/* css/winxp.css
 * Windows XP Luna: base da página, área de trabalho (Bliss), janelas,
 * barra de tarefas, menu iniciar, letreiros, boot e login.
 */
:root {
  --xp-beige: #ece9d8;
  --xp-blue: #0a56d6;
  --xp-blue-dark: #0831d9;
  --xp-green: #3c9a2a;
  --xp-text: #111;
  --font: Tahoma, "Segoe UI", Verdana, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  display: flex; flex-direction: column; height: 100vh; height: 100dvh;
  overflow: hidden; font: 12px/1.35 var(--font); color: var(--xp-text);
  background: #000; user-select: none; -webkit-user-select: none;
}
button { font-family: inherit; }
[hidden] { display: none !important; }
.ico { display: inline-block; width: 1.4em; height: 1.4em; vertical-align: middle; flex: none; }
.ico svg { display: block; width: 100%; height: 100%; }
.muted { color: #666; }

/* ---------- Letreiros ---------- */
.ticker { display: flex; align-items: center; flex: none; height: 26px; overflow: hidden; font-size: 12px; white-space: nowrap; }
.ticker-top { background: linear-gradient(#1a3fa8, #0b2a80); color: #fff; border-bottom: 1px solid #000a3a; }
.ticker-bottom { background: linear-gradient(#f5f3e6, #d8d4c2); color: #1a1a1a; border-top: 1px solid #fff; height: 24px; }
.ticker-label { flex: none; padding: 0 10px; font-weight: bold; background: #c4161c; color: #fff; height: 100%; display: flex; align-items: center; letter-spacing: .5px; z-index: 1; }
.ticker-bottom .ticker-label { background: #0a56d6; }
.ticker-view { flex: 1; overflow: hidden; }
.ticker-track { display: inline-block; white-space: nowrap; animation: ticker-roll linear infinite; will-change: transform; }
.ticker-half { display: inline-block; }
.ticker-item { display: inline-block; padding: 0 6px; }
.ticker-sep { display: inline-block; margin: 0 38px; color: #f0a020; font-size: 10px; vertical-align: middle; }
.ticker-bottom .ticker-sep { color: #0a56d6; }
/* Keep both news tickers moving slowly, including on hover. */
@keyframes ticker-roll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Área de trabalho (Bliss) ---------- */
#desktop {
  position: relative; flex: 1; min-height: 0; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(ellipse 18% 9% at 22% 20%, rgba(255,255,255,.95) 0 55%, transparent 100%),
    radial-gradient(ellipse 26% 11% at 28% 22%, rgba(255,255,255,.85) 0 50%, transparent 100%),
    radial-gradient(ellipse 14% 7% at 70% 14%, rgba(255,255,255,.9) 0 55%, transparent 100%),
    radial-gradient(ellipse 22% 9% at 76% 17%, rgba(255,255,255,.8) 0 50%, transparent 100%),
    radial-gradient(ellipse 150% 60% at 20% 118%, #3b8a14 0 55%, transparent 56%),
    radial-gradient(ellipse 120% 52% at 95% 125%, #5db620 0 60%, transparent 61%),
    radial-gradient(ellipse 160% 62% at 55% 112%, #79c936 0 60%, transparent 61%),
    linear-gradient(#1f64d6 0%, #4f9bf0 30%, #9fcdf7 52%, #cfe9fb 60%);
}
.desktop-icons { position: absolute; top: 8px; left: 6px; bottom: 8px; display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; gap: 6px; z-index: 1; }
.desktop-icon { width: 82px; background: none; border: 1px solid transparent; padding: 4px 2px; color: #fff; text-align: center; cursor: default; }
.desktop-icon .di-img { display: block; width: 40px; height: 40px; margin: 0 auto 3px; filter: drop-shadow(1px 2px 1px rgba(0,0,0,.45)); }
.desktop-icon .di-label { display: block; font-size: 11px; text-shadow: 1px 1px 1px #000; line-height: 1.2; }
.desktop-icon.sel { background: rgba(49, 106, 197, .55); border: 1px dotted #fff; }
.desktop-icon:focus-visible { outline: 1px dotted #fff; }

/* ---------- Janelas ---------- */
.window {
  position: absolute; display: flex; flex-direction: column; min-width: 220px; max-width: 100%; max-height: 100%;
  background: var(--xp-beige); border: 3px solid var(--xp-blue-dark); border-top: 0; border-radius: 8px 8px 3px 3px;
  box-shadow: 3px 4px 14px rgba(0,0,0,.55); overflow: hidden;
}
.window.active { box-shadow: 4px 6px 20px rgba(0,0,0,.7); }
.window:not(.active) .titlebar { background: linear-gradient(#7697e0, #5e7fd0 8%, #5879c8 40%, #6b8dd9 88%, #5979c4); }
.window.minimized { display: none; }
.window.maximized { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; }
.window.dragging { opacity: .93; }
.titlebar {
  flex: none; display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 5px 0 7px; color: #fff; cursor: default; touch-action: none;
  background: linear-gradient(#0997ff, #0053ee 8%, #0050ee 40%, #0066ff 88%, #0066ff 93%, #005bff 95%, #003dd7 96%, #003dd7);
  border-radius: 8px 8px 0 0; text-shadow: 1px 1px #0f1089; font-weight: bold; font-size: 13px;
}
.tb-icon { width: 18px; height: 18px; }
.tb-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-btns { display: flex; gap: 2px; }
.tb-btn {
  position: relative; width: 22px; height: 22px; padding: 0; border: 1px solid #fff; border-radius: 3px; color: #fff; cursor: default;
  background: radial-gradient(circle at 30% 25%, #6fa0ff, #2060e8 70%); font-weight: bold; line-height: 1;
}
.tb-btn::before { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; text-shadow: none; }
.tb-min::before { content: "\2013"; }
.tb-max::before { content: "\25A1"; }
.tb-close::before { content: "\2715"; font-size: 12px; }
.tb-close { background: radial-gradient(circle at 30% 25%, #f59a7e, #d4381a 70%); }
.tb-btn:hover { filter: brightness(1.15); }
.tb-btn.dodger { position: relative; z-index: 6; transition: transform .12s; }
.win-body { flex: 1; min-height: 0; overflow: auto; background: var(--xp-beige); user-select: text; -webkit-user-select: text; }
.ie-body { display: flex; flex-direction: column; overflow: hidden; user-select: none; -webkit-user-select: none; }
.window button, .window .site-tab { user-select: none; -webkit-user-select: none; }

#win-ie { left: 2.5%; top: 6px; width: min(1060px, 95%); height: calc(100% - 12px); }
#win-utorrent { left: 9%; top: 14%; width: min(760px, 92%); height: min(470px, 86%); }
#win-computer { left: 24%; top: 12%; width: min(400px, 92%); }
#win-trash { left: 28%; top: 18%; width: min(380px, 92%); height: min(320px, 80%); }
#win-mines { left: 38%; top: 10%; width: 270px; }

/* ---------- Internet Explorer ---------- */
.ie-menubar { display: flex; align-items: center; gap: 12px; padding: 2px 8px; background: var(--xp-beige); border-bottom: 1px solid #aca899; }
.ie-menubar span { cursor: default; }
.ie-throbber { margin-left: auto; width: 26px; height: 22px; background: radial-gradient(circle at 50% 50%, #4f9bf0 0 6px, transparent 7px), conic-gradient(from 0deg, #e8791d, #fff, #2f7be0, #fff, #e8791d); border-radius: 50%; opacity: .55; }
.ie-throbber.busy { animation: spin 1.2s linear infinite; opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.ie-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px 6px; background: var(--xp-beige); border-bottom: 1px solid #aca899; }
.ie-toolbar button { background: none; border: 1px solid transparent; padding: 2px 8px; font-size: 12px; color: #222; cursor: default; }
.ie-toolbar button:hover { border-color: #aca899; background: #f5f3ea; }
.ie-address { display: flex; align-items: center; gap: 6px; padding: 3px 8px; background: var(--xp-beige); border-bottom: 1px solid #aca899; }
.ie-url { flex: 1; min-width: 0; background: #fff; border: 1px solid #7f9db9; padding: 2px 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ie-go { padding: 1px 8px; }
.ie-page { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #fff; border-top: 1px solid #fff; }
.tab-scroll { flex: 1; min-height: 0; overflow: auto; background: #f4f7fb; user-select: text; -webkit-user-select: text; }
.tab-pane { min-height: 100%; }
.ie-status { display: flex; gap: 12px; align-items: center; flex: none; padding: 2px 8px; background: var(--xp-beige); border-top: 1px solid #aca899; font-size: 11px; }
.ie-tip { flex: 1; color: #555; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: center; }
.ie-zone { padding-left: 6px; border-left: 1px solid #aca899; }

/* ---------- Barra de tarefas ---------- */
.taskbar {
  flex: none; display: flex; align-items: stretch; height: 36px; z-index: 5;
  background: linear-gradient(#3168d5 0%, #4993e6 8%, #2157d7 18%, #2157d7 80%, #1941a5 94%, #1941a5 100%); border-top: 1px solid #0c3a9e;
}
.start-btn {
  display: flex; align-items: center; gap: 6px; padding: 0 22px 0 10px; margin-right: 8px; border: 0; color: #fff; font-style: italic; font-size: 20px; cursor: pointer;
  background: linear-gradient(#5db34b 0%, #3c9a2a 12%, #3c9a2a 85%, #2a7a1c 100%); border-radius: 0 14px 14px 0; box-shadow: inset -1px 0 3px rgba(0,0,0,.4), inset 0 1px 1px rgba(255,255,255,.4); text-shadow: 1px 1px 2px #1a4a10;
}
.start-btn:hover { filter: brightness(1.1); }
.start-btn.open { filter: brightness(.85); }
.start-flag { width: 22px; height: 22px; display: block; }
.tasks { flex: 1; min-width: 0; display: flex; align-items: center; gap: 3px; padding: 3px 0; overflow: hidden; }
.task-btn {
  display: flex; align-items: center; gap: 5px; flex: 0 1 170px; min-width: 40px; height: 100%; padding: 0 8px; border: 1px solid #0d3cb0; border-radius: 3px;
  color: #fff; font-size: 12px; text-align: left; cursor: pointer; background: linear-gradient(#4e8cf0, #3b78e0 50%, #2f67cf);
}
.task-btn span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-btn.pressed { background: linear-gradient(#1b4bb8, #2a5fd0); box-shadow: inset 1px 1px 3px rgba(0,0,0,.5); }
.task-ico { width: 16px; height: 16px; }
.tray { display: flex; align-items: center; gap: 8px; padding: 0 10px; color: #fff; background: linear-gradient(#0f8ff0, #0f7ae0 50%, #0b66cf); border-left: 1px solid #0a4aa8; box-shadow: inset 1px 0 2px rgba(255,255,255,.35); }
.tray-icons { display: flex; align-items: center; gap: 6px; }
.tray-ico { width: 18px; height: 18px; padding: 0; border: 0; background: none; display: block; cursor: default; }
.tray-ico svg { width: 100%; height: 100%; }
.tray-ico.alert { animation: blink .7s steps(2) infinite; }
.tray-ico.off { opacity: .35; }
.tray-ico.blink { animation: blink .8s steps(2) infinite; }
.clock { font-size: 12px; min-width: 38px; text-align: right; }
@keyframes blink { 50% { opacity: .15; } }

/* ---------- Menu iniciar ---------- */
.start-menu { position: fixed; left: 0; bottom: 36px; width: 300px; z-index: 9000; border: 2px solid #1b49b8; border-radius: 8px 8px 0 0; overflow: hidden; background: #fff; box-shadow: 3px -3px 14px rgba(0,0,0,.55); }
.sm-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: #fff; font-size: 15px; background: linear-gradient(#2a66d8, #1b4bb8); }
.sm-avatar { font-size: 26px; background: #fff; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 4px; border: 2px solid #e6c15a; }
.sm-items { display: flex; flex-direction: column; padding: 4px 0; }
.sm-item { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border: 0; background: none; font-size: 13px; text-align: left; cursor: pointer; }
.sm-item:hover { background: #316ac5; color: #fff; }
.sm-ico { width: 26px; height: 26px; }
.sm-foot { display: flex; justify-content: flex-end; gap: 6px; padding: 7px 10px; background: linear-gradient(#2a66d8, #1b4bb8); }
.sm-foot button { border: 0; padding: 4px 10px; color: #fff; background: rgba(255,255,255,.12); border-radius: 3px; cursor: pointer; }
.sm-foot button:hover { background: rgba(255,255,255,.28); }

/* ---------- Camadas ---------- */
.popup-layer { position: absolute; inset: 0; pointer-events: none; }
.popup-layer > * { pointer-events: auto; }
.modal-veil { position: absolute; inset: 0; background: rgba(0,0,0,.18); pointer-events: auto; }
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 9500; overflow: hidden; }
.toasts { position: absolute; right: 8px; bottom: 6px; z-index: 8000; display: flex; flex-direction: column; gap: 6px; width: 290px; max-width: calc(100% - 16px); pointer-events: none; }
.toasts > * { pointer-events: auto; }

/* ---------- Boot e login ---------- */
.boot { position: fixed; inset: 0; z-index: 20000; background: #000; color: #fff; transition: opacity .6s; }
.boot.gone { opacity: 0; pointer-events: none; }
.boot-stage { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.boot-black { background: #000; gap: 40px; }
.xp-logo { display: flex; align-items: center; gap: 12px; font-style: italic; }
.xp-logo b { display: block; font-size: 34px; font-weight: bold; letter-spacing: -1px; }
.xp-logo em { display: block; font-size: 15px; color: #f58a1f; }
.xp-logo.light em { color: #cfe0ff; }
.xp-flag { display: grid; grid-template: 1fr 1fr / 1fr 1fr; gap: 3px; width: 54px; height: 54px; transform: skewY(-6deg); }
.xp-flag i { display: block; border-radius: 3px 8px 3px 8px; }
.xp-flag i:nth-child(1) { background: #f25022; }
.xp-flag i:nth-child(2) { background: #7fba00; }
.xp-flag i:nth-child(3) { background: #00a4ef; }
.xp-flag i:nth-child(4) { background: #ffb900; }
.boot-bar { width: 190px; height: 16px; border: 2px solid #b2b2b2; border-radius: 4px; padding: 2px; overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: 60px; background: repeating-linear-gradient(90deg, #2a6ee0 0 8px, transparent 8px 11px); animation: boot-go 1.3s linear infinite; }
@keyframes boot-go { from { transform: translateX(-70px); } to { transform: translateX(200px); } }
.login { background: linear-gradient(90deg, #5a7edc, #7b9ae4 50%, #5a7edc); justify-content: space-between; align-items: stretch; }
.login-top { height: 70px; background: #00309c; border-bottom: 2px solid #f0a020; }
.login-mid { flex: 1; display: flex; align-items: center; justify-content: space-around; gap: 20px; padding: 0 20px; background: linear-gradient(90deg, #00309c 0 50%, #5a7edc 50%); }
.login-left { max-width: 360px; text-align: right; display: flex; flex-direction: column; gap: 14px; align-items: flex-end; }
.login-left p { margin: 0; color: #cfe0ff; font-size: 14px; }
.login-user { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border: 2px solid transparent; border-radius: 8px; background: none; color: #fff; cursor: pointer; text-align: left; }
.login-user:hover, .login-user:focus-visible { background: rgba(0, 20, 120, .5); border-color: #fff; outline: none; }
.login-avatar { font-size: 44px; width: 70px; height: 70px; display: grid; place-items: center; background: #fff; border: 3px solid #e6c15a; border-radius: 6px; }
.login-user strong { display: block; font-size: 22px; }
.login-user small { font-size: 12px; color: #dbe6ff; }
.login-bottom { height: 70px; display: flex; align-items: center; padding: 0 30px; background: #00309c; border-top: 2px solid #f0a020; color: #cfe0ff; }
.welcome { justify-content: center; align-items: center; background: #5a7edc; }
.welcome h1 { margin: 0; font-size: 44px; font-style: italic; text-shadow: 2px 2px 4px #00309c; }
.blink-cursor { animation: blink 1s steps(2) infinite; }

/* ---------- Responsivo ---------- */
@media (max-width: 760px) {
  .window:not(.dialog):not(.popup-win) { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; max-width: none; }
  .desktop-icons { flex-wrap: nowrap; overflow: auto; }
  .desktop-icon { width: 70px; }
  .ie-toolbar, .ie-menubar span:not(.ie-throbber):nth-child(n+4) { display: none; }
  .start-btn b { font-size: 16px; }
  .task-btn { flex-basis: 56px; }
  .login-mid { flex-direction: column; background: #3a5fc8; }
  .login-left { align-items: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .ie-throbber.busy { animation: none; }
}
