/* ===== TOKENS ===== */
:root {
  --bg: #111729;
  --bg-2: #1a2238;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.11);
  --text: #f2f5fc;
  --muted: #a7b0c6;
  --brand: #5b8cff;
  --brand-2: #29e3c5;
  --accent: #b07cff;
  --good: #29e3a0;
  --radius: 18px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; color-scheme: dark; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: #0f1424;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* Fixed background layer — composited, so it doesn't repaint on scroll. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(1200px 600px at 50% -10%, #1d2742 0%, transparent 60%),
    linear-gradient(180deg, #131a2e 0%, #0f1424 100%);
}

h1, h2, h3, h4, .brand, .stat-num, .plan-price {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.02em;
}

a { color: inherit; text-decoration: none; }

/* ===== BACKGROUND ===== */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  z-index: -2;
}
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
}
.glow-1 { width: 600px; height: 600px; top: -200px; left: -150px;
  background: radial-gradient(circle, var(--brand), transparent 70%); }
.glow-2 { width: 520px; height: 520px; top: 200px; right: -180px;
  background: radial-gradient(circle, var(--accent), transparent 70%); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.94rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #04121a;
  box-shadow: 0 10px 30px -10px rgba(91, 140, 255, 0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(41, 227, 197, 0.65); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-2px); }
.btn-lg { padding: 14px 26px; font-size: 1rem; border-radius: 14px; }
.btn-block { width: 100%; margin-top: auto; }

/* ===== NAV ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px;
  transition: padding 0.3s, background 0.3s;
}
.nav.scrolled {
  background: rgba(7, 9, 15, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
}
.brand { display: flex; align-items: center; gap: 9px; font-size: 1.25rem; font-weight: 700; }
.brand b { color: var(--brand-2); font-weight: 700; }
.brand-mark {
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-links { display: flex; gap: 28px; margin-left: 16px; }
.nav-links a { color: var(--muted); font-size: 0.92rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 10px; margin-left: auto; align-items: center; }
/* Custom language switcher with real flag images */
.lang-switch { position: relative; }
.lang-switch-float { position: fixed; top: 12px; right: 12px; z-index: 600; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 6px 10px; font-size: 0.86rem; font-weight: 600; font-family: inherit;
}
.lang-btn:hover { border-color: var(--brand); }
.lang-flag { width: 20px; height: 15px; border-radius: 2px; object-fit: cover; display: block; box-shadow: 0 0 0 1px rgba(255,255,255,0.12); }
.lang-caret { color: var(--muted); font-size: 0.7rem; }
.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 158px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); list-style: none; padding: 6px; margin: 0; display: none; z-index: 700;
}
.lang-switch.open .lang-menu { display: block; }
.lang-menu li {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  cursor: pointer; font-size: 0.9rem; color: var(--text);
}
.lang-menu li:hover { background: var(--surface); }
.lang-menu li.sel { background: var(--surface-2); }
.lang-menu li img { width: 22px; height: 16px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,0.12); }
.nav-burger { display: none; margin-left: auto; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ===== HERO ===== */
.hero { position: relative; max-width: var(--maxw); margin: 0 auto; padding: 60px 24px 0; }

/* Floating mining hardware on the hero sides (decorative). */
.hero-rig { position: absolute; z-index: 0; pointer-events: none; filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.55)); }
.hero-rig-left  { left: -8px;  top: 250px; width: 200px; animation: rigFloatL 6.5s ease-in-out infinite; }
.hero-rig-right { right: -18px; top: 296px; width: 280px; animation: rigFloatR 7.5s ease-in-out infinite; }
@keyframes rigFloatL { 0%, 100% { transform: translateX(0) rotate(-5deg); } 50% { transform: translateX(24px) rotate(-5deg); } }
@keyframes rigFloatR { 0%, 100% { transform: translateX(0) rotate(5deg); }  50% { transform: translateX(-24px) rotate(5deg); } }
/* Below 1180px the hero text fills the width — hide the side hardware. */
@media (max-width: 1180px) { .hero-rig { display: none; } }
@media (prefers-reduced-motion: reduce) { .hero-rig-left, .hero-rig-right { animation: none; } }

/* Floating info badges on the lower hero sides. */
.hero-badge {
  position: absolute; z-index: 0; pointer-events: none;
  background: rgba(20, 27, 44, 0.72); border: 1px solid var(--border);
  border-radius: 16px; padding: 13px 15px; backdrop-filter: blur(6px);
  box-shadow: 0 16px 40px -14px rgba(0, 0, 0, 0.6);
}
.hero-badge-left {
  left: 4px; top: 548px; width: 214px;
  display: flex; align-items: center; gap: 11px;
  animation: badgeFloatL 6s ease-in-out infinite;
}
.hb-ico {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.5rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.hb-main { display: flex; flex-direction: column; line-height: 1.25; }
.hb-main b { font-size: 0.98rem; }
.hb-main small { color: var(--muted); font-size: 0.76rem; }
.hb-tag {
  margin-left: auto; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 0.95rem;
  color: #04121a; background: linear-gradient(135deg, #17d9b6, #2fd94a);
  padding: 3px 9px; border-radius: 999px;
}
.hero-badge-right {
  right: 4px; top: 542px; width: 226px;
  display: flex; flex-direction: column; gap: 9px;
  animation: badgeFloatR 7s ease-in-out infinite;
}
.hb-head { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 0.95rem; }
.hb-levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.hb-lv {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  padding: 6px 2px; font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 0.8rem; color: var(--brand-2);
}
.hb-lv i { font-style: normal; font-size: 0.62rem; color: var(--muted); }
@keyframes badgeFloatL { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-14px) rotate(-2deg); } }
@keyframes badgeFloatR { 0%, 100% { transform: translateY(0) rotate(2deg); }  50% { transform: translateY(-14px) rotate(2deg); } }
@media (max-width: 1180px) { .hero-badge { display: none; } }
@media (prefers-reduced-motion: reduce) { .hero-badge-left, .hero-badge-right, .hero-info-left, .hero-info-right { animation: none; } }

