/* =========================================================
   Dreamexch - Cosmic Space Theme
   Fonts: Lexend (headings), Cabin (body)
   ========================================================= */

:root {
  /* Brand palette */
  --purple: #5c0181;          /* deep purple */
  --purple-bright: #7c3aed;   /* bright accent / CTA */
  --purple-tint: #f3e8ff;     /* light section bg */
  --card-dark: #1a0a2e;       /* dark card bg */
  --space-deep: #0d0015;      /* footer / deepest */
  --space-void: #06000f;      /* body base */
  --white: #ffffff;

  /* Derived */
  --bg: #0a0118;
  --bg-alt: #100221;
  --text: #ece7f5;
  --text-muted: #b3a7c9;
  --text-dim: #8a7ba3;
  --border: rgba(124, 58, 237, 0.22);
  --border-strong: rgba(124, 58, 237, 0.45);
  --glow: 0 0 15px rgba(92, 1, 129, 0.3);
  --glow-bright: 0 0 22px rgba(124, 58, 237, 0.5);

  --radius: 12px;
  --radius-lg: 18px;
  --maxw: 1160px;
  --nav-h: 68px;

  --ff-head: "Lexend", system-ui, sans-serif;
  --ff-body: "Cabin", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ff-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Global starfield background ---------- */
.starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 15% 20%, rgba(92, 1, 129, 0.28), transparent 42%),
    radial-gradient(circle at 85% 12%, rgba(124, 58, 237, 0.20), transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(92, 1, 129, 0.22), transparent 50%),
    var(--space-void);
  pointer-events: none;
}
.starfield::before,
.starfield::after {
  content: "";
  position: absolute;
  inset: -50%;
  background-repeat: repeat;
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 120px 80px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 200px 150px, rgba(255,255,255,0.85), transparent),
    radial-gradient(1px 1px at 300px 50px, rgba(200,180,255,0.8), transparent),
    radial-gradient(1px 1px at 80px 220px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 260px 260px, rgba(255,255,255,0.7), transparent);
  background-size: 340px 340px;
  opacity: 0.5;
  animation: drift 140s linear infinite;
}
.starfield::after {
  background-size: 500px 500px;
  opacity: 0.35;
  animation: drift 220s linear infinite reverse;
}
@keyframes drift {
  from { transform: translate(0, 0); }
  to   { transform: translate(-340px, -340px); }
}

/* Twinkling star dots layer */
.stars-twinkle {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.stars-twinkle span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px 1px rgba(255,255,255,0.6);
  animation: twinkle 3.5s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.7); }
  50%      { opacity: 1;    transform: scale(1.3); }
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}
section { position: relative; }
.section {
  padding: 78px 0;
}
.section--alt {
  background: linear-gradient(180deg, transparent, rgba(92,1,129,0.06) 15%, rgba(92,1,129,0.06) 85%, transparent);
}
.section-head {
  max-width: 760px;
  margin: 0 auto 46px;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple-bright);
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(124,58,237,0.08);
  margin-bottom: 16px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--ff-head);
  color: var(--white);
  line-height: 1.18;
  margin: 0 0 0.5em;
  font-weight: 700;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1.1em; color: var(--text-muted); }
a { color: var(--purple-bright); text-decoration: none; transition: color .2s; }
a:hover { color: #a06bff; }
strong { color: var(--white); font-weight: 600; }
.lead { font-size: 1.16rem; color: var(--text); }
.text-glow { text-shadow: 0 0 20px rgba(124,58,237,0.5); }
ul, ol { color: var(--text-muted); padding-left: 1.25em; }
li { margin-bottom: 0.5em; }

.prose { max-width: 820px; margin: 0 auto; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; color: #d9c9ff; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .25s ease, background .2s;
  text-align: center;
  line-height: 1;
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple-bright), var(--purple));
  color: #fff;
  box-shadow: 0 0 0 rgba(124,58,237,0);
  animation: pulse-glow 3s ease-in-out infinite;
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 26px rgba(124,58,237,0.65);
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 12px rgba(124,58,237,0.35); }
  50%      { box-shadow: 0 0 26px rgba(124,58,237,0.7); }
}
.btn-ghost {
  background: rgba(124,58,237,0.08);
  border-color: var(--border-strong);
  color: var(--white);
}
.btn-ghost:hover {
  color: #fff;
  background: rgba(124,58,237,0.18);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}
