/* =========================================================
   Fake Update Screens
   File: styles.css
   Version: 1.9.2
   Author: Ruben Cardozo
   Scope: backend.php, play.php, preview iframes, index.php landing
   Stack: PHP + HTML + CSS + JavaScript vanilla
   Notes: keep runtime/prank styles isolated from landing/backend UI.
========================================================= */

/* =========================================================
   01. Base / Backend UI / Runtime Core
   Original runtime and manual backend styles.
========================================================= */

*{box-sizing:border-box;margin:0;padding:0}:root{--page-bg:#f4f5f7;--text:#111827;--muted:#687182;--panel:#fff;--border:#d9dee7;--shadow:0 18px 55px rgba(15,23,42,.12)}body{min-height:100vh;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:radial-gradient(circle at top,#fff 0,var(--page-bg) 44%,#e8ebf0 100%);color:var(--text);padding:28px 16px}button,select,input{font:inherit}.app{width:min(100%,1060px);margin:0 auto}.hero{margin-bottom:22px}.eyebrow{color:#2563eb;font-size:13px;font-weight:700;letter-spacing:.08em;margin-bottom:8px;text-transform:uppercase}h1{font-size:clamp(30px,5vw,54px);line-height:1.02;letter-spacing:-.045em;margin-bottom:10px}.subtitle{max-width:720px;color:var(--muted);font-size:clamp(15px,2vw,18px)}.panel{background:rgba(255,255,255,.88);border:1px solid var(--border);border-radius:22px;box-shadow:var(--shadow)}.controls{padding:16px;margin-bottom:18px}.control-row,.button-row,.preview-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.control-row{justify-content:space-between}.button-row{margin-top:14px}.field{display:grid;gap:6px;color:#3f4654;font-size:14px;font-weight:650}select{min-width:190px;border:1px solid #cfd6e2;border-radius:12px;background:#fff;color:#111827;padding:10px 12px;cursor:pointer}.toggle{display:inline-flex;align-items:center;gap:8px;color:#303846;font-weight:650;cursor:pointer;user-select:none}.toggle input{width:18px;height:18px;accent-color:#dc2626}.button{border:0;border-radius:12px;padding:11px 15px;font-weight:750;cursor:pointer;transition:transform .14s ease,opacity .14s ease}.button:hover{transform:translateY(-1px)}.button:active{transform:translateY(0)}.primary{background:#111827;color:#fff}.secondary{background:#edf1f7;color:#111827}.preview-shell{padding:16px}.preview-toolbar{justify-content:space-between;margin-bottom:12px}.preview-toolbar strong{font-size:18px}.badge{display:inline-flex;margin-left:8px;padding:4px 8px;border-radius:999px;background:#edf1f7;color:#4b5563;font-size:12px;font-weight:800;vertical-align:middle}.badge.critical{background:#fee2e2;color:#991b1b}.esc-hint,.safety-note{color:var(--muted);font-size:14px}.safety-note{margin-top:14px;text-align:center}.screen{position:relative;width:100%;aspect-ratio:16/9;min-height:360px;overflow:hidden;border-radius:18px;cursor:pointer;user-select:none;box-shadow:inset 0 0 0 1px rgba(255,255,255,.1)}.screen:fullscreen{width:100vw;height:100vh;min-height:100vh;aspect-ratio:auto;border-radius:0;cursor:none}.screen-ui{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px;z-index:2}.restart-overlay{position:absolute;inset:0;z-index:10;background:#000;opacity:0;pointer-events:none;transition:opacity .18s ease}.screen.restarting .restart-overlay{opacity:1}.os-mark{margin-bottom:28px}.spinner{width:46px;height:46px;border:4px solid rgba(255,255,255,.24);border-top-color:#fff;border-radius:50%;animation:spin 1.05s linear infinite;margin-bottom:22px}@keyframes spin{to{transform:rotate(360deg)}}.main-message{max-width:900px;font-size:clamp(22px,3.7vw,42px);font-weight:380;line-height:1.18}.sub-message{max-width:780px;min-height:1.4em;margin-top:12px;font-size:clamp(15px,2vw,22px);color:rgba(255,255,255,.86)}.progress-wrap{width:min(560px,72vw);margin-top:25px}.progress-track{width:100%;height:8px;overflow:hidden;border-radius:99px;background:rgba(255,255,255,.26)}.progress-bar{width:0;height:100%;border-radius:inherit;background:#fff;transition:width .55s ease}.percent{margin-top:14px;font-size:clamp(16px,2vw,22px);color:rgba(255,255,255,.92)}.bottom-note{position:absolute;left:50%;bottom:7%;width:min(860px,88%);transform:translateX(-50%);z-index:3;color:rgba(255,255,255,.84);text-align:center;font-size:clamp(13px,1.8vw,18px)}.dots{display:none;gap:13px;margin-top:22px}.dots span{width:9px;height:9px;border-radius:50%;background:currentColor;opacity:.25;animation:pulse 1.3s ease-in-out infinite}.dots span:nth-child(2){animation-delay:.13s}.dots span:nth-child(3){animation-delay:.26s}.dots span:nth-child(4){animation-delay:.39s}.dots span:nth-child(5){animation-delay:.52s}@keyframes pulse{0%,100%{opacity:.25;transform:scale(.72)}50%{opacity:1;transform:scale(1.2)}}.windows{background:#0067b8;color:#fff;font-family:"Segoe UI",system-ui,sans-serif}.windows .os-mark{display:grid;grid-template-columns:repeat(2,38px);grid-template-rows:repeat(2,38px);gap:6px}.windows .os-mark:before,.windows .os-mark:after,.windows .os-mark span,.windows .os-mark i{content:"";display:block;background:#fff}.windows .os-mark:before{grid-area:1/1}.windows .os-mark:after{grid-area:1/2}.windows .os-mark span{grid-area:2/1}.windows .os-mark i{grid-area:2/2}
/* Windows XP Update */
.windowsxp{background:linear-gradient(to bottom,#063990 0%,#063990 7.2%,#8db0ef 7.3%,#6889db 16%,#5a7bd0 50%,#5e7fd4 83.5%,#24279b 83.6%,#083995 100%);color:#fff;font-family:Tahoma,Verdana,"Segoe UI",system-ui,sans-serif}.windowsxp:before{content:"";position:absolute;left:0;right:0;top:7.2%;height:2px;background:rgba(255,255,255,.55);z-index:1}.windowsxp:after{content:"";position:absolute;left:0;right:0;bottom:16.4%;height:2px;background:rgba(255,255,255,.38);z-index:1}.windowsxp .screen-ui{justify-content:center;padding-top:3%;padding-bottom:12%;z-index:2}.windowsxp .os-mark{width:auto;height:auto;margin-bottom:28px}.xp-logo{display:flex;align-items:flex-end;justify-content:center;gap:13px;filter:drop-shadow(0 2px 2px rgba(0,0,0,.16))}.xp-flag{width:86px;height:72px;position:relative;transform:skewY(-12deg) rotate(7deg)}.xp-flag span{position:absolute;display:block;width:40px;height:32px;border-radius:2px 10px 2px 8px}.xp-red{left:0;top:0;background:linear-gradient(135deg,#ff8a2a,#d73512)}.xp-green{right:0;top:6px;background:linear-gradient(135deg,#9fdb42,#54a91f)}.xp-blue{left:5px;bottom:0;background:linear-gradient(135deg,#87a8ff,#3158c8)}.xp-yellow{right:1px;bottom:5px;background:linear-gradient(135deg,#ffe257,#f4b000)}.xp-wordmark{position:relative;text-align:left;line-height:.86;min-width:220px}.xp-microsoft{position:absolute;left:0;top:-16px;font-size:18px;font-weight:400;opacity:.9}.xp-windows{font-size:54px;font-weight:700;letter-spacing:-3px;color:#fff}.xp-xp{font-size:38px;font-weight:700;color:#ff6a00;margin-left:5px;vertical-align:baseline}.windowsxp .spinner,.windowsxp .dots,.windowsxp .progress-wrap{display:none}.windowsxp .main-message{font-size:clamp(19px,2vw,26px);font-weight:400;line-height:1.3;text-shadow:0 1px 2px rgba(0,0,0,.18)}.windowsxp .sub-message{margin-top:5px;min-height:auto;color:#fff;font-size:clamp(18px,2vw,25px);line-height:1.25;text-shadow:0 1px 2px rgba(0,0,0,.18)}.windowsxp .percent{display:none}.windowsxp .bottom-note{bottom:27%;color:transparent;font-size:0}.critical-mode.windowsxp{background:linear-gradient(to bottom,#052c76 0%,#052c76 7.2%,#768fd1 7.3%,#5267b4 83.5%,#1b1c75 83.6%,#062b73 100%)}@media(max-width:720px){.xp-logo{gap:8px;transform:scale(.8)}.xp-wordmark{min-width:185px}.xp-windows{font-size:44px}.xp-xp{font-size:31px}.xp-microsoft{font-size:15px;top:-13px}.xp-flag{width:70px;height:58px}.xp-flag span{width:32px;height:26px}}
.ubuntu{background:radial-gradient(circle at center,#5e083d 0%,#33021f 62%,#19000f 100%);color:#fff;font-family:Ubuntu,"Segoe UI",system-ui,sans-serif}.ubuntu .os-mark{width:108px;height:108px}.ubuntu-logo-svg{display:block;width:100%;height:100%}.ubuntu-ring{fill:none;stroke:#e95420;stroke-width:16}.ubuntu-gap{fill:#5e083d}.critical-mode.ubuntu .ubuntu-gap{fill:#7c1d09}.ubuntu-dot{fill:#e95420}.ubuntu .dots{display:flex;color:#e95420}.ubuntu .spinner{display:none}.macos{background:linear-gradient(135deg,#0b1020,#283e73 48%,#b15b8e);color:#fff;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display",system-ui,sans-serif}.macos .os-mark:before{content:"";display:block;font-size:clamp(62px,9vw,116px);line-height:.9}.macos .spinner,.android .dots,.windows .dots,.macos .dots{display:none}.android{background:#121212;color:#fff;font-family:Roboto,"Segoe UI",system-ui,sans-serif}.android .os-mark{width:122px;height:122px}.android-logo-svg{display:block;width:100%;height:100%;fill:#3ddc84;stroke:#3ddc84;stroke-width:5;stroke-linecap:round}.android-logo-svg .android-eye{fill:#121212;stroke:none}.critical-mode.android .android-logo-svg .android-eye{fill:#1b1111}.critical-mode.windows{background:#0b4f91}.critical-mode.ubuntu{background:radial-gradient(circle at center,#7c1d09 0%,#3b0904 72%)}.critical-mode.macos{background:linear-gradient(135deg,#1f2937,#7f1d1d 54%,#111827)}.critical-mode.android{background:#1b1111}.critical-mode .progress-bar{background:#ffefef}.noise{background:#000 url("noise.gif") center/cover repeat;color:#fff;font-family:"Courier New",monospace}.noise:before{content:"";position:absolute;inset:0;z-index:1;background:repeating-linear-gradient(to bottom,rgba(255,255,255,.05) 0,rgba(255,255,255,.05) 1px,rgba(0,0,0,.05) 2px,rgba(0,0,0,.05) 4px);mix-blend-mode:overlay;pointer-events:none}.noise .screen-ui{justify-content:flex-end;padding-bottom:9%;text-shadow:0 2px 12px rgba(0,0,0,.8)}.noise .os-mark,.noise .spinner,.noise .progress-wrap,.noise .dots{display:none}.noise .main-message{display:inline-flex;padding:8px 12px;border:1px solid rgba(255,255,255,.4);background:rgba(0,0,0,.34);font-size:clamp(18px,2.7vw,34px);font-weight:700;letter-spacing:.08em;text-transform:uppercase}.noise .sub-message,.noise .bottom-note{display:inline-flex;align-self:center;padding:6px 10px;background:rgba(0,0,0,.32);color:rgba(255,255,255,.92)}.noise.critical-mode{filter:contrast(1.15) brightness(1.1)}.bsod{background:#0078D7;color:#fff;font-family:"Segoe UI Variable","Segoe UI",system-ui,sans-serif;text-align:left}.bsod .screen-ui{align-items:flex-start;text-align:left;justify-content:center;padding:60px 80px}.bsod .os-mark{margin:0 0 30px}.bsod-sad{color:#fff;font-size:clamp(86px,11vw,142px);font-weight:300;line-height:.85;letter-spacing:0;text-shadow:none}.bsod .spinner,.bsod .dots{display:none}.bsod .main-message{font-size:clamp(24px,3.1vw,38px);font-weight:300;letter-spacing:-.02em;line-height:1.32;max-width:760px;color:#fff}.bsod .sub-message{max-width:780px;margin-top:22px;font-size:clamp(16px,1.8vw,21px);line-height:1.45;color:#fff}.bsod .progress-wrap{width:min(620px,78vw);margin-top:28px}.bsod .progress-track{height:0;background:transparent}.bsod .progress-bar{display:none}.bsod .percent{font-size:clamp(16px,1.8vw,21px);margin-top:0;color:#fff}.bsod .bottom-note{left:80px;right:80px;bottom:60px;width:auto;transform:none;text-align:left;font-size:clamp(13px,1.45vw,16px);line-height:1.55;color:rgba(255,255,255,.92)}.critical-mode.bsod{background:#0078D7}@media(max-width:720px){body{padding:18px 10px}.controls,.preview-shell{padding:12px}.control-row,.button-row,.preview-toolbar{align-items:stretch;flex-direction:column}select,.button{width:100%}.screen{min-height:520px;aspect-ratio:9/16}.progress-wrap{width:min(78vw,420px)}}

@media(max-width:720px){.bsod .screen-ui{padding:44px 32px}.bsod .bottom-note{left:32px;right:32px;bottom:40px}}

/* Windows BSOD clásico (Windows XP/7 style) */
.bsod-classic {
  background: #0000aa;
  color: #fff;
  font-family: "Lucida Console", "Courier New", Consolas, monospace;
  text-align: left;
  text-shadow: none;
}
.bsod-classic .screen-ui {
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  padding: clamp(18px, 3vw, 34px);
  gap: 0;
}
.bsod-classic .os-mark,
.bsod-classic .spinner,
.bsod-classic .dots,
.bsod-classic .progress-wrap {
  display: none;
}
.bsod-classic .main-message,
.bsod-classic .sub-message,
.bsod-classic .bottom-note {
  max-width: none;
  width: 100%;
  color: #fff;
  font-family: inherit;
  font-size: clamp(15px, 1.85vw, 28px);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: 0;
  white-space: normal;
}
.bsod-classic .main-message { margin: 0 0 clamp(20px, 2.6vw, 34px); }
.bsod-classic .sub-message { margin: 0; }
.bsod-classic .bottom-note {
  position: absolute;
  left: clamp(18px, 3vw, 34px);
  right: clamp(18px, 3vw, 34px);
  bottom: clamp(18px, 2.4vw, 30px);
  transform: none;
  width: auto;
  text-align: left;
}
.critical-mode.bsod-classic { background: #000080; }
@media (max-width: 720px) {
  .bsod-classic .screen-ui { padding: 18px; }
  .bsod-classic .main-message,
  .bsod-classic .sub-message,
  .bsod-classic .bottom-note {
    font-size: clamp(12px, 3vw, 17px);
    line-height: 1.14;
  }
  .bsod-classic .bottom-note { left: 18px; right: 18px; bottom: 18px; }
}


/* v0.6.5: Windows XP uses the provided transparent PNG logo asset. */
.windowsxp .xp-logo-image {
  display: block;
  width: min(245px, 34vw);
  height: auto;
  margin: 0 auto 24px;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.16));
}
@media (max-width: 720px) {
  .windowsxp .xp-logo-image {
    width: min(220px, 62vw);
    margin-bottom: 18px;
  }
}


/* v0.7.3: BIOS / POST fake screen */
.bios {
  background: #000;
  color: #33ff33;
  font-family: "Courier New", Consolas, monospace;
  text-align: left;
}

.bios .screen-ui {
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  padding: 34px 38px;
}

.bios .os-mark,
.bios .spinner,
.bios .progress-wrap,
.bios .dots {
  display: none;
}

.bios .main-message {
  max-width: none;
  width: 100%;
  font-family: inherit;
  font-size: clamp(14px, 1.9vw, 22px);
  font-weight: 400;
  line-height: 1.35;
  white-space: pre-wrap;
  color: #33ff33;
  text-shadow: 0 0 6px rgba(51,255,51,.22);
  letter-spacing: 0;
}

.bios .sub-message,
.bios .bottom-note {
  display: none;
}

.bios-cursor {
  display: inline-block;
  width: .65em;
  height: 1em;
  margin-left: 2px;
  background: currentColor;
  vertical-align: -0.15em;
  animation: biosBlink 1s steps(2, start) infinite;
}

@keyframes biosBlink {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0; }
}

/* v0.7.3: boot/restart loop overlay */
.boot-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: #000;
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.screen.booting .boot-overlay {
  opacity: 1;
}

.boot-box {
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.boot-logo {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 300;
  letter-spacing: -.03em;
}

.boot-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255,255,255,.24);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@media(max-width:720px){
  .bios .screen-ui {
    padding: 24px 20px;
  }
}


/* v0.7.5: domain gated UI */
.is-gated-hidden {
  display: none !important;
}

.limited-domain-note {
  margin-left: 8px;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 700;
}


/* v0.7.6: full domain lockdown */
body.domain-locked {
  padding: 0;
  background: #0b1020;
}

body.domain-locked .app {
  display: none !important;
}

.domain-lock-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at top, #1f2937 0, #0b1020 55%, #030712 100%);
  color: #f9fafb;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.domain-lock-card {
  width: min(560px, 100%);
  padding: 28px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  background: rgba(17,24,39,.86);
  box-shadow: 0 22px 70px rgba(0,0,0,.32);
}

.domain-lock-card h1 {
  margin-bottom: 10px;
  font-size: clamp(24px, 4vw, 36px);
  letter-spacing: -.03em;
}

.domain-lock-card p {
  color: #cbd5e1;
  line-height: 1.55;
}

.domain-lock-card code {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: #fff;
}


/* v1.5.1: sound button availability */
.button.disabled,
.button:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
}


/* v1.5.1: ultra realistic mode */
.screen.realistic-mode::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.025), rgba(255,255,255,0) 42%),
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,.025) 0,
      rgba(255,255,255,.025) 1px,
      transparent 2px,
      transparent 5px
    );
  mix-blend-mode: screen;
  opacity: .34;
}