/* Upper hero info cards (mining stats left, NovaSwap stats right). */
.hero-infocard { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.hero-info-left  { left: 4px;  top: 288px; width: 218px; animation: badgeFloatL 6.5s ease-in-out infinite; }
.hero-info-right { right: 4px; top: 288px; width: 226px; animation: badgeFloatR 7.5s ease-in-out infinite; }
.hic-head { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 0.98rem; }
.hic-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hic-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 9px 4px;
}
.hic-stat b {
  font-family: "Space Grotesk", sans-serif; font-size: 1.5rem; line-height: 1;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hic-stat small { color: var(--muted); font-size: 0.72rem; text-align: center; }
.hic-coins { color: var(--muted); font-size: 0.74rem; letter-spacing: 0.02em; }
/* Decorative hero side cards are desktop-only — hide on narrow screens
   (this rule is placed AFTER the .hero-infocard base so it always wins). */
@media (max-width: 1180px) { .hero-badge, .hero-infocard { display: none !important; } }
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 820px; margin: 0 auto; }
/* Live pills sit on their own line below the sign-up banner, centered. */
.hero-live {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 26px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 26px;
}
.hero-live .pill { margin-bottom: 0; }
.pill b { color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(41, 227, 160, 0.6); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(41, 227, 160, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(41, 227, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(41, 227, 160, 0); }
}
.hero-title { font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.05; font-weight: 700; }
.grad {
  background: linear-gradient(120deg, var(--brand), var(--brand-2) 50%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub { color: var(--muted); font-size: clamp(1rem, 2vw, 1.18rem); margin: 24px auto 34px; max-width: 620px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---- Referral hub widget (hero) ---- */
.hero-refwidget { max-width: 560px; margin: 4px auto 30px; text-align: center; }
.invite-headline {
  font-family: "Space Grotesk", sans-serif; font-weight: 700;
  font-size: clamp(1.25rem, 3.4vw, 1.7rem); line-height: 1.3;
  margin: 0 auto 18px; max-width: 520px; color: var(--text);
}
.invite-headline span { color: var(--brand-2); }
.invite-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  width: auto; min-width: 240px; max-width: 100%;
  padding: 13px 30px; border: 0; border-radius: 14px; cursor: pointer;
  font-family: "Space Grotesk", sans-serif; font-size: clamp(1.05rem, 2.6vw, 1.28rem); font-weight: 700;
  color: #fff; background: linear-gradient(90deg, #2f6bff 0%, #5b8cff 100%);
  box-shadow: 0 12px 34px -10px rgba(60, 120, 255, 0.6);
  transition: transform 0.15s var(--ease), filter 0.15s var(--ease);
}
.invite-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.invite-btn:active { transform: translateY(0); }
.invite-btn svg { width: 22px; height: 22px; flex: 0 0 auto; }

.hex-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 24px; }
.hex-tile {
  display: flex; flex-direction: column; align-items: center; gap: 11px;
  text-decoration: none; color: inherit;
}
.hex {
  width: 88px; height: 98px; display: grid; place-items: center; padding: 2px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(160deg, var(--brand-2), var(--brand));
  filter: drop-shadow(0 6px 16px rgba(41, 227, 197, 0.25));
  transition: transform 0.15s var(--ease), filter 0.2s var(--ease);
}
.hex-tile:hover .hex { transform: translateY(-3px); filter: drop-shadow(0 12px 24px rgba(41, 227, 197, 0.5)); }
.hex-in {
  width: 100%; height: 100%; display: grid; place-items: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: #0b1220; font-size: 2rem; line-height: 1;
}
.hex-label { font-size: 1.02rem; font-weight: 500; color: var(--text); }
.invite-note { margin: 18px auto 0; max-width: 460px; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.invite-note b { color: var(--brand-2); }

/* Copy-confirmation toast */
.invite-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: var(--bg-2); color: var(--text); border: 1px solid var(--border);
  padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 0.92rem;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; z-index: 900;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.invite-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 560px) {
  .hero-refwidget { max-width: 340px; }
  .hex-row { gap: 8px; }
  .hex { width: 68px; height: 76px; }
  .hex-in { font-size: 1.5rem; }
  .hex-label { font-size: 0.82rem; }
  .invite-btn { min-width: 0; padding: 11px 22px; border-radius: 12px; }
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 64px auto 0;
  max-width: var(--maxw);
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 12px;
}
.stat-num { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 700; color: var(--text); }
.stat-label { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }

/* ===== TICKER ===== */
.ticker {
  margin-top: 56px;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ticker-track { display: flex; gap: 40px; width: max-content; animation: scroll 32s linear infinite; will-change: transform; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }
.tick { display: inline-flex; align-items: center; gap: 10px; font-size: 0.92rem; color: var(--muted); white-space: nowrap; }
.tick b { color: var(--text); font-family: "Space Grotesk"; }
.tick .up { color: var(--good); }
.tick .down { color: #ff6b81; }

/* ===== SECTIONS ===== */
.section { max-width: var(--maxw); margin: 0 auto; padding: 110px 24px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-2);
  font-weight: 600;
  margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; }
.section-head p { color: var(--muted); margin-top: 12px; }

/* ===== CARDS ===== */
.card {
  background: linear-gradient(180deg, rgba(33, 42, 66, 0.6), rgba(24, 31, 50, 0.5));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 18px 40px -28px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

/* ===== FEATURES ===== */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 18px; }
.feature { padding: 28px; }
.feature:hover { transform: translateY(-6px); border-color: rgba(91, 140, 255, 0.4); box-shadow: var(--shadow); }
.feature-ico {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  font-size: 1.5rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(91, 140, 255, 0.18), rgba(41, 227, 197, 0.12));
  border: 1px solid var(--border);
  margin-bottom: 18px;
}
.feature h3 { font-size: 1.2rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 0.95rem; }

/* ===== PLANS ===== */
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan { padding: 32px 28px; display: flex; flex-direction: column; position: relative; }
.plan:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.plan-featured {
  border-color: rgba(41, 227, 197, 0.5);
  background: linear-gradient(180deg, rgba(41, 227, 197, 0.08), var(--surface));
  box-shadow: 0 0 0 1px rgba(41, 227, 197, 0.2), var(--shadow);
}
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #04121a; font-size: 0.72rem; font-weight: 700;
  padding: 5px 14px; border-radius: 999px; letter-spacing: 0.04em;
}
.plan-name { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.plan-price { font-size: 2.8rem; font-weight: 700; margin: 8px 0 2px; }
.plan-price span { font-size: 1rem; color: var(--muted); font-family: "Inter"; font-weight: 500; }
.plan-rate {
  display: inline-block;
  font-family: "Space Grotesk";
  color: var(--brand-2);
  background: rgba(41, 227, 197, 0.1);
  border: 1px solid rgba(41, 227, 197, 0.25);
  padding: 4px 12px; border-radius: 8px; font-size: 0.9rem;
  margin-bottom: 22px;
}
.plan-list { list-style: none; display: grid; gap: 12px; margin-bottom: 26px; }
.plan-list li { color: var(--muted); font-size: 0.94rem; }
.plan-term {
  display: inline-block; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin: 2px 0 10px;
}
.plan-daily {
  font-family: "Space Grotesk"; font-weight: 700; font-size: 1.5rem; color: var(--good);
  margin: 6px 0 14px;
}
.plan-daily span { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
/* 8-package responsive grid */
.plans-grid-8 { grid-template-columns: repeat(4, 1fr); }
.plans-grid-8 .plan { padding: 26px 22px; }
.plans-grid-8 .plan-price { font-size: 2.1rem; }
.plans-grid-8 .plan-list { gap: 9px; margin-bottom: 20px; }
.plans-grid-8 .plan-list li { font-size: 0.86rem; }
@media (max-width: 1080px) { .plans-grid-8 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .plans-grid-8 { grid-template-columns: 1fr; } }

/* ===== CALCULATOR ===== */
.calc { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; overflow: hidden; }
.calc-controls { padding: 38px; display: grid; gap: 30px; align-content: start; }
.calc-field span { display: block; font-size: 0.95rem; margin-bottom: 12px; color: var(--muted); }
.calc-field b { color: var(--brand-2); font-family: "Space Grotesk"; }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 999px;
  background: var(--surface-2); outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  cursor: pointer; border: 3px solid var(--bg);
  box-shadow: 0 4px 14px rgba(41, 227, 197, 0.5);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand-2); cursor: pointer; border: 3px solid var(--bg);
}
.coin-toggle { display: flex; gap: 8px; }
.coin {
  flex: 1; padding: 10px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); font-weight: 600; cursor: pointer;
  transition: all 0.2s;
}
.coin.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #04121a; border-color: transparent;
}
.calc-output {
  padding: 38px;
  background: linear-gradient(180deg, rgba(91, 140, 255, 0.07), rgba(176, 124, 255, 0.04));
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.calc-big { text-align: center; margin-bottom: 26px; }
.calc-cur { display: block; font-family: "Space Grotesk"; font-size: 2.8rem; font-weight: 700; color: var(--good); }
.calc-cap { font-size: 0.85rem; color: var(--muted); }
.calc-rows { display: grid; gap: 12px; margin-bottom: 24px; }
.calc-row {
  display: flex; justify-content: space-between;
  padding: 12px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.94rem;
}
.calc-row span { color: var(--muted); }
.calc-row b { font-family: "Space Grotesk"; }
.calc-note { font-size: 0.76rem; color: var(--muted); text-align: center; margin-top: 14px; }

/* ===== STEPS ===== */
.steps { display: flex; align-items: stretch; gap: 16px; justify-content: center; }
.step {
  flex: 1; max-width: 320px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px;
}
.step-no {
  font-family: "Space Grotesk"; font-size: 1.6rem; font-weight: 700;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 14px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.94rem; }
.step-arrow { display: grid; place-items: center; color: var(--brand-2); font-size: 1.6rem; }

/* ===== FAQ ===== */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 4px 22px; transition: border-color 0.25s;
}
.faq-item[open] { border-color: rgba(91, 140, 255, 0.4); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 18px 0;
  font-weight: 600; font-size: 1.02rem;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--brand-2); font-size: 1.4rem; transition: transform 0.25s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--muted); padding-bottom: 20px; font-size: 0.95rem; }

