:root {
  --bg: #f2f4f8;
  --surface: #fff;
  --text: #14161a;
  --muted: #697182;
  --border: rgba(19, 24, 35, .1);
  --accent: #5b5ce9;
  --coral: #ff6b4a;
  --shadow: 0 20px 60px rgba(37, 42, 68, .12);
  --shadow-soft: 0 10px 28px rgba(37, 42, 68, .08);
  --rail-width: 22%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; margin: 0; }
body { color: var(--text); background: var(--bg); }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.app-shell {
  display: grid;
  grid-template-columns: 22% 56% 22%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.center {
  grid-column: 2;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  background: linear-gradient(180deg, #f6f7fa, var(--bg));
  border-inline: 1px solid rgba(19, 24, 35, .08);
}

.center-inner { width: min(100%, 868px); margin: 0 auto; padding: 24px; }
.header { display: flex; justify-content: center; margin-bottom: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 850; }
.brand-logo { width: 34px; height: 34px; }

.ad-rail {
  position: fixed;
  top: 0;
  z-index: 2;
  width: var(--rail-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 28px clamp(18px, 3vw, 48px);
  background: #f3f4f6;
}
.ad-rail-left { left: 0; }
.ad-rail-right { right: 0; }
.ad-slot {
  width: min(300px, 100%);
  min-height: 250px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: rgba(20, 22, 26, .68);
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-soft);
  text-align: center;
}
.ad-slot span { font-size: .78rem; font-weight: 800; }
.ad-slot small { max-width: 100%; overflow-wrap: anywhere; color: rgba(20, 22, 26, .42); font-size: .68rem; }
.inline-ad-row, .content-image-ad, .static-image-ad { width: 100%; display: grid; place-items: center; margin: 24px 0; }
.inline-ad-row .ad-slot, .content-image-ad .ad-slot, .static-image-ad .ad-slot {
  width: 100%;
  min-height: 92px;
  aspect-ratio: 728 / 90;
  border-radius: 12px;
}

.simple-studio { display: grid; gap: 18px; margin-bottom: 36px; }
.simple-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(245, 178, 57, .26);
}
.preview-stage, .screen-fill-stage { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.simple-fullscreen-button {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #000;
  background: rgba(255, 255, 255, .8);
}
.simple-fullscreen-button svg { width: 28px; }
.simple-controls {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(210px, 1.25fr) auto minmax(132px, .8fr);
  align-items: end;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--shadow-soft);
}
.simple-controls h1 { grid-column: 1 / -1; margin: 0; text-align: center; font-size: 1.65rem; }
.simple-select, .simple-size-row label, .simple-hex-input {
  height: 44px;
  border: 1px solid rgba(24, 29, 43, .14);
  border-radius: 14px;
  background: #fff;
}
.simple-select select { width: 100%; height: 100%; padding: 0 12px; border: 0; border-radius: inherit; background: transparent; font-weight: 650; }
.simple-size-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.simple-size-row label { display: flex; align-items: center; padding: 0 10px; }
.simple-size-row input { min-width: 0; width: 100%; border: 0; text-align: center; font-weight: 700; }
.simple-size-row span { color: var(--muted); font-size: .82rem; }
.simple-download, .primary-button, .secondary-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 800;
}
.simple-download, .primary-button { color: #fff; background: var(--accent); box-shadow: 0 12px 26px rgba(91, 92, 233, .25); }
.secondary-button { border: 1px solid var(--border); background: #f3f2ff; }
.simple-color-row { display: flex; align-items: center; gap: 12px; }
.simple-color-picker { position: relative; width: 44px; height: 44px; display: grid; place-items: center; color: #ff8d8d; }
.simple-color-picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.simple-hex-input { min-width: 0; width: 118px; padding: 0 12px; font-weight: 700; }

.screen-grid-section h2 { margin: 0 0 22px; font-size: 1.5rem; font-weight: 500; text-align: center; }
.screen-category + .screen-category { margin-top: 22px; }
.screen-category h3 { margin: 0 0 10px; color: #555; font-size: .86rem; font-weight: 600; }
.screen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.screen-card {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}
.screen-card.is-selected { border-color: rgba(91, 92, 233, .65); box-shadow: 0 12px 26px rgba(91, 92, 233, .1); }
.card-thumbnail { width: 22px; height: 22px; flex: 0 0 auto; border: 1px solid rgba(0, 0, 0, .08); border-radius: 50%; }
.screen-card strong { font-size: .9rem; font-weight: 650; }

.home-content { margin: 52px 0 10px; }
.content-intro { max-width: 610px; margin: 0 auto 24px; text-align: center; }
.content-eyebrow { color: var(--accent); font-size: .74rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.content-intro h2, .use-cases-heading h2 { margin: 10px 0; font-size: clamp(1.7rem, 3vw, 2.25rem); line-height: 1.08; letter-spacing: -.035em; }
.content-intro p, .how-card p, .use-case-card p { margin: 0; color: var(--muted); line-height: 1.6; }
.how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.how-card, .use-case-card { border: 1px solid var(--border); border-radius: 20px; background: rgba(255, 255, 255, .8); box-shadow: var(--shadow-soft); }
.how-card { position: relative; min-height: 200px; padding: 20px; }
.how-card h3, .use-case-card h3 { margin: 18px 0 8px; font-size: 1rem; }
.content-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: var(--accent); background: rgba(91, 92, 233, .1); font-weight: 900; }
.step-number { position: absolute; top: 16px; right: 18px; color: rgba(91, 92, 233, .16); font-size: 2rem; font-weight: 900; }
.use-cases-heading { margin-bottom: 18px; }
.use-case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.use-case-card { min-height: 150px; display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 18px; }
.use-case-card h3 { margin-top: 2px; }

.footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 48px; padding: 28px 0 12px; border-top: 1px solid var(--border); color: var(--muted); font-size: .82rem; }
.footer nav, .footer-meta { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 20px; }
.footer nav { font-weight: 750; }
.footer a:hover { color: var(--accent); }

.static-page { min-height: 420px; padding: 28px; border: 1px solid var(--border); border-radius: 22px; background: #fff; box-shadow: var(--shadow-soft); }
.static-page h1 { margin: 0 0 12px; font-size: 2.4rem; }
.static-page p, .static-page li { color: var(--muted); line-height: 1.65; }
.legal-details { display: grid; gap: 28px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--border); }
.legal-detail-section h2 { margin: 0 0 10px; font-size: 1.2rem; }
.legal-detail-section p { margin: 0; }
.legal-detail-section p + p { margin-top: 10px; }
.fullscreen-layer { position: fixed; inset: 0; z-index: 9999; background: #000; }
.fullscreen-stage { position: absolute; inset: 0; overflow: hidden; }
.fullscreen-exit {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 10;
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  padding: 0 18px;
  color: #fff;
  background: rgba(15, 17, 25, .68);
  font-weight: 800;
}

.white-noise-screen canvas, .radar-screen canvas, .matrix-screen canvas { width: 100%; height: 100%; display: block; }
.white-noise-screen canvas { image-rendering: pixelated; }
.broken-screen { background: #05070c; }
.broken-screen-image { width: 100%; height: 100%; object-fit: cover; }
.radar-screen { background: #06160d; }
.bsod-screen { display: grid; align-items: center; color: #fff; background: #0078d7; }
.bsod-content { width: min(980px, calc(100% - 80px)); margin-left: clamp(28px, 9vw, 120px); }
.sad-face { margin-bottom: 20px; font-size: clamp(3.2rem, 10vw, 7rem); line-height: 1; }
.bsod-content p { max-width: 760px; font-size: clamp(.86rem, 2.2vw, 1.65rem); }
.bsod-details { display: grid; gap: 8px; opacity: .9; }
.hacker-screen { color: #49ff8b; background: #020704; }
.hacker-screen pre { position: absolute; inset: 24px; overflow: hidden; white-space: pre-wrap; font: 700 clamp(.58rem, 1.25vw, 1rem)/1.45 ui-monospace, monospace; }
.terminal-cursor { animation: blink 1s steps(2, start) infinite; }
.fake-update-screen { display: grid; place-items: center; color: #fff; text-align: center; }
.update-card { width: min(620px, calc(100% - 40px)); display: grid; justify-items: center; gap: 14px; }
.os-spinner { width: 50px; height: 50px; border: 4px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: spin 1.2s linear infinite; }
.update-progress { width: min(460px, 100%); height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.22); }
.update-progress span { display: block; height: 100%; background: #fff; transition: width .7s ease; }
.update-windows10 { background: #0067b8; }
.update-windowsxp { color: #1c2e52; background: linear-gradient(#62aa49 0 48%, #2474db 48%); }
.update-windowsxp .update-card, .update-macos .update-card, .update-chromeos .update-card { padding: 34px; border-radius: 24px; background: rgba(255,255,255,.9); box-shadow: var(--shadow); }
.update-macos { color: #1d1f27; background: linear-gradient(135deg, #f7f8fb, #dfe6f7); }
.update-ubuntu { background: linear-gradient(135deg, #2c001e, #77216f 55%, #e95420); }
.update-chromeos { color: #263238; background: #f8fbff; }
.dvd-screen { background: #0c0f18; }
.dvd-logo { position: absolute; left: 0; top: 0; width: 130px; height: 64px; display: grid; place-items: center; border: 5px solid currentColor; border-radius: 18px; font-size: 2rem; font-weight: 950; }
.flip-clock-screen { display: grid; place-items: center; background: radial-gradient(circle, #273048, #080a0f 70%); }
.flip-clock { display: flex; align-items: center; justify-content: center; gap: 8px; }
.clock-card, .clock-separator { min-width: 60px; height: 96px; display: grid; place-items: center; color: #fff; font-size: 4rem; font-weight: 950; }
.clock-card { border-radius: 16px; background: linear-gradient(#232838, #11141d); box-shadow: 0 26px 80px rgba(0,0,0,.42); }
.quotes-screen { display: grid; place-items: center; padding: 40px; color: #fff; background: linear-gradient(135deg, #5b5ce9, #35c789); }
.quotes-screen blockquote { max-width: 920px; margin: 0; font-size: clamp(1.45rem, 5vw, 4rem); line-height: 1.12; font-weight: 850; text-align: center; }
.no-signal-screen { background: #111; }
.smpte-bars { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, 1fr); }
.no-signal-badge { position: absolute; left: 50%; top: 50%; z-index: 2; padding: 14px 24px; color: #fff; border: 3px solid #fff; border-radius: 10px; background: rgba(0,0,0,.82); font-size: 2rem; font-weight: 950; transform: translate(-50%, -50%); }
.signal-static { position: absolute; inset: 0; opacity: .13; background-image: repeating-radial-gradient(circle, #fff 0 1px, transparent 1px 3px); animation: staticShift 180ms steps(2, end) infinite; }
.matrix-screen { background: #000; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes staticShift { to { transform: translate(2px, -2px); } }

@media (max-width: 1180px) {
  .simple-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .simple-download { width: 100%; }
}

@media (max-width: 1023px) {
  .app-shell { grid-template-columns: 1fr; }
  .ad-rail { display: none; }
  .center { grid-column: 1; border: 0; }
}

@media (max-width: 740px) {
  .center-inner { padding: 16px; }
  .simple-controls, .how-grid, .use-case-grid { grid-template-columns: 1fr; }
  .simple-size-row { grid-template-columns: 1fr; }
  .screen-grid { grid-template-columns: 1fr; }
  .how-card { min-height: 0; }
  .static-page { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