.realistic-pulse {
  animation: realisticPulse .9s ease-in-out;
}

@keyframes realisticPulse {
  0% { filter: brightness(1); }
  50% { filter: brightness(.88) contrast(1.08); }
  100% { filter: brightness(1); }
}

.realistic-note {
  display: inline-flex;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 800;
}


/* v1.5.1: technical logs */
.log-output {
  display: none;
  width: min(760px, 84vw);
  max-height: 190px;
  margin-top: 22px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  background: rgba(0,0,0,.24);
  color: rgba(255,255,255,.82);
  font-family: "Courier New", Consolas, monospace;
  font-size: clamp(11px, 1.35vw, 14px);
  line-height: 1.45;
  text-align: left;
  text-shadow: 0 1px 8px rgba(0,0,0,.55);
}

.screen.technical-mode .log-output {
  display: block;
}

.log-line {
  white-space: pre-wrap;
  opacity: .92;
  animation: logIn .18s ease-out;
}

.log-line.warning {
  color: #fde68a;
}

.log-line.error {
  color: #fecaca;
}

.log-line.ok {
  color: #bbf7d0;
}

@keyframes logIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: .92; transform: translateY(0); }
}

.technical-note {
  display: inline-flex;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ecfeff;
  color: #155e75;
  font-size: 12px;
  font-weight: 800;
}

