/* The screens around the desktop: the first screen, boot, the fake crashes, the end. */

/* First screen: darkness, two eyes, one button. */
#gate { z-index: 800; display: grid; align-content: center; justify-items: center; gap: 0; padding: 24px; text-align: center; color: var(--putty);
  background: radial-gradient(ellipse at 50% 38%, #1c0f2b 0, var(--night) 62%); }
.gate-eyes { display: flex; gap: clamp(28px, 6vw, 70px); margin-bottom: clamp(34px, 7vh, 72px); }
.gate-eye { position: relative; display: block; width: clamp(64px, 11vw, 118px); aspect-ratio: 1.75; overflow: hidden; border-radius: 82% 12%; rotate: 8deg;
  background: radial-gradient(circle at 50% 45%, #ffd27a 0, var(--tabby) 46%, var(--tabby-dk) 100%); box-shadow: 0 0 44px rgba(238, 123, 26, 0.4);
  animation: blink 5.5s linear infinite; transition: scale 0.15s; }
.gate-eye.r { border-radius: 12% 82%; rotate: -8deg; animation-delay: 0.04s; }
.gate-eye b { position: absolute; left: 50%; top: 50%; width: 15%; height: 86%; translate: -50% -50%; border-radius: 50%; background: var(--night); transform: translate(var(--px, 0px), var(--py, 0px)); }
#gate.smug .gate-eye { scale: 1 0.42; }
@keyframes blink { 0%, 94%, 100% { transform: none; } 97% { transform: scaleY(0.06); } }
.gate-note { margin-top: clamp(34px, 6vh, 56px); font-size: clamp(19px, 2.4vw, 26px); font-weight: 600; color: var(--paper); }
.gate-fine { margin-top: 10px; font-size: clamp(14px, 1.6vw, 17px); color: var(--lilac); }

/* Boot */
#boot { z-index: 790; background: #000; color: #c9c9c9; }
#boot-log { margin: 0; padding: 5vh 5vw; font: 400 clamp(13px, 1.5vw, 18px) / 1.55 var(--term); white-space: pre-wrap; }
#splash { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 5vh; background: radial-gradient(ellipse at center, #2a1740, #0b0710 75%); }
#splash img { width: min(78vw, 820px); height: auto; }
.march { width: min(50vw, 260px); height: 18px; padding: 3px; box-shadow: 0 0 0 2px var(--putty-lo); }
.march::before { content: ''; display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--tabby) 0 12px, transparent 12px 20px); animation: march 0.5s steps(5) infinite; }
@keyframes march { to { background-position: 20px 0; } }

/* The fake crashes. Shown inside the game, and the joke is revealed a few seconds later. */
#crash { z-index: 600; cursor: none; }
#crash.awake { cursor: var(--cursor); }
#crash.black { background: #000; }
#crash.bsod-old { padding: 6vh 5vw; overflow: hidden; background: #000084; color: #fff; font: 600 clamp(10px, 1.5vw, 19px) / 1.5 var(--term); white-space: pre-wrap; }
#crash.bsod-new { padding: 13vh 10vw 6vh; overflow: hidden; background: #0078d7; color: #fff; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; font-weight: 300; }
.bn-face { display: inline-block; font-size: clamp(80px, 13vw, 180px); line-height: 1.1; transform-origin: 50% 55%; transition: transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
.bn-face.flip { transform: rotate(360deg); }
.bn-text { margin-top: 3vh; max-width: 32em; font-size: clamp(17px, 2.3vw, 32px); line-height: 1.35; }
.bn-pct { margin-top: 3vh; font-size: clamp(17px, 2.3vw, 32px); }
.bn-more { display: flex; gap: 22px; align-items: flex-start; margin-top: 5vh; font-size: clamp(11px, 1.15vw, 16px); line-height: 1.5; font-weight: 400; }
.bn-qr { flex: none; display: grid; grid-template-columns: repeat(11, 1fr); width: clamp(72px, 8.5vw, 116px); aspect-ratio: 1; padding: 6px; background: #fff; }
.bn-qr i { background: #0078d7; }
.bn-qr i.o { background: #fff; }
#crash.shrink { animation: crash-shrink 0.55s cubic-bezier(0.6, 0, 0.9, 0.4) forwards; transform-origin: calc(100% - 180px) 60px; }
@keyframes crash-shrink { to { transform: scale(0.02); opacity: 0.2; } }
/* the little cat window that owns up to the blue screen */
#crash .win { left: auto; top: 46px; right: 22px; width: min(330px, 86vw); color: var(--ink); font: 500 17px/1.3 var(--ui); cursor: var(--cursor); }
#crash .win * { cursor: var(--cursor); }

/* The end */
#end { z-index: 780; display: grid; align-content: center; justify-items: center; gap: 4vh; padding: 20px; background: #000; text-align: center; }
.safe { max-width: 14em; font: 400 clamp(38px, 6.4vw, 88px) / 1.05 var(--rite); color: var(--tabby); text-wrap: balance; }
.cert { position: relative; width: min(430px, 94vw); padding: 6px; text-align: left; background: var(--putty); box-shadow: var(--out); animation: win-pop 0.14s cubic-bezier(0.2, 1.5, 0.5, 1); }
.cert .win-bar { cursor: inherit; }
.cert dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0 0 14px; padding: 10px 12px; background: var(--paper); box-shadow: var(--in); }
.cert dt { color: #5b5346; }
.cert dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.cert-rank { margin-bottom: 14px; font: 400 34px/1 var(--rite); color: var(--stop-dk); }
.cert-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.end-ps { min-height: 3em; max-width: 34em; font-size: 16px; color: var(--lilac); }

/* Leaving full screen in the middle of it */
#coward { z-index: 950; display: grid; place-items: center; padding: 20px; background: rgba(11, 7, 16, 0.93); color: var(--paper); text-align: center; }
#coward h2 { margin: 0 0 8px; font: 400 clamp(40px, 7vw, 76px) / 1 var(--rite); color: var(--tabby); }
#coward p { font-size: 20px; color: var(--lilac); }
.coward-btns { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 24px; margin-top: 34px; }

/* Shut Down from the Meow menu */
#off { position: absolute; inset: 0; z-index: 700; display: grid; place-items: center; background: #000; color: var(--tabby); font: 400 clamp(30px, 5vw, 60px) / 1.1 var(--rite); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .gate-eye { animation: none; }
  .bn-face { transition: none; }
}
