:root {
  --bg:  #06060c;
  --bg2: #0b0b14;
  --glass: rgba(255,255,255,0.042);
  --glass-hover: rgba(255,255,255,0.072);
  --glass-border: rgba(255,255,255,0.08);
  --glass-border-h: rgba(255,255,255,0.14);
  --accent:  #9b5cf6;
  --accent2: #c0399f;
  --accent3: #f97316;
  --error:   #ef4444;
  --warn:    #f59e0b;
  --success: #22d3a3;
  --accent-glow: rgba(155,92,246,0.35);
  --grad: linear-gradient(135deg,#9b5cf6 0%,#c0399f 50%,#f97316 100%);
  --grad-error: linear-gradient(135deg,#ef4444 0%,#c0399f 100%);
  --grad-text: linear-gradient(135deg,#c084fc 0%,#ffffff 45%,#fb923c 100%);
  --text: #f0f0f8;
  --text-muted: rgba(240,240,248,0.52);
  --text-subtle: rgba(240,240,248,0.28);
  --ease: cubic-bezier(0.16,1,0.3,1);
  --t: all 0.25s var(--ease);
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Manrope', sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Consolas, 'Courier New', monospace;
  --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-full: 9999px;
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
  --glow-error: 0 0 40px rgba(239,68,68,0.35);
  --glow-accent: 0 0 40px rgba(155,92,246,0.3);
}

*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { -webkit-font-smoothing:antialiased; font-size:16px; }
body { font-family:var(--font-body); background:#000; color:var(--text); overflow:hidden; width:100vw; height:100dvh; }
button { cursor:pointer; background:none; border:none; font:inherit; color:inherit; }
a { color:inherit; text-decoration:none; }
img, svg { display:block; max-width:100%; }

.layer {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s;
}
.layer.hidden { opacity:0; visibility:hidden; pointer-events:none; }

#biosScreen {
  background: #000; z-index: 9700;
  align-items: flex-start; justify-content: flex-start;
  padding: 2.5rem 3rem;
  font-family: var(--font-mono);
  font-size: clamp(.58rem,.85vw,.8rem);
  line-height: 1.85; color: #c8c8c8; overflow: hidden;
}
.bios-logo-ascii {
  font-family: var(--font-mono);
  font-size: clamp(.38rem,.58vw,.65rem);
  line-height: 1.2; color: #9b5cf6;
  margin-bottom: 1.5rem; letter-spacing: .01em;
}
.bios-line { display:block; opacity:0; animation:appear .01s ease forwards; white-space:pre; }
.bios-line.hi    { color:#fff; font-weight:700; }
.bios-line.ok    { color:#22d3a3; }
.bios-line.warn  { color:#f59e0b; }
.bios-line.err   { color:#ef4444; font-weight:700; }
.bios-line.fatal {
  color:#ef4444; font-weight:800; font-size:1.05em;
  text-shadow: 0 0 16px rgba(239,68,68,0.8);
  animation: appear .01s ease forwards, glitchLine .35s steps(2) .05s;
}
.bios-line.dim    { color:#444; }
.bios-line.white  { color:var(--text); }
.bios-line.accent { color:var(--accent); }
.bios-line.retry  { color:#f59e0b; font-weight:600; }

@keyframes appear { to { opacity:1 } }
@keyframes glitchLine {
  0%  { clip-path:inset(0 0 95% 0); transform:translateX(-4px); }
  25% { clip-path:inset(30% 0 40% 0); transform:translateX(4px); }
  50% { clip-path:inset(60% 0 10% 0); transform:translateX(-2px); }
  75% { clip-path:inset(5% 0 70% 0); transform:translateX(1px); }
  100%{ clip-path:inset(0 0 0 0); transform:translateX(0); }
}

.bios-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  color: rgba(155,92,246,.8);
  letter-spacing: .08em;
}

.bios-skip-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: .5rem 1rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: .68rem;
  color: rgba(255,255,255,.35);
  cursor: pointer;
  transition: var(--t);
  animation: fadeInUp .5s var(--ease) 2s both;
  z-index: 9999;
}
.bios-skip-btn:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(155,92,246,.3);
  color: rgba(255,255,255,.6);
}
.bios-skip-btn kbd {
  display: inline-block;
  padding: .1rem .35rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 4px;
  font-size: .65rem;
}
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0); }
}

#bootScreen  { background:var(--bg); z-index:9600; gap:2.5rem; }
#bootScreen2 { background:var(--bg); z-index:9200; gap:2.5rem; }

.boot-logo-wrap { display:flex; flex-direction:column; align-items:center; gap:1.25rem; }
.boot-logo-icon {
  width:72px; height:72px;
  background:linear-gradient(135deg,rgba(155,92,246,.15),rgba(192,57,159,.1));
  border:1px solid rgba(155,92,246,.25); border-radius:20px;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 0 40px rgba(155,92,246,.2);
  animation:logoPulse 2s ease-in-out infinite;
}
@keyframes logoPulse { 0%,100%{box-shadow:0 0 40px rgba(155,92,246,.2)} 50%{box-shadow:0 0 65px rgba(155,92,246,.45)} }
.boot-os-name {
  font-family:var(--font-head); font-size:1.5rem; font-weight:800; letter-spacing:-.02em;
  background:var(--grad-text); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.boot-spinner-track { width:200px; height:3px; background:rgba(255,255,255,.06); border-radius:var(--r-full); overflow:hidden; }
.boot-spinner-fill  { height:100%; width:0%; background:var(--grad); border-radius:var(--r-full); transition:width .4s var(--ease); }
.boot-status-text {
  font-family:var(--font-mono); font-size:.72rem; color:var(--text-subtle);
  letter-spacing:.08em; min-height:1.2em; text-align:center;
  margin-top:.75rem; transition:opacity .2s ease;
}
.boot-dots { display:inline-block; }

#bsodScreen {
  background:#0050ef; z-index:9500;
  flex-direction:column; gap:0;
  align-items:flex-start; justify-content:center;
  padding:clamp(2rem,6vw,5rem) clamp(2rem,8vw,6rem);
  font-family:var(--font-mono);
}
.bsod-emoji { font-size:clamp(3rem,8vw,5.5rem); margin-bottom:1.5rem; animation:sadBounce .6s ease 1s both; }
@keyframes sadBounce { 0%{transform:translateY(-20px);opacity:0} 60%{transform:translateY(4px)} 100%{transform:translateY(0);opacity:1} }
.bsod-title { font-size:clamp(1.4rem,3.5vw,2.2rem); font-weight:700; color:#fff; margin-bottom:1.5rem; line-height:1.2; }
.bsod-body  { font-size:clamp(.75rem,1.2vw,.95rem); color:rgba(255,255,255,.88); line-height:1.9; max-width:60ch; margin-bottom:2.5rem; }
.bsod-code  {
  display:inline-block; padding:.6rem 1.25rem;
  background:rgba(0,0,0,.25); border:1px solid rgba(255,255,255,.2);
  border-radius:var(--r-sm); font-size:clamp(.7rem,1.1vw,.85rem);
  color:#fff; letter-spacing:.06em; margin-bottom:2rem;
}
.bsod-progress-label { font-size:.75rem; color:rgba(255,255,255,.7); margin-bottom:.5rem; }
.bsod-progress-track { width:min(300px,70vw); height:4px; background:rgba(0,0,0,.3); border-radius:var(--r-full); overflow:hidden; }
.bsod-progress-fill  { height:100%; width:0%; background:#fff; border-radius:var(--r-full); transition:width .3s ease; }
.bsod-qr {
  position:absolute; right:clamp(2rem,6vw,5rem); bottom:clamp(2rem,6vw,5rem);
  display:flex; flex-direction:column; align-items:center; gap:.5rem; opacity:.7;
}
.bsod-qr-box {
  width:80px; height:80px; background:#fff; border-radius:4px;
  display:flex; align-items:center; justify-content:center;
  font-size:.45rem; color:#0050ef; font-weight:800; letter-spacing:.02em; text-align:center; padding:4px; line-height:1.3;
}
.bsod-qr-label { font-size:.6rem; color:rgba(255,255,255,.6); text-align:center; }

#rebootScreen { background:#000; z-index:9400; gap:1.25rem; }
.reboot-text    { font-family:var(--font-mono); font-size:clamp(.8rem,1.2vw,.95rem); color:rgba(255,255,255,.6); letter-spacing:.08em; text-align:center; }
.reboot-spinner { width:36px; height:36px; border:2px solid rgba(255,255,255,.1); border-top-color:rgba(155,92,246,.8); border-radius:50%; animation:spin .8s linear infinite; }
@keyframes spin { to{transform:rotate(360deg)} }

#biosScreen2 {
  background:#000; z-index:9300;
  align-items:flex-start; justify-content:flex-start;
  overflow:hidden; padding:2.5rem 3rem;
  font-family:var(--font-mono);
  font-size:clamp(.58rem,.85vw,.8rem);
  line-height:1.85; color:#c8c8c8;
}

#failScreen { background:var(--bg); z-index:9100; gap:1.5rem; }
.fail-icon {
  width:64px; height:64px; border-radius:50%;
  background:rgba(239,68,68,.1); border:1px solid rgba(239,68,68,.3);
  display:flex; align-items:center; justify-content:center;
  box-shadow:var(--glow-error); animation:errorPulse 2s ease-in-out infinite;
}
@keyframes errorPulse { 0%,100%{box-shadow:var(--glow-error)} 50%{box-shadow:0 0 60px rgba(239,68,68,.55)} }
.fail-icon svg    { width:28px; height:28px; color:#ef4444; }
.fail-title       { font-family:var(--font-head); font-size:clamp(1.25rem,2.5vw,1.75rem); font-weight:800; color:#ef4444; text-align:center; text-shadow:0 0 20px rgba(239,68,68,.5); }
.fail-code        { font-family:var(--font-mono); font-size:.78rem; color:var(--text-subtle); letter-spacing:.1em; text-align:center; }
.fail-escalating  { font-family:var(--font-mono); font-size:.75rem; color:var(--accent); letter-spacing:.06em; animation:fadeInOut 1.5s ease-in-out infinite; }
@keyframes fadeInOut { 0%,100%{opacity:.3} 50%{opacity:1} }

.decision-overlay {
  position:fixed; inset:0; z-index:9350;
  display:flex; align-items:center; justify-content:center; padding:2rem;
  background:rgba(6,6,12,.75); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px);
  animation:overlayIn .4s var(--ease) both;
}
.decision-overlay.hidden { display:none; }
@keyframes overlayIn { from{opacity:0} to{opacity:1} }
.decision-box {
  display:flex; flex-direction:column; align-items:center; gap:1.1rem;
  padding:2.5rem 2rem;
  background:rgba(11,11,20,.98);
  border:1px solid rgba(239,68,68,.25); border-radius:var(--r-xl);
  max-width:480px; width:100%;
  box-shadow:0 0 60px rgba(239,68,68,.15),var(--shadow-lg);
  animation:boxIn .45s var(--ease) .1s both;
}
@keyframes boxIn { from{opacity:0;transform:scale(.94) translateY(12px)} to{opacity:1;transform:none} }
.decision-label { font-family:var(--font-mono); font-size:.68rem; font-weight:700; letter-spacing:.1em; color:#ef4444; text-transform:uppercase; }
.decision-title { font-family:var(--font-head); font-size:clamp(1.25rem,2.5vw,1.6rem); font-weight:800; color:var(--text); text-align:center; letter-spacing:-.02em; }
.decision-sub   { font-size:.84rem; color:var(--text-muted); text-align:center; line-height:1.7; max-width:40ch; }
.decision-buttons { display:flex; flex-direction:column; gap:.75rem; width:100%; margin-top:.5rem; }
.decision-btn {
  display:flex; align-items:center; justify-content:center; gap:.6rem;
  width:100%; padding:.85rem 1.25rem; border-radius:var(--r-md);
  font-family:var(--font-body); font-size:.9rem; font-weight:700;
  cursor:pointer; transition:var(--t); border:1px solid transparent;
}
.decision-btn--primary { background:linear-gradient(135deg,rgba(155,92,246,.15),rgba(192,57,159,.1)); border-color:rgba(155,92,246,.35); color:var(--text); }
.decision-btn--primary:hover { background:linear-gradient(135deg,rgba(155,92,246,.25),rgba(192,57,159,.18)); border-color:rgba(155,92,246,.6); transform:translateY(-2px); box-shadow:0 8px 24px rgba(155,92,246,.2); }
.decision-btn--ghost { background:var(--glass); border-color:var(--glass-border); color:var(--text-muted); }
.decision-btn--ghost:hover { background:var(--glass-hover); border-color:var(--glass-border-h); color:var(--text); }

#interactivePanel {
  background:var(--bg); z-index:9000;
  flex-direction:column; gap:1.75rem; padding:2rem; overflow-y:auto;
}
#interactivePanel::before {
  content:''; position:fixed; inset:0; pointer-events:none; z-index:0;
  background:radial-gradient(ellipse at 50% 30%,rgba(239,68,68,.06) 0%,transparent 65%);
}
#interactivePanel > * { position:relative; z-index:1; }

.panel-title { font-family:var(--font-head); font-size:clamp(1.4rem,3vw,2rem); font-weight:800; letter-spacing:-.02em; text-align:center; background:var(--grad-error); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.panel-sub   { font-size:.88rem; color:var(--text-muted); text-align:center; max-width:50ch; margin-top:.4rem; line-height:1.65; }

.fix-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:.875rem; width:100%; max-width:700px; }
.fix-btn {
  position:relative; overflow:hidden; padding:1rem 1.1rem;
  background:var(--glass); border:1px solid var(--glass-border);
  border-radius:var(--r-md); font-family:var(--font-mono); font-size:.75rem; font-weight:600;
  color:var(--text-muted); text-align:left; transition:var(--t);
}
.fix-btn:hover { background:var(--glass-hover); border-color:var(--glass-border-h); color:var(--text); transform:translateY(-2px); box-shadow:0 8px 24px rgba(0,0,0,.4); }
.fix-btn:active { transform:translateY(0); }
.fix-btn.running { border-color:rgba(245,158,11,.5); color:#f59e0b; animation:runPulse 1s ease-in-out infinite; }
.fix-btn.failed  { border-color:rgba(239,68,68,.45); color:#ef4444; }
@keyframes runPulse { 0%,100%{box-shadow:none} 50%{box-shadow:0 0 20px rgba(245,158,11,.3)} }
.fix-btn-icon   { display:flex; margin-bottom:.45rem; color:var(--accent); }
.fix-btn-icon svg { width:20px; height:20px; flex-shrink:0; }
.fix-btn-label  { display:block; font-size:.62rem; letter-spacing:.07em; text-transform:uppercase; opacity:.5; margin-top:.2rem; }
.fix-btn-status { display:block; font-size:.63rem; margin-top:.3rem; color:var(--text-subtle); min-height:.9em; transition:color .3s; }

.fix-attempts { font-family:var(--font-mono); font-size:.72rem; color:var(--text-subtle); text-align:center; }
.fix-attempts span { color:#ef4444; font-weight:700; }
.skip-link {
  font-size:.75rem; color:var(--text-subtle);
  border-bottom:1px solid rgba(255,255,255,.08); padding-bottom:2px;
  transition:var(--t); background:none; border-top:none; border-left:none; border-right:none;
}
.skip-link:hover { color:var(--text-muted); }

.task-dialog {
  position:fixed; inset:0; z-index:9999;
  display:flex; align-items:center; justify-content:center; padding:2rem;
  background:rgba(6,6,12,.82); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  opacity:0; transition:opacity .3s ease;
}
.task-dialog.active { opacity:1; }
.task-dialog-box {
  display:flex; flex-direction:column; gap:1rem; padding:2rem;
  background:rgba(11,11,20,.99);
  border:1px solid rgba(155,92,246,.2); border-radius:var(--r-xl);
  max-width:440px; width:100%;
  box-shadow:var(--shadow-lg),0 0 40px rgba(155,92,246,.1);
  animation:boxIn .4s var(--ease) both;
}
.task-dialog-header { display:flex; align-items:center; gap:.75rem; color:var(--accent); }
.task-dialog-icon svg { flex-shrink:0; }
.task-dialog-title    { font-family:var(--font-head); font-size:1.1rem; font-weight:800; color:var(--text); letter-spacing:-.01em; }
.task-dialog-question { font-size:.84rem; color:var(--text-muted); line-height:1.65; }
.task-dialog-input {
  width:100%; padding:.7rem .95rem;
  background:rgba(255,255,255,.04); border:1px solid var(--glass-border);
  border-radius:var(--r-md); font-family:var(--font-mono); font-size:.84rem;
  color:var(--text); outline:none; transition:var(--t); caret-color:var(--accent);
}
.task-dialog-input:focus { border-color:rgba(155,92,246,.5); box-shadow:0 0 0 3px rgba(155,92,246,.1); }
.task-dialog-hint    { font-family:var(--font-mono); font-size:.7rem; min-height:1em; transition:color .2s ease; }
.task-dialog-actions { display:flex; flex-wrap:wrap; gap:.625rem; justify-content:flex-end; margin-top:.25rem; }
.task-dialog-btn {
  padding:.6rem 1.25rem; border-radius:var(--r-md);
  font-family:var(--font-body); font-size:.84rem; font-weight:700;
  cursor:pointer; transition:var(--t); border:1px solid transparent;
}
.task-dialog-btn--cancel  { background:var(--glass); border-color:var(--glass-border); color:var(--text-muted); }
.task-dialog-btn--cancel:hover { background:var(--glass-hover); color:var(--text); }
.task-dialog-btn--help { background:rgba(34,211,163,.1); border-color:rgba(34,211,163,.35); color:var(--success); }
.task-dialog-btn--help:hover { background:rgba(34,211,163,.18); border-color:rgba(34,211,163,.55); }
.task-dialog-btn--confirm { background:linear-gradient(135deg,rgba(155,92,246,.2),rgba(192,57,159,.15)); border-color:rgba(155,92,246,.4); color:var(--text); }
.task-dialog-btn--confirm:hover { background:linear-gradient(135deg,rgba(155,92,246,.3),rgba(192,57,159,.22)); border-color:rgba(155,92,246,.65); transform:translateY(-1px); }

#mainPage {
  position:fixed; inset:0; z-index:8900;
  background-color:var(--bg);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  background-repeat:repeat;
  box-shadow:inset 0 0 240px 70px rgba(0,0,0,.5);
  overflow-y:auto; overflow-x:hidden;
  opacity:0; visibility:hidden; transition:opacity .8s var(--ease),visibility .8s;
}
#mainPage.visible { opacity:1; visibility:visible; }
#mainPage::before {
  content:''; position:fixed; inset:0; pointer-events:none;
  background-image:linear-gradient(rgba(255,255,255,.022) 1px,transparent 1px),
                   linear-gradient(90deg,rgba(255,255,255,.022) 1px,transparent 1px);
  background-size:64px 64px;
  mask-image:radial-gradient(ellipse 85% 70% at 50% 0%,black 15%,transparent 100%); z-index:0;
}
#mainPage::after {
  content:''; position:fixed; inset:0; pointer-events:none; z-index:0;
  background:
    radial-gradient(ellipse 720px 620px at 68% 10%, rgba(155,92,246,.18) 0%, rgba(192,57,159,.08) 45%, transparent 72%),
    radial-gradient(ellipse 640px 480px at 92% 108%, rgba(239,68,68,.07) 0%, transparent 65%),
    radial-gradient(ellipse 520px 420px at -8% 60%, rgba(155,92,246,.07) 0%, transparent 65%);
}
#mainPage > * { position:relative; z-index:1; }

.navbar { position:fixed; top:1.25rem; left:50%; transform:translateX(-50%); width:auto; min-width:400px; max-width:680px; z-index:100; transition:var(--t); }
.nav-container {
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:1.25rem;
  height:52px; padding:0 1.125rem;
  background:rgba(136,120,204,.06); backdrop-filter:blur(18px) saturate(180%); -webkit-backdrop-filter:blur(18px) saturate(180%);
  border:1px solid transparent; background-clip:padding-box;
  box-shadow:0 0 0 1px rgba(136,120,204,.15),0 4px 24px rgba(0,0,0,.2),0 1px 0 rgba(255,255,255,.04) inset;
  border-radius:999px; transition:var(--t);
}
.nav-brand { justify-self:start; min-width:0; }
.nav-brand a { display:flex; align-items:center; gap:.6rem; }
.brand-text  { font-family:var(--font-head); font-size:1rem; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nav-logo { justify-self:center; }
.nav-logo a { display:flex; align-items:center; transition:var(--t); }
.nav-logo a:hover { transform:scale(1.08); }
.nav-status-pill {
  justify-self:end;
  display:inline-flex; align-items:center; gap:.4rem; padding:.25rem .75rem;
  background:rgba(239,68,68,.1); border:1px solid rgba(239,68,68,.3); border-radius:var(--r-full);
  font-family:var(--font-mono); font-size:.62rem; font-weight:700; color:#ef4444; letter-spacing:.05em;
  animation:badgePulse 2s ease-in-out infinite;
}
.nav-status-dot { width:5px; height:5px; border-radius:50%; background:#ef4444; animation:blink .7s step-end infinite; }
@keyframes badgePulse { 0%,100%{box-shadow:none} 50%{box-shadow:0 0 12px rgba(239,68,68,.4)} }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero { position:relative; min-height:100dvh; display:flex; align-items:center; padding:7.5rem 1.5rem 4rem; }
.hero-container {
  max-width:1180px; margin:0 auto; width:100%;
  display:grid; grid-template-columns:1.05fr .95fr; gap:3rem; align-items:center;
}
.hero-content { text-align:left; }

.hero-logo-mark {
  width:72px; height:72px; border-radius:var(--r-lg); margin-bottom:1.25rem;
  filter:drop-shadow(0 12px 28px rgba(155,92,246,.35));
  animation:heroLogoFloat 5s ease-in-out infinite;
}
@keyframes heroLogoFloat {
  0%,100% { transform:translateY(0); }
  50%     { transform:translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-logo-mark { animation:none; }
}

.hero-title {
  font-family:var(--font-head); font-size:clamp(2.6rem,6vw,5rem); font-weight:800;
  line-height:1.04; letter-spacing:-.035em; margin:0 0 1.5rem;
}
.hero-title .grad-text { background:var(--grad-text); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.hero-sub { font-size:clamp(1rem,1.5vw,1.15rem); color:var(--text-muted); max-width:48ch; margin:0 0 2.25rem; line-height:1.8; }

.hero-visual { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1.5rem; }

.hero-help-card {
  display:flex; align-items:flex-start; gap:.85rem; max-width:480px;
  padding:1rem 1.35rem;
  background:rgba(245,158,11,.08); border:1px solid rgba(245,158,11,.3); border-radius:var(--r-lg);
  box-shadow:0 0 24px rgba(245,158,11,.1); text-align:left;
}
.hero-help-icon {
  flex-shrink:0; width:32px; height:32px; border-radius:50%; margin-top:.1rem;
  background:rgba(245,158,11,.15); border:1px solid rgba(245,158,11,.4);
  display:flex; align-items:center; justify-content:center; color:#f59e0b;
}
.hero-help-text { font-size:.84rem; line-height:1.65; color:var(--text-muted); }
.hero-help-text strong { color:#f59e0b; font-weight:700; }

.hero-scroll-cue {
  position:absolute; bottom:2rem; left:50%; transform:translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:.5rem;
  color:var(--text-subtle); font-family:var(--font-mono); font-size:.68rem; letter-spacing:.1em; text-transform:uppercase;
}
.hero-scroll-mouse {
  width:22px; height:34px; border:1.5px solid rgba(155,92,246,.35); border-radius:var(--r-full);
  display:flex; justify-content:center; padding-top:6px;
}
.hero-scroll-wheel { width:3px; height:6px; background:var(--accent); border-radius:var(--r-full); animation:heroScrollWheel 1.6s ease-in-out infinite; }
@keyframes heroScrollWheel {
  0%,100% { transform:translateY(0);   opacity:1; }
  50%     { transform:translateY(8px); opacity:.4; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-wheel { animation:none; }
}
@media (max-width:900px) {
  .hero-scroll-cue { display:none; }
}

.glitch { position:relative; display:inline-block; }
.glitch::before,.glitch::after { content:attr(data-text); position:absolute; top:0; left:0; width:100%; height:100%; -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.glitch::before { background:linear-gradient(135deg,#ef4444,#c0399f); -webkit-background-clip:text; background-clip:text; animation:glitchT .8s steps(2) infinite alternate; opacity:.55; }
.glitch::after  { background:linear-gradient(135deg,#9b5cf6,#f97316); -webkit-background-clip:text; background-clip:text; animation:glitchB .9s steps(2) infinite alternate; opacity:.45; }
@keyframes glitchT { 0%{clip-path:inset(0 0 90% 0);transform:translateX(-3px)} 100%{clip-path:inset(50% 0 0 0);transform:translateX(3px)} }
@keyframes glitchB { 0%{clip-path:inset(60% 0 0 0);transform:translateX(3px)} 100%{clip-path:inset(0 0 60% 0);transform:translateX(-3px)} }

.sneakpeaks-section { padding:5rem 1.5rem; }
.section-label {
  display:flex; align-items:center; gap:.75rem; font-family:var(--font-mono); font-size:.68rem; font-weight:700;
  letter-spacing:.12em; text-transform:uppercase; color:var(--text-subtle); margin-bottom:3rem; justify-content:center;
}
.section-label::before,.section-label::after { content:''; flex:1; max-width:80px; height:1px; background:linear-gradient(90deg,transparent,rgba(155,92,246,.3),transparent); }
.sneakpeaks-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(320px,100%),1fr)); gap:1.5rem; max-width:1080px; margin:0 auto; }
.sneakpeak-card { position:relative; overflow:hidden; background:var(--glass); border:1px solid var(--glass-border); border-radius:var(--r-xl); aspect-ratio:16/10; transition:var(--t); cursor:pointer; }
.sneakpeak-card:hover { border-color:rgba(155,92,246,.3); transform:translateY(-4px); box-shadow:0 20px 50px rgba(0,0,0,.5),0 0 30px rgba(155,92,246,.15); }
.sneakpeak-img { width:100%; height:100%; object-fit:cover; transition:transform .5s var(--ease); filter:brightness(.85); }
.sneakpeak-card:hover .sneakpeak-img { transform:scale(1.04); filter:brightness(.95); }
.sneakpeak-overlay { position:absolute; inset:0; background:linear-gradient(to top,rgba(6,6,12,.9) 0%,rgba(6,6,12,.1) 60%,transparent 100%); display:flex; flex-direction:column; justify-content:flex-end; padding:1.25rem; }
.sneakpeak-tag   { font-family:var(--font-mono); font-size:.63rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--accent); margin-bottom:.3rem; opacity:.8; }
.sneakpeak-title { font-family:var(--font-head); font-size:1rem; font-weight:700; }
.sneakpeak-placeholder { width:100%; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.75rem; background:linear-gradient(135deg,rgba(155,92,246,.06),rgba(192,57,159,.04)); }
.sneakpeak-placeholder-icon { font-size:2.5rem; opacity:.25; }
.sneakpeak-placeholder-text { font-family:var(--font-mono); font-size:.68rem; color:var(--text-subtle); letter-spacing:.06em; }

.sneakpeak-card.corrupted { cursor: not-allowed; }
.sneakpeak-card.corrupted .sneakpeak-img { filter: grayscale(1) contrast(1.5) brightness(.28); }
.sneakpeak-card.corrupted::after {
  content: '// FILE_CORRUPTED';
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 1rem;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  color: #ef4444;
  background: repeating-linear-gradient(0deg, rgba(6,6,12,.92), rgba(6,6,12,.92) 2px, rgba(24,4,4,.9) 2px, rgba(24,4,4,.9) 4px);
  text-shadow: 2px 0 rgba(0,240,255,.8), -2px 0 rgba(255,0,60,.8);
  animation: corruptFlicker 1.7s infinite steps(1);
}
@keyframes corruptFlicker {
  0%, 88%, 100% { opacity: 1; transform: translateX(0); }
  90% { opacity: .55; transform: translateX(-2px); }
  93% { opacity: 1; transform: translateX(2px); }
  96% { opacity: .75; transform: translateX(-1px); }
}
@media (prefers-reduced-motion: reduce) {
  .sneakpeak-card.corrupted::after { animation: none; }
}

.maintenance-section { padding:4rem 1.5rem 3rem; border-top:1px solid rgba(255,255,255,.05); text-align:center; }
.maintenance-status-block {
  display:inline-flex; flex-direction:column; align-items:center; gap:1.25rem;
  padding:2.5rem; background:var(--glass); border:1px solid var(--glass-border);
  border-radius:var(--r-xl); max-width:480px; margin:0 auto 3rem; box-shadow:var(--glow-error);
}
.maintenance-icon { width:56px; height:56px; background:rgba(239,68,68,.1); border-radius:50%; display:flex; align-items:center; justify-content:center; border:1px solid rgba(239,68,68,.3); }
.maintenance-icon svg { width:26px; height:26px; color:#ef4444; }
.maintenance-title { font-family:var(--font-head); font-size:1.5rem; font-weight:800; }
.maintenance-sub   { font-size:.88rem; color:var(--text-muted); line-height:1.75; max-width:40ch; }
.maintenance-code  { font-family:var(--font-mono); font-size:.68rem; color:var(--text-subtle); letter-spacing:.1em; }

.footer { padding:2rem 1.5rem; border-top:1px solid rgba(255,255,255,.05); display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.75rem; }
.footer-brand { display:flex; align-items:center; gap:.6rem; }
.footer-brand svg { flex-shrink:0; }
.footer-copy { font-size:.76rem; color:var(--text-subtle); }
.footer-links { display:flex; gap:1.25rem; }
.footer-links a { font-size:.76rem; color:var(--text-subtle); transition:var(--t); }
.footer-links a:hover { color:var(--text-muted); }

.reveal { opacity:0; transform:translateY(24px); transition:opacity .6s var(--ease),transform .6s var(--ease); }
.reveal.visible { opacity:1; transform:none; }

.toast-container { position:fixed; bottom:2rem; right:2rem; z-index:99999; display:flex; flex-direction:column; gap:.625rem; pointer-events:none; }
.toast {
  padding:.7rem 1.1rem; background:rgba(11,11,20,.96); border:1px solid var(--glass-border);
  border-radius:var(--r-md); font-family:var(--font-mono); font-size:.72rem; color:var(--text-muted);
  box-shadow:var(--shadow-lg); backdrop-filter:blur(16px);
  transform:translateX(120%); opacity:0; transition:transform .4s var(--ease),opacity .4s ease;
  pointer-events:all; max-width:300px;
}
.toast.show  { transform:translateX(0); opacity:1; }
.toast.error { border-color:rgba(239,68,68,.4); color:#ef4444; }
.toast.warn  { border-color:rgba(245,158,11,.4); color:#f59e0b; }
.toast.ok    { border-color:rgba(34,211,163,.4); color:#22d3a3; }

#scrollProgress { position:fixed; top:0; left:0; height:2px; width:0%; background:var(--grad); z-index:99998; transition:width .1s linear; }

.scanlines { position:fixed; inset:0; z-index:99997; pointer-events:none; background:repeating-linear-gradient(0deg,transparent,transparent 2px,rgba(0,0,0,.025) 2px,rgba(0,0,0,.025) 4px); opacity:.35; }

@media(max-width:900px) {
  .hero-container { grid-template-columns:1fr; }
  .hero-visual { margin-top:2.5rem; }
}
@media(max-width:768px) {
  .navbar { top:.75rem; left:1rem; right:1rem; width:auto; min-width:unset; max-width:unset; transform:none; }
  .footer { flex-direction:column; align-items:center; text-align:center; }
  .fix-grid { grid-template-columns:1fr 1fr; }
  #biosScreen { padding:1.5rem; }
  .bsod-qr { display:none; }
  .bios-logo-ascii { display:none; }
}
@media(max-width:480px) {
  .fix-grid { grid-template-columns:1fr; }
  #biosScreen { font-size:.55rem; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

.discord-section { padding: 4rem 1.5rem; position: relative; }

.discord-wrapper {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  box-shadow: 0 0 40px rgba(88,101,242,0.08);
}

.discord-info { display: flex; flex-direction: column; gap: 1.1rem; }

.discord-info-icon {
  width: 52px; height: 52px;
  background: rgba(88,101,242,0.12);
  border: 1px solid rgba(88,101,242,0.25);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: #5865f2;
}

.discord-info-title {
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
}

.discord-info-text {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 38ch;
}

.discord-join-btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1.5rem;
  background: #5865f2;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: var(--t);
  width: fit-content;
  border: 1px solid transparent;
}
.discord-join-btn:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(88,101,242,0.35);
}
.discord-join-btn:active { transform: translateY(0); }

.discord-widget-wrap iframe {
  border-radius: var(--r-lg);
  display: block;
  border: 1px solid var(--glass-border);
}

@media (max-width: 768px) {
  .discord-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .discord-widget-wrap iframe {
    width: 100% !important;
    height: 400px !important;
  }
  .discord-info-text { max-width: 100%; }
}

.live-status { display: flex; flex-direction: column; align-items: center; gap: .85rem; }

.live-status-progress,
.live-status-countdown {
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  padding: 1.25rem 1.75rem; background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--r-xl); min-width: min(340px, 86vw);
}
.live-status-progress.hidden,
.live-status-countdown.hidden { display: none; }

.live-status-label {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--font-mono); font-size: .68rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: #f59e0b;
}
.live-status-label--ok { color: var(--success); }

.live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 6px rgba(34,211,163,.7); flex-shrink: 0;
  animation: liveDotPulse 1.4s ease-in-out infinite;
}
@keyframes liveDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.7); }
}

.live-status-count { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.live-status-count span { color: var(--text); }
.live-status-count span:last-child { color: var(--text-subtle); font-size: 1.1rem; font-weight: 700; }

.live-status-track { width: 100%; height: 6px; background: rgba(255,255,255,.06); border-radius: var(--r-full); overflow: hidden; }
.live-status-fill  {
  height: 100%; width: 0%; border-radius: var(--r-full); transition: width .5s var(--ease);
  background: linear-gradient(90deg, #f59e0b 0%, #22d3a3 100%);
}

.live-status-btn {
  padding: .6rem 1.4rem; background: linear-gradient(135deg,rgba(155,92,246,.2),rgba(192,57,159,.15));
  border: 1px solid rgba(155,92,246,.4); border-radius: var(--r-full);
  font-family: var(--font-mono); font-size: .75rem; font-weight: 700; letter-spacing: .04em;
  color: var(--text); transition: var(--t);
}
.live-status-btn:hover:not(:disabled) {
  background: linear-gradient(135deg,rgba(155,92,246,.3),rgba(192,57,159,.22));
  border-color: rgba(155,92,246,.6); transform: translateY(-1px);
}
.live-status-btn:disabled { opacity: .45; cursor: not-allowed; }

.live-status-cooldown { font-family: var(--font-mono); font-size: .66rem; color: var(--text-subtle); min-height: 1em; }

.countdown-digits { display: flex; gap: 1rem; }
.countdown-unit { display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.countdown-unit span {
  font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; color: var(--text);
  min-width: 2ch; text-align: center;
}
.countdown-unit label { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-subtle); }

.patch-code {
  font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; letter-spacing: .06em;
  color: var(--accent); text-align: center; padding: .6rem 1rem;
  background: rgba(155,92,246,.08); border: 1px solid rgba(155,92,246,.25); border-radius: var(--r-md);
  user-select: all;
}
.patch-timer-track { width: 100%; height: 3px; background: rgba(255,255,255,.08); border-radius: var(--r-full); overflow: hidden; }
.patch-timer-fill  { height: 100%; width: 100%; background: var(--grad-error); border-radius: var(--r-full); transition: width .1s linear; }

.text-corrupt {
  color: #ef4444 !important;
  text-shadow: 1px 0 rgba(0,240,255,.85), -1px 0 rgba(255,0,60,.85);
}

body[data-glitch-level="4"] #mainPage { animation: mainPageShake 7s ease-in-out infinite; }

body[data-glitch-level="3"] .navbar,
body[data-glitch-level="4"] .navbar {
  animation: navFlicker 3.4s ease-in-out infinite;
}
body[data-glitch-level="4"] .nav-container {
  animation: navShake 5.5s ease-in-out infinite;
}
body[data-glitch-level="4"] .discord-section::after {
  content: '';
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(239,68,68,.07) 3px, rgba(239,68,68,.07) 4px);
  animation: discordStatic 2.6s steps(1) infinite;
}

@keyframes mainPageShake {
  0%, 95%, 100% { transform: translateX(0); }
  96% { transform: translateX(-2px); }
  97% { transform: translateX(2px); }
  98% { transform: translateX(-1px); }
  99% { transform: translateX(1px); }
}
@keyframes navFlicker {
  0%, 91%, 100% { opacity: 1; filter: none; }
  92% { opacity: .6; filter: hue-rotate(25deg) saturate(1.5); }
  94% { opacity: 1; filter: none; }
  96% { opacity: .8; filter: hue-rotate(-20deg); }
}
@keyframes navShake {
  0%, 96%, 100% { transform: translateX(0); }
  97% { transform: translateX(-2px); }
  98% { transform: translateX(2px); }
  99% { transform: translateX(-1px); }
}
@keyframes discordStatic {
  0%, 88%, 100% { opacity: 0; }
  90%, 94% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-glitch-level="4"] #mainPage,
  body[data-glitch-level="3"] .navbar,
  body[data-glitch-level="4"] .navbar,
  body[data-glitch-level="4"] .nav-container,
  body[data-glitch-level="4"] .discord-section::after {
    animation: none;
  }
}