.noise .log-output {
  display: none !important;
}

.bsod .log-output,
.bsod-classic .log-output,
.bios .log-output {
  display: none !important;
}

@media(max-width:720px){
  .log-output {
    width: min(82vw, 420px);
    max-height: 160px;
    font-size: 11px;
  }
}


/* v1.5.1: direct URL mode */
body.direct-mode {
  padding: 0;
  background: #000;
}

body.direct-mode .hero,
body.direct-mode .controls,
body.direct-mode .preview-toolbar,
body.direct-mode .safety-note {
  display: none !important;
}

body.direct-mode .app {
  width: 100%;
  margin: 0;
}

body.direct-mode .preview-shell {
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

body.direct-mode .screen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
}

body.direct-mode .screen:not(:fullscreen) {
  cursor: pointer;
}

body.direct-mode .bottom-note::after {
  content: " · Click para pantalla completa · ESC para salir";
}

.direct-start-hint {
  position: fixed;
  right: 18px;
  bottom: 16px;
  z-index: 50;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.48);
  color: rgba(255,255,255,.86);
  font: 700 12px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  pointer-events: none;
  opacity: .82;
}

.screen:fullscreen + .direct-start-hint {
  display: none;
}


/* v1.5.1: hard prank mode */
body.hard-prank-mode .direct-start-hint,
body.hard-prank-mode .esc-hint,
body.hard-prank-mode .bottom-note::after {
  display: none !important;
  content: "" !important;
}

