:root {
  --bg: #070a11;
  --bg-2: #0b101b;
  --panel: rgba(18, 25, 39, 0.86);
  --panel-solid: #111827;
  --panel-2: #151e2e;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(240, 184, 90, 0.35);
  --text: #f6f2e8;
  --muted: #9ca7b8;
  --amber: #f0b85a;
  --amber-2: #ffd58a;
  --teal: #5be0c2;
  --violet: #a68cff;
  --danger: #ff7c86;
  --success: #70e6a1;
  --shadow: 0 24px 80px rgba(0,0,0,.35);
  --radius: 20px;
  --radius-sm: 12px;
  --max: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(91,224,194,.09), transparent 28rem),
    radial-gradient(circle at 85% 20%, rgba(166,140,255,.08), transparent 30rem),
    linear-gradient(180deg, #070a11 0%, #0a0f19 55%, #070a11 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
.container { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.page { min-height: 100vh; }
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7,10,17,.76); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { width: 38px; height: 38px; position: relative; border: 1px solid rgba(240,184,90,.45); border-radius: 11px; background: linear-gradient(145deg, rgba(240,184,90,.16), rgba(91,224,194,.06)); box-shadow: inset 0 0 24px rgba(240,184,90,.05); }
.brand-mark::before { content: ""; position: absolute; left: 10px; right: 10px; top: 7px; height: 11px; border: 2px solid var(--amber); border-bottom: 0; border-radius: 10px 10px 0 0; }
.brand-mark::after { content: "◇"; position: absolute; inset: 13px 0 0; text-align: center; color: var(--teal); font-size: 18px; }
.brand-name { font-size: 19px; }
.brand-sub { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link { color: var(--muted); padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 650; }
.nav-link:hover, .nav-link.active { color: var(--text); background: rgba(255,255,255,.05); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn { border: 1px solid transparent; border-radius: 12px; padding: 11px 16px; font-weight: 750; color: var(--text); background: rgba(255,255,255,.06); transition: .2s ease; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { transform: translateY(-1px); background: rgba(255,255,255,.1); }
.btn-primary { background: linear-gradient(135deg, #e4a844, #f0c473); color: #171107; box-shadow: 0 12px 35px rgba(240,184,90,.2); }
.btn-primary:hover { background: linear-gradient(135deg, #efb552, #ffd58a); }
.btn-outline { border-color: var(--line); background: transparent; }
.btn-danger { background: rgba(255,124,134,.12); color: #ffb3b9; border-color: rgba(255,124,134,.25); }
.btn-small { padding: 8px 11px; border-radius: 9px; font-size: 13px; }
.hero { padding: 100px 0 80px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 70px; }
.eyebrow { color: var(--amber); text-transform: uppercase; font-size: 12px; letter-spacing: .16em; font-weight: 850; }
h1 { font-size: clamp(46px, 7vw, 82px); line-height: .98; letter-spacing: -.055em; margin: 18px 0 24px; max-width: 790px; }
h2 { font-size: clamp(30px, 4vw, 50px); letter-spacing: -.04em; line-height: 1.05; margin: 0 0 16px; }
h3 { font-size: 20px; letter-spacing: -.02em; margin: 0; }
.hero-copy { color: #bec7d4; font-size: 19px; max-width: 650px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-note { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 32px; color: var(--muted); font-size: 13px; }
.hero-note span::before { content: "✦"; color: var(--teal); margin-right: 8px; }
.hero-device { position: relative; min-height: 520px; display: grid; place-items: center; }
.orbit { position: absolute; border: 1px solid rgba(240,184,90,.16); border-radius: 50%; animation: spin 24s linear infinite; }
.orbit.one { width: 430px; height: 430px; }
.orbit.two { width: 330px; height: 330px; animation-direction: reverse; animation-duration: 18s; border-color: rgba(91,224,194,.15); }
.orbit-dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--amber); top: 14%; left: 14%; box-shadow: 0 0 18px var(--amber); }
.orbit.two .orbit-dot { background: var(--teal); top: 72%; left: 88%; box-shadow: 0 0 18px var(--teal); }
@keyframes spin { to { transform: rotate(360deg); } }
.demo-card { position: relative; z-index: 2; width: min(390px, 92vw); padding: 26px; border-radius: 26px; background: linear-gradient(150deg, rgba(20,29,45,.98), rgba(11,16,27,.98)); border: 1px solid rgba(240,184,90,.24); box-shadow: var(--shadow); }
.demo-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(140deg, rgba(255,255,255,.05), transparent 35%); pointer-events: none; }
.demo-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; }
.status-pill, .tag { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: #c7d0dd; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 700; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px var(--success); }
.room-code { letter-spacing: .2em; color: var(--amber-2); font-weight: 850; }
.pulse-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 22px 0; }
.lantern { min-height: 105px; border: 1px solid var(--line); background: #0a101c; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; position: relative; overflow: hidden; }
.lantern::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 35%, rgba(240,184,90,.24), transparent 38%); opacity: var(--glow, .25); transition: opacity .12s; }
.lantern.active { --glow: 1; border-color: rgba(240,184,90,.55); box-shadow: inset 0 0 30px rgba(240,184,90,.11); }
.lantern span { z-index: 1; color: var(--muted); font-size: 11px; }
.lantern b { z-index: 1; color: var(--amber); font-size: 26px; }
.fake-input { background: rgba(0,0,0,.28); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.section { padding: 90px 0; }
.section-alt { background: rgba(255,255,255,.018); border-block: 1px solid rgba(255,255,255,.05); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 34px; }
.section-copy { color: var(--muted); max-width: 650px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 60px rgba(0,0,0,.15); }
.feature-card { padding: 26px; min-height: 220px; }
.feature-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(240,184,90,.1); border: 1px solid rgba(240,184,90,.2); color: var(--amber); margin-bottom: 22px; font-size: 22px; }
.feature-card p { color: var(--muted); }
.puzzle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.puzzle-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(160deg, rgba(19,27,42,.98), rgba(11,16,27,.98)); min-height: 410px; display: flex; flex-direction: column; transition: .22s ease; }
.puzzle-card:hover { transform: translateY(-4px); border-color: rgba(240,184,90,.28); box-shadow: 0 25px 65px rgba(0,0,0,.3); }
.puzzle-art { height: 156px; position: relative; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 50%, rgba(91,224,194,.12), transparent 55%); border-bottom: 1px solid var(--line); }
.puzzle-art.violet { background: radial-gradient(circle, rgba(166,140,255,.17), transparent 58%); }
.puzzle-art.amber { background: radial-gradient(circle, rgba(240,184,90,.18), transparent 58%); }
.puzzle-glyph { font-size: 65px; color: var(--teal); filter: drop-shadow(0 0 18px rgba(91,224,194,.2)); }
.puzzle-art.violet .puzzle-glyph { color: var(--violet); }
.puzzle-art.amber .puzzle-glyph { color: var(--amber); }
.puzzle-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.puzzle-body p { color: var(--muted); font-size: 14px; }
.puzzle-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 20px; }
.puzzle-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.access-badge { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 850; color: var(--amber); }
.pricing-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 22px; max-width: 920px; margin: auto; }
.price-card { padding: 32px; border-radius: 24px; border: 1px solid var(--line); background: var(--panel); }
.price-card.featured { border-color: rgba(240,184,90,.35); background: linear-gradient(145deg, rgba(240,184,90,.09), rgba(18,25,39,.95) 35%); box-shadow: var(--shadow); }
.price { font-size: 48px; font-weight: 900; letter-spacing: -.05em; margin: 20px 0 4px; }
.price small { font-size: 15px; color: var(--muted); letter-spacing: 0; }
.check-list { padding: 0; list-style: none; display: grid; gap: 12px; margin: 26px 0; }
.check-list li { color: #cbd3df; }
.check-list li::before { content: "✓"; color: var(--teal); font-weight: 900; margin-right: 10px; }
.footer { border-top: 1px solid var(--line); padding: 34px 0; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.demo-banner { background: linear-gradient(90deg, rgba(91,224,194,.08), rgba(240,184,90,.08)); border-bottom: 1px solid rgba(91,224,194,.16); padding: 9px 18px; text-align: center; font-size: 13px; color: #cbd5e1; }
.demo-banner b { color: var(--teal); }
.auth-shell { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 50px 20px; }
.auth-card { width: min(470px, 100%); padding: 34px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 5px; margin: 24px 0 20px; border: 1px solid var(--line); border-radius: 13px; background: rgba(2,6,12,.38); }
.auth-tab { padding: 10px 12px; border-radius: 9px; color: var(--muted); text-align: center; font-weight: 800; font-size: 13px; }
.auth-tab:hover, .auth-tab.active { color: var(--text); background: rgba(255,255,255,.065); }
.auth-notice { margin: 0 0 18px; padding: 13px 14px; border: 1px solid rgba(91,224,194,.25); border-radius: 11px; background: rgba(91,224,194,.07); color: #d6fff5; font-size: 13px; line-height: 1.55; }
.btn:disabled { cursor: wait; opacity: .62; transform: none; }
.field { display: grid; gap: 8px; margin-bottom: 17px; }
.field label { color: #d5dbe5; font-weight: 700; font-size: 13px; }
.input, .select, .textarea { width: 100%; border: 1px solid var(--line); background: rgba(2,6,12,.48); color: var(--text); border-radius: 12px; padding: 12px 14px; outline: none; }
.textarea { min-height: 115px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(240,184,90,.55); box-shadow: 0 0 0 3px rgba(240,184,90,.08); }
.helper { font-size: 12px; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 24px 0; }
.dashboard { display: grid; grid-template-columns: 248px 1fr; min-height: calc(100vh - 72px); }
.sidebar { border-right: 1px solid var(--line); padding: 26px 18px; background: rgba(8,12,20,.58); }
.sidebar-title { padding: 0 10px 12px; color: var(--muted); font-size: 11px; letter-spacing: .13em; text-transform: uppercase; font-weight: 850; }
.side-link { width: 100%; border: 0; color: var(--muted); background: transparent; text-align: left; padding: 11px 12px; border-radius: 10px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin: 3px 0; }
.side-link:hover, .side-link.active { color: var(--text); background: rgba(255,255,255,.055); }
.side-link .side-icon { width: 20px; color: var(--amber); }
.dashboard-main { padding: 34px; min-width: 0; }
.dashboard-head { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 28px; }
.dashboard-head h1 { font-size: 40px; margin: 0 0 8px; }
.dashboard-head p { margin: 0; color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 26px; }
.stat { padding: 20px; }
.stat-number { font-size: 31px; font-weight: 900; letter-spacing: -.04em; }
.stat-label { color: var(--muted); font-size: 13px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.search { flex: 1; min-width: 220px; }
.lock-overlay { position: absolute; inset: 0; background: rgba(5,8,14,.58); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 3; }
.lock-box { text-align: center; padding: 20px; }
.lock-box b { display: block; margin: 8px 0 12px; }
.detail-hero { padding: 50px 0 30px; }
.back-link { color: var(--muted); display: inline-flex; gap: 8px; align-items: center; margin-bottom: 26px; }
.detail-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 26px; }
.detail-main, .detail-side { padding: 28px; }
.detail-title { font-size: clamp(38px, 6vw, 65px); margin: 12px 0 18px; }
.detail-meta { display: flex; gap: 9px; flex-wrap: wrap; margin: 22px 0; }
.callout { border-left: 3px solid var(--amber); background: rgba(240,184,90,.06); padding: 17px 18px; border-radius: 0 12px 12px 0; color: #d8dee8; }
.stack { display: grid; gap: 16px; }
.hint-item { padding: 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
.session-shell { min-height: calc(100vh - 72px); padding: 36px 0 70px; }
.session-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.session-layout { display: grid; grid-template-columns: 1fr 330px; gap: 22px; }
.session-stage { padding: 30px; min-height: 570px; }
.control-panel { padding: 22px; align-self: start; position: sticky; top: 96px; }
.control-section { padding: 16px 0; border-bottom: 1px solid var(--line); }
.control-section:last-child { border-bottom: 0; }
.player-list { display: grid; gap: 8px; }
.player-row { display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.035); border-radius: 9px; padding: 9px 10px; color: #cbd3df; font-size: 13px; }
.avatar { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; background: rgba(91,224,194,.12); color: var(--teal); font-weight: 850; font-size: 11px; }
.stage-frame { min-height: 460px; border: 1px solid var(--line); border-radius: 18px; padding: 30px; background: radial-gradient(circle at 50% 20%, rgba(91,224,194,.07), transparent 43%), rgba(5,9,16,.56); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.stage-frame h2 { max-width: 720px; }
.stage-frame p { color: var(--muted); max-width: 680px; }
.answer-row { width: min(480px, 100%); display: flex; gap: 10px; margin-top: 24px; }
.answer-row .input { flex: 1; }
.feedback { min-height: 28px; margin-top: 14px; font-weight: 750; }
.feedback.error { color: var(--danger); }
.feedback.success { color: var(--success); }
.morse-display { display: grid; grid-template-columns: repeat(4, minmax(70px, 110px)); gap: 13px; margin: 30px 0; }
.morse-lantern { height: 145px; border-radius: 16px; border: 1px solid var(--line); background: #090f1b; position: relative; display: flex; align-items: end; justify-content: center; padding: 16px; overflow: hidden; }
.morse-lantern::after { content: ""; position: absolute; width: 58px; height: 58px; border-radius: 50%; top: 24px; background: rgba(240,184,90,.16); box-shadow: 0 0 20px rgba(240,184,90,.12); transition: .08s; }
.morse-lantern.flash::after { background: var(--amber); box-shadow: 0 0 45px rgba(240,184,90,.75); }
.morse-lantern b { color: var(--amber); }
.perspective-card { width: min(420px, 100%); padding: 32px; border: 1px solid rgba(166,140,255,.28); background: rgba(166,140,255,.06); border-radius: 18px; margin: 28px 0; }
.private-word { font-size: 45px; letter-spacing: .12em; color: var(--violet); font-weight: 900; }
.cipher-block { width: min(650px, 100%); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .16em; color: var(--amber-2); background: #070b12; border: 1px solid rgba(240,184,90,.18); border-radius: 14px; padding: 24px; margin: 26px 0; overflow-wrap: anywhere; }
.admin-grid { display: grid; grid-template-columns: 1fr 380px; gap: 22px; }
.admin-form, .admin-preview { padding: 25px; }
.admin-preview { position: sticky; top: 96px; align-self: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
th { color: var(--muted); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(2,5,9,.72); backdrop-filter: blur(8px); z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal { width: min(520px, 100%); max-height: 90vh; overflow: auto; padding: 28px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); }
.toast-root { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 10px; }
.toast { max-width: 360px; background: #172032; border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: 12px; padding: 13px 16px; box-shadow: var(--shadow); animation: toast-in .2s ease; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
.mobile-menu { display: none; }
.kbd { border: 1px solid var(--line); border-bottom-color: rgba(255,255,255,.2); background: rgba(255,255,255,.04); padding: 2px 6px; border-radius: 6px; font-size: 11px; color: #d6deea; }
.progress { height: 8px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--amber)); border-radius: inherit; }
.checkbox-row { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.checkbox-row input { accent-color: var(--amber); }
@media (max-width: 980px) {
  .hero-grid, .detail-grid, .session-layout, .admin-grid { grid-template-columns: 1fr; }
  .hero-device { min-height: 450px; }
  .feature-grid, .puzzle-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard { grid-template-columns: 1fr; }
  .sidebar { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .sidebar-title { display: none; }
  .side-link { width: auto; white-space: nowrap; }
  .control-panel, .admin-preview { position: static; }
}
@media (max-width: 720px) {
  .container { width: min(100% - 26px, var(--max)); }
  .nav-links { display: none; }
  .nav-actions .btn-outline { display: none; }
  .brand-sub { display: none; }
  .hero { padding-top: 65px; }
  h1 { font-size: 49px; }
  .feature-grid, .puzzle-grid, .pricing-grid, .stats-grid, .form-grid { grid-template-columns: 1fr; }
  .section { padding: 65px 0; }
  .section-head, .dashboard-head, .session-head { align-items: flex-start; flex-direction: column; }
  .dashboard-main { padding: 24px 15px; }
  .morse-display { grid-template-columns: repeat(2, 1fr); }
  .answer-row { flex-direction: column; }
  .hero-device { min-height: 390px; }
  .orbit.one { width: 340px; height: 340px; }
  .orbit.two { width: 260px; height: 260px; }
}
