/* Site theme overrides — html[data-site-theme="…"] */

html[data-site-theme='crimson-signal'] {
  --bg: #140c0e;
  --bg-elevated: #1c1216;
  --bg-card: #241418;
  --border: #3a2228;
  --text: #f2e8ea;
  --text-muted: #b08a92;
  --accent: #e04b4b;
  --accent-dim: #9a3030;
  --body-glow: rgba(224, 75, 75, 0.12);
  --body-gradient-from: #140c0e;
  --body-gradient-to: #1c1216;
  --scrollbar-thumb-hover: rgba(224, 75, 75, 0.55);
  --scrollbar-thumb-active: rgba(224, 75, 75, 0.72);
}

html[data-site-theme='arctic-steel'] {
  --bg: #0b1118;
  --bg-elevated: #121a24;
  --bg-card: #15202c;
  --border: #243444;
  --text: #e8f2ff;
  --text-muted: #8aa3bf;
  --accent: #6eb6ff;
  --accent-dim: #3d7fbf;
  --body-glow: rgba(110, 182, 255, 0.12);
  --body-gradient-from: #0b1118;
  --body-gradient-to: #121a24;
  --scrollbar-thumb-hover: rgba(110, 182, 255, 0.55);
  --scrollbar-thumb-active: rgba(110, 182, 255, 0.72);
}

html[data-site-theme='forest-ghost'] {
  --bg: #0c1210;
  --bg-elevated: #121a16;
  --bg-card: #162019;
  --border: #243028;
  --text: #e6f2ea;
  --text-muted: #8aa898;
  --accent: #5fbf82;
  --accent-dim: #3a8058;
  --body-glow: rgba(95, 191, 130, 0.12);
  --body-gradient-from: #0c1210;
  --body-gradient-to: #121a16;
  --scrollbar-thumb-hover: rgba(95, 191, 130, 0.55);
  --scrollbar-thumb-active: rgba(95, 191, 130, 0.72);
}

html[data-site-theme='violet-relay'] {
  --bg: #100e18;
  --bg-elevated: #161222;
  --bg-card: #1c1728;
  --border: #2c2640;
  --text: #eee8ff;
  --text-muted: #a094c0;
  --accent: #a978ff;
  --accent-dim: #7050bf;
  --body-glow: rgba(169, 120, 255, 0.12);
  --body-gradient-from: #100e18;
  --body-gradient-to: #161222;
  --scrollbar-thumb-hover: rgba(169, 120, 255, 0.55);
  --scrollbar-thumb-active: rgba(169, 120, 255, 0.72);
}

html[data-site-theme='ember-dust'] {
  --bg: #14100c;
  --bg-elevated: #1c1610;
  --bg-card: #241c14;
  --border: #3a2e22;
  --text: #f5ece4;
  --text-muted: #b09a82;
  --accent: #f0a04a;
  --accent-dim: #b07028;
  --body-glow: rgba(240, 160, 74, 0.12);
  --body-gradient-from: #14100c;
  --body-gradient-to: #1c1610;
  --scrollbar-thumb-hover: rgba(240, 160, 74, 0.55);
  --scrollbar-thumb-active: rgba(240, 160, 74, 0.72);
}

html[data-site-theme='cobalt-raid'] {
  --bg: #080d18;
  --bg-elevated: #0e1624;
  --bg-card: #121c30;
  --border: #1e2e48;
  --text: #e6eeff;
  --text-muted: #8498bf;
  --accent: #4f8cff;
  --accent-dim: #3058b0;
  --body-glow: rgba(79, 140, 255, 0.12);
  --body-gradient-from: #080d18;
  --body-gradient-to: #0e1624;
  --scrollbar-thumb-hover: rgba(79, 140, 255, 0.55);
  --scrollbar-thumb-active: rgba(79, 140, 255, 0.72);
}