body.hard-prank-mode .screen {
  cursor: none;
}

body.hard-prank-mode .screen:not(:fullscreen) {
  cursor: pointer;
}

body.hard-prank-mode .main-message,
body.hard-prank-mode .sub-message,
body.hard-prank-mode .percent {
  user-select: none;
}

body.hard-prank-mode .screen.realistic-mode::after {
  opacity: .42;
}

.hard-boot-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #000;
  color: rgba(255,255,255,.78);
  font: 600 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

body.hard-prank-mode .hard-boot-mask.visible {
  opacity: 1;
}

body.hard-prank-mode .screen:fullscreen .bottom-note {
  opacity: .35;
}


/* v1.5.1: system behavior / recovery events */
.system-status {
  position: absolute;
  top: 7%;
  left: 50%;
  z-index: 6;
  max-width: min(760px, 86vw);
  transform: translateX(-50%);
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(0,0,0,.28);
  color: rgba(255,255,255,.88);
  font: 700 clamp(11px, 1.35vw, 14px)/1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
  text-align: center;
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}

.screen.system-mode .system-status.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.system-status.warning {
  color: #fde68a;
  border-color: rgba(253,230,138,.34);
}

.system-status.recovery {
  color: #bfdbfe;
  border-color: rgba(191,219,254,.34);
}