/* ===== CTA BAND ===== */
.cta-band { max-width: var(--maxw); margin: 110px auto 0; padding: 0 24px; }
.cta-inner {
  text-align: center; padding: 64px 24px;
  background: linear-gradient(135deg, rgba(91, 140, 255, 0.14), rgba(41, 227, 197, 0.08));
  border-color: rgba(91, 140, 255, 0.3);
}
.cta-inner h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.cta-inner p { color: var(--muted); margin: 14px 0 28px; }

/* ===== FOOTER ===== */
.footer { max-width: var(--maxw); margin: 100px auto 0; padding: 60px 24px 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.footer-brand p { color: var(--muted); margin-top: 12px; font-size: 0.92rem; max-width: 260px; }
.footer-col h4 { margin-bottom: 14px; font-size: 0.95rem; }
.footer-col a { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; color: var(--muted); font-size: 0.86rem; flex-wrap: wrap; gap: 12px;
}
/* Companies House registration badge (links to the official record) */
.reg-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--muted); text-decoration: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.reg-badge:hover { border-color: var(--brand-2); background: var(--surface-2); color: var(--text); }
.reg-crown { flex-shrink: 0; color: #e8b64c; }
.reg-txt { font-size: 0.78rem; line-height: 1.25; }
.reg-txt b { color: var(--text); font-weight: 700; letter-spacing: 0.02em; }

.tg-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  padding: 9px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 0.9rem;
  background: #229ed9; color: #fff; transition: filter 0.15s var(--ease), transform 0.15s var(--ease);
}
.tg-link:hover { filter: brightness(1.06); transform: translateY(-1px); }
.tg-link svg { display: block; }

.footer-socials { display: flex; gap: 16px; }
.footer-socials a { font-size: 1.1rem; transition: color 0.2s, transform 0.2s; }
.footer-socials a:hover { color: var(--brand-2); transform: translateY(-2px); }

/* ===== REVEAL ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .nav-links, .nav-actions { display: none; }
  .nav-burger { display: block; }
  .nav.open { flex-wrap: wrap; }
  .nav.open .nav-links { display: flex; flex-direction: column; gap: 14px; width: 100%; margin: 14px 0 0; }
  .nav.open .nav-actions { display: flex; width: 100%; }
  .features-grid, .plans-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .calc { grid-template-columns: 1fr; }
  .calc-output { border-left: none; border-top: 1px solid var(--border); }
  .steps { flex-direction: column; align-items: center; }
  .step { max-width: 100%; width: 100%; }
  .step-arrow { transform: rotate(90deg); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   AUTH PAGE
   ===================================================== */
.hidden { display: none !important; }

.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  gap: 26px;
}
.auth-brand { font-size: 1.6rem; }
.auth-card { width: 100%; max-width: 430px; padding: 30px; }
.auth-tabs {
  display: flex; gap: 6px; padding: 5px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 26px;
}
.auth-tab {
  flex: 1; padding: 10px; border-radius: 9px;
  background: transparent; border: none; color: var(--muted);
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
  font-family: inherit; transition: all 0.2s;
}
.auth-tab.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #04121a;
}
.auth-form h2 { font-size: 1.5rem; }
.auth-lead { color: var(--muted); font-size: 0.92rem; margin: 6px 0 22px; }