html[data-site-theme='rust-protocol'] {
  --bg: #12100c;
  --bg-elevated: #1a1610;
  --bg-card: #221c16;
  --border: #362c22;
  --text: #f0e8e0;
  --text-muted: #b09882;
  --accent: #c97845;
  --accent-dim: #8a5028;
  --body-glow: rgba(201, 120, 69, 0.12);
  --body-gradient-from: #12100c;
  --body-gradient-to: #1a1610;
  --scrollbar-thumb-hover: rgba(201, 120, 69, 0.55);
  --scrollbar-thumb-active: rgba(201, 120, 69, 0.72);
}

html[data-site-theme='neon-hive'] {
  --bg: #081210;
  --bg-elevated: #0e1a18;
  --bg-card: #102220;
  --border: #1a3430;
  --text: #e4faf6;
  --text-muted: #82b8b0;
  --accent: #3ee0c5;
  --accent-dim: #249880;
  --body-glow: rgba(62, 224, 197, 0.12);
  --body-gradient-from: #081210;
  --body-gradient-to: #0e1a18;
  --scrollbar-thumb-hover: rgba(62, 224, 197, 0.55);
  --scrollbar-thumb-active: rgba(62, 224, 197, 0.72);
}

html[data-site-theme='slate-phantom'] {
  --bg: #0c0d10;
  --bg-elevated: #14161a;
  --bg-card: #181a20;
  --border: #2a2e36;
  --text: #eef0f4;
  --text-muted: #949aa8;
  --accent: #b8c0cc;
  --accent-dim: #787f8a;
  --body-glow: rgba(184, 192, 204, 0.1);
  --body-gradient-from: #0c0d10;
  --body-gradient-to: #14161a;
  --scrollbar-thumb-hover: rgba(184, 192, 204, 0.45);
  --scrollbar-thumb-active: rgba(184, 192, 204, 0.62);
}

html[data-site-theme='sandstorm-ops'] {
  --bg: #12100c;
  --bg-elevated: #1a1610;
  --bg-card: #221e16;
  --border: #363022;
  --text: #f2ece0;
  --text-muted: #b0a080;
  --accent: #d4b06a;
  --accent-dim: #907840;
  --body-glow: rgba(212, 176, 106, 0.12);
  --body-gradient-from: #12100c;
  --body-gradient-to: #1a1610;
  --scrollbar-thumb-hover: rgba(212, 176, 106, 0.55);
  --scrollbar-thumb-active: rgba(212, 176, 106, 0.72);
}

/* Nikita's Chosen — gold animated luxury */
html[data-site-theme='bitcoin-tycoon'] {
  --bg: #120c04;
  --bg-elevated: #1a1208;
  --bg-card: #221808;
  --border: #4a3818;
  --text: #fff6e0;
  --text-muted: #c8b080;
  --accent: #ffd54a;
  --accent-dim: #b89020;
  --success: #6ecf8a;
  --warn: #ffb84a;
  --danger: #ff6b5a;
  --scrollbar-thumb: rgba(255, 213, 74, 0.28);
  --scrollbar-thumb-hover: rgba(255, 213, 74, 0.62);
  --scrollbar-thumb-active: rgba(255, 213, 74, 0.82);
  --body-glow: rgba(255, 213, 74, 0.14);
  --body-gradient-from: #120c04;
  --body-gradient-to: #1a1208;
}

html[data-site-theme='bitcoin-tycoon'] body {
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(255, 213, 74, 0.14), transparent 55%),
    radial-gradient(circle at 85% 15%, rgba(255, 180, 40, 0.08), transparent 35%),
    radial-gradient(circle at 10% 90%, rgba(255, 140, 20, 0.06), transparent 40%);
  background-attachment: fixed;
}

html[data-site-theme='bitcoin-tycoon'] body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 220, 80, 0.04) 35%,
    rgba(255, 255, 200, 0.08) 50%,
    rgba(255, 200, 60, 0.04) 65%,
    transparent 100%
  );
  background-size: 280% 100%;
  animation: hq-btc-shimmer 42s linear infinite;
}