.system-status.error {
  color: #fecaca;
  border-color: rgba(254,202,202,.36);
}

.system-event-flash {
  animation: systemEventFlash .85s ease-in-out;
}

@keyframes systemEventFlash {
  0% { filter: brightness(1); }
  35% { filter: brightness(.72) contrast(1.16); }
  100% { filter: brightness(1); }
}

.system-note {
  display: inline-flex;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
}

.bsod .system-status,
.bsod-classic .system-status,
.noise .system-status {
  display: none !important;
}

body.hard-prank-mode .system-status {
  top: 5%;
  opacity: 0;
}

body.hard-prank-mode .screen.system-mode .system-status.visible {
  opacity: .72;
}


/* v1.6.2: responsive classic BSOD */
.bsod-classic .screen-ui {
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  padding: clamp(18px, 4vw, 44px);
  overflow: hidden;
}

.bsod-classic .main-message,
.bsod-classic .sub-message,
.bsod-classic .bottom-note {
  max-width: min(1120px, 94vw);
  font-family: "Courier New", Consolas, monospace;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.32;
}

.bsod-classic .main-message {
  font-size: clamp(13px, 1.75vw, 22px);
}

.bsod-classic .sub-message {
  margin-top: clamp(10px, 1.8vw, 22px);
  font-size: clamp(10px, 1.25vw, 15px);
}

