:root {
  --bg: #060b12;
  --panel: #0d1522;
  --panel-2: #111d2e;
  --text: #eff7ff;
  --muted: #aebdd0;
  --blue: #4ea1ff;
  --cyan: #39e6d2;
  --green: #48e07c;
  --red: #ff5c6f;
  --gold: #ffc857;
  --line: rgba(239,247,255,0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(78, 161, 255, 0.18), transparent 32rem),
    radial-gradient(circle at bottom left, rgba(57, 230, 210, 0.12), transparent 34rem),
    linear-gradient(135deg, rgba(255, 200, 87, 0.08), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid var(--line);
  background: rgba(6, 11, 18, 0.86);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.logo-mark {
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  border-radius: 0.55rem;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #04101b;
  font-weight: 950;
  font-size: 0.8rem;
}

nav {
  display: flex;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

nav a {
  text-decoration: none;
}

nav a:hover {
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(290px, 0.95fr);
  gap: 3rem;
  align-items: center;
  min-height: 78vh;
  padding: clamp(3rem, 8vw, 7rem) clamp(1rem, 4vw, 4rem);
}

.eyebrow,
.section-label {
  color: var(--cyan);
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1;
}

h1 {
  font-size: clamp(3.3rem, 10vw, 8.4rem);
  letter-spacing: -0.08em;
  max-width: 9ch;
}

h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  margin-top: 0.5rem;
  max-width: 13ch;
}

h3 {
  font-size: 1.35rem;
}

.subtitle {
  max-width: 46rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.button,
.signup-form button,
.market-actions button {
  border: 0;
  border-radius: 0.55rem;
  padding: 0.9rem 1.2rem;
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
}

.primary,
.signup-form button,
.market-actions button {
  background: var(--cyan);
  color: #04101b;
}

.secondary {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.hero-card,
.section,
.market-card,
.portfolio-card,
.product-card {
  border: 1px solid var(--line);
  background: rgba(13, 21, 34, 0.84);
  box-shadow: 0 20px 60px rgba(0,0,0,0.24);
}

.hero-card {
  border-radius: 1.4rem;
  min-height: 430px;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.terminal-card {
  width: min(410px, 86vw);
  border: 1px solid rgba(57,230,210,0.28);
  border-radius: 1rem;
  overflow: hidden;
  background: #06101a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.terminal-top {
  display: flex;
  gap: 0.45rem;
  padding: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.terminal-top span {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: var(--muted);
}

.ticker-line {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: var(--muted);
}

.green { color: var(--green); }
.red { color: var(--red); }
.gold { color: var(--gold); }

.section {
  margin: 1.5rem clamp(1rem, 4vw, 4rem);
  padding: clamp(1.5rem, 4vw, 4rem);
  border-radius: 1.4rem;
}

.section p,
.section li {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 68rem;
}

.split,
.rules {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
}

.sim-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  margin-top: 2rem;
}

.market-card,
.portfolio-card {
  border-radius: 1rem;
  padding: 1.2rem;
}

.market-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.small-label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 900;
}

.price {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 950;
  color: var(--green);
}

.chart-placeholder {
  position: relative;
  min-height: 180px;
  border-radius: 0.8rem;
  background:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px),
    #07101a;
  background-size: 32px 32px;
  margin: 1rem 0;
  overflow: hidden;
}

.chart-line {
  position: absolute;
  left: -10%;
  top: 50%;
  width: 120%;
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green));
  transform: rotate(-8deg);
  border-radius: 999px;
  box-shadow: 0 0 22px rgba(57,230,210,0.5);
}

.market-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.portfolio-card dl {
  margin: 1rem 0 0;
}

.portfolio-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.portfolio-card dt {
  color: var(--muted);
}

.portfolio-card dd {
  margin: 0;
  font-weight: 950;
}

.game-message {
  min-height: 2.5rem;
  color: var(--gold) !important;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.feature-grid article {
  border: 1px solid var(--line);
  background: rgba(17, 29, 46, 0.72);
  border-radius: 1rem;
  padding: 1.2rem;
}

.feature-grid p {
  font-size: 0.95rem;
}

.rules ul {
  margin: 0;
  padding-left: 1.3rem;
}

.signup {
  text-align: center;
}

.signup h2,
.signup p {
  margin-left: auto;
  margin-right: auto;
}

.signup-form {
  display: flex;
  gap: 0.75rem;
  max-width: 520px;
  margin: 1.5rem auto 0;
}

.signup-form input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  background: #07101a;
  color: var(--text);
  border-radius: 0.55rem;
  padding: 0.9rem 1rem;
}

.signup-message {
  min-height: 1.5rem;
  color: var(--cyan) !important;
}

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 1.5rem clamp(1rem, 4vw, 4rem);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .hero,
  .split,
  .rules,
  .sim-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  nav {
    display: none;
  }

  .signup-form {
    flex-direction: column;
  }

  .market-actions {
    flex-direction: column;
  }
}
