/* ==========================================================
   SOSEEKS ACADEMY — AI AUTOMATION (Basic to Advanced)
   Styles for learn-ai-automation.html
   ========================================================== */
/* Layout: Soseeks Academy shell — sticky topbar, sticky sidebar (progress ring + level/lesson nav), reading column with n8n-style canvas diagrams */
:root {
  --bg: #030014;
  --surface: #0a0822;
  --surface-2: #120f2e;
  --node: #15122f;
  --code-bg: #0d1117;
  --border: rgba(129,140,248,0.16);
  --border-strong: rgba(129,140,248,0.34);
  --text: #e2e8f0;
  --muted: #a3afc4;
  --dim: #7c8aa3;
  --primary: #6366f1;
  --primary-light: #8b93f8;
  --accent: #c471ed;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #f87171;
  --k-trigger: #ff6d5a;
  --k-app: #4f8cff;
  --k-ai: #b26bff;
  --k-logic: #f5a524;
  --k-data: #19c2b0;
  --k-human: #34d399;
  --k-out: #38bdf8;
  --font-display: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-code: 'Fira Code', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --topbar-h: 60px;
  --sidebar-w: 290px;
  --radius: 14px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 15.5px; line-height: 1.7; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
.glow { position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at 15% 20%, rgba(99,102,241,0.10) 0%, transparent 45%), radial-gradient(ellipse at 85% 10%, rgba(196,113,237,0.07) 0%, transparent 45%), radial-gradient(ellipse at 60% 90%, rgba(6,182,212,0.05) 0%, transparent 50%); }
a { color: var(--primary-light); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
code { font-family: var(--font-code); font-size: 0.86em; background: rgba(99,102,241,0.14); color: #b9befc; padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }
strong, b { color: #fff; font-weight: 600; }

/* Topbar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; height: var(--topbar-h); display: flex; align-items: center; gap: 14px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: rgba(3,0,20,0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.hamburger { display: none; width: 38px; height: 38px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; align-items: center; justify-content: center; flex-direction: column; gap: 4px; flex-shrink: 0; }
.hamburger span { display: block; width: 16px; height: 2px; background: var(--text); border-radius: 2px; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; letter-spacing: 1px; text-decoration: none; background: linear-gradient(90deg, var(--primary-light), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sep { color: var(--dim); }
.top-label { color: var(--muted); font-size: 0.86rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top-progress { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.track { width: 160px; height: 6px; background: rgba(255,255,255,0.06); border-radius: 6px; overflow: hidden; }
.fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 6px; transition: width .5s; }
.top-pct { font-family: var(--font-display); font-size: 0.78rem; color: var(--primary-light); min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }

/* Shell */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: calc(100vh - var(--topbar-h)); }
.sidebar { position: sticky; top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); height: calc(100vh - var(--topbar-h) - env(safe-area-inset-top, 0px)); overflow-y: auto; border-right: 1px solid var(--border); background: rgba(10,8,34,0.72); padding: 20px 14px 40px max(14px, env(safe-area-inset-left, 0px)); }
.sb-head { display: flex; align-items: center; gap: 14px; padding: 6px 6px 18px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.ring-wrap { position: relative; width: 74px; height: 74px; flex-shrink: 0; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255,255,255,0.07); stroke-width: 9; }
.ring-bar { fill: none; stroke: url(#ringGrad); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset .6s; }
.ring-pct { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 0.85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sb-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; flex: 1; }
.sb-stat { text-align: center; }
.sb-stat strong { display: block; font-family: var(--font-display); font-size: 0.92rem; color: var(--text); font-variant-numeric: tabular-nums; }
.sb-stat small { font-size: 0.66rem; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.nav-group { margin: 16px 0 6px; padding: 0 8px; font-size: 0.68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.nav-link { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 10px; border: 1px solid transparent; border-radius: 10px; color: var(--muted); font-size: 0.86rem; line-height: 1.35; text-decoration: none; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: rgba(99,102,241,0.13); border-color: var(--border-strong); color: #fff; }
.nav-num { flex-shrink: 0; min-width: 28px; height: 22px; padding: 0 4px; border-radius: 7px; display: grid; place-items: center; font-family: var(--font-display); font-size: 0.6rem; font-weight: 700; background: rgba(255,255,255,0.05); color: var(--dim); border: 1px solid var(--border); }
.nav-link.done .nav-num { background: rgba(16,185,129,0.16); color: var(--success); border-color: rgba(16,185,129,0.4); }
.overlay { display: none; }

/* Main */
main { min-width: 0; padding-block: 34px 80px; padding-left: max(16px, min(5vw, 56px)); padding-right: max(16px, min(5vw, 56px), env(safe-area-inset-right, 0px)); }
.view { max-width: 900px; }
.eyebrow { font-family: var(--font-display); font-size: 0.7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 3.4vw, 2.15rem); line-height: 1.28; margin: 8px 0 12px; text-wrap: balance; letter-spacing: .4px; }
h1 .hl { background: linear-gradient(90deg, var(--primary-light), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: 1.22rem; margin: 36px 0 12px; font-weight: 700; text-wrap: balance; display: flex; align-items: center; gap: 10px; }
h2::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: linear-gradient(135deg, var(--primary), var(--accent)); flex-shrink: 0; }
h3 { font-size: 1.02rem; margin: 22px 0 8px; font-weight: 600; }
p { margin: 0 0 12px; max-width: 72ch; }
.lead { font-size: 1.05rem; color: var(--muted); max-width: 68ch; }
ul.list, ol.list { margin: 0 0 14px; padding-left: 1.25em; max-width: 74ch; }
ul.list li, ol.list li { margin-bottom: 6px; }
ul.list li::marker { color: var(--primary-light); }
ol.list li::marker { color: var(--accent); font-family: var(--font-display); font-size: .8em; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.chip { font-size: 0.76rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); background: var(--surface); max-width: 100%; line-height: 1.5; }
.chip.long { border-radius: 10px; }
.chip.lvl { border-color: rgba(196,113,237,0.35); color: #e3c6f5; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin: 14px 0; }
.panel > :last-child { margin-bottom: 0; }
.panel p:last-child { margin-bottom: 0; }
.tag { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; color: var(--primary-light); }
.analogy { border-color: rgba(196,113,237,0.32); background: linear-gradient(180deg, rgba(196,113,237,0.08), rgba(196,113,237,0.02)); }
.analogy .tag { color: var(--accent); }
.analogy p { color: #fff; font-size: 1.02rem; }
.try { border-color: rgba(16,185,129,0.3); background: linear-gradient(180deg, rgba(16,185,129,0.06), rgba(16,185,129,0.015)); }
.try .tag { color: var(--success); }
.tip { border-color: rgba(245,158,11,0.3); background: linear-gradient(180deg, rgba(245,158,11,0.07), rgba(245,158,11,0.02)); }
.tip .tag { color: var(--warning); }
.warn { border-color: rgba(248,113,113,0.35); background: rgba(248,113,113,0.06); }
.warn .tag { color: var(--error); }

.table-wrap { overflow-x: auto; margin: 12px 0 16px; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.87rem; min-width: 560px; }
caption { caption-side: top; text-align: left; padding: 10px 13px; color: var(--muted); font-size: .82rem; }
th, td { text-align: left; padding: 9px 13px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 0.72rem; letter-spacing: .08em; text-transform: uppercase; }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.best { color: var(--success); font-weight: 600; }

/* Prompt & code blocks */
.prompt { background: var(--code-bg); border: 1px solid var(--border); border-radius: 12px; margin: 12px 0 16px; overflow: hidden; }
.prompt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--border); background: rgba(99,102,241,0.07); }
.prompt-title { font-size: 0.82rem; font-weight: 600; color: var(--text); min-width: 0; }
.prompt-kind { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-right: 8px; }
.copy-btn { flex-shrink: 0; font-size: 0.76rem; font-weight: 600; padding: 5px 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: rgba(99,102,241,0.14); color: var(--primary-light); }
.copy-btn:hover { background: rgba(99,102,241,0.26); color: #fff; }
.copy-btn.ok { border-color: rgba(16,185,129,0.5); color: var(--success); background: rgba(16,185,129,0.12); }
.prompt pre { margin: 0; padding: 14px; font-family: var(--font-code); font-size: 0.8rem; line-height: 1.65; color: #cdd6f4; white-space: pre-wrap; word-break: break-word; max-height: 440px; overflow: auto; }

/* n8n-style canvas diagrams */
.canvas { margin: 16px 0 18px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #0b0920; }
.canvas-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: #110e28; }
.dots { display: flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: #2b2750; display: block; }
.canvas-title { font-size: 0.8rem; color: var(--muted); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.canvas-pill { margin-left: auto; font-size: 0.7rem; font-weight: 700; color: #fff; background: var(--k-trigger); padding: 3px 10px; border-radius: 7px; white-space: nowrap; }
.canvas-scroll { overflow-x: auto; }
.canvas-scroll svg { display: block; }
.canvas-cap { padding: 8px 14px; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--dim); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 14px; font-size: .76rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Tokens illustration */
.tokens { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 12px; }
.tokens span { font-family: var(--font-code); font-size: .82rem; padding: 3px 7px; border-radius: 6px; border: 1px solid; white-space: pre; }

/* Cards grid */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 14px 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 16px; min-width: 0; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 4px; }
a.card:hover { border-color: var(--border-strong); background: var(--surface-2); }
.card .k { font-family: var(--font-display); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.card .t { font-weight: 700; font-size: .98rem; line-height: 1.35; }
.card .d { font-size: .84rem; color: var(--muted); line-height: 1.5; }
.card .f { margin-top: auto; padding-top: 8px; font-size: .76rem; color: var(--dim); }

/* Checklist */
.checks { list-style: none; padding: 0; margin: 8px 0 14px; display: grid; gap: 6px; }
.checks label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,0.02); border: 1px solid var(--border); }
.checks input { margin-top: 5px; accent-color: var(--success); width: 16px; height: 16px; flex-shrink: 0; }
.checks input:checked + span { color: var(--dim); text-decoration: line-through; text-decoration-color: rgba(16,185,129,0.6); }

/* Steps (numbered build steps) */
.steps { list-style: none; padding: 0; margin: 10px 0 16px; counter-reset: st; display: grid; gap: 8px; }
.steps li { counter-increment: st; display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 12px; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.steps li::before { content: counter(st); width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-family: var(--font-display); font-size: .7rem; font-weight: 700; background: rgba(99,102,241,0.16); color: var(--primary-light); border: 1px solid var(--border-strong); margin-top: 1px; }
.node-name { display: inline-block; font-size: .76rem; font-weight: 700; padding: 1px 8px; border-radius: 6px; margin-right: 4px; border: 1px solid; }

/* Forms (calculator & designer) */
.tool { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; padding: 18px 20px; margin: 16px 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 16px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field .lbl { font-size: .78rem; font-weight: 600; color: var(--muted); }
.field small { font-size: .74rem; color: var(--dim); }
input[type=text], input[type=number], select, textarea { width: 100%; background: #0f0c27; border: 1px solid var(--border-strong); color: var(--text); border-radius: 10px; padding: 9px 11px; font: inherit; font-size: .9rem; min-width: 0; }
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(99,102,241,0.2); }
.opt-row { display: flex; flex-wrap: wrap; gap: 6px; }
.opt-row label { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; padding: 5px 10px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; background: rgba(255,255,255,0.02); color: var(--text); font-weight: 500; }
.opt-row input { accent-color: var(--primary); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.preset { font-size: .78rem; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border-strong); background: rgba(99,102,241,0.08); color: var(--primary-light); }
.preset:hover, .preset.on { background: rgba(99,102,241,0.24); color: #fff; }
.result { margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.res { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.res span { font-size: .74rem; color: var(--dim); display: block; }
.res strong { font-family: var(--font-display); font-size: 1.15rem; display: block; margin-top: 2px; font-variant-numeric: tabular-nums; }
.res.total strong { background: linear-gradient(90deg, var(--primary-light), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.note-line { font-size: .82rem; color: var(--muted); margin-top: 10px; }
.note-line.warnc { color: var(--warning); }

/* Quiz */
.quiz { margin-top: 8px; display: grid; gap: 14px; }
.q { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.q-text { font-weight: 600; margin-bottom: 10px; }
.opts { display: grid; gap: 7px; }
.opt { text-align: left; padding: 9px 13px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,0.02); color: var(--text); font-size: 0.9rem; line-height: 1.45; }
.opt:hover:not(:disabled) { border-color: var(--border-strong); background: rgba(99,102,241,0.08); }
.opt:disabled { cursor: default; }
.opt.right { border-color: rgba(16,185,129,0.6); background: rgba(16,185,129,0.12); color: #d1fae5; }
.opt.wrong { border-color: rgba(248,113,113,0.6); background: rgba(248,113,113,0.10); color: #fee2e2; }
.why { margin-top: 10px; font-size: 0.86rem; color: var(--muted); }
.why b { color: var(--success); }
.why.bad b { color: var(--error); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--border); }
.btn { padding: 10px 18px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface-2); font-weight: 600; font-size: 0.9rem; text-decoration: none; color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { border-color: var(--primary-light); }
.btn.primary { background: linear-gradient(90deg, var(--primary), #8b5cf6); border-color: transparent; color: #fff; }
.btn.primary.isdone { background: rgba(16,185,129,0.16); border-color: rgba(16,185,129,0.5); color: var(--success); }
.spacer { flex: 1; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin: 18px 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.stat strong { display: block; font-family: var(--font-display); font-size: 1.25rem; color: #fff; }
.stat span { font-size: 0.78rem; color: var(--dim); }
.gloss { display: grid; grid-template-columns: minmax(130px, 200px) minmax(0,1fr); gap: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.gloss dt, .gloss dd { margin: 0; padding: 9px 14px; border-bottom: 1px solid var(--border); }
.gloss dt { font-weight: 700; background: var(--surface-2); }
.gloss dd { color: var(--muted); font-size: .9rem; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; background: var(--surface-2); border: 1px solid var(--border-strong); padding: 9px 16px; border-radius: 10px; font-size: 0.86rem; z-index: 80; transition: .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.foot { margin-top: 50px; font-size: 0.78rem; color: var(--dim); }

@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .hamburger { display: inline-flex; }
  .sidebar { position: fixed; top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); left: 0; bottom: 0; height: auto; width: min(86vw, 310px); z-index: 45; transform: translateX(-105%); transition: transform .25s; background: var(--surface); padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
  .sidebar.open { transform: none; }
  .overlay.show { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,0.55); }
}
@media (max-width: 640px) {
  .track { width: 70px; }
  .sep, .top-label { display: none; }
  .stat-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid { grid-template-columns: minmax(0,1fr); }
  .result { grid-template-columns: minmax(0,1fr); }
  .gloss { grid-template-columns: minmax(0,1fr); }
  .gloss dt { border-bottom: none; padding-bottom: 2px; }
  .panel, .tool { padding: 14px 15px; }
}

/* ============================================================
   ACCESS GATE (same pattern as other Soseeks Academy courses)
   ============================================================ */
[hidden] { display: none !important; }
img { max-width: 100%; }
.app-hidden { display: none !important; }
#gate { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: var(--bg); transition: opacity 0.6s, visibility 0.6s; overflow-y: auto; overflow-x: hidden; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); }
#gate.gate-unlocked { opacity: 0; visibility: hidden; pointer-events: none; }
.gate-particles { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.08) 0%, transparent 50%), radial-gradient(ellipse at 80% 30%, rgba(196,113,237,0.06) 0%, transparent 50%), radial-gradient(ellipse at 50% 80%, rgba(6,182,212,0.05) 0%, transparent 50%); }
.gate-card { position: relative; z-index: 1; text-align: center; padding: 44px 36px; width: 440px; max-width: 100%; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 16px; backdrop-filter: blur(20px); flex-shrink: 0; }
.gate-glow { position: absolute; top: -1px; left: 50%; transform: translateX(-50%); width: 60%; height: 2px; background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent); }
.gate-logo { display: inline-block; font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; text-decoration: none; background: linear-gradient(135deg, #4a6cf7, #7b5ea7, #c471ed); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 8px; }
.gate-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin: 0 0 8px; line-height: 1.3; }
.gate-title span { color: var(--primary-light); }
.gate-desc { color: var(--muted); font-size: 0.92rem; margin: 0 auto 26px; }
.gate-input-group { display: flex; border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; transition: border-color 0.3s; }
.gate-input-group:focus-within { border-color: var(--primary); box-shadow: 0 0 20px rgba(99,102,241,0.15); }
.gate-input-group input { flex: 1; min-width: 0; padding: 14px 18px; border: none; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 0.95rem; letter-spacing: 2px; }
.gate-input-group input::placeholder { color: var(--dim); letter-spacing: 1px; }
.gate-input-group button { padding: 14px 20px; border: none; background: var(--primary); color: #fff; cursor: pointer; transition: background 0.3s; display: grid; place-items: center; }
.gate-input-group button:hover { background: #4f46e5; }
.gate-input-group button svg { width: 20px; height: 20px; }
.gate-error { color: var(--error); font-size: 0.85rem; min-height: 24px; margin: 12px 0 0; }
.gate-hint { color: var(--dim); font-size: 0.78rem; margin: 18px 0 0; }
.gate-hint a { color: var(--primary-light); text-decoration: none; }
.gate-back { margin-top: 14px; font-size: 0.8rem; }
.gate-back a { color: var(--primary-light); text-decoration: none; }
.gate-preview { margin-top: 22px; text-align: left; border-top: 1px solid var(--border); padding-top: 16px; }
.gate-preview h2 { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin: 0 0 10px; display: block; }
.gate-preview h2::before { display: none; }
.gate-preview ul { margin: 0; padding-left: 1.1em; color: var(--muted); font-size: .84rem; line-height: 1.6; }
.gate-card.shake { animation: shakeCard 0.5s; }
@keyframes shakeCard { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-12px); } 40% { transform: translateX(10px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
.lock-btn { flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); display: grid; place-items: center; }
.lock-btn:hover { color: #fff; border-color: var(--border-strong); }
.lock-btn svg { width: 17px; height: 17px; }
@media (max-width: 640px) { .gate-card { padding: 30px 18px; } .gate-title { font-size: 1.25rem; } }