.bsod-classic .bottom-note {
  left: clamp(18px, 4vw, 44px);
  right: clamp(18px, 4vw, 44px);
  bottom: clamp(14px, 3vw, 34px);
  width: auto;
  transform: none;
  text-align: left;
  font-size: clamp(10px, 1.15vw, 14px);
}

.bsod-classic .progress-wrap,
.bsod-classic .spinner,
.bsod-classic .dots {
  display: none !important;
}

body.preview-mode {
  padding: 0 !important;
  overflow: hidden;
  background: #000;
}

body.preview-mode .direct-start-hint,
body.preview-mode .bottom-note::after {
  display: none !important;
  content: "" !important;
}

body.preview-mode .screen {
  cursor: default !important;
}

body.preview-mode .log-output,
body.preview-mode .system-status {
  display: none !important;
}

@media(max-width: 720px) {
  .bsod-classic .screen-ui {
    padding: 14px;
  }

  .bsod-classic .main-message {
    font-size: 12px;
    line-height: 1.25;
  }

  .bsod-classic .sub-message {
    font-size: 9px;
    line-height: 1.22;
  }

  .bsod-classic .bottom-note {
    left: 14px;
    right: 14px;
    bottom: 10px;
    font-size: 9px;
    line-height: 1.22;
  }
}


