/* ==========================================================================
   Full-screen states — POST, boot, Welcome, power dialogs, off, stand by, BSOD
   ========================================================================== */
#screens { position: fixed; inset: 0; z-index: 200000; }
#screens[hidden] { display: none; }
.screen { position: absolute; inset: 0; overflow: hidden; transition: opacity .45s ease; }
.screen.fade { opacity: 0; }
.screen.black { background: #000; }

/* XP wordmark */
.xp-logo { display: inline-flex; align-items: flex-start; gap: calc(6px * var(--s)); color: #fff; }
.xp-logo .xp-logo-flag { filter: drop-shadow(0 0 1px rgba(0,0,0,.3)); margin-top: calc(-4px * var(--s)); }
.xp-logo-text { display: flex; flex-direction: column; line-height: 1; font-family: "Franklin Gothic Medium", "Trebuchet MS", Tahoma, sans-serif; }
.xp-logo-text .ms { font-size: calc(13px * var(--s)); font-weight: bold; letter-spacing: .2px; }
.xp-logo-text .ms sup { font-size: .55em; }
.xp-logo-text .win { font-size: calc(46px * var(--s)); font-weight: 600; letter-spacing: -.5px; margin-top: calc(-1px * var(--s)); }
.xp-logo-text .xp { font-size: .55em; color: #FF6A00; font-style: italic; font-weight: bold; margin-left: 2px; vertical-align: .75em; letter-spacing: 0; }

/* POST */
.screen.post { background: #000; color: #A8A8A8; padding: 18px 22px; }
.post-text { margin: 0; font: 15px/18px "Lucida Console", "Courier New", monospace; white-space: pre-wrap; }
.post-star { position: absolute; right: 26px; top: 16px; color: #3BA7FF; font: italic bold 16px "Courier New", monospace; display: flex; align-items: center; gap: 4px; }
.post-star b { color: #FFE63B; font-size: 26px; }

/* boot */
.screen.boot { background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.boot-center { position: relative; margin-top: -8vh; display: flex; flex-direction: column; align-items: flex-end; }
.boot-edition { color: #fff; font: 20px "Franklin Gothic Medium", "Trebuchet MS", sans-serif; margin-top: 2px; margin-right: 4px; }
.boot-bar { margin-top: 64px; width: 160px; height: 20px; border: 2px solid #B2B2B2; border-radius: 4px; padding: 2px 2px; overflow: hidden; position: relative; }
.boot-blocks { position: absolute; top: 2px; left: 0; display: flex; gap: 2px; animation: boot-scroll 2.1s linear infinite; }
.boot-blocks i { width: 9px; height: 12px; border-radius: 1px; background: linear-gradient(to bottom, #2838C7 0%, #5979EF 17%, #869EF3 32%, #869EF3 45%, #5979EF 59%, #2838C7 100%); }
@keyframes boot-scroll { from { transform: translateX(-36px); } to { transform: translateX(164px); } }
.boot-copy { position: absolute; left: 22px; bottom: 18px; color: #fff; font-size: 13px; }
.boot-ms { position: absolute; right: 26px; bottom: 14px; color: #fff; font: italic 900 22px Arial, sans-serif; letter-spacing: -1px; }
.boot-ms sup { font-size: 9px; }
.resume-text { color: #fff; font: 18px "Franklin Gothic Medium", "Trebuchet MS", sans-serif; margin-top: 18px; align-self: center; }
.resume-bar { width: 260px; margin-top: 18px; }

/* Welcome */
.screen.welcome { background: #5A7EDC; display: flex; flex-direction: column; color: #fff; }
.wl-top { height: 13%; min-height: 50px; flex: none; background: #00309C; position: relative; }
.wl-top::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(to right, #5A7EDC 0%, #fff 35%, #b9ccf5 60%, #5A7EDC 100%); opacity: .9; }
.wl-mid { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0;
  background: radial-gradient(ellipse 60% 70% at 8% 12%, #97B4F2 0%, rgba(151,180,242,.35) 35%, transparent 70%), #5A7EDC; }
.wl-bottom { height: 16%; min-height: 64px; flex: none; background: #00309C; position: relative; display: flex; align-items: center; justify-content: space-between; padding: 0 3.5% 0 2.5%; gap: 16px; }
.wl-bottom::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(to right, #466FD5 0%, #F1A259 30%, #F6B976 50%, #E48E3F 70%, #466FD5 100%); }
.wl-split { display: flex; align-items: center; width: 100%; max-width: 980px; padding: 0 20px; }
.wl-left { flex: 1; display: flex; flex-direction: column; align-items: flex-end; padding-right: 28px; gap: 16px; }
.wl-hint { font-size: 17px; text-shadow: 0 0 1px rgba(0,0,0,.2); }
.wl-divider { width: 1px; align-self: stretch; min-height: 320px; background: linear-gradient(to bottom, transparent, rgba(255,255,255,.85) 30%, rgba(255,255,255,.85) 70%, transparent); flex: none; }
.wl-users { flex: 1; display: flex; flex-direction: column; gap: 8px; padding-left: 20px; max-height: 60vh; overflow: auto; }
.wl-user { display: flex; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 8px 0 0 8px; cursor: var(--cur-hand); max-width: 360px; transition: opacity .3s; outline: none; }
.wl-user:hover, .wl-user:focus-visible, .wl-user.picked { background: linear-gradient(to right, #00309C 0%, rgba(0,48,156,.75) 55%, rgba(90,126,220,0) 100%); }
.wl-pic { width: 58px; height: 58px; flex: none; border: 3px solid #fff; border-radius: 5px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); display: grid; place-items: center; transition: border-color .15s; }
.wl-pic .ico { width: 52px; height: 52px; }
.wl-user:hover .wl-pic, .wl-user.picked .wl-pic, .wl-user:focus-visible .wl-pic { border-color: #FFCC33; }
.wl-name { font-size: 20px; line-height: 24px; }
.wl-running, .wl-sub { font-size: 12px; color: #D7E3FF; min-height: 14px; }
.wl-running { color: #fff; }
.wl-user.dim { opacity: .45; pointer-events: none; }
.wl-typepw { font-size: 12px; margin: 4px 0; }
.wl-passrow { display: flex; align-items: center; gap: 6px; }
.wl-pass { width: 170px; height: 24px; border: 1px solid #1A3E9E; border-radius: 3px; padding: 2px 6px; font-size: 14px; }
.wl-go { width: 24px; height: 24px; border-radius: 4px; border: 1px solid #fff; background: linear-gradient(to bottom, #6DD86A, #29A225); position: relative; cursor: var(--cur-hand); }
.wl-go::after { content: ''; position: absolute; left: 7px; top: 5px; border: 6px solid transparent; border-left: 9px solid #fff; border-right: 0; }
.wl-hintbtn { width: 24px; height: 24px; border-radius: 4px; border: 1px solid #fff; background: linear-gradient(to bottom, #4F8BF5, #1C4FD0); color: #fff; font-weight: bold; font-size: 14px; cursor: var(--cur-hand); }
.wl-balloon .b-tail.up { top: -19px; bottom: auto; left: 24px; border-top: 0; border-bottom: 19px solid #000; }
.wl-balloon .b-tail.up::after { top: 2px; left: -17px; border-top: 0; border-bottom: 18px solid #FFFFE1; }
.wl-off { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: #fff; font-size: 15px; cursor: var(--cur-hand); padding: 4px; }
.wl-off-btn { width: 26px; height: 26px; border-radius: 4px; border: 1px solid #fff; position: relative; background: radial-gradient(circle at 30% 25%, #F79A7C, #D5401A 55%, #B42B08); box-shadow: 0 0 2px rgba(0,0,0,.4); }
.wl-off-btn::before { content: ''; position: absolute; left: 6px; top: 7px; width: 10px; height: 10px; border: 2px solid #fff; border-top-color: transparent; border-radius: 50%; }
.wl-off-btn::after { content: ''; position: absolute; left: 11px; top: 4px; width: 2px; height: 8px; background: #fff; }
.wl-off:hover span:last-child { text-decoration: underline; }
.wl-note { font-size: 13px; line-height: 17px; text-align: left; white-space: pre-line; max-width: 380px; }
.wl-status { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.wl-status-text { font-size: 20px; }
.wl-status-sub { font-size: 14px; color: #E5EDFF; }
.wl-progress { width: 280px; }
.wl-splash { width: 100%; max-width: 900px; padding: 0 8%; display: flex; flex-direction: column; gap: 8px; }
.wl-splash-word { font: italic bold 68px "Franklin Gothic Medium", "Trebuchet MS", Tahoma, sans-serif; letter-spacing: -1px; text-shadow: 1px 2px 4px rgba(0,0,40,.35); animation: splash-in .6s ease-out; }
@keyframes splash-in { from { opacity: 0; transform: translateX(-12px); } }

@media (max-width: 700px) {
  .wl-split { flex-direction: column; gap: 18px; }
  .wl-left { align-items: center; padding: 0; }
  .wl-left .xp-logo { --s: .8 !important; }
  .wl-divider { width: 80%; min-height: 1px; height: 1px; background: linear-gradient(to right, transparent, rgba(255,255,255,.85) 30%, rgba(255,255,255,.85) 70%, transparent); align-self: center; }
  .wl-users { padding: 0; align-items: center; width: 100%; }
  .wl-user { border-radius: 8px; width: 100%; max-width: 330px; }
  .wl-note { font-size: 11px; line-height: 14px; }
  .wl-off { font-size: 13px; }
  .wl-splash-word { font-size: 48px; }
  .wl-hint { font-size: 15px; }
}

/* power dialogs */
.pw-overlay { position: fixed; inset: 0; z-index: 150000; display: grid; place-items: center; background: transparent; }
.pw-dialog { width: 314px; max-width: calc(100vw - 16px); border: 1px solid #fff; box-shadow: 0 0 0 1px #00309C, 4px 4px 10px rgba(0,0,0,.4); position: relative; animation: win-open .15s ease-out; }
.pw-head { height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px 0 12px; color: #fff;
  font: 19px "Franklin Gothic Medium", "Trebuchet MS", sans-serif; background: #00309C; position: relative; }
.pw-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(to right, #00309C, #8CB0F8 40%, #00309C); }
.pw-mid { background: linear-gradient(to bottom, #7AA1E6 0%, #5A7EDC 60%, #5A7EDC 100%); padding: 22px 12px 18px; }
.pw-buttons { display: flex; justify-content: space-around; }
.pw-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: 0; color: #fff; font-size: 11px; cursor: var(--cur-hand); width: 84px; padding: 0; }
.pw-orb { width: 33px; height: 33px; border-radius: 4px; display: block; background-size: contain; background-repeat: no-repeat; transition: filter .1s; box-shadow: 0 0 0 1px rgba(255,255,255,.7); }
.pw-btn:hover .pw-orb { filter: brightness(1.18); }
.pw-btn:active .pw-orb { filter: brightness(.9); }
.pw-btn.standby .pw-orb { background: radial-gradient(circle at 30% 25%, #FFF3B0, #F6CB34 50%, #D99A08); }
.pw-btn.turnoff .pw-orb { background: radial-gradient(circle at 30% 25%, #F9B39C, #E0461C 50%, #B42B08); }
.pw-btn.restart .pw-orb { background: radial-gradient(circle at 30% 25%, #C3F5AE, #45B52A 50%, #237A12); }
.pw-btn.logoff .pw-orb { background: radial-gradient(circle at 30% 25%, #FFE0A6, #F29A1E 50%, #C96C00); }
.pw-btn.switch .pw-orb { background: radial-gradient(circle at 30% 25%, #BFE3FF, #3B8DEB 50%, #1B55C2); }
.pw-orb { position: relative; }
.pw-btn .pw-orb::before, .pw-btn .pw-orb::after { content: ''; position: absolute; }
.pw-btn.turnoff .pw-orb::before, .pw-btn.standby .pw-orb::before { left: 9px; top: 10px; width: 11px; height: 11px; border: 2.5px solid #fff; border-top-color: transparent; border-radius: 50%; }
.pw-btn.turnoff .pw-orb::after, .pw-btn.standby .pw-orb::after { left: 15px; top: 6px; width: 2.5px; height: 10px; background: #fff; }
.pw-btn.restart .pw-orb::before { left: 8px; top: 8px; width: 13px; height: 13px; border: 2.5px solid #fff; border-left-color: transparent; border-radius: 50%; }
.pw-btn.restart .pw-orb::after { left: 7px; top: 6px; border: 4px solid transparent; border-bottom: 6px solid #fff; transform: rotate(-30deg); }
.pw-btn.logoff .pw-orb::before { left: 7px; top: 8px; width: 10px; height: 10px; border: 2.5px solid #fff; border-radius: 50%; }
.pw-btn.logoff .pw-orb::after { left: 16px; top: 14px; width: 11px; height: 3px; background: #fff; box-shadow: 6px 3px 0 -0.5px #fff; }
.pw-btn.switch .pw-orb::before { left: 5px; top: 13px; width: 20px; height: 3px; background: #fff; box-shadow: 0 6px 0 #fff; }
.pw-btn.switch .pw-orb::after { left: 20px; top: 9px; border: 5px solid transparent; border-left: 7px solid #fff; border-right: 0; }
.pw-foot { background: #00309C; display: flex; justify-content: flex-end; padding: 10px 12px; }
.pw-cancel { min-width: 70px; }
.pw-tip { position: absolute; z-index: 2; background: #FFFFE1; border: 1px solid #000; color: #000; padding: 4px 6px; max-width: 240px; font-size: 11px; white-space: pre-line; box-shadow: 2px 2px 3px rgba(0,0,0,.25); pointer-events: none; }
.pw-flag { display: grid; place-items: center; }

/* powered off */
.screen.off { background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; color: #7A7A7A; }
.power-btn { width: 76px; height: 76px; border-radius: 50%; border: 3px solid #2A2A2A; background: radial-gradient(circle at 40% 35%, #333, #111 70%); position: relative; cursor: var(--cur-hand); box-shadow: 0 0 0 6px #0C0C0C, inset 0 2px 3px rgba(255,255,255,.08); transition: box-shadow .2s; }
.power-btn::before { content: ''; position: absolute; left: 22px; top: 24px; width: 26px; height: 26px; border: 3px solid #6BD66B; border-top-color: transparent; border-radius: 50%; }
.power-btn::after { content: ''; position: absolute; left: 35px; top: 16px; width: 3px; height: 20px; background: #6BD66B; }
.power-btn:hover { box-shadow: 0 0 0 6px #0C0C0C, 0 0 22px rgba(107,214,107,.35); }
.off-text { font-size: 16px; color: #C8C8C8; font-family: var(--font-title); }
.off-hint { font-size: 12px; }

/* stand by */
.screen.standby { background: #000; display: grid; place-items: center; transition: background 1s; }
.standby-text { color: #fff; font-size: 16px; }
.screen.standby .led { position: absolute; right: 22px; bottom: 18px; width: 9px; height: 9px; border-radius: 50%; background: #F6A623; box-shadow: 0 0 8px #F6A623; animation: led 2.4s ease-in-out infinite; }
@keyframes led { 50% { opacity: .15; } }
.screen.standby.waking { background: #111; }

/* BSOD */
.screen.bsod { background: #0000AA; color: #fff; padding: 3vh 3vw; cursor: none; }
.bsod-text { margin: 0; font: 15px/19px "Lucida Console", "Courier New", monospace; white-space: pre-wrap; }
@media (max-width: 640px) { .bsod-text { font-size: 11px; line-height: 14px; } .post-text { font-size: 11px; line-height: 14px; } }

/* desktop reveal after log on */
#machine.revealing #desktop-icons, #machine.revealing #taskbar { opacity: 0; }
#machine #desktop-icons, #machine #taskbar { transition: opacity .45s ease; }
#machine.revealing.reveal-icons #desktop-icons { opacity: 1; }
#machine.revealing.reveal-taskbar #taskbar { opacity: 1; }

/* crash dialogs */
.crash-win .custom-dlg { padding: 0 !important; }
.crash { width: 420px; max-width: calc(100vw - 20px); }
.crash-head { background: #fff; display: flex; justify-content: space-between; gap: 14px; padding: 12px 12px 14px; border-bottom: 1px solid #ACA899; }
.crash-title { font-weight: bold; line-height: 15px; }
.crash-body { padding: 10px 14px 0; line-height: 14px; }
.crash-body p { margin: 0 0 10px; }
.crash-details { white-space: pre-wrap; background: #fff; border: 1px solid #7F9DB9; padding: 6px; font: 11px "Courier New", monospace; }
.crash-classic-details { margin: 10px 0 0; background: #fff; border: 1px solid #7F9DB9; padding: 6px; font: 11px "Courier New", monospace; max-height: 150px; overflow: auto; }
.flashlight { animation: flashlight 1s ease-in-out infinite alternate; }
@keyframes flashlight { from { transform: translateX(-4px) rotate(-8deg); } to { transform: translateX(6px) rotate(8deg); } }