.btn-lg { padding: 16px 34px; font-size: 1.08rem; }
.btn-block { width: 100%; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: transparent;
  transition: background .3s, backdrop-filter .3s, box-shadow .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10,1,24,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 34px; width: auto; display: block; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-family: var(--ff-head);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 9px 13px;
  border-radius: 8px;
  transition: color .2s, background .2s, box-shadow .25s;
}
.nav-links a:hover { color: #fff; background: rgba(124,58,237,0.12); }
.nav-links a.active {
  color: #fff;
  background: rgba(124,58,237,0.16);
  box-shadow: inset 0 0 0 1px var(--border-strong), 0 0 12px rgba(124,58,237,0.35);
}
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  width: 42px; height: 40px;
  cursor: pointer;
  color: #fff;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px 18px 22px;
    background: rgba(10,1,24,0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-140%);
    transition: transform .32s ease;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 14px; font-size: 1.02rem; }
  .nav .desktop-cta { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 70px) 0 88px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,58,237,0.28), transparent 60%),
    linear-gradient(180deg, var(--purple) -20%, #2a0342 22%, #12002a 60%, var(--bg) 100%);
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 140px;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; max-width: 860px; margin: 0 auto; }
.hero h1 { margin-bottom: 0.35em; }
.hero .lead { max-width: 680px; margin: 0 auto 32px; color: #e6ddf6; }
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.hero-badges {
  display: flex;
  gap: 10px 20px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-dim);
  font-family: var(--ff-head);
  letter-spacing: 0.04em;
}
.hero-badges span { display: inline-flex; align-items: center; gap: 7px; }
.hero-badges span::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--purple-bright);
  box-shadow: 0 0 8px var(--purple-bright);
}