/* v1.6.2: scaled live previews */
body.preview-mode .screen {
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: hidden !important;
}

body.preview-mode .screen-ui {
  transform: scale(.72);
  transform-origin: center center;
}

body.preview-mode .main-message {
  max-width: 80vw;
}

body.preview-mode .sub-message {
  max-width: 76vw;
}

body.preview-mode .bottom-note {
  display: none !important;
}

body.preview-mode .progress-wrap {
  max-width: min(440px, 58vw);
}

body.preview-mode .bsod .screen-ui,
body.preview-mode .bsod-classic .screen-ui,
body.preview-mode .bios .screen-ui {
  transform: scale(.62);
  transform-origin: center center;
}

body.preview-mode .windowsxp .screen-ui {
  transform: scale(.68);
}

body.preview-mode .noise .screen-ui {
  transform: scale(.78);
}

body.preview-mode .screen.realistic-mode::after {
  opacity: .18;
}


/* v1.8.0: share URL + runtime polish */
.copy-url-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 9999;
  transform: translateX(-50%) translateY(16px);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .92);
  color: #fff;
  font: 800 13px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  box-shadow: 0 18px 50px rgba(0,0,0,.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.copy-url-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

body.autostart-mode .direct-start-hint {
  display: none !important;
}

.button.copy-url-ready {
  border-color: rgba(147, 197, 253, .55);
}


/* v1.8.0: configurable polish features */
body.interaction-delay-active .screen {
  pointer-events: none;
  filter: brightness(.96);
}

.direct-start-hint.hidden {
  opacity: 0 !important;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}

body[data-cursor-mode="bios"] .screen {
  cursor: none;
}

body[data-cursor-mode="bsod"] .screen,
body[data-cursor-mode="bsodClassic"] .screen {
  cursor: default;
}

body[data-cursor-mode="ubuntu"] .screen,
body[data-cursor-mode="windowsxp"] .screen {
  cursor: progress;
}

body[data-cursor-mode="noise"] .screen {
  cursor: crosshair;
}


/* v1.9.2: playground back link + runtime loading */
.back-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 18px 0 0 18px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.2s ease;
}

.back-link:hover {
  color: #e5e7eb;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
}

body.direct-mode .back-link,
body.preview-mode .back-link,
body.hard-prank-mode .back-link {
  display: none !important;
}

body.runtime-loading {
  padding: 0;
  margin: 0;
  background: #000 !important;
  overflow: hidden;
}

body.runtime-loading .app {
  width: 100%;
  margin: 0;
  visibility: hidden;
}

body.runtime-loading .hero,
body.runtime-loading .controls,
body.runtime-loading .preview-toolbar,
body.runtime-loading .safety-note,
body.runtime-loading .back-link,
body.runtime-loading .direct-start-hint {
  display: none !important;
}

body.runtime-loading .preview-shell {
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

body.runtime-loading .screen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
}

/* =========================================================
   02. Landing Page — index.php
   Replaces the old inline <style> block from index.php.
   Usage required in index.php: <body class="landing-page">
========================================================= */

body.landing-page {
  min-height: 100vh;
  padding: 34px 18px;
  background: radial-gradient(circle at top, #1f2937 0, #0b1020 48%, #030712 100%);
  color: #f9fafb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.landing-page code { color: #bfdbfe; }

body.landing-page .wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
}

body.landing-page .top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

body.landing-page .eyebrow {
  color: #93c5fd;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

body.landing-page h1 {
  font-size: clamp(24px, 4vw, 48px);
  line-height: .95;
  letter-spacing: -.055em;
  margin-bottom: 12px;
}

body.landing-page .subtitle {
  max-width: 760px;
  color: #cbd5e1;
  font-size: clamp(15px, 2vw, 19px);
  line-height: 1.55;
}

body.landing-page .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

body.landing-page .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.1);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,.14);
}