.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 7px; }
.field input {
  width: 100%; padding: 12px 14px; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-size: 0.96rem; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.18);
}
.field input::placeholder { color: #5a6178; }

.auth-msg, .panel-msg {
  font-size: 0.86rem; min-height: 0; max-height: 0;
  overflow: hidden; transition: all 0.2s; margin-bottom: 0;
}
.auth-msg.show, .panel-msg.show { max-height: 60px; margin-bottom: 14px; }
.auth-msg.err, .panel-msg.err { color: #ff6b81; }
.auth-msg.ok, .panel-msg.ok { color: var(--good); }
.auth-foot { text-align: center; color: var(--muted); font-size: 0.78rem; margin-top: 20px; }
.ref-tag {
  background: rgba(176, 124, 255, 0.12); border: 1px solid rgba(176, 124, 255, 0.35);
  color: #d3bbff; font-size: 0.82rem; padding: 10px 14px; border-radius: 11px; margin-bottom: 14px;
}
.btn-sm { padding: 8px 16px; font-size: 0.86rem; border-radius: 10px; }

/* =====================================================
   DASHBOARD
   ===================================================== */
.dash-body { background: var(--bg); }
.dash-top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 28px;
  background: rgba(7, 9, 15, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.dash-top-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.coin-pill {
  font-size: 0.8rem; color: var(--brand-2);
  background: rgba(41, 227, 197, 0.1); border: 1px solid rgba(41, 227, 197, 0.25);
  padding: 5px 12px; border-radius: 999px;
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #04121a;
}
.dash-user { font-weight: 600; font-size: 0.92rem; }

.dash-main { max-width: 1200px; margin: 0 auto; padding: 34px 24px 80px; }
.dash-head { margin-bottom: 28px; }
.dash-head h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
.dash-sub { color: var(--muted); margin-top: 4px; }

.dash-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px;
}
.dash-stat { padding: 22px; position: relative; overflow: hidden; }
.dash-stat::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  opacity: 0.5;
}
.dash-stat.highlight {
  background: linear-gradient(135deg, rgba(91, 140, 255, 0.18), rgba(41, 227, 197, 0.09));
  border-color: rgba(41, 227, 197, 0.4);
}
.dash-stat.highlight::before { opacity: 1; }
.dash-stat:hover { transform: translateY(-3px); }
.dash-stat-label { font-size: 0.82rem; color: var(--muted); }
.dash-stat-val { font-family: "Space Grotesk"; font-size: 1.9rem; font-weight: 700; margin: 8px 0 6px; }
.dash-stat-val small { font-size: 0.9rem; color: var(--muted); }
.dash-stat-foot { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 0 rgba(41, 227, 160, 0.6); animation: pulse 2s infinite;
}

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dash-col { display: grid; gap: 20px; align-content: start; }
.dash-panel { padding: 24px; }
.dash-panel h3 { font-size: 1.15rem; margin-bottom: 4px; }
.panel-lead { color: var(--muted); font-size: 0.88rem; margin-bottom: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-head h3 { margin-bottom: 0; }
.muted-small { color: var(--muted); font-size: 0.82rem; }
.panel-form { display: block; }

.seg {
  display: flex; gap: 6px; padding: 5px; margin-bottom: 16px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px;
}
.seg-btn {
  flex: 1; padding: 9px; border-radius: 8px; border: none;
  background: transparent; color: var(--muted); font-weight: 600;
  font-family: inherit; cursor: pointer; font-size: 0.85rem; transition: all 0.2s;
}
.seg-btn.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #04121a; }
.seg-btn.active .coin-ico { color: #04121a !important; }
/* wrap for 6-coin selectors */
.seg-coins { flex-wrap: wrap; }
.seg-coins .seg-btn {
  flex: 1 1 28%; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
.coin-ico { font-weight: 700; }

/* mining coin picker */
.mine-coins { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mine-coin {
  display: flex; align-items: center; gap: 11px; text-align: left;
  padding: 12px 13px; border-radius: 12px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; transition: all 0.2s; position: relative;
}
.mine-coin:hover { border-color: var(--cc); transform: translateY(-2px); }
.mine-coin.active { border-color: var(--cc); box-shadow: 0 0 0 1px var(--cc), 0 8px 24px -12px var(--cc); }
.mine-coin-ico {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.1rem; font-weight: 700;
}
.mine-coin-meta { display: flex; flex-direction: column; min-width: 0; }
.mine-coin-meta b { font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mine-coin-meta small { color: var(--muted); font-size: 0.74rem; }
.mine-coin-on {
  position: absolute; top: 8px; right: 9px;
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--good); background: rgba(41, 227, 160, 0.14);
  padding: 2px 7px; border-radius: 999px;
}
@media (max-width: 560px) { .mine-coins { grid-template-columns: 1fr; } }

.quick { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.quick button {
  flex: 1; min-width: 64px; padding: 8px; border-radius: 9px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font-weight: 600; font-size: 0.82rem;
  font-family: inherit; cursor: pointer; transition: all 0.2s;
}
.quick button:hover { color: var(--text); border-color: var(--brand); }

/* withdraw available + amount row */
.wd-avail {
  font-size: 0.84rem; color: var(--muted); margin-bottom: 14px;
  padding: 9px 13px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border);
}
.wd-avail b { color: var(--brand-2); font-family: "Space Grotesk"; }
.wd-amt-row { display: flex; gap: 8px; }
.wd-amt-row input { flex: 1; }
.wd-amt-row .btn { flex-shrink: 0; }

/* exchange */
.ex-row { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.ex-select {
  width: 100%; padding: 11px 12px; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: 0.92rem; cursor: pointer;
  color-scheme: dark; /* render the native dropdown popup in dark mode */
}
.ex-select option { background: #1a2238; color: var(--text); }
.ex-flip {
  flex-shrink: 0; width: 40px; height: 42px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--border); color: var(--brand-2);
  font-size: 1.1rem; cursor: pointer; transition: all 0.2s;
}
.ex-flip:hover { background: var(--surface-2); transform: rotate(180deg); }
.ex-preview {
  text-align: center; font-family: "Space Grotesk"; font-weight: 700; font-size: 1.2rem;
  color: var(--brand-2); padding: 12px; margin-bottom: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.holdings { display: grid; gap: 8px; margin-top: 16px; }
.holding {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 13px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); font-size: 0.88rem;
}
.holding .h-left { display: flex; align-items: center; gap: 9px; }
.holding .h-amt { font-family: "Space Grotesk"; font-weight: 600; }
.holding .h-usd { color: var(--muted); font-size: 0.78rem; }

/* dash plans */
.dash-plans { display: grid; gap: 10px; max-height: 460px; overflow-y: auto; }
.dash-plan-term { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.dash-plan {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.dash-plan.owned { border-color: rgba(41, 227, 197, 0.5); background: rgba(41, 227, 197, 0.06); }
.dash-plan-info b { font-size: 1rem; }
.dash-plan-info span { display: block; color: var(--brand-2); font-size: 0.85rem; font-family: "Space Grotesk"; }
.dash-plan-buy { display: flex; align-items: center; gap: 12px; }
.dash-plan-price { font-family: "Space Grotesk"; font-weight: 700; }
.dash-plan-sale { border-color: rgba(255, 120, 80, 0.55); box-shadow: 0 0 22px -8px rgba(255, 120, 80, 0.5); }
.dash-sale-tag {
  display: inline-block; font-family: "Space Grotesk", sans-serif; font-weight: 800; font-size: 0.72rem;
  color: #2a0f00; background: linear-gradient(135deg, #ff6b6b, #ff9f43);
  padding: 2px 8px; border-radius: 999px; margin-right: 4px; vertical-align: middle;
  box-shadow: 0 4px 12px -3px rgba(255, 107, 107, 0.6); animation: flashPulse 1.4s ease-in-out infinite;
}

/* staking */
.stake-plans { display: grid; gap: 10px; }
.stake-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(91,140,255,0.08), rgba(41,227,197,0.05));
  border: 1px solid rgba(91,140,255,0.28);
}
.stake-amt { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.5rem; color: var(--brand-2); }
.stake-lines { display: flex; flex-direction: column; gap: 2px; }
.stake-day { font-family: "Space Grotesk", sans-serif; font-weight: 600; color: var(--good); }
.stake-day small { color: var(--muted); font-weight: 400; }
.stake-back { color: var(--muted); font-size: 0.74rem; }
.stake-active {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: 10px; margin-top: 6px;
  background: var(--surface); border: 1px solid var(--border);
}
.sa-amt { font-family: "Space Grotesk", sans-serif; font-weight: 700; color: var(--brand-2); }
.sa-meta { font-size: 0.82rem; color: var(--muted); }
.sa-meta b { color: var(--text); }
.stake-bal {
  padding: 14px 16px; border-radius: 12px; margin-bottom: 14px;
  background: rgba(41,227,197,0.06); border: 1px solid rgba(41,227,197,0.28);
}
.stake-bal-val { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.6rem; color: var(--good); }
.stake-swap { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.stake-swap input { flex: 1; min-width: 110px; padding: 9px 11px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-family: inherit; }
.stake-swap select { min-width: 84px; }

/* transactions */
.tx-list { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; }
.tx-empty { color: var(--muted); font-size: 0.9rem; text-align: center; padding: 24px 0; }
.tx {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.tx-ico {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.1rem;
  background: var(--surface-2);
}
.tx-body { flex: 1; min-width: 0; }
.tx-label { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-date { font-size: 0.76rem; color: var(--muted); }
.tx-right { text-align: right; flex-shrink: 0; }
.tx-amt { font-family: "Space Grotesk"; font-weight: 700; font-size: 0.95rem; }
.tx-amt.pos { color: var(--good); }
.tx-amt.neg { color: #ff8da0; }
.tx-status {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 8px; border-radius: 999px; display: inline-block; margin-top: 3px;
}
.status-completed { background: rgba(41, 227, 160, 0.14); color: var(--good); }
.status-pending { background: rgba(255, 196, 84, 0.14); color: #ffc454; }
.status-rejected { background: rgba(255, 107, 129, 0.14); color: #ff6b81; }
.tx-link { color: var(--brand); font-size: 0.74rem; margin-left: 6px; }
.tx-link:hover { color: var(--brand-2); }

/* toast */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 120px);
  padding: 13px 22px; border-radius: 12px; font-weight: 600; font-size: 0.92rem;
  background: var(--bg-2); border: 1px solid var(--border);
  box-shadow: var(--shadow); z-index: 100; opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.4s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.ok { border-color: rgba(41, 227, 160, 0.5); }
.toast.err { border-color: rgba(255, 107, 129, 0.5); }

@media (max-width: 920px) {
  .dash-cards { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .dash-cards { grid-template-columns: 1fr; }
  .dash-user { display: none; }
  .dash-top { padding: 12px 16px; }
  .dash-main { padding: 24px 14px 60px; }
}

/* =====================================================
   CHART
   ===================================================== */
.chart-panel { padding: 24px; grid-column: 1 / -1; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.chart-head h3 { margin-bottom: 2px; }
.chart-legend { display: flex; gap: 16px; align-items: center; }
.chart-legend .lg { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--muted); }
.chart-legend .swatch { width: 12px; height: 12px; border-radius: 4px; }
.chart-wrap { position: relative; height: 240px; }
#earningsChart { width: 100%; height: 100%; }
.dash-top-link { color: var(--muted); font-size: 0.9rem; font-weight: 600; transition: color 0.2s; }
.dash-top-link:hover { color: var(--text); }
.dash-top-link.active { color: var(--brand-2); }

/* live price strip */
.price-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 22px; }
.price-chip {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
}
.price-chip .pc-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.price-chip .pc-meta { min-width: 0; }
.price-chip .pc-sym { font-size: 0.74rem; color: var(--muted); }
.price-chip .pc-price { font-family: "Space Grotesk"; font-weight: 700; font-size: 0.92rem; }
.price-chip .pc-ch { font-size: 0.72rem; font-weight: 600; }
.price-chip .pc-ch.up { color: var(--good); }
.price-chip .pc-ch.down { color: #ff6b81; }
.price-live { font-size: 0.74rem; color: var(--muted); }
.price-live b { color: var(--good); }
@media (max-width: 920px) { .price-strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .price-strip { grid-template-columns: repeat(2, 1fr); } }

/* =====================================================
   PROFILE / REFERRAL
   ===================================================== */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.profile-hero {
  display: flex; align-items: center; gap: 20px; margin-bottom: 22px;
  padding: 26px 28px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(91, 140, 255, 0.12), rgba(176, 124, 255, 0.06));
  border: 1px solid var(--border);
}
.profile-avatar {
  width: 72px; height: 72px; border-radius: 20px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.8rem; font-weight: 700;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #04121a;
}
.profile-hero h1 { font-size: 1.7rem; }
.profile-hero p { color: var(--muted); font-size: 0.92rem; }

.ref-box {
  background: linear-gradient(135deg, rgba(176, 124, 255, 0.12), rgba(91, 140, 255, 0.08));
  border: 1px solid rgba(176, 124, 255, 0.3);
}
.ref-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.ref-stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; text-align: center; }
.ref-stat b { display: block; font-family: "Space Grotesk"; font-size: 1.5rem; }
.ref-stat span { font-size: 0.76rem; color: var(--muted); }

/* 5-level referral breakdown table */
.ref-levels { margin: 6px 0 18px; display: flex; flex-direction: column; gap: 6px; }
.ref-level {
  display: grid; grid-template-columns: 56px 1fr 1.4fr 0.8fr 1fr; align-items: center; gap: 8px;
  padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  font-size: 0.86rem;
}
.ref-level-head {
  background: transparent; border: 0; padding: 2px 12px; color: var(--muted);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.rl-badge {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  font-family: "Space Grotesk"; font-weight: 700; color: #04121a;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.rl-pct { font-family: "Space Grotesk"; font-weight: 600; color: var(--brand-2); }
.rl-th { color: var(--text); font-size: 0.8rem; }
.rl-earn { font-family: "Space Grotesk"; color: var(--good); }
@media (max-width: 560px) {
  .ref-level { grid-template-columns: 42px 1fr 1.3fr; row-gap: 2px; font-size: 0.8rem; }
  .ref-level > span:nth-child(4), .ref-level > span:nth-child(5),
  .ref-level-head > span:nth-child(4), .ref-level-head > span:nth-child(5) { display: none; }
  .rl-badge { width: 30px; height: 30px; }
}

.ref-link-row { display: flex; gap: 8px; margin-top: 8px; }
.ref-link-input {
  flex: 1; padding: 12px 14px; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-size: 0.86rem; font-family: "Space Grotesk";
}
.ref-empty { color: var(--muted); font-size: 0.9rem; text-align: center; padding: 10px 0 16px; }

/* withdrawal-address fields: 2 per row */
#payoutFields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 6px; }
#payoutFields .payout-field { margin-bottom: 0; }
@media (max-width: 560px) { #payoutFields { grid-template-columns: 1fr; } }

.ref-list { display: grid; gap: 8px; margin-top: 16px; }
.ref-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border); font-size: 0.88rem;
}
.ref-item .ref-on { color: var(--good); font-size: 0.74rem; }
.ref-item .ref-off { color: var(--muted); font-size: 0.74rem; }

@media (max-width: 820px) { .profile-grid { grid-template-columns: 1fr; } }

/* =====================================================
   ON-CHAIN DEPOSIT
   ===================================================== */
.addr-box { margin-top: 16px; text-align: center; }
.addr-qr {
  width: 180px; height: 180px; border-radius: 12px; background: #fff;
  padding: 8px; display: block; margin: 0 auto 14px;
}
.addr-net { font-size: 0.84rem; color: var(--muted); margin-bottom: 10px; }
.addr-net b { color: var(--brand-2); }
.addr-row { display: flex; gap: 8px; margin-bottom: 10px; }
.addr-explorer { display: inline-block; font-size: 0.82rem; color: var(--brand); }
.addr-explorer:hover { color: var(--brand-2); }
.addr-unsupported {
  margin-top: 14px; padding: 14px; border-radius: 12px; font-size: 0.86rem;
  background: rgba(255, 196, 84, 0.1); border: 1px solid rgba(255, 196, 84, 0.3); color: #ffc454;
}

/* =====================================================
   2FA
   ===================================================== */
.twofa-status {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
  margin-bottom: 16px; font-size: 0.9rem;
}
.twofa-badge { font-size: 0.72rem; padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.twofa-on { background: rgba(41, 227, 160, 0.14); color: var(--good); }
.twofa-off { background: rgba(255, 107, 129, 0.14); color: #ff6b81; }
.twofa-qr { width: 180px; height: 180px; border-radius: 12px; background: #fff; padding: 8px; display: block; margin: 10px auto; }
.twofa-secret {
  font-family: "Space Grotesk"; font-size: 0.82rem; text-align: center; color: var(--brand-2);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px; margin-bottom: 12px; word-break: break-all;
}

/* =====================================================
   ADMIN
   ===================================================== */
.admin-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 22px; }
.admin-stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.admin-stat b { display: block; font-family: "Space Grotesk"; font-size: 1.5rem; }
.admin-stat span { font-size: 0.78rem; color: var(--muted); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.admin-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.admin-table tr:hover td { background: var(--surface); }
.admin-table .role-admin { color: var(--brand-2); font-weight: 600; }
.admin-wrap { overflow-x: auto; }
.admin-act { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-badge { font-size: 0.7rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); }
@media (max-width: 920px) { .admin-stats { grid-template-columns: repeat(2, 1fr); } }

/* =====================================================
   WIND TURBINES (hero eco background)
   ===================================================== */
.turbines { position: absolute; inset: 0; overflow: visible; z-index: -1; pointer-events: none; }
.turbines-fixed { position: fixed; }

/* =====================================================
   CONTENT PAGES (about, blog, careers, legal)
   ===================================================== */
.page-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 22px;
  max-width: var(--maxw); margin: 0 auto; padding: 16px 24px;
  background: rgba(17, 23, 41, 0.72); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.page-nav .brand { font-size: 1.2rem; }
.page-nav-links { display: flex; gap: 22px; margin-left: 12px; }
.page-nav-links a { color: var(--muted); font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.page-nav-links a:hover { color: var(--text); }
.page-nav .btn { margin-left: auto; }

.page-main { max-width: 880px; margin: 0 auto; padding: 56px 24px 40px; }
.page-head { margin-bottom: 34px; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3rem); }
.page-head .lead { color: var(--muted); font-size: 1.1rem; margin-top: 12px; max-width: 640px; }
.page-body { padding: 34px 36px; }
.page-body h2 { font-size: 1.3rem; margin: 26px 0 10px; }
.page-body h2:first-child { margin-top: 0; }
.page-body p { color: var(--muted); margin-bottom: 14px; }
.page-body ul { color: var(--muted); margin: 0 0 16px 20px; display: grid; gap: 8px; }
.page-body a { color: var(--brand-2); }
.page-updated { font-size: 0.84rem; color: var(--muted); margin-bottom: 24px; }

/* about stats */
.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 30px 0; }
.about-stats .as { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; text-align: center; }
.about-stats .as b { display: block; font-family: "Space Grotesk"; font-size: 1.8rem; color: var(--brand-2); }
.about-stats .as span { font-size: 0.84rem; color: var(--muted); }

/* ===== Monthly milestone rewards (glowing, blinking) ===== */
.milestone-band { position: relative; }
.milestone-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 980px; margin: 0 auto; }
.milestone-card {
  position: relative; overflow: hidden; text-align: center;
  padding: 34px 22px 30px; border-radius: 20px;
  background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1.5px solid var(--mc); isolation: isolate;
  animation: msPulse 2.2s ease-in-out infinite;
}
.milestone-card .ms-glow {
  position: absolute; inset: -40% -20% auto -20%; height: 160px; z-index: -1;
  background: radial-gradient(circle, var(--mc), transparent 70%); opacity: 0.35;
  animation: msGlow 2.2s ease-in-out infinite;
}
.ms-refs { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 3.2rem; line-height: 1;
  color: var(--mc); text-shadow: 0 0 22px var(--mc); }
.ms-refs-label { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
.ms-reward { margin-top: 16px; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 2.2rem; color: var(--text); }
.ms-reward span { font-size: 0.95rem; font-weight: 500; color: var(--muted); }
.ms-badge {
  position: absolute; top: 12px; right: 12px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em;
  color: #04121a; background: var(--mc); padding: 3px 9px; border-radius: 999px;
  animation: msBlink 1s steps(2, start) infinite;
}
.ms-1 { --mc: #29e3c5; }
.ms-2 { --mc: #5b8cff; }
.ms-3 { --mc: #ffcf4a; animation-duration: 1.6s; transform: scale(1.04); }
.ms-3 .ms-glow { animation-duration: 1.6s; opacity: 0.5; }
.milestone-note { text-align: center; color: var(--muted); font-size: 0.9rem; margin: 22px auto 0; max-width: 620px; }
@keyframes msPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(0,0,0,0); border-color: color-mix(in srgb, var(--mc) 45%, transparent); }
  50% { box-shadow: 0 0 34px -6px var(--mc); border-color: var(--mc); }
}
@keyframes msGlow { 0%, 100% { opacity: 0.22; } 50% { opacity: 0.5; } }
@keyframes msBlink { 0% { opacity: 1; } 100% { opacity: 0.35; } }
@media (max-width: 760px) { .milestone-grid { grid-template-columns: 1fr; gap: 16px; } .ms-3 { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .milestone-card, .ms-glow, .ms-badge { animation: none; }
}

/* ===== Flash sale ===== */
.flash-banner {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  max-width: 720px; margin: 0 auto 24px; padding: 13px 22px; border-radius: 14px;
  background: linear-gradient(90deg, #ff6b6b, #ff9f43); color: #1a0e00; font-weight: 700;
  box-shadow: 0 12px 30px -8px rgba(255, 107, 107, 0.5); animation: flashPulse 1.6s ease-in-out infinite;
}
.flash-ico { font-size: 1.3rem; }
.flash-txt { font-size: 1.05rem; }
.flash-txt b { font-size: 1.2rem; }
.flash-timer {
  font-family: "Space Grotesk", monospace; font-weight: 700; font-size: 1.15rem;
  background: rgba(0, 0, 0, 0.28); color: #fff; padding: 4px 12px; border-radius: 8px; letter-spacing: 1px;
}
@keyframes flashPulse { 0%, 100% { box-shadow: 0 12px 30px -8px rgba(255, 107, 107, 0.4); } 50% { box-shadow: 0 12px 42px -6px rgba(255, 159, 67, 0.75); } }
.plan-old { text-decoration: line-through; opacity: 0.55; font-weight: 400; font-size: 0.8em; margin-right: 3px; }
.plan-off { color: #ff6b6b; font-size: 0.6em; font-weight: 700; vertical-align: middle; background: rgba(255, 107, 107, 0.15); padding: 2px 6px; border-radius: 6px; }
/* Prominent per-package sale badge + card highlight */
.plan { position: relative; }
.plan-on-sale { border-color: rgba(255, 120, 80, 0.6) !important; box-shadow: 0 0 30px -6px rgba(255, 120, 80, 0.45); }
.plan-ribbon {
  position: absolute; top: 16px; right: -7px; z-index: 4;
  font-family: "Space Grotesk", sans-serif; font-weight: 800; font-size: 1.05rem; letter-spacing: 0.5px;
  color: #2a0f00; background: linear-gradient(135deg, #ff6b6b, #ff9f43);
  padding: 7px 15px; border-radius: 8px 0 0 8px;
  box-shadow: 0 8px 22px -4px rgba(255, 107, 107, 0.75);
  animation: flashPulse 1.4s ease-in-out infinite;
}
.plan-ribbon::after { content: ""; position: absolute; right: 0; bottom: -6px; border: 3px solid transparent; border-top-color: #b3431f; border-right-color: #b3431f; }
.plan-price-sale .plan-old { font-size: 0.6em; }
.plan-price-sale .plan-new { color: #ff8f5a; }
@media (prefers-reduced-motion: reduce) { .flash-banner, .plan-ribbon { animation: none; } }

/* blog */
.blog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.blog-card { padding: 24px; cursor: pointer; }
.blog-card .b-tag { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-2); }
.blog-card h3 { font-size: 1.15rem; margin: 8px 0; }
.blog-card p { color: var(--muted); font-size: 0.92rem; }
.blog-card .b-date { font-size: 0.8rem; color: var(--muted); margin-top: 14px; }

/* careers */
.job { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 12px; }
.job .j-meta { color: var(--muted); font-size: 0.86rem; margin-top: 4px; }

.page-foot {
  max-width: var(--maxw); margin: 40px auto 0; padding: 24px;
  border-top: 1px solid var(--border); color: var(--muted); font-size: 0.86rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.page-foot a { color: var(--muted); }
.page-foot a:hover { color: var(--text); }
@media (max-width: 700px) { .blog-grid, .about-stats { grid-template-columns: 1fr; } .page-nav-links { display: none; } }
.turbine { position: absolute; bottom: -20px; opacity: 0.22; }
.turbine .tower { fill: rgba(255, 255, 255, 0.5); }
.turbine .hub { fill: #d7f7ee; }
.turbine .blade { fill: rgba(41, 227, 197, 0.9); }
.turbine .rotor { transform-origin: 50px 52px; animation: spin var(--spd, 7s) linear infinite; will-change: transform; }
@keyframes spin { to { transform: rotate(360deg); } }
/* big turbines flanking the hero on both sides */
.t1 { left: -70px;  width: 250px; }
.t2 { left: 14%;    width: 150px; opacity: 0.13; }
.t3 { right: -80px; width: 280px; }
.t4 { right: 15%;   width: 160px; opacity: 0.13; }
@media (prefers-reduced-motion: reduce) { .turbine .rotor { animation: none; } }
@media (max-width: 1100px) { .t1 { left: -90px; } .t3 { right: -90px; } }
@media (max-width: 760px) { .t2, .t4 { display: none; } .t1, .t3 { width: 150px; opacity: 0.12; } }

/* =====================================================
   COIN MARQUEE (home)
   ===================================================== */
.coin-band { padding: 30px 0 6px; }
.coin-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.coin-marquee + .coin-marquee { margin-top: 14px; }
.cm-track { display: flex; gap: 16px; width: max-content; animation: cm-left 34s linear infinite; will-change: transform; }
.cm-track.rev { animation: cm-right 34s linear infinite; }
.coin-marquee:hover .cm-track { animation-play-state: paused; }
@keyframes cm-left  { to { transform: translateX(-50%); } }
@keyframes cm-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.cm-chip {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 22px 12px 14px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border);
  white-space: nowrap;
}
.coin-logo {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.25rem; font-weight: 800;
  color: #fff; position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25), 0 6px 16px -6px var(--cc, #000);
}
.cm-name { display: flex; flex-direction: column; line-height: 1.15; }
.cm-name b { font-family: "Space Grotesk"; font-size: 1rem; }
.cm-name span { font-size: 0.78rem; color: var(--muted); }

/* =====================================================
   REFERRAL SECTION (home)
   ===================================================== */
.ref-home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ref-step { padding: 30px 26px; position: relative; overflow: hidden; }
.ref-step .ref-ico {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  font-size: 1.5rem; margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(176, 124, 255, 0.22), rgba(91, 140, 255, 0.14));
  border: 1px solid var(--border);
}
.ref-step h3 { font-size: 1.18rem; margin-bottom: 8px; }
.ref-step p { color: var(--muted); font-size: 0.94rem; }
.ref-step .ref-num {
  position: absolute; top: 14px; right: 20px;
  font-family: "Space Grotesk"; font-weight: 700; font-size: 2.6rem;
  color: rgba(255, 255, 255, 0.06);
}
.ref-cta { text-align: center; margin-top: 30px; }
.ref-cta .ref-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding: 9px 18px; border-radius: 999px; font-weight: 600;
  background: rgba(41, 227, 160, 0.12); border: 1px solid rgba(41, 227, 160, 0.3); color: var(--good);
}
@media (max-width: 820px) { .ref-home-grid { grid-template-columns: 1fr; } }

/* ---- 5-level referral chain diagram (homepage) ---- */
.ref-chain {
  display: flex; align-items: stretch; justify-content: center; flex-wrap: wrap;
  gap: 8px; margin: 8px 0 34px;
}
.rc-node {
  flex: 0 0 auto; min-width: 122px; text-align: center;
  padding: 14px 12px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.rc-node b { font-size: 0.98rem; font-family: "Space Grotesk"; }
.rc-node b span { color: var(--brand-2); font-weight: 600; white-space: nowrap; }
.rc-node small { color: var(--muted); font-size: 0.72rem; }
.rc-ava { font-size: 1.5rem; }
.rc-lvl {
  display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 8px;
  border-radius: 7px; font-family: "Space Grotesk"; font-weight: 700; font-size: 0.82rem; color: #04121a;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.rc-you { border-color: rgba(41, 227, 197, 0.4); background: rgba(41, 227, 197, 0.08); }
.rc-off { opacity: 0.5; }
.rc-off .rc-lvl { background: var(--muted); color: var(--bg); }
.rc-arrow { align-self: center; color: var(--brand-2); font-size: 1.3rem; font-weight: 700; }
.rc-arrow.rc-stop { color: #ff6b6b; }

/* ---- reward table (homepage) ---- */
.ref-table {
  margin: 6px auto 6px; max-width: 760px;
  display: flex; flex-direction: column; gap: 7px;
}
.rht-row {
  display: grid; grid-template-columns: 0.8fr 1.2fr 1.4fr 1.3fr; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); font-size: 0.9rem;
}
.rht-head { background: transparent; border: 0; padding: 2px 16px; color: var(--muted);
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; }
.rht-lvl { font-family: "Space Grotesk"; font-weight: 700; color: var(--brand-2); }
.rht-who { color: var(--muted); }
.rht-pct { font-family: "Space Grotesk"; font-weight: 600; }
.rht-th { color: var(--good); font-weight: 600; }
.ref-note {
  max-width: 760px; margin: 12px auto 0; text-align: center;
  color: var(--muted); font-size: 0.88rem;
}
@media (max-width: 640px) {
  .rc-arrow { transform: rotate(90deg); }
  .ref-chain { flex-direction: column; align-items: center; }
  .rc-node { width: 100%; max-width: 260px; }
  .rht-row { grid-template-columns: 0.7fr 1.3fr; row-gap: 3px; }
  .rht-who { display: none; }
}

/* =====================================================
   FOOTER COIN LOGOS
   ===================================================== */
.footer-coins { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0; padding: 22px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.footer-coins .fc { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 0.88rem; }
.footer-coins .coin-logo { width: 30px; height: 30px; font-size: 0.95rem; }

/* =====================================================
   CALCULATOR — clearer daily profit
   ===================================================== */
.calc-hint { font-size: 0.8rem; color: var(--muted); margin-top: 8px; }
.calc-hint b { color: var(--brand-2); }
.calc-daily {
  text-align: center; padding: 22px; border-radius: 16px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(41, 227, 160, 0.14), rgba(91, 140, 255, 0.08));
  border: 1px solid rgba(41, 227, 160, 0.3);
}
.calc-daily .cd-num { font-family: "Space Grotesk"; font-size: 2.6rem; font-weight: 700; color: var(--good); }
.calc-daily .cd-cap { font-size: 0.82rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }

/* =====================================================
   MOBILE HORIZONTAL-OVERFLOW FIX
   The fixed background glow blobs sit partly off-canvas (glow-2 is at
   right:-180px). Fixed elements are positioned to the viewport, so the
   body{overflow-x:hidden} rule does NOT clip them — on phones this adds a
   sideways scroll ("moves to the right"). Clamp the root and drop the
   off-canvas blobs on narrow screens.
   ===================================================== */
/* Brand logo mark — replace the plain ⬡ glyph with the SVG logo everywhere
   the .brand-mark span appears (nav, dashboard header, auth, footer). */
.brand-mark {
  display: inline-block !important;
  width: 27px; height: 27px;
  vertical-align: middle;
  font-size: 0 !important;
  background: url("logo.svg") center / contain no-repeat !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: initial !important;
}

html { overflow-x: hidden; }
@media (max-width: 760px) {
  /* These decorative layers are position:fixed / absolute and poke past the
     right edge of the viewport. Fixed elements are NOT clipped by
     body{overflow-x:hidden}, so on phones they add a sideways scroll and make
     the page look off-centre with empty space on the right. Drop them on
     small screens (they're barely visible there anyway). */
  .bg-glow { display: none; }
  .turbines, .turbines-fixed { display: none; }
  /* Dashboard header: wrap its items (incl. the right-side group with the Log
     out button) instead of overflowing the screen to the right. */
  .dash-top { flex-wrap: wrap; row-gap: 8px; gap: 10px; padding: 10px 14px; }
  .dash-top-right { flex-wrap: wrap; gap: 8px; }
  .dash-user { display: none; } /* hide the long username to save width */
  body, .dash-main, .container, main { max-width: 100%; overflow-x: hidden; }
  /* Grid items default to min-width:auto and refuse to shrink below their
     content, so the dashboard panels spill past a phone screen on the right.
     Force every column/panel to shrink to fit the viewport. */
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-col { min-width: 0; grid-template-columns: minmax(0, 1fr); }
  .dash-col > .card, .card, .dash-panel, .dash-stat, .price-chip { min-width: 0; }
  .wd-amt-row input, .addr-row input, .field input, .panel-form input,
  .exchange-row select, .exchange-row input { min-width: 0; }
  .addr-row, .wd-amt-row { flex-wrap: wrap; }
  /* Home profit calculator: shrink its grid + rows so the $ values on the
     right aren't clipped off the screen. */
  .calc { grid-template-columns: minmax(0, 1fr); }
  .calc, .calc-controls, .calc-output, .calc-row, .calc-field { min-width: 0; }
  .calc-field input[type="range"] { width: 100%; max-width: 100%; }
  /* Home calculator coin picker: wrap so the last coin (RVN) isn't cut off. */
  .coin-toggle { flex-wrap: wrap; }
  /* Affiliate stat cards: shrink so all three fit across a phone screen. */
  .ref-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ref-stats .dash-stat { padding: 12px 8px; }
  .ref-stats .dash-stat-val { font-size: 1.2rem; }
  .ref-stats .dash-stat-label { font-size: 0.72rem; }
}

/* ============================================================
   Support widget (support.js) — floating chat with HashNova logo
   ============================================================ */
.hn-support {
  position: fixed; right: 22px; bottom: 22px; z-index: 400;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
/* Telegram button — sits just above the support chat bubble. */
.hn-tg-fab {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #229ed9; color: #fff; text-decoration: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s var(--ease), filter 0.15s var(--ease);
}
.hn-tg-fab:hover { transform: scale(1.08); filter: brightness(1.05); }
.hn-tg-fab svg { display: block; }

.hn-support-fab {
  width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #04121f; font-size: 1.6rem; line-height: 1;
  box-shadow: 0 10px 26px -6px rgba(41, 227, 197, 0.55), 0 8px 20px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s var(--ease);
}
.hn-support-fab:hover { transform: scale(1.07); }
/* Closed = showing the logo: light disc so the mark stays visible. */
.hn-support-fab:not(.is-open) { background: #eafaf7; }
.hn-support-fab svg { display: block; }

.hn-support-panel {
  position: fixed; right: 22px; bottom: 92px;
  width: 340px; max-width: calc(100vw - 44px);
  height: 460px; max-height: calc(100vh - 130px);
  display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; z-index: 401; animation: hnSupUp 0.2s var(--ease);
}
@keyframes hnSupUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.hn-support-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; flex-shrink: 0; font-weight: 700; color: #eafff6;
  background: linear-gradient(135deg, rgba(41,227,197,0.22), rgba(91,140,255,0.22));
  border-bottom: 1px solid var(--border);
}
.hn-support-title { display: inline-flex; align-items: center; gap: 8px; }
.hn-support-logo { display: inline-flex; background: #eafaf7; border-radius: 50%; padding: 3px; }
.hn-support-logo svg { display: block; width: 20px; height: 20px; }
.hn-led { width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); animation: hnBlink 1.4s infinite; }
@keyframes hnBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.hn-support-close { background: none; border: none; color: inherit; font-size: 1.4rem; cursor: pointer; line-height: 1; }

.hn-support-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.hn-msg { max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: 0.9rem; line-height: 1.45; }
.hn-msg.bot { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.hn-msg.user { align-self: flex-end; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #04121f; font-weight: 600; border-bottom-right-radius: 4px; }
.hn-typing { display: inline-flex; gap: 4px; }
.hn-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: hnDot 1s infinite; }
.hn-typing span:nth-child(2) { animation-delay: 0.15s; }
.hn-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes hnDot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.hn-support-topics { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.hn-support-topic {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 7px 11px; border-radius: 999px; font-size: 0.82rem; cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.hn-support-topic:hover { background: var(--surface-2); border-color: var(--brand); }

.hn-support-input {
  flex-shrink: 0; display: flex; gap: 8px; align-items: center;
  padding: 10px 12px; border-top: 1px solid var(--border); background: rgba(0,0,0,0.15);
}
.hn-support-input input {
  flex: 1 1 auto; min-width: 0; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px; padding: 9px 14px;
  font-size: 0.88rem; outline: none;
}
.hn-support-input input:focus { border-color: var(--brand); }
.hn-support-send {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #04121f; font-size: 1rem;
}
.hn-support-send:hover { filter: brightness(1.08); }

.hn-support-auth {
  flex-shrink: 0; display: flex; flex-direction: column; gap: 8px;
  padding: 12px 14px; border-top: 1px solid var(--border); background: rgba(0,0,0,0.15);
}
.hn-support-btn {
  display: block; text-align: center; text-decoration: none;
  padding: 10px 14px; border-radius: 12px; font-size: 0.9rem; font-weight: 600;
  background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #04121f;
  transition: filter 0.15s var(--ease);
}
.hn-support-btn:hover { filter: brightness(1.08); }
.hn-support-btn.ghost {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.hn-support-btn.ghost:hover { background: var(--surface-2); }

@media (max-width: 480px) {
  .hn-support-panel { right: 12px; bottom: 84px; width: calc(100vw - 24px); }
  .hn-support { right: 14px; bottom: 14px; }
}

/* ===== Live activity popup (social proof) ===== */
.hn-activity {
  position: fixed; left: 18px; bottom: 22px; z-index: 480;
  max-width: 330px; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 15px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(16px) scale(0.98); pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.hn-activity.show { opacity: 1; transform: translateY(0) scale(1); }
.hna-row { display: flex; align-items: center; gap: 10px; }
.hna-flag { width: 22px; height: 16px; border-radius: 3px; object-fit: cover; flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); }
.hna-coin { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; font-size: 0.72rem; font-weight: 700; vertical-align: middle; }
.hna-txt { font-size: 0.86rem; color: var(--text); line-height: 1.35; }
.hna-txt b { color: var(--brand-2); }
.hna-usd { color: var(--muted); font-size: 0.82em; }
.hna-plan { color: var(--brand-2); font-weight: 600; }
.hna-stake { color: var(--good); font-weight: 700; }
.hna-swap { color: var(--brand); font-weight: 700; font-size: 0.8em; background: rgba(91, 140, 255, 0.16); padding: 1px 6px; border-radius: 6px; margin-right: 2px; }
@media (max-width: 560px) { .hn-activity { left: 10px; right: 10px; bottom: 12px; max-width: none; } }

/* ============================================================
   Telegram Mini App theme (.tg-app on <html>, set by tgtheme.js)
   A distinct violet/magenta palette + rounder cards so the Mini App
   is visibly different from the blue/teal web version. Because almost
   everything is painted from these CSS variables, re-tinting them
   re-themes the whole app in one place.
   ============================================================ */
.tg-app {
  --bg: #171130;
  --bg-2: #221944;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-2: rgba(255, 255, 255, 0.09);
  --border: rgba(173, 140, 255, 0.20);
  --text: #f4f0ff;
  --muted: #b3a7d6;
  --brand: #9a6cff;      /* violet (was blue) */
  --brand-2: #ff6fae;    /* magenta-pink (was teal) */
  --accent: #4cc9ff;     /* sky accent */
  --good: #52e0b0;
  --radius: 22px;
  --shadow: 0 24px 60px -20px rgba(20, 6, 40, 0.75);
}
.tg-app body { background: #100a24; }

/* Already inside Telegram → the "Join us on Telegram" button is pointless. */
.tg-app .hn-tg-fab { display: none !important; }

/* Support bubble accent follows the Mini-App palette (its closed disc is a
   fixed light colour, so give it a subtle violet tint to match). */
.tg-app .hn-support-fab:not(.is-open) { background: #efe9ff; }
.tg-app .hn-support-fab {
  box-shadow: 0 10px 26px -6px rgba(154, 108, 255, 0.55), 0 8px 20px rgba(0, 0, 0, 0.45);
}

/* Small "Mini App" ribbon on the brand mark so the context is obvious. */
.tg-app .brand::after {
  content: "Mini App";
  margin-left: 8px; padding: 2px 8px; border-radius: 999px;
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.04em;
  color: #100a24; background: linear-gradient(135deg, var(--brand-2), var(--brand));
  vertical-align: middle;
}