/* Floating planets/orbs in hero */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
  z-index: 1;
  animation: float 12s ease-in-out infinite;
}
.orb-1 { width: 90px; height: 90px; top: 18%; left: 8%;
  background: radial-gradient(circle at 30% 30%, #b57bff, #5c0181); }
.orb-2 { width: 54px; height: 54px; top: 62%; left: 15%;
  background: radial-gradient(circle at 30% 30%, #7c3aed, #2a0342); animation-delay: -3s; }
.orb-3 { width: 120px; height: 120px; top: 24%; right: 7%;
  background: radial-gradient(circle at 30% 30%, #9d5bff, #3a0357); animation-delay: -6s; }
.orb-4 { width: 40px; height: 40px; top: 70%; right: 16%;
  background: radial-gradient(circle at 30% 30%, #c9a4ff, #5c0181); animation-delay: -1.5s; }
@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50%      { transform: translateY(-24px) translateX(10px); }
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--card-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .22s ease, box-shadow .28s ease, border-color .25s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 0 15px rgba(92,1,129,0.3), 0 0 30px rgba(124,58,237,0.18);
}
.card-icon {
  width: 50px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(92,1,129,0.15));
  border: 1px solid var(--border-strong);
  margin-bottom: 16px;
  color: #c9a4ff;
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { color: #fff; margin-bottom: 0.4em; }
.card p { margin-bottom: 0; font-size: 0.98rem; }

/* Feature list rows */
.feature-row { display: flex; gap: 16px; align-items: flex-start; }
.feature-row .card-icon { flex-shrink: 0; margin-bottom: 0; }

/* Stat blocks */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  text-align: center;
  padding: 24px 14px;
  background: rgba(26,10,46,0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat .num {
  font-family: var(--ff-head);
  font-weight: 800;
  font-size: 2rem;
  color: #fff;
  text-shadow: 0 0 18px rgba(124,58,237,0.5);
}
.stat .label { font-size: 0.86rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }

/* Payment chips */
.pay-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pay-chip {
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(26,10,46,0.7);
  border: 1px solid var(--border-strong);
  color: #d9c9ff;
}

/* Steps */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step {
  position: relative;
  padding: 22px 22px 22px 74px;
  background: var(--card-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 20px; top: 20px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-family: var(--ff-head);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--purple-bright), var(--purple));
  box-shadow: 0 0 14px rgba(124,58,237,0.5);
}
.step h4 { margin-bottom: 0.3em; color: #fff; }
.step p { margin-bottom: 0; font-size: 0.96rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  background: var(--card-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
}
.faq-item[open] { border-color: var(--border-strong); box-shadow: var(--glow); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 52px 18px 22px;
  font-family: var(--ff-head);
  font-weight: 600;
  color: #fff;
  position: relative;
  font-size: 1.02rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 22px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--purple-bright);
  transition: transform .25s;
  line-height: 1;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item .faq-body { padding: 0 22px 20px; }
.faq-item .faq-body p { margin-bottom: 0; }

/* ---------- Testimonials ---------- */
.testimonial {
  background: var(--card-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.testimonial:hover { box-shadow: var(--glow); border-color: var(--border-strong); }
.testimonial .stars { color: #ffc64d; letter-spacing: 2px; margin-bottom: 10px; font-size: 0.95rem; }
.testimonial p { color: var(--text); font-style: italic; }
.testimonial .who { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.testimonial .avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-head); font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--purple-bright), var(--purple));
  flex-shrink: 0;
}
.testimonial .who .name { font-family: var(--ff-head); font-weight: 600; color: #fff; font-size: 0.95rem; }
.testimonial .who .city { font-size: 0.82rem; color: var(--text-dim); }

/* ---------- Forms ---------- */
.form-card {
  max-width: 460px;
  margin: 0 auto;
  background: var(--card-dark);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  box-shadow: 0 0 30px rgba(92,1,129,0.35), 0 0 60px rgba(124,58,237,0.12);
}
.form-card--wide { max-width: 560px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--ff-head);
  font-weight: 500;
  font-size: 0.9rem;
  color: #d9c9ff;
  margin-bottom: 7px;
}
.field .req { color: #ff6b9d; }
.input, .select, textarea.input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--ff-body);
  font-size: 1rem;
  color: #fff;
  background: rgba(6,0,15,0.6);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: #6f6188; }
.input:focus, .select:focus, textarea.input:focus {
  outline: none;
  border-color: var(--purple-bright);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.25);
}
textarea.input { resize: vertical; min-height: 120px; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237c3aed' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.pw-wrap { position: relative; }
.pw-toggle {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  display: flex;
}
.pw-toggle:hover { color: var(--purple-bright); }
.pw-toggle svg { width: 20px; height: 20px; }

.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.check-row input[type=checkbox] {
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--purple-bright);
  flex-shrink: 0;
  cursor: pointer;
}
.check-row a { text-decoration: underline; }

/* Password strength meter */
.strength { margin: -6px 0 16px; }
.strength-bars { display: flex; gap: 6px; margin-bottom: 5px; }
.strength-bars i {
  height: 5px; flex: 1; border-radius: 3px;
  background: rgba(124,58,237,0.15);
  transition: background .25s;
}
.strength-bars i.on { background: linear-gradient(90deg, var(--purple), var(--purple-bright)); }
.strength-label { font-size: 0.78rem; color: var(--text-dim); }

.form-alt { text-align: center; margin-top: 18px; font-size: 0.92rem; color: var(--text-muted); }
.form-note { font-size: 0.82rem; color: var(--text-dim); text-align: center; margin-top: 14px; }

/* ---------- Tools ---------- */
.tool-card {
  background: var(--card-dark);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 0 15px rgba(92,1,129,0.25);
}
.tool-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tool-tab {
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
}
.tool-tab.active { background: linear-gradient(135deg, var(--purple-bright), var(--purple)); color: #fff; box-shadow: var(--glow); }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
@media (max-width: 620px) { .tool-grid { grid-template-columns: 1fr; } }

.result-table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 0.94rem; }
.result-table th, .result-table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.result-table th { font-family: var(--ff-head); color: #d9c9ff; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.result-table td { color: var(--text); }
.cell-profit { color: #4ade80 !important; font-weight: 600; background: rgba(74,222,128,0.08); }
.cell-loss { color: #f87171 !important; font-weight: 600; background: rgba(248,113,113,0.08); }
.tool-explain {
  margin-top: 18px;
  padding: 16px 18px;
  background: rgba(6,0,15,0.5);
  border: 1px solid var(--border);
  border-left: 3px solid var(--purple-bright);
  border-radius: 8px;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.tool-explain strong { color: #d9c9ff; }

/* Higher/Lower card game */
.hl-stage { text-align: center; }
.playing-card {
  width: 150px; height: 210px;
  margin: 0 auto 22px;
  perspective: 900px;
}
.card-inner {
  position: relative;
  width: 100%; height: 100%;
  transition: transform .6s;
  transform-style: preserve-3d;
}
.card-inner.flipped { transform: rotateY(180deg); }
.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-head);
  border: 2px solid var(--border-strong);
}
.card-front {
  background: linear-gradient(160deg, #fff, #ede4ff);
  color: var(--purple);
  flex-direction: column;
  transform: rotateY(180deg);
}
.card-front .rank { font-size: 3.4rem; font-weight: 800; line-height: 1; }
.card-front .suit { font-size: 2rem; margin-top: 6px; }
.card-front.red { color: #d11a5c; }
.card-back {
  background:
    radial-gradient(circle at 25% 25%, rgba(255,255,255,0.7) 0.5px, transparent 1.5px),
    radial-gradient(circle at 75% 65%, rgba(255,255,255,0.6) 0.5px, transparent 1.5px),
    radial-gradient(circle at 55% 40%, rgba(255,255,255,0.5) 0.5px, transparent 1.5px),
    linear-gradient(160deg, #2a0342, #12002a);
  background-size: 30px 30px, 40px 40px, 24px 24px, cover;
  color: var(--purple-bright);
}
.card-back span { font-size: 2.4rem; opacity: 0.5; }
.hl-streak { font-family: var(--ff-head); font-weight: 700; font-size: 1.1rem; color: #fff; margin-bottom: 6px; }
.hl-streak b { color: var(--purple-bright); font-size: 1.4rem; }
.hl-hint { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 18px; }
.hl-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hl-gameover { color: #f87171; font-family: var(--ff-head); font-weight: 700; margin-bottom: 10px; }

/* Trade log */
.trade-form { display: grid; grid-template-columns: repeat(5, 1fr) auto; gap: 10px; align-items: end; }
@media (max-width: 820px) { .trade-form { grid-template-columns: repeat(2, 1fr); } }
.trade-form .field { margin-bottom: 0; }
.trade-form label { font-size: 0.78rem; }
.trade-form .input, .trade-form .select { padding: 9px 11px; font-size: 0.92rem; }
.table-scroll { overflow-x: auto; margin-top: 20px; }
.log-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 620px; }
.log-table th, .log-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.log-table th { font-family: var(--ff-head); color: #d9c9ff; font-weight: 600; font-size: 0.78rem; text-transform: uppercase; }
.log-table tfoot td { font-weight: 700; color: #fff; border-top: 2px solid var(--border-strong); font-family: var(--ff-head); }
.pnl-pos { color: #4ade80; font-weight: 600; }
.pnl-neg { color: #f87171; font-weight: 600; }
.pnl-pending { color: var(--text-dim); }
.row-best { background: rgba(74,222,128,0.1); }
.row-worst { background: rgba(248,113,113,0.1); }
.tool-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.empty-row td { text-align: center; color: var(--text-dim); font-style: italic; padding: 22px; }

/* ---------- CTA banner ---------- */
.cta-banner {
  text-align: center;
  background:
    radial-gradient(ellipse 70% 120% at 50% 0%, rgba(124,58,237,0.3), transparent 60%),
    linear-gradient(135deg, #2a0342, #12002a);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 50px 30px;
  box-shadow: 0 0 30px rgba(92,1,129,0.3);
}
.cta-banner h2 { margin-bottom: 0.4em; }
.cta-banner p { max-width: 560px; margin: 0 auto 24px; color: #e6ddf6; }

/* ---------- Responsible gaming note ---------- */
.rg-note {
  background: rgba(26,10,46,0.6);
  border: 1px solid var(--border);
  border-left: 3px solid #ffc64d;
  border-radius: 10px;
  padding: 18px 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.rg-note strong { color: #ffc64d; }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  background: var(--space-deep);
  border-top: 1px solid var(--border);
  padding: 60px 0 26px;
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 40px 40px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 160px 120px, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 280px 60px, rgba(200,180,255,0.5), transparent),
    radial-gradient(1px 1px at 380px 180px, rgba(255,255,255,0.35), transparent);
  background-size: 420px 220px;
  opacity: 0.6;
  pointer-events: none;
}
.footer .container { position: relative; z-index: 1; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 34px;
  margin-bottom: 40px;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand img { height: 36px; margin-bottom: 14px; }
.footer-brand p { font-size: 0.92rem; color: var(--text-dim); max-width: 320px; }
.footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.06em; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 9px; }
.footer ul a { color: var(--text-muted); font-size: 0.92rem; }
.footer ul a:hover { color: var(--purple-bright); }
.rg-badges {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}
.rg-badge {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: rgba(124,58,237,0.08);
  color: #d9c9ff;
}
.rg-badge.age { color: #ffc64d; border-color: rgba(255,198,77,0.4); background: rgba(255,198,77,0.08); }
.footer-bottom {
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-dim);
}
.footer-bottom p { margin-bottom: 8px; color: var(--text-dim); }
.footer-bottom a { color: var(--purple-bright); }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-3 { margin-top: 24px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }
.divider-fade { height: 1px; background: linear-gradient(90deg, transparent, var(--border-strong), transparent); margin: 0 auto; max-width: 600px; }
.badge-inline {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8rem; font-family: var(--ff-head); font-weight: 600;
  color: #ffc64d; padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(255,198,77,0.35); background: rgba(255,198,77,0.08);
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 28px; } }

/* Page hero (subpages) */
.page-hero {
  padding: calc(var(--nav-h) + 56px) 0 46px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 70% at 50% 0%, rgba(124,58,237,0.24), transparent 60%),
    linear-gradient(180deg, #2a0342, #12002a 70%, var(--bg));
  position: relative;
}
.page-hero .lead { max-width: 640px; margin: 0 auto; color: #e6ddf6; }
.breadcrumb { font-size: 0.84rem; color: var(--text-dim); margin-bottom: 14px; }
.breadcrumb a { color: var(--text-muted); }
.updated { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 20px; }

.toast {
  position: fixed;
  bottom: 26px; left: 50%;
  transform: translateX(-50%) translateY(140%);
  background: var(--card-dark);
  border: 1px solid var(--border-strong);
  color: #fff;
  padding: 13px 22px;
  border-radius: 10px;
  box-shadow: 0 0 24px rgba(124,58,237,0.5);
  font-family: var(--ff-head);
  font-weight: 500;
  font-size: 0.92rem;
  z-index: 200;
  transition: transform .35s ease;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Reduced motion: kill ALL animation ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .starfield::before, .starfield::after { display: none !important; }
  .stars-twinkle { display: none !important; }
  .orb { display: none !important; }
  .btn-primary { animation: none !important; }
}