body.landing-page .button.primary {
  background: #fff;
  color: #111827;
}

body.landing-page .notice {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(251,191,36,.35);
  border-radius: 14px;
  background: rgba(251,191,36,.1);
  color: #fde68a;
}

body.landing-page .grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

body.landing-page .card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px;
  background: rgba(15,23,42,.78);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 22px 70px rgba(0,0,0,.22);
  transition: transform .16s ease, border-color .16s ease;
}

body.landing-page .card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.32);
}

body.landing-page .shot {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
}

body.landing-page .live-preview {
  position: absolute;
  left: 0;
  top: 0;
  width: 200%;
  height: 200%;
  border: 0;
  pointer-events: none;
  background: #000;
  transform: scale(.5);
  transform-origin: top left;
}

body.landing-page .shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.03) 0, rgba(255,255,255,.03) 1px, transparent 2px, transparent 5px);
  opacity: .4;
  pointer-events: none;
}

body.landing-page .preview-title {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  width: 88%;
  text-align: center;
  font-size: clamp(15px, 2vw, 24px);
  font-weight: 500;
}

body.landing-page .preview-sub {
  position: absolute;
  left: 50%;
  top: 61%;
  transform: translateX(-50%);
  width: 82%;
  text-align: center;
  color: rgba(255,255,255,.78);
  font-size: 12px;
}

body.landing-page .preview-bar {
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 18%;
  height: 5px;
  border-radius: 99px;
  background: rgba(255,255,255,.28);
  overflow: hidden;
}

body.landing-page .preview-bar span {
  display: block;
  width: 64%;
  height: 100%;
  background: #fff;
  border-radius: inherit;
}

body.landing-page .preview-windows { background: #0067b8; }
body.landing-page .preview-xp { background: linear-gradient(90deg,#7a9bd6,#5a78c5); }
body.landing-page .preview-xp::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 18px; background: #1f3f95; }
body.landing-page .preview-xp::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18px; background: #1f3f95; }
body.landing-page .preview-ubuntu { background: radial-gradient(circle at center,#5e083d 0,#33021f 62%,#19000f 100%); }
body.landing-page .preview-macos { background: linear-gradient(135deg,#0b1020,#283e73 48%,#b15b8e); }
body.landing-page .preview-android { background: #121212; }
body.landing-page .preview-noise { background: #000 url("noise.gif") center/cover repeat; }
body.landing-page .preview-bsod { background: #0078D7; }
body.landing-page .preview-bsod-classic { background: #0000aa; font-family: "Courier New", monospace; }
body.landing-page .preview-bios { background: #000; color: #33ff33; font-family: "Courier New", monospace; }

body.landing-page .meta h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

body.landing-page .meta p {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.45;
}

body.landing-page .tag {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 800;
}

body.landing-page footer,
body.landing-page .footer { color: #94a3b8; }

@media (max-width: 900px) {
  body.landing-page .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  body.landing-page { padding: 22px 12px; }
  body.landing-page .grid { grid-template-columns: 1fr; }
}

/* =========================================================
   03. Playground Back Navigation
   Flat link. Hidden in direct/prank/preview runtime contexts.
========================================================= */

:root { --playground-back-color: #ffffff; }
body.light-theme { --playground-back-color: #111827; }

a.playground-back,
a.playground-back:link,
a.playground-back:visited,
a.playground-back:hover,
a.playground-back:active,
a.playground-back:focus {
  color: var(--playground-back-color) !important;
  text-decoration: none !important;
}

.playground-back {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 9999;
  font-size: 14px;
  font-weight: 500;
  opacity: .9;
  transition: opacity .2s ease;
}

.playground-back:hover { opacity: 1; }

body.direct-mode .playground-back,
body.preview-mode .playground-back,
body.hard-prank-mode .playground-back,
body.runtime-loading .playground-back {
  display: none !important;
}
