/* Nexus Project — unified black/orange visual theme.
   Loaded after page-specific styles so every section shares one palette. */

:root {
  --nexus-orange: #fb474b;
  --nexus-orange-bright: #fb474b;
  --nexus-orange-deep: #fb474b;
  --nexus-orange-soft: rgba(251, 71, 75, 0.14);
  --nexus-bg: #1b1d24;
  --nexus-surface: #1b1d24;
  --nexus-surface-raised: #1b1d24;
  --nexus-border: rgba(251, 71, 75, 0.22);
  --nexus-text: #ffffff;
  --nexus-muted: #9297a3;

  /* Existing components consume these legacy variables. */
  --bg: var(--nexus-bg) !important;
  --bg-soft: #1b1d24 !important;
  --panel: rgba(27, 29, 36, 0.94) !important;
  --panel-solid: #1b1d24 !important;
  --panel-light: #1b1d24 !important;
  --line: rgba(251, 71, 75, 0.16) !important;
  --line-strong: rgba(251, 71, 75, 0.4) !important;
  --text: var(--nexus-text) !important;
  --muted: var(--nexus-muted) !important;
  --blue: var(--nexus-orange) !important;
  --blue-2: var(--nexus-orange-bright) !important;
  --cyan: var(--nexus-orange-bright) !important;
  --violet: #fb474b !important;
  --coin-blue: var(--nexus-orange) !important;
  --coin-blue2: var(--nexus-orange-deep) !important;
  --coin-card: rgba(27, 29, 36, 0.94) !important;
  --coin-border: var(--nexus-border) !important;
}

html,
body {
  min-height: 100%;
  background: var(--nexus-bg) !important;
  color: var(--nexus-text) !important;
  color-scheme: dark;
}