html[data-site-theme='bitcoin-tycoon'] .topbar {
  border-bottom-color: rgba(255, 213, 74, 0.35);
  background: linear-gradient(180deg, rgba(34, 24, 8, 0.98), rgba(18, 12, 4, 0.96));
  box-shadow: 0 4px 24px rgba(255, 180, 40, 0.12);
}

html[data-site-theme='bitcoin-tycoon'] .panel,
html[data-site-theme='bitcoin-tycoon'] .hq-home-card {
  border-color: rgba(255, 213, 74, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 180, 0.06),
    0 8px 28px rgba(0, 0, 0, 0.35);
}

html[data-site-theme='bitcoin-tycoon'] .btn:not(.btn-ghost):not(.btn-secondary):not(.tr-slots-bet-btn):not(.tr-slots-speed-btn):not(.profile-theme-action) {
  background: linear-gradient(180deg, #ffe082, #ffb300);
  color: #1a1000;
  border-color: rgba(255, 220, 100, 0.6);
  font-weight: 700;
}

html[data-site-theme='bitcoin-tycoon'] .tr-slots-bet-btn,
html[data-site-theme='bitcoin-tycoon'] .tr-slots-speed-btn {
  background: rgba(0, 0, 0, 0.38);
  color: rgba(255, 246, 224, 0.52);
  border-color: transparent;
  font-weight: 600;
}

html[data-site-theme='bitcoin-tycoon'] .tr-slots-bet-btn:hover:not(:disabled):not(.is-active),
html[data-site-theme='bitcoin-tycoon'] .tr-slots-speed-btn:hover:not(:disabled):not(.is-active) {
  background: rgba(255, 213, 74, 0.1);
  color: rgba(255, 246, 224, 0.85);
}

html[data-site-theme='bitcoin-tycoon'] .tr-slots-bet-btn.is-active,
html[data-site-theme='bitcoin-tycoon'] .tr-slots-speed-btn.is-active {
  background: linear-gradient(180deg, #ffe082, #ffb300);
  color: #1a1000;
  border-color: rgba(255, 220, 100, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 220, 0.35),
    0 0 14px rgba(255, 180, 40, 0.35);
  font-weight: 700;
}

html[data-site-theme='bitcoin-tycoon'] .hq-ammo-class-btn.is-active,
html[data-site-theme='bitcoin-tycoon'] .hq-tab.active {
  background: rgba(255, 213, 74, 0.18);
  border-color: rgba(255, 213, 74, 0.55);
  color: #ffd54a;
}

html[data-site-theme='bitcoin-tycoon'] .profile-theme-action.is-active {
  background: rgba(255, 213, 74, 0.14);
  color: rgba(255, 246, 224, 0.72);
  border-color: rgba(255, 213, 74, 0.35);
  opacity: 1;
}

html[data-site-theme='bitcoin-tycoon'] .topbar-brand-title,
html[data-site-theme='bitcoin-tycoon'] .profile-theme-badge {
  animation: hq-btc-glow 3s ease-in-out infinite;
}

@keyframes hq-btc-shimmer {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

@keyframes hq-btc-glow {
  0%,
  100% {
    text-shadow: 0 0 8px rgba(255, 213, 74, 0.35);
  }
  50% {
    text-shadow: 0 0 18px rgba(255, 213, 74, 0.75);
  }
}

/* Profile theme shop */
.profile-theme-intro {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.profile-theme-balance {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 0.84rem;
  color: var(--text-muted);
}

.profile-theme-balance strong {
  color: var(--accent);
}

.profile-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.85rem;
}

.profile-theme-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.profile-theme-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

.profile-theme-card.is-premium {
  border-color: rgba(255, 213, 74, 0.35);
  background: linear-gradient(165deg, rgba(255, 213, 74, 0.06), transparent 45%);
}

.profile-theme-preview {
  height: 3.25rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--theme-a);
}

.profile-theme-preview-bar {
  height: 0.65rem;
  background: color-mix(in srgb, var(--theme-b) 70%, #000);
}

.profile-theme-preview-body {
  height: calc(100% - 0.65rem);
  background: linear-gradient(135deg, var(--theme-a), var(--theme-c));
}

.profile-theme-swatch-row {
  display: flex;
  gap: 0.25rem;
}

.profile-theme-swatch-chip {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-theme-name {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
}

.profile-theme-badge {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1a1000;
  background: linear-gradient(90deg, #ffd54a, #ffb300);
}

.profile-theme-tagline,
.profile-theme-price {
  margin: 0.15rem 0 0;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.profile-theme-card.is-previewing {
  border-color: color-mix(in srgb, var(--choice) 55%, var(--accent));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--choice) 25%, transparent);
}

.profile-theme-card.is-previewing .profile-theme-price::after {
  content: ' · local preview';
  color: var(--choice);
}

.profile-theme-action.is-active {
  opacity: 1;
}

.profile-theme-card.is-premium .profile-theme-preview {
  animation: hq-btc-shimmer 6s ease-in-out infinite;
  background-size: 200% 100%;
  background-image: linear-gradient(
    90deg,
    var(--theme-a),
    color-mix(in srgb, var(--theme-b) 40%, var(--theme-a)),
    var(--theme-a)
  );
}

@media (max-width: 900px) {
  .profile-theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .profile-theme-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Nikita's Chosen — dashboard bitcoin rain */
html[data-site-theme='bitcoin-tycoon'] #view-hideout {
  position: relative;
}

html[data-site-theme='bitcoin-tycoon'] body.route-hideout #hideout-root.hideout-tab-home {
  position: relative;
  z-index: 2;
}

html[data-site-theme='bitcoin-tycoon'] body.route-hideout #hideout-root.hideout-tab-home .hq-home .panel,
html[data-site-theme='bitcoin-tycoon'] body.route-hideout #hideout-root.hideout-tab-home .tr-slots-app .panel {
  background: color-mix(in srgb, var(--bg-elevated) 80%, transparent);
}

html[data-site-theme='bitcoin-tycoon'] body.route-hideout #hideout-root.hideout-tab-home .hq-home-promo-hero {
  background:
    linear-gradient(135deg, rgba(201, 162, 39, 0.08) 0%, rgba(201, 162, 39, 0.03) 42%, rgba(10, 12, 16, 0.1) 100%),
    color-mix(in srgb, var(--bg-elevated) 78%, transparent);
}

.hq-btc-rain {
  position: fixed;
  top: var(--topbar-height, 3.75rem);
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.hq-btc-rain[hidden] {
  display: none !important;
}

.hq-btc-rain-drop {
  position: absolute;
  top: -14%;
  left: var(--left, 50%);
  width: var(--size, 22px);
  height: var(--size, 22px);
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(255, 213, 74, 0.35));
  animation: hq-btc-rain-fall var(--duration, 18s) linear infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform, opacity;
}

.hq-btc-rain-drop img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: screen;
}

.hq-btc-rain-drop.is-fallback {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: calc(var(--size, 22px) * 0.52);
  font-weight: 800;
  line-height: 1;
  color: #1a1000;
  background: radial-gradient(circle at 32% 28%, #ffe082 0%, #ffb300 52%, #b8860b 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 240, 180, 0.35);
}

.hq-btc-rain-drop.is-fallback img {
  display: none;
}

@keyframes hq-btc-rain-fall {
  0% {
    transform: translate3d(0, -10vh, 0) rotate(0deg) scale(0.88);
    opacity: 0;
  }
  8% {
    opacity: 0.82;
  }
  92% {
    opacity: 0.68;
  }
  100% {
    transform: translate3d(var(--drift, 0px), 112vh, 0) rotate(calc(360deg * var(--spin, 1))) scale(1);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hq-btc-rain {
    display: none !important;
  }
}