body,
.market-body,
.coin-shop-page,
.cases-page,
.activity-page,
.cabinet-page,
.archive-page,
.support-page,
.admin-page,
.market-page {
  background-image:
    radial-gradient(circle at 82% 0, rgba(251, 71, 75, 0.15), transparent 34%),
    radial-gradient(circle at 8% 55%, rgba(251, 71, 75, 0.055), transparent 30%),
    linear-gradient(180deg, #1b1d24, #1b1d24) !important;
  background-color: var(--nexus-bg) !important;
}

body::before {
  background-image:
    linear-gradient(rgba(251, 71, 75, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251, 71, 75, 0.035) 1px, transparent 1px) !important;
}

::selection {
  background: rgba(251, 71, 75, 0.42);
  color: #ffffff;
}

::-webkit-scrollbar-track { background: #1b1d24; }
::-webkit-scrollbar-thumb {
  background: #fb474b;
  border: 2px solid #1b1d24;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--nexus-orange); }

a { color: var(--nexus-orange-bright); }
a:hover { color: #fb474b; }

/* Header, footer and navigation */
.site-header,
.unified-header,
.cabinet-header,
.archive-header {
  border-color: var(--nexus-border) !important;
  background: rgba(27, 29, 36, 0.95) !important;
  box-shadow: 0 14px 38px rgba(27, 29, 36, 0.42) !important;
}

.site-footer,
.unified-footer,
.footer {
  border-color: var(--nexus-border) !important;
  background: #1b1d24 !important;
}

.main-nav a:hover,
.main-nav a.active,
.unified-nav > a:hover,
.unified-nav > a.active,
.archive-nav a:hover,
.archive-nav a.active,
.side-menu a:hover,
.side-menu a.active {
  background: var(--nexus-orange-soft) !important;
  color: var(--nexus-orange-bright) !important;
}

.brand-mark,
.brand-logo {
  border-color: rgba(251, 71, 75, 0.7) !important;
  filter: drop-shadow(0 0 15px rgba(251, 71, 75, 0.25)) !important;
}

/* Hero blocks */
:is(
  .hero,
  .coin-hero,
  .cases-hero,
  .market-hero,
  .activity-hero,
  .history-hero,
  .legal-hero,
  .cash-intro,
  .login-showcase,
  .support-intro,
  .archive-heading,
  .dashboard-heading
) {
  border-color: var(--nexus-border) !important;
  background:
    radial-gradient(circle at 90% 8%, rgba(251, 71, 75, 0.18), transparent 38%),
    linear-gradient(135deg, #1b1d24, #1b1d24) !important;
}

/* Cards, panels and modal surfaces */
:is(
  .panel,
  .server-card,
  .catalog-card,
  .purchase-card,
  .patron-card,
  .promo-panel,
  .mega-card,
  .community-card,
  .home-case-feature,
  .home-store-promo,
  .home-activity-feature,
  .buyers-section-wide,
  .coin-form-card,
  .role-preview-card,
  .coin-orders-card,
  .coin-shop-selectors,
  .coin-balance-card,
  .server-product-card,
  .market-panel,
  .market-card,
  .market-sidebar,
  .market-toolbar,
  .cases-stats,
  .case-opening,
  .roulette-card,
  .case-inventory-dialog,
  .activity-calendar,
  .activity-overview,
  .activity-rules,
  .activity-inventory-dialog,
  .dashboard-panel,
  .identity-card,
  .security-card,
  .cabinet-login-card,
  .cash-balance-card,
  .cash-payment-card,
  .history-card,
  .legal-document,
  .archive-toolbar,
  .demo-card,
  .top-card,
  .support-login,
  .ticket-sidebar,
  .ticket-chat,
  .ticket-message,
  .moderation-toolbar,
  .moderation-card,
  .moderation-note,
  .moderation-dialog,
  .admin-sidebar,
  .admin-content,
  .admin-table-wrap,
  .purchase-modal-dialog,
  .cabinet-modal
) {
  border-color: var(--nexus-border) !important;
  background: linear-gradient(145deg, var(--nexus-surface-raised), #1b1d24) !important;
  box-shadow: 0 20px 55px rgba(27, 29, 36, 0.34) !important;
}

/* Form controls */
body :is(input, select, textarea, .market-search, .archive-filter, .demo-search, .moderation-search, .admin-search) {
  border-color: var(--nexus-border) !important;
  background: #1b1d24 !important;
  color: #ffffff !important;
}

body :is(input, select, textarea):focus {
  border-color: var(--nexus-orange) !important;
  box-shadow: 0 0 0 3px rgba(251, 71, 75, 0.14) !important;
  outline: 0 !important;
}

/* Primary actions */
body :is(
  .btn-primary,
  .buy-button,
  .coin-buy,
  .case-open-button,
  .activity-claim,
  .cash-submit,
  .login-submit,
  .primary-button,
  .home-case-button,
  .home-store-button,
  .home-activity-button,
  .demo-download,
  .market-card button:not(.cancel),
  .market-transfer-submit,
  .market-create-submit,
  .moderation-save,
  .ticket-reply button,
  .ticket-create-form button,
  .admin-action:not(.danger)
) {
  border-color: #fb474b !important;
  background: linear-gradient(110deg, var(--nexus-orange-bright), var(--nexus-orange-deep)) !important;
  color: #1b1d24 !important;
  box-shadow: 0 10px 28px rgba(251, 71, 75, 0.26) !important;
}

body :is(
  .btn-primary,
  .buy-button,
  .coin-buy,
  .case-open-button,
  .activity-claim,
  .cash-submit,
  .login-submit,
  .primary-button,
  .home-case-button,
  .home-store-button,
  .home-activity-button,
  .demo-download,
  .market-card button:not(.cancel)
):hover {
  filter: brightness(1.09) !important;
  transform: translateY(-1px);
  box-shadow: 0 13px 32px rgba(251, 71, 75, 0.34) !important;
}

body :is(.btn-ghost, .copy-button, .archive-pagination button, .coin-orders-head button, .server-product-card button) {
  border-color: var(--nexus-border) !important;
  background: var(--nexus-orange-soft) !important;
  color: var(--nexus-orange-bright) !important;
}

/* Tabs, filters and selected states */
body :is(
  .catalog-tabs,
  .market-tabs,
  .moderation-tabs,
  .profile-achievements-tabs,
  .profile-statistics-tabs,
  .coin-categories,
  .duration-grid,
  .cash-presets
) button.active,
body :is(.duration.active, .catalog-picker-card.selected, .market-category.active) {
  border-color: var(--nexus-orange) !important;
  background: var(--nexus-orange-soft) !important;
  color: var(--nexus-orange-bright) !important;
  box-shadow: inset 0 0 0 1px rgba(251, 71, 75, 0.18) !important;
}

/* Accent text and badges */
body :is(
  .eyebrow,
  [class*="-kicker"],
  [class*="-label"],
  .market-price strong,
  .market-card-badge,
  .market-card-price,
  .market-card-server,
  .market-category,
  .coin-balance-card strong,
  .coin-order-status,
  .cash-balance-card strong,
  .dashboard-stats strong,
  .history-counter strong,
  .activity-total strong,
  .activity-message,
  .case-message,
  .archive-count,
  .top-value
) {
  color: var(--nexus-orange-bright) !important;
}

body :is(
  .server-chip,
  .tag,
  .sale-badge,
  .live-pill,
  .discord-badge,
  .market-card-badge,
  .market-card-server,
  .market-category,
  .moderation-badge,
  .catalog-kind,
  .case-note
) {
  border-color: var(--nexus-border) !important;
  background: var(--nexus-orange-soft) !important;
}

/* LavkaCoins and market-specific blue/yellow remnants */
.coin-hero::after,
.market-hero::after {
  background: rgba(251, 71, 75, 0.1) !important;
}

.coin-section-title > span,
.discord-avatar,
.activity-day.current,
.title-icon,
.server-mini {
  background: linear-gradient(135deg, var(--nexus-orange-bright), var(--nexus-orange-deep)) !important;
  color: #1b1d24 !important;
}

.coin-categories button,
.duration,
.discord-preview,
.role-pill,
.coin-order,
.coin-flow,
.coin-inventory-note,
.coin-destination,
.market-tabs button,
.market-toolbar select,
.market-sell-form input {
  border-color: var(--nexus-border) !important;
  background: #1b1d24 !important;
}

.coin-categories button.active,
.duration.active,
.market-tabs button.active {
  background: linear-gradient(110deg, var(--nexus-orange-bright), var(--nexus-orange-deep)) !important;
  color: #1b1d24 !important;
}

.market-card .type,
.coin-flow b,
.coin-selectors-title span,
.coin-destination b,
.coin-inventory-note a,
.target-choice em,
.market-seller small {
  color: var(--nexus-orange-bright) !important;
}

/* Preserve destructive and status meaning while keeping it in-theme. */
body :is(.danger, .market-card button.cancel, .moderation-remove, .logout-button, .ticket-close-button) {
  border-color: rgba(251, 71, 75, 0.3) !important;
  background: rgba(251, 71, 75, 0.11) !important;
  color: #fb474b !important;
  box-shadow: none !important;
}

.nexus-mobile-dock,
.nexus-mobile-menu {
  border-color: var(--nexus-border) !important;
  background: rgba(27, 29, 36, 0.97) !important;
}

.nexus-mobile-dock-main {
  border-color: #fb474b !important;
  background: linear-gradient(145deg, var(--nexus-orange-bright), var(--nexus-orange-deep)) !important;
  color: #1b1d24 !important;
  box-shadow: 0 9px 24px rgba(251, 71, 75, 0.34) !important;
}

.nexus-mobile-dock-item.active,
.nexus-mobile-dock-item:hover,
.nexus-mobile-menu a:hover,
.nexus-mobile-menu a.active {
  color: var(--nexus-orange-bright) !important;
}

.cookie-banner {
  border-color: var(--nexus-border) !important;
  background: #1b1d24 !important;
}

.page-transition { background: #1b1d24 !important; }
.page-transition-orbit,
.page-transition-core {
  border-color: var(--nexus-orange) !important;
  box-shadow: 0 0 24px rgba(251, 71, 75, 0.34) !important;
}

/* Remove the last hard-coded blue accents from the legacy landing page. */
.hero h1 em {
  -webkit-text-stroke-color: rgba(251, 71, 75, 0.88) !important;
  text-shadow: 0 0 30px rgba(251, 71, 75, 0.22) !important;
}

.hero-grid {
  background: radial-gradient(circle, rgba(251, 71, 75, 0.14), transparent 61%) !important;
}

.hero-grid::before,
.orbit {
  border-color: rgba(251, 71, 75, 0.2) !important;
  box-shadow: 0 0 60px rgba(251, 71, 75, 0.1) !important;
}

.nexus-core {
  background: linear-gradient(145deg, rgba(251, 71, 75, 0.5), rgba(27, 29, 36, 0.94) 65%) !important;
  box-shadow: 0 0 100px rgba(251, 71, 75, 0.25) !important;
}

.nexus-core::after,
.server-strip,
.server-card {
  background: #1b1d24 !important;
}

.server-icon,
.server-icon.surf,
.server-icon.jail,
.avatar,
.cabinet-header-avatar {
  border-color: var(--nexus-border) !important;
  background: var(--nexus-orange-soft) !important;
  color: var(--nexus-orange-bright) !important;
}

.cookie-banner a {
  color: var(--nexus-orange-bright) !important;
}

.cookie-choice,
.cookie-choice.accept {
  border-color: #fb474b !important;
  background: linear-gradient(110deg, var(--nexus-orange-bright), var(--nexus-orange-deep)) !important;
  color: #1b1d24 !important;
}

.cookie-choice:first-child {
  border-color: var(--nexus-border) !important;
  background: var(--nexus-orange-soft) !important;
  color: var(--nexus-orange-bright) !important;
}

/* Store catalogue */
.market-hero-copy > span,
.market-sidebar-title small,
.market-result-head small,
.market-search > span,
.market-card-price b,
.market-card-media > span {
  color: var(--nexus-orange-bright) !important;
}

.market-help-grid article {
  border-color: var(--nexus-border) !important;
  background: #1b1d24 !important;
}

.market-help-grid article > b {
  background: linear-gradient(135deg, var(--nexus-orange-bright), var(--nexus-orange-deep)) !important;
  color: #1b1d24 !important;
}

.market-category.active {
  border-color: var(--nexus-orange) !important;
  background: linear-gradient(110deg, var(--nexus-orange-bright), var(--nexus-orange-deep)) !important;
  color: #1b1d24 !important;
}

.market-category.active b {
  background: rgba(27, 29, 36, 0.82) !important;
  color: var(--nexus-orange-bright) !important;
}

.market-card:hover {
  border-color: rgba(251, 71, 75, 0.52) !important;
  box-shadow: 0 20px 48px rgba(27, 29, 36, 0.34), 0 0 28px rgba(251, 71, 75, 0.1) !important;
}

.market-card-media {
  background: radial-gradient(circle, rgba(251, 71, 75, 0.14), transparent 65%), #1b1d24 !important;
}

/* Homepage feature blocks */
:is(.home-case-feature, .home-activity-feature, .home-store-promo) {
  border-color: var(--nexus-border) !important;
  background:
    radial-gradient(circle at 82% 42%, rgba(251, 71, 75, 0.15), transparent 36%),
    linear-gradient(145deg, #1b1d24, #1b1d24 72%) !important;
}

:is(.home-case-feature, .home-activity-feature, .home-store-promo)::before {
  background-image:
    linear-gradient(rgba(251, 71, 75, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251, 71, 75, 0.04) 1px, transparent 1px) !important;
}

:is(.home-case-feature, .home-activity-feature, .home-store-promo)::after {
  background: rgba(251, 71, 75, 0.11) !important;
}

:is(.home-case-label, .home-activity-label, .home-store-label),
:is(.home-case-steps, .home-activity-points, .home-store-features) b,
:is(.home-case-steps, .home-activity-points, .home-store-features) i {
  color: var(--nexus-orange-bright) !important;
}

:is(.home-case-label, .home-activity-label, .home-store-label)::before {
  background: var(--nexus-orange-bright) !important;
  box-shadow: 0 0 10px rgba(251, 71, 75, 0.55) !important;
}

.home-case-copy h2 em,
.home-store-copy h2 em {
  -webkit-text-stroke-color: var(--nexus-orange-bright) !important;
  text-shadow: 0 0 20px rgba(251, 71, 75, 0.16) !important;
}

.home-activity-copy h2 em {
  background: linear-gradient(100deg, var(--nexus-orange-bright), var(--nexus-orange-deep)) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
}

:is(.home-case-steps span, .home-activity-points span, .home-store-features span) {
  border-color: var(--nexus-border) !important;
  background: #1b1d24 !important;
}

.home-activity-core,
.home-activity-token,
.home-store-product,
.home-store-badge,
.home-case-web-track span {
  border-color: var(--nexus-border) !important;
  background: linear-gradient(145deg, #1b1d24, #1b1d24) !important;
  box-shadow: 0 15px 34px rgba(27, 29, 36, 0.4) !important;
}

.home-activity-ring,
.home-store-orbit,
.home-store-orbit::before,
.home-store-orbit::after {
  border-color: var(--nexus-border) !important;
}

.home-activity-core small,
.home-activity-token,
.home-store-badge b,
.home-store-product span,
.home-case-web-track b {
  color: var(--nexus-orange-bright) !important;
}

/* Recolour the small navigation pictograms exported with the former cyan palette. */
:is(
  .nexus-nav-icon,
  .dock-icon,
  .nexus-mobile-avatar-fallback,
  .nexus-mobile-discord img
) {
  filter:
    brightness(0)
    saturate(100%)
    invert(58%)
    sepia(96%)
    saturate(3180%)
    hue-rotate(359deg)
    brightness(101%)
    contrast(104%)
    drop-shadow(0 0 12px rgba(251, 71, 75, 0.22)) !important;
}

/* Clean, roomy first screen: no rectangular plate behind the atom. */
.hero {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.hero-visual {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.hero-copy {
  min-width: 0;
}

@media (min-width: 981px) {
  .hero {
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr) !important;
    gap: 24px !important;
  }

  .hero-copy {
    max-width: 760px;
  }
}

@media (min-width: 821px) and (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero-visual {
    min-height: 360px !important;
    margin-top: -24px !important;
  }
}

/* Keep the real Nexus mark visible in every shared header and footer. */
.brand-mark {
  transform: none !important;
  clip-path: none !important;
  border: 1px solid rgba(251, 71, 75, 0.3) !important;
  border-radius: 50% !important;
  background: #1b1d24 url("/assets/nexus-icon-orange.png?v=20261020orange5") center / cover no-repeat !important;
  box-shadow: 0 0 24px rgba(251, 71, 75, 0.28) !important;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark i {
  display: none !important;
}

/* Information headers stay dark; orange is an accent, never the whole plate. */
:is(
  .coin-hero,
  .cases-hero,
  .market-hero,
  .activity-hero,
  .history-hero,
  .legal-hero,
  .cash-intro,
  .login-showcase,
  .support-intro,
  .archive-heading,
  .dashboard-heading
) {
  background:
    radial-gradient(circle at 92% 0, rgba(251, 71, 75, 0.1), transparent 34%),
    linear-gradient(145deg, #1b1d24, #1b1d24 72%) !important;
  box-shadow: 0 24px 70px rgba(27, 29, 36, 0.38) !important;
}

/* Every clickable button uses readable white copy on the orange palette. */
:is(
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  .btn,
  .demo-download,
  a[class*="button"]
) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

:is(button, .btn, .demo-download, a[class*="button"]) :is(span, b, strong, small, i) {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}

@media (max-width: 760px) {
  body,
  .market-body,
  .coin-shop-page {
    background-image: linear-gradient(180deg, #1b1d24, #1b1d24) !important;
  }
}

/* Nexus slate/red palette — exact project colors. */
:root {
  --nexus-bg: #1b1d24;
  --nexus-bg-elevated: #242731;
  --nexus-surface: #242731;
  --nexus-surface-soft: #242731;
  --nexus-border: #343844;
  --nexus-border-strong: #454a58;
  --nexus-orange: #fb474b;
  --nexus-orange-bright: #fb474b;
  --nexus-orange-deep: #fb474b;
  --nexus-orange-soft: rgba(251, 71, 75, 0.15);
  --nexus-text: #fff;
  --nexus-muted: #9297a3;
  --bg: #1b1d24;
  --bg-soft: #242731;
  --panel: #242731;
  --panel-solid: #242731;
  --panel-light: #242731;
  --text: #fff;
  --muted: #9297a3;
  --line: #343844;
  --line-strong: #454a58;
  --blue: #fb474b;
  --blue-2: #fb474b;
  --cyan: #fb474b;
  --violet: #fb474b;
  --coin-accent: #fb474b;
  --coin-accent-soft: rgba(251, 71, 75, 0.15);
}

html,
body,
:is(.market-body, .coin-shop-page, .archive-page, .moderation-page, .support-page, .profile-page, .admin-page) {
  background: #1b1d24 !important;
  color: #9297a3 !important;
}

body::before {
  background-image:
    linear-gradient(rgba(118, 122, 132, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(118, 122, 132, 0.035) 1px, transparent 1px) !important;
}

:is(.ambient, .ambient-one, .ambient-two) {
  background: rgba(251, 71, 75, 0.08) !important;
}

:is(
  .site-header,
  .unified-header,
  .cabinet-header,
  .archive-header,
  .moderation-header,
  .site-footer,
  .unified-footer,
  .nexus-mobile-dock,
  .nexus-mobile-menu
) {
  background: #1b1d24 !important;
  border-color: #343844 !important;
}

:is(
  .panel,
  .server-card,
  .catalog-card,
  .purchase-card,
  .patron-card,
  .promo-panel,
  .mega-card,
  .community-card,
  .home-case-feature,
  .home-store-promo,
  .home-activity-feature,
  .buyers-section-wide,
  .coin-form-card,
  .role-preview-card,
  .coin-orders-card,
  .case-card,
  .activity-card,
  .market-panel,
  .market-card,
  .market-hero,
  .coin-hero,
  .cases-hero,
  .activity-hero,
  .history-hero,
  .legal-hero,
  .cash-intro,
  .login-showcase,
  .login-panel,
  .support-intro,
  .archive-heading,
  .dashboard-heading,
  .demo-card,
  .moderation-card,
  .profile-card,
  .support-card,
  .ticket-card,
  .cookie-banner,
  .purchase-modal-dialog,
  .error-card,
  .catalog-picker,
  .market-balance,
  .server-strip,
  .live-strip
) {
  background: #242731 !important;
  border-color: #343844 !important;
  box-shadow: 0 20px 55px rgba(27, 29, 36, 0.34) !important;
}

:is(
  input:not([type="color"]),
  textarea,
  select,
  .market-sell-form input,
  .search-input
) {
  background: #1b1d24 !important;
  border-color: #454a58 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

::placeholder {
  color: #9297a3 !important;
  opacity: 1 !important;
}

:is(h1, h2, h3, h4, h5, h6, .brand-copy b, strong, .market-card h3, .market-toolbar h2) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

:is(p, small, label, .muted, .market-card p, .market-price small, .hero-copy > p, .market-hero p, .market-toolbar p) {
  color: #9297a3 !important;
}

:is(.eyebrow, .market-kicker, .coin-kicker, .cabinet-kicker, .archive-heading small, .home-case-label, .home-activity-label, .home-store-label) {
  color: #9297a3 !important;
  -webkit-text-fill-color: #9297a3 !important;
}

.hero h1 em,
.home-case-copy h2 em,
.home-store-copy h2 em {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  -webkit-text-stroke-color: #9297a3 !important;
  text-shadow: none !important;
}

:is(
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  .btn,
  .demo-download,
  .buy-button,
  .coin-buy,
  a[class*="button"]
) {
  background: #fb474b !important;
  border-color: #fb474b !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: none !important;
}

:is(button, .btn, .demo-download, .buy-button, .coin-buy, a[class*="button"]) :is(span, b, strong, small, i) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

:is(button, .btn, .demo-download, .buy-button, .coin-buy, a[class*="button"]):hover {
  background: #fb474b !important;
  border-color: #fb474b !important;
  filter: brightness(1.08);
}

:is(button, .btn, .demo-download, .buy-button, .coin-buy, a[class*="button"]):disabled {
  background: #fb474b !important;
  color: #fff !important;
  opacity: 0.48;
}

:is(a, .unified-nav > a, .site-nav a, .archive-nav a, .footer-links a) {
  color: #fff;
}

:is(.unified-nav > a.active, .unified-nav > a:hover, .site-nav a.active, .site-nav a:hover) {
  background: rgba(251, 71, 75, 0.15) !important;
  color: #fff !important;
}

:is(.brand-mark, .nexus-core span, .mega-art b, .nexus-transition-logo img) {
  filter: hue-rotate(325deg) saturate(1.3) contrast(1.04) !important;
}

::selection {
  background: #fb474b !important;
  color: #fff !important;
}

::-webkit-scrollbar-track {
  background: #1b1d24 !important;
}

::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb:hover {
  background: #fb474b !important;
  border-color: #1b1d24 !important;
}

/* Exact-value enforcement for legacy selectors with higher specificity. */
body::before {
  background: none !important;
}

body :is(.ambient, .ambient-one, .ambient-two) {
  display: none !important;
}

body :is(
  .panel,
  .server-card,
  .catalog-card,
  .purchase-card,
  .patron-card,
  .promo-panel,
  .mega-card,
  .community-card,
  .home-case-feature,
  .home-store-promo,
  .home-activity-feature,
  .buyers-section-wide,
  .coin-form-card,
  .role-preview-card,
  .coin-orders-card,
  .case-card,
  .activity-card,
  .market-panel,
  .market-card,
  .market-hero,
  .coin-hero,
  .cases-hero,
  .activity-hero,
  .history-hero,
  .legal-hero,
  .cash-intro,
  .login-showcase,
  .login-panel,
  .support-intro,
  .archive-heading,
  .dashboard-heading,
  .demo-card,
  .moderation-card,
  .profile-card,
  .support-card,
  .ticket-card,
  .ticket-sidebar,
  .ticket-chat,
  .cookie-banner,
  .purchase-modal-dialog,
  .error-card,
  .catalog-picker,
  .market-balance,
  .server-strip,
  .live-strip
):not(#nexus-panel-palette-exempt) {
  background: #242731 !important;
  background-image: none !important;
  border-color: #343844 !important;
}

body :is(
  .market-hero,
  .coin-hero,
  .cases-hero,
  .activity-hero,
  .history-hero,
  .legal-hero,
  .cash-intro,
  .login-showcase,
  .support-intro,
  .archive-heading,
  .dashboard-heading
)::before {
  background: none !important;
  background-image: none !important;
}

body :is(
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  .btn,
  .demo-download,
  .buy-button,
  .coin-buy,
  .coin-hero-actions a,
  a[class*="button"],
  a[class*="btn"]
):not(#nexus-button-palette-exempt) {
  background: #fb474b !important;
  background-color: #fb474b !important;
  background-image: none !important;
  border-color: #fb474b !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  opacity: 1;
}

body :is(
  button,
  .btn,
  .demo-download,
  .buy-button,
  .coin-buy,
  .coin-hero-actions a,
  a[class*="button"],
  a[class*="btn"]
):not(#nexus-button-palette-exempt) * {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

body :is(
  p,
  small,
  label,
  .muted,
  [class*="kicker"],
  [class*="label"],
  .market-hero-copy > span,
  .market-card .type,
  .market-card-badge,
  .market-card-price small,
  .market-card-server
):not(#nexus-muted-palette-exempt) {
  color: #9297a3 !important;
  -webkit-text-fill-color: #9297a3 !important;
}

body :is(h1, h2, h3, h4, h5, h6, strong, .brand-copy b):not(#nexus-heading-palette-exempt),
body a:not(#nexus-link-palette-exempt) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

body :is(.nexus-nav-icon, .dock-icon, .nexus-mobile-avatar-fallback, .nexus-mobile-discord img) {
  filter:
    brightness(0)
    saturate(100%)
    invert(42%)
    sepia(97%)
    saturate(2386%)
    hue-rotate(329deg)
    brightness(103%)
    contrast(97%) !important;
}

body:not(#nexus-background-palette-exempt) {
  background: #1b1d24 !important;
  background-color: #1b1d24 !important;
  background-image: none !important;
}

body :is(.market-sidebar, .server-chip, .market-help-grid article):not(#nexus-small-panel-palette-exempt) {
  background: #242731 !important;
  background-image: none !important;
  border-color: #343844 !important;
}

body :is(button, input[type="button"], input[type="submit"], input[type="reset"]):disabled {
  opacity: 0.48 !important;
}

/* The footer cat is an interactive decoration, not a visual CTA button. */
body button.nexus-footer-cat:not(#nexus-footer-cat-palette-anchor),
body button.nexus-footer-cat:not(#nexus-footer-cat-palette-anchor):hover,
body button.nexus-footer-cat:not(#nexus-footer-cat-palette-anchor):active {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Consistent rounded and padded description headers across inner pages. */
body :is(
  .coin-hero,
  .cases-hero,
  .market-hero,
  .activity-hero,
  .history-hero,
  .legal-hero,
  .cash-intro,
  .login-showcase,
  .support-intro,
  .archive-heading,
  .dashboard-heading
):not(#nexus-description-panel-exempt) {
  box-sizing: border-box !important;
  padding: clamp(26px, 3.25vw, 44px) !important;
  overflow: hidden;
  border: 1px solid #343844 !important;
  border-radius: 24px !important;
}

@media (max-width: 680px) {
  body :is(
    .coin-hero,
    .cases-hero,
    .market-hero,
    .activity-hero,
    .history-hero,
    .legal-hero,
    .cash-intro,
    .login-showcase,
    .support-intro,
    .archive-heading,
    .dashboard-heading
  ):not(#nexus-description-panel-exempt) {
    padding: 20px 16px !important;
    border-radius: 18px !important;
  }
}

/* Readability and component corrections requested for the slate/red palette. */
:root {
  --nexus-muted: #9297a3;
  --muted: #9297a3 !important;
  --muted-2: #9297a3 !important;
}

/* All outlined heading accents use the same solid red as primary buttons. */
body :is(h1, h2, h3, h4, h5, h6) em:not(#nexus-heading-accent-exempt) {
  color: #fb474b !important;
  -webkit-text-fill-color: #fb474b !important;
  -webkit-text-stroke: 0 !important;
  background: none !important;
  text-shadow: 0 0 24px rgba(251, 71, 75, 0.2) !important;
}

/* Store filters are neutral blocks; red is reserved for selection borders. */
body button.market-category:not(#nexus-market-category-anchor),
body button.market-category:not(#nexus-market-category-anchor):hover,
body button.market-category:not(#nexus-market-category-anchor):active {
  background: #242731 !important;
  background-color: #242731 !important;
  background-image: none !important;
  border-color: #343844 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: none !important;
}

body button.market-category.active:not(#nexus-market-category-anchor) {
  border-color: #fb474b !important;
  box-shadow: inset 0 0 0 1px rgba(251, 71, 75, 0.22) !important;
}

body button.market-category:not(#nexus-market-category-anchor) b {
  background: #1b1d24 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

body .market-search input:not(#nexus-market-search-anchor),
body .market-toolbar select:not(#nexus-market-search-anchor) {
  background: #242731 !important;
  background-color: #242731 !important;
  border-color: #343844 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

body .market-card-server:not(#nexus-market-server-anchor) {
  display: block;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  color: #9297a3 !important;
  -webkit-text-fill-color: #9297a3 !important;
}

body .market-card-bottom:not(#nexus-market-card-bottom-anchor) {
  border-top-color: #343844 !important;
}

/* Server names and their captions stay fully legible. */
body .server-chip :is(span, small):not(#nexus-server-chip-copy-anchor) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Punishment filters and records use neutral blocks with clear white data. */
body .moderation-tabs button:not(#nexus-moderation-filter-anchor),
body .archive-filters button.archive-filter:not(#nexus-moderation-filter-anchor) {
  background: #242731 !important;
  background-color: #242731 !important;
  background-image: none !important;
  border-color: #343844 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: none !important;
}

body .moderation-tabs button.active:not(#nexus-moderation-filter-anchor),
body .archive-filters button.archive-filter.active:not(#nexus-moderation-filter-anchor) {
  border-color: #fb474b !important;
  box-shadow: inset 0 0 0 1px rgba(251, 71, 75, 0.2) !important;
}

body .moderation-tabs,
body .archive-filters,
body .moderation-list {
  gap: 14px !important;
}

body .moderation-card:not(#nexus-moderation-card-anchor) {
  background: #242731 !important;
  background-color: #242731 !important;
  background-image: none !important;
  border-color: #343844 !important;
}

body .moderation-badge:not(#nexus-moderation-badge-anchor),
body .moderation-badge.off:not(#nexus-moderation-badge-anchor),
body .moderation-note:not(#nexus-moderation-note-anchor) {
  background: #242731 !important;
  background-color: #242731 !important;
  background-image: none !important;
  border: 1px solid #343844 !important;
  box-shadow: none !important;
}

body .moderation-badge.off:not(#nexus-moderation-badge-anchor) {
  color: #9297a3 !important;
  -webkit-text-fill-color: #9297a3 !important;
}

body .moderation-card :is(
  .moderation-player b,
  .moderation-player code,
  .moderation-meta small,
  .moderation-meta b,
  .moderation-reason small,
  .moderation-reason b
):not(#nexus-moderation-copy-anchor),
body .archive-count:not(#nexus-moderation-copy-anchor) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Buyers heading and rows form one rounded block instead of nested plates. */
body .buyers-section-wide:not(#nexus-buyers-panel-anchor) {
  margin-top: 32px !important;
  margin-bottom: 32px !important;
  padding: 28px !important;
  overflow: hidden;
  border: 1px solid #343844 !important;
  border-radius: 24px !important;
  background: #242731 !important;
  background-image: none !important;
}

body .buyers-section-wide .section-heading {
  margin: 0 0 18px !important;
  padding: 0 !important;
}

body .buyers-section-wide .buyers-table:not(#nexus-buyers-table-anchor) {
  overflow: hidden;
  border: 0 !important;
  border-radius: 14px !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

body .buyers-section-wide .live-pill:not(#nexus-buyers-live-anchor) {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: none !important;
}

body .buyers-section-wide .table-row {
  position: relative;
  line-height: 1.45;
}

/* Activity milestone: red numbers, white explanatory copy. */
body .home-activity-title-number:not(#nexus-activity-title-anchor),
body .home-activity-core :is(b, small):not(#nexus-activity-core-anchor),
body .home-activity-points b:not(#nexus-activity-number-anchor) {
  color: #fb474b !important;
  -webkit-text-fill-color: #fb474b !important;
}

body .home-activity-points span:not(#nexus-activity-copy-anchor) {
  background: #242731 !important;
  background-color: #242731 !important;
  border-color: #343844 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Numeric values in the personal cabinet are white, not accent red. */
body.cabinet-page :is(
  .dashboard-stats b,
  .identity-meta b,
  .profile-statistics-group dd,
  .profile-achievement-status,
  #rublesBalance,
  #coinsBalance,
  #playtimeValue,
  #profileId
):not(#nexus-profile-number-anchor) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

@media (max-width: 620px) {
  body .buyers-section-wide:not(#nexus-buyers-panel-anchor) {
    padding: 18px 14px !important;
    border-radius: 18px !important;
  }
}

/* Purchase details stay readable on both the home feed and full history. */
body .buyers-section-wide .table-row:not(.table-head) :is(
  .purchase-cell .tag,
  .purchase-kind-cell
),
body.cabinet-page .purchase-history-row:not(.purchase-history-head) :is(
  .purchase-cell,
  .purchase-kind-cell,
  .history-expiry
) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Profile surfaces use the requested slate cards without red-tinted fills. */
body.cabinet-page #dashboard :is(
  .dashboard-panel,
  .dashboard-stats article,
  .identity-meta > div,
  .dashboard-privilege,
  .profile-achievements-tabs,
  .profile-statistics-tabs,
  .profile-achievements-summary,
  .profile-achievement,
  .profile-achievement.completed,
  .profile-statistics-group,
  .profile-achievement-status
) {
  border-color: #343844 !important;
  background: #242731 !important;
  background-image: none !important;
}

body.cabinet-page #dashboard :is(
  .dashboard-heading p,
  .identity-card > p,
  .identity-meta span,
  .security-card p,
  .dashboard-stats span,
  .dashboard-stats b,
  .dashboard-stats small,
  .dashboard-panel-head small,
  .dashboard-privilege b,
  .dashboard-privilege small,
  .dashboard-privilege mark,
  .dashboard-empty,
  .profile-statistics-toggle small,
  .profile-statistics-toggle-action,
  .profile-achievements-head p,
  .profile-achievements-summary,
  .profile-achievement h3,
  .profile-achievement p,
  .profile-achievement-status,
  .profile-achievement-footer b,
  .profile-achievement-footer span,
  .profile-statistics-group h3,
  .profile-statistics-group dt,
  .profile-statistics-group dd,
  .profile-statistics-updated
) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

body.cabinet-page #dashboard :is(.profile-achievements-tabs, .profile-statistics-tabs) button {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

body.cabinet-page #dashboard :is(.profile-achievements-tabs, .profile-statistics-tabs) button.active {
  border-color: #fb474b !important;
  background: #fb474b !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Case catalog entries are content blocks, not red action buttons. */
body.cases-page button.case-catalog-card,
body.cases-page button.case-catalog-card:hover,
body.cases-page button.case-catalog-card:focus,
body.cases-page button.case-catalog-card:active {
  background: #242731 !important;
  background-color: #242731 !important;
  background-image: none !important;
  border-color: #343844 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: 0 16px 45px rgba(27, 29, 36, 0.28) !important;
}

body.cases-page button.case-catalog-card.active {
  border-color: #454a58 !important;
  box-shadow: 0 0 0 1px #343844, 0 18px 50px rgba(27, 29, 36, 0.34) !important;
}

body.cases-page button.case-catalog-card .case-card-body small,
body.cases-page button.case-catalog-card .case-card-body > span {
  color: #767a84 !important;
  -webkit-text-fill-color: #767a84 !important;
}

body.cases-page button.case-catalog-card .case-card-body strong,
body.cases-page button.case-catalog-card .case-card-price {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
