* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --indigo: #38bdf8;
  --violet: #06b6d4;
  --pink: #2dd4bf;
  --bg: #0a0a14;
  --win-bg: rgba(18, 18, 31, .88);
  --chrome: rgba(26, 26, 46, .92);
  --text: #e2e2f0;
  --muted: #8a8aa3;
  --accent-grad: linear-gradient(135deg, var(--indigo), var(--violet), var(--pink));
}

html, body { height: 100%; overflow: hidden; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.hidden { display: none !important; }
.mono { font-family: Consolas, 'Cascadia Code', monospace; }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(6,182,212,.35); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ BOOT ============ */
#boot-screen {
  position: fixed; inset: 0; z-index: 1000;
  background: #000; padding: 40px;
  font-family: Consolas, monospace; font-size: 15px; color: #cccccc;
}
#boot-log { white-space: pre-wrap; line-height: 1.55; max-width: 900px; }
#boot-log .ok { color: #4ade80; }
#boot-log .warn { color: #fbbf24; }
#boot-log .brand { color: var(--violet); font-weight: bold; }
#boot-bar-wrap {
  width: min(60vw, 420px); height: 14px; margin-top: 24px;
  border: 1px solid #444; padding: 2px;
}
#boot-bar { height: 100%; width: 0; background: var(--accent-grad); transition: width .18s; }
#boot-prompt { margin-top: 20px; color: #888; display: none; }

/* ============ LOGIN ============ */
#login-screen {
  position: fixed; inset: 0; z-index: 999;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(56,189,248,.25), transparent 50%),
    radial-gradient(ellipse at 75% 70%, rgba(45,212,191,.18), transparent 50%),
    #0d0d1a;
  display: flex; align-items: center; justify-content: center;
}
.login-card { text-align: center; animation: rise .5s ease; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.avatar {
  width: 96px; height: 96px; margin: 0 auto 16px;
  border-radius: 50%; overflow: hidden;
  background: var(--accent-grad);
  box-shadow: 0 0 34px rgba(6,182,212,.55);
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.login-card h1 { font-size: 26px; font-weight: 600; }
.login-sub { color: var(--muted); margin: 6px 0 22px; }
#login-btn {
  background: var(--accent-grad); border: none; color: #fff;
  font-size: 15px; font-weight: 600; padding: 12px 34px;
  border-radius: 10px; cursor: pointer; transition: transform .15s, box-shadow .15s;
}
#login-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(6,182,212,.5); }
.login-hint { margin-top: 14px; font-size: 12px; color: #66667f; }

/* ============ DESKTOP & WALLPAPER ============ */
#desktop { position: fixed; inset: 0; animation: fadein .4s ease; }
@keyframes fadein { from { opacity: 0; } }
#wallpaper { position: absolute; inset: 0; overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 15%, rgba(56,189,248,.30), transparent 45%),
    radial-gradient(ellipse at 85% 80%, rgba(45,212,191,.20), transparent 45%),
    linear-gradient(160deg, #0b0b18 0%, #101024 100%);
}
#wallpaper::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(6,182,212,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6,182,212,.05) 1px, transparent 1px);
  background-size: 42px 42px;
}
#wallpaper.wall-midnight {
  background:
    radial-gradient(ellipse at 50% 120%, rgba(56,189,248,.14), transparent 55%),
    #07070f;
}
#wallpaper.wall-midnight .blob { opacity: .18; }
#wallpaper.wall-emberfall {
  background:
    radial-gradient(ellipse at 25% 10%, rgba(249,115,22,.28), transparent 45%),
    radial-gradient(ellipse at 80% 85%, rgba(239,68,68,.24), transparent 45%),
    linear-gradient(160deg, #170d0a 0%, #1f1013 100%);
}
.blob {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5;
  animation: drift 22s ease-in-out infinite alternate;
}
.blob1 { width: 46vw; height: 46vw; left: -10vw; top: -12vw; background: radial-gradient(circle, rgba(56,189,248,.5), transparent 65%); }
.blob2 { width: 40vw; height: 40vw; right: -8vw; bottom: -10vw; background: radial-gradient(circle, rgba(45,212,191,.4), transparent 65%); animation-delay: -11s; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(6vw, 4vh) scale(1.15); }
}

/* icons — free-positioned draggable desktop */
#icons { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.dicon {
  position: absolute;
  width: 88px; padding: 7px 4px; text-align: center; cursor: grab;
  border-radius: 8px; user-select: none; transition: background .12s;
  pointer-events: auto; touch-action: none;
}
.dicon.dragging { cursor: grabbing; opacity: .85; z-index: 5; }
.dicon:hover, .dicon.selected { background: rgba(6,182,212,.22); outline: 1px solid rgba(6,182,212,.45); }
.dicon .iico { font-size: 31px; display: block; filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); }
.dicon span span, .dicon > span:last-child { font-size: 12px; display: block; margin-top: 5px; text-shadow: 0 1px 3px #000; }

/* ============ WINDOWS (glass) ============ */
.window {
  position: absolute; min-width: 300px; min-height: 190px;
  background: var(--win-bg);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(6,182,212,.35);
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0,0,0,.65);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: winpop .18s cubic-bezier(.2,.9,.3,1.3);
}
@keyframes winpop { from { transform: scale(.94); opacity: 0; } }
.window.focused {
  border-color: rgba(6,182,212,.85);
  box-shadow: 0 0 0 1px rgba(6,182,212,.25), 0 26px 80px rgba(56,189,248,.28), 0 18px 60px rgba(0,0,0,.7);
}
.titlebar {
  height: 38px; background: var(--chrome);
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px 0 14px; cursor: grab; user-select: none; flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.titlebar:active { cursor: grabbing; }
.window.focused .titlebar { background: linear-gradient(90deg, rgba(56,189,248,.30), rgba(45,212,191,.16)); }
.titlebar .t-icon { font-size: 16px; }
.titlebar .t-title { font-size: 13px; font-weight: 600; flex: 1; pointer-events: none; }
.win-btn {
  width: 32px; height: 27px; border: none; border-radius: 7px;
  background: transparent; color: var(--text); cursor: pointer;
  font-size: 13px; line-height: 1; transition: background .12s, transform .12s;
}
.win-btn svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; display: block; margin: auto; }
.win-btn:hover { background: rgba(255,255,255,.15); transform: scale(1.06); }
.win-btn.close:hover { background: #e81123; color: #fff; }
.win-body { flex: 1; overflow: auto; padding: 16px; font-size: 14px; line-height: 1.65; }
.window.maximized { left: 0 !important; top: 0 !important; width: 100vw !important; height: calc(100vh - 56px) !important; border-radius: 0; }

/* ============ TASKBAR ============ */
#taskbar {
  position: absolute; bottom: 0; left: 0; right: 0; height: 56px; z-index: 500;
  background: rgba(12,12,24,.82); backdrop-filter: blur(20px);
  border-top: 1px solid rgba(6,182,212,.28);
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
}
#start-btn {
  width: 42px; height: 42px; border: none; border-radius: 13px;
  background: var(--accent-grad);
  color: #fff; font-size: 19px; cursor: pointer; flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(6,182,212,.45), inset 0 1px 0 rgba(255,255,255,.35);
  display: grid; place-items: center;
  transition: transform .15s cubic-bezier(.2,.9,.3,1.4), box-shadow .15s, filter .15s;
}
#start-btn:hover { transform: translateY(-2px) scale(1.06); box-shadow: 0 8px 26px rgba(6,182,212,.65); filter: brightness(1.1); }
#start-btn.open { transform: scale(.94); box-shadow: 0 0 0 3px rgba(6,182,212,.35); }
.orb-glyph { text-shadow: 0 1px 3px rgba(0,0,0,.35); }
#task-windows { flex: 1; display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
#task-windows::-webkit-scrollbar { display: none; }
.task-item {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09);
  color: var(--text); font-size: 12px; padding: 7px 13px;
  border-radius: 10px; cursor: pointer; white-space: nowrap; max-width: 170px;
  transition: background .13s, border-color .13s, transform .13s;
}
.task-item:hover { background: rgba(255,255,255,.11); transform: translateY(-1px); }
.task-item.active { background: rgba(6,182,212,.30); border-color: var(--violet); }
.task-item span.tl { overflow: hidden; text-overflow: ellipsis; }
#tray { color: var(--text); font-size: 12px; padding: 4px 10px; text-align: right; line-height: 1.3; }
#tray-clock { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
#tray-date { color: var(--muted); font-size: 11px; }

/* ============ START MENU ============ */
#start-menu {
  position: absolute; bottom: 66px; left: 12px; width: 420px; max-height: calc(100vh - 90px); z-index: 600;
  background: rgba(15,15,28,.96); backdrop-filter: blur(24px);
  border: 1px solid rgba(6,182,212,.38); border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0,0,0,.75);
  display: flex; flex-direction: column; overflow: hidden;
  animation: smrise .18s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes smrise { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.sm-search {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 14px 10px; padding: 10px 14px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(6,182,212,.35); border-radius: 12px;
}
.sm-search input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 13.5px;
}
.sm-search input::placeholder { color: #77778f; }
.sm-section-label { font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin: 8px 18px 6px; }
.pin-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  padding: 0 10px 6px;
}
.pin {
  background: transparent; border: none; border-radius: 12px;
  color: var(--text); font-family: inherit; font-size: 11.5px;
  padding: 12px 4px 9px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 7px;
  transition: background .13s, transform .13s;
}
.pin span { font-size: 25px; }
.pin:hover { background: rgba(6,182,212,.22); transform: translateY(-2px); }
.rec-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 0 10px 10px; }
.rec {
  display: flex; align-items: center; gap: 10px; text-align: left;
  background: transparent; border: none; border-radius: 10px;
  color: var(--text); font-family: inherit; padding: 9px 10px; cursor: pointer;
  transition: background .13s;
}
.rec:hover { background: rgba(6,182,212,.2); }
.rec .ri { font-size: 21px; }
.rec .rt b { font-size: 12.5px; display: block; }
.rec .rt small { color: var(--muted); font-size: 11px; }
.sm-results { flex: 1; overflow-y: auto; padding: 4px 10px 10px; min-height: 120px; }
.sres {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  background: transparent; border: none; border-radius: 10px;
  color: var(--text); font-family: inherit; font-size: 13px; padding: 10px 12px; cursor: pointer;
}
.sres:hover, .sres.sel { background: rgba(6,182,212,.28); }
.sres .si { font-size: 20px; }
.sres small { color: var(--muted); margin-left: auto; font-size: 11px; }
.sm-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: rgba(255,255,255,.04);
  border-top: 1px solid rgba(255,255,255,.07); margin-top: auto;
}
.sm-user { display: flex; align-items: center; gap: 11px; }
.sm-avatar { width: 40px; height: 40px; margin: 0; box-shadow: none; }
.su-t { font-size: 12.5px; line-height: 1.35; }
.su-t small { color: var(--muted); font-size: 11px; }
.power-wrap { position: relative; }
#power-btn {
  width: 38px; height: 38px; border-radius: 10px; border: none;
  background: rgba(255,255,255,.07); color: var(--text); font-size: 16px; cursor: pointer;
  transition: background .13s, transform .13s;
}
#power-btn:hover { background: rgba(232,17,35,.75); transform: scale(1.08); }
#power-pop {
  position: absolute; bottom: 48px; right: 0; width: 170px;
  background: rgba(22,22,38,.98); border: 1px solid rgba(6,182,212,.4); border-radius: 12px;
  overflow: hidden; box-shadow: 0 14px 44px rgba(0,0,0,.6);
}
#power-pop div { padding: 11px 16px; font-size: 13px; cursor: pointer; }
#power-pop div:hover { background: rgba(6,182,212,.3); }

/* ============ APP SHARED ============ */
.notepad-view { font-family: Consolas, monospace; font-size: 13.5px; white-space: pre-wrap; }
.proj-card {
  border: 1px solid rgba(6,182,212,.3); border-radius: 10px;
  padding: 13px 15px; margin-bottom: 11px; background: rgba(255,255,255,.028);
  transition: border-color .15s, transform .15s;
}
.proj-card:hover { border-color: var(--violet); transform: translateX(4px); }
.proj-card b { font-size: 14.5px; }
.proj-card p { color: #b9b9cf; font-size: 13px; margin: 4px 0 8px; }
.proj-card.clickable { cursor: pointer; }
.proj-card.clickable:hover { border-color: var(--pink); transform: translateX(6px); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.chip {
  font-size: 11px; padding: 3px 9px; border-radius: 20px;
  background: rgba(56,189,248,.16); border: 1px solid rgba(56,189,248,.4); color: #c7c9ff;
}
.gh-link {
  display: inline-block; font-size: 12px; font-weight: 600; text-decoration: none;
  color: #fff; background: var(--accent-grad); padding: 6px 14px; border-radius: 7px;
}
.gh-link:hover { filter: brightness(1.15); }
.skill-row { margin-bottom: 15px; }
.skill-label { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 5px; }
.skill-name { display: flex; align-items: center; gap: 8px; }
.skill-pct { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.skill-logos { display: inline-flex; gap: 4px; }
.skill-logos img {
  width: 21px; height: 21px; border-radius: 5px; padding: 2.5px;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.07);
}
.skill-bar { height: 10px; background: rgba(255,255,255,.07); border-radius: 6px; overflow: hidden; }
.skill-fill { height: 100%; width: 0; background: var(--accent-grad); border-radius: 6px; transition: width 1s cubic-bezier(.25,.9,.3,1); }

/* explorer */
.explore { display: flex; height: calc(100% - 49px); gap: 0; margin: -16px; margin-top: 0; }
.exp-tools {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.exp-btn {
  width: 32px; height: 29px; border-radius: 8px; border: none;
  background: rgba(255,255,255,.07); color: var(--text); font-size: 14px; cursor: pointer;
  transition: background .13s, transform .13s;
}
.exp-btn:hover:not(:disabled) { background: rgba(6,182,212,.32); transform: translateY(-1px); }
.exp-btn:disabled { opacity: .32; cursor: default; }
.exp-addr {
  flex: 1; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px; padding: 6px 12px; font-family: Consolas, monospace; font-size: 12.5px;
  color: #c9c9de; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: none;
}
.exp-side {
  width: 190px; flex-shrink: 0; background: rgba(255,255,255,.03);
  border-right: 1px solid rgba(255,255,255,.07); padding: 12px 8px;
  font-size: 13px; overflow-y: auto;
}
.exp-side div { padding: 7px 10px; border-radius: 6px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exp-side div:hover { background: rgba(6,182,212,.18); }
.exp-side div.on { background: rgba(6,182,212,.3); }
.exp-main { flex: 1; padding: 14px; overflow-y: auto; }
.exp-main h3 { font-size: 15px; margin-bottom: 4px; }
.ep-desc { color: #b9b9cf; font-size: 13px; margin-bottom: 10px; }

/* terminal */
.term {
  height: 100%; margin: -16px; padding: 14px; overflow-y: auto;
  background: rgba(8,8,15,.92); font-family: Consolas, 'Cascadia Code', monospace; font-size: 13.5px;
}
.term .t-in { color: #4ade80; }
.term .t-out { color: #cfcfe6; white-space: pre-wrap; }
.term .t-accent { color: var(--violet); font-weight: bold; }
.term-input-line { display: flex; }
.term input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #fff; font: inherit; caret-color: #4ade80;
}

/* contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.ccard {
  border: 1px solid rgba(6,182,212,.3); border-radius: 10px; padding: 16px;
  background: rgba(255,255,255,.03); text-decoration: none; color: var(--text);
  transition: transform .15s, border-color .15s; display: block;
}
.ccard:hover { transform: translateY(-3px); border-color: var(--pink); }
.ccard .ci { font-size: 26px; } .ccard b { display: block; margin: 8px 0 3px; } .ccard small { color: var(--muted); word-break: break-all; }

/* calculator */
.calc { display: flex; flex-direction: column; height: 100%; margin: -16px; }
.calc-disp {
  padding: 18px 18px 12px; text-align: right; flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.calc-hist { color: var(--muted); font-size: 13px; min-height: 18px; font-variant-numeric: tabular-nums; }
.calc-cur { font-size: 34px; font-weight: 600; font-variant-numeric: tabular-nums; word-break: break-all; }
.calc-pad { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; padding: 12px; }
.ckey {
  border: none; border-radius: 10px; font-family: inherit; font-size: 16.5px;
  background: rgba(255,255,255,.06); color: var(--text); cursor: pointer;
  transition: background .1s, transform .06s;
}
.ckey:hover { background: rgba(255,255,255,.12); }
.ckey:active { transform: scale(.95); }
.ckey.op { color: #c4b5fd; font-weight: 700; }
.ckey.eq { background: var(--accent-grad); color: #fff; font-weight: 700; }
.ckey.eq:hover { filter: brightness(1.15); }
.ckey.fn { color: #f0abfc; font-size: 14px; }

/* calendar */
.cal { height: 100%; margin: -16px; display: flex; flex-direction: column; }
.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; flex-shrink: 0;
}
.cal-title { font-size: 16px; font-weight: 700; }
.cal-nav { display: flex; gap: 6px; }
.cal-btn {
  width: 30px; height: 30px; border-radius: 8px; border: none;
  background: rgba(255,255,255,.07); color: var(--text); font-size: 14px; cursor: pointer;
}
.cal-btn.wide { width: auto; padding: 0 12px; font-size: 12px; }
.cal-btn:hover { background: rgba(6,182,212,.35); }
.cal-grid { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; padding: 4px 14px 14px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; padding: 5px 0; text-transform: uppercase; }
.cal-day {
  aspect-ratio: 1.15 / 1; display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; border-radius: 9px; cursor: default; font-variant-numeric: tabular-nums;
}
.cal-day.dim { color: #55556d; }
.cal-day.today {
  background: var(--accent-grad); color: #fff; font-weight: 700;
  box-shadow: 0 3px 14px rgba(6,182,212,.5);
}
.cal-day:not(.dim):not(.today):hover { background: rgba(6,182,212,.2); }
.cal-foot { padding: 0 16px 13px; color: var(--muted); font-size: 11.5px; text-align: center; flex-shrink: 0; }

/* notepad app */
.np-area {
  width: 100%; height: 100%; resize: none; border: none; outline: none;
  background: transparent; color: var(--text);
  font-family: Consolas, monospace; font-size: 13.5px; line-height: 1.7;
  margin: -16px; padding: 16px;
}
.np-status {
  position: absolute; bottom: 0; right: 0; left: 0;
  padding: 5px 14px; font-size: 11px; color: var(--muted);
  background: rgba(255,255,255,.04); border-top: 1px solid rgba(255,255,255,.06);
}

/* settings */
.set-row { margin-bottom: 18px; }
.set-row h4 { font-size: 13px; margin-bottom: 9px; color: #c9c9de; }
.swatches { display: flex; gap: 10px; }
.swatch {
  width: 54px; height: 34px; border-radius: 9px; cursor: pointer; border: 2px solid transparent;
  transition: transform .13s, border-color .13s;
}
.swatch:hover { transform: scale(1.07); }
.swatch.on { border-color: #fff; }
.wall-opts { display: flex; gap: 10px; flex-wrap: wrap; }
.wall-opt {
  padding: 8px 14px; border-radius: 9px; cursor: pointer; font-size: 12.5px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  transition: background .13s, border-color .13s;
}
.wall-opt:hover { background: rgba(6,182,212,.25); }
.wall-opt.on { border-color: var(--violet); background: rgba(6,182,212,.3); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-size: 13.5px; }
.switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; border-radius: 20px; cursor: pointer;
  background: rgba(255,255,255,.14); transition: background .18s;
}
.slider::before {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  left: 3px; top: 3px; background: #fff; transition: transform .18s;
}
.switch input:checked + .slider { background: var(--violet); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* task manager */
.tm-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tm-table th {
  text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase;
  letter-spacing: .6px; padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,.09);
}
.tm-table td { padding: 8px; border-bottom: 1px solid rgba(255,255,255,.05); font-variant-numeric: tabular-nums; }
.tm-end {
  border: none; background: rgba(232,17,35,.8); color: #fff; font-size: 11px;
  padding: 4px 11px; border-radius: 6px; cursor: pointer; font-family: inherit;
}
.tm-end:hover { background: #e81123; }
.tm-note { margin-top: 10px; color: var(--muted); font-size: 11.5px; }

/* scanlines (CRT toggle) */
#scanlines {
  position: absolute; inset: 0; z-index: 450; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.13) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

/* ============ BSOD / SHUTDOWN ============ */
#bsod { position: fixed; inset: 0; z-index: 2000; background: #0078d7; padding: 12vh 12vw; font-family: 'Segoe UI', sans-serif; color: #fff; }
#bsod p:first-child { font-size: 90px; margin-bottom: 26px; }
#bsod p { margin-bottom: 18px; font-size: 17px; line-height: 1.6; }
#bsod-pct { color: #cfe8ff; }
#shutdown-screen {
  position: fixed; inset: 0; z-index: 2000; background: #000;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 26px; cursor: pointer;
}
#shutdown-screen small { display: block; margin-top: 14px; color: #777; font-size: 13px; }

/* matrix rain overlay */
#matrix-canvas { position: fixed; inset: 0; z-index: 1500; }

/* ============ TASKBAR EXTRAS ============ */
#tb-center {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: flex; gap: 4px;
}
.tb-pin {
  position: relative; width: 38px; height: 40px; border: none; border-radius: 10px;
  background: transparent; font-size: 17px; cursor: pointer;
  transition: background .13s, transform .13s;
}
.tb-pin:hover { background: rgba(255,255,255,.1); transform: translateY(-2px); }
.tb-pin.running::after {
  content: ""; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 3px; border-radius: 2px; background: var(--accent-grad);
}
#tray { display: flex; align-items: center; gap: 9px; }
.tray-ic { font-size: 15px; cursor: pointer; padding: 6px 4px; border-radius: 7px; transition: background .12s; }
.tray-ic:hover { background: rgba(255,255,255,.12); }
#perf-widget {
  display: flex; align-items: center; gap: 5px; padding: 4px 8px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 8px;
}
#perf-cv { display: block; }
#perf-val { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 26px; }
#tray-clock { display: flex; flex-direction: column; align-items: flex-end; cursor: pointer; padding: 5px 9px; border-radius: 8px; line-height: 1.25; transition: background .12s; }
#tray-clock:hover { background: rgba(255,255,255,.12); }
#tray-date { color: var(--muted); font-size: 11px; }
#show-desktop {
  width: 9px; align-self: stretch; margin: 5px 0; cursor: pointer;
  border-left: 1px solid rgba(255,255,255,.16); border-radius: 2px; transition: background .12s;
}
#show-desktop:hover { background: rgba(6,182,212,.35); }

/* flyouts */
.tb-pop {
  position: absolute; bottom: 66px; right: 12px; z-index: 600;
  width: 320px; max-height: calc(100vh - 90px); overflow-y: auto;
  background: rgba(15,15,28,.97); backdrop-filter: blur(24px);
  border: 1px solid rgba(139,92,246,.38); border-color: rgba(6,182,212,.4);
  border-radius: 16px; box-shadow: 0 24px 80px rgba(0,0,0,.75);
  animation: smrise .16s cubic-bezier(.2,.9,.3,1.2);
}
.fly-big { padding: 14px 16px 4px; font-size: 13px; color: var(--muted); }
.fly-big b { display: block; font-size: 34px; color: var(--text); line-height: 1.15; }
.fly-big small { color: var(--violet); font-weight: 600; }
.fly-month-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px 2px; font-size: 12.5px; }
.fc-nav { font-style: normal; cursor: pointer; padding: 2px 8px; border-radius: 6px; margin-left: 4px; }
.fc-nav:hover { background: rgba(6,182,212,.3); }
.fly-grid { padding: 0 10px 12px !important; }
.qs-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; padding: 14px; }
.qs-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 11px 4px; border-radius: 11px; cursor: pointer; user-select: none;
  background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.09);
  transition: background .14s, border-color .14s, transform .14s;
}
.qs-tile span { font-size: 19px; } .qs-tile small { font-size: 10.5px; color: var(--muted); }
.qs-tile:hover { transform: translateY(-2px); }
.qs-tile.on { background: rgba(6,182,212,.24); border-color: var(--violet); }
.qs-tile.on small { color: var(--text); }
.qs-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; font-size: 12.5px; color: #c9c9de;
  border-top: 1px solid rgba(255,255,255,.06);
}
.qs-dots { display: flex; gap: 7px; }
.qs-dot { width: 20px; height: 20px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform .13s, border-color .13s; }
.qs-dot:hover { transform: scale(1.15); }
.qs-dot.on { border-color: #fff; }

/* ============ MOBILE ============ */
@media (max-width: 720px) {
  .window { left: 2vw !important; top: 2vh !important; width: 96vw !important; height: calc(100vh - 120px) !important; }
  #start-menu { width: calc(100vw - 24px); left: 12px; }
  .pin-grid { grid-template-columns: repeat(4, 1fr); }
  .login-card h1 { font-size: 20px; padding: 0 14px; }

  /* boot */
  #boot-screen { padding: 22px; font-size: 12.5px; }
  #boot-prompt { font-size: 16px; color: #bbb; }

  /* taskbar: slim down */
  #taskbar { gap: 5px; padding: 0 8px; height: 52px; }
  #start-btn { width: 38px; height: 38px; font-size: 17px; }
  #perf-widget, #show-desktop, #tray-net, #tray-bat { display: none !important; }
  .tb-pin[data-app="notepad"], .tb-pin[data-app="settings"] { display: none; }
  .tb-pin { width: 35px; height: 37px; font-size: 15px; }
  #tb-center { gap: 2px; }
  #tray { gap: 5px; margin-left: auto; }
  #tray-date { display: none; }
  #tray-clock { padding: 4px 7px; }
  #clock { font-size: 12.5px; }
  .tray-ic { font-size: 14px; padding: 5px 3px; }

  /* flyouts fit small screens */
  .tb-pop { width: calc(100vw - 24px); max-width: 340px; right: 12px; }

  /* explorer: sidebar hidden, toolbar nav only */
  .exp-side { display: none !important; }
  .exp-tools { padding: 8px 10px; gap: 5px; }
  .exp-btn { width: 30px; height: 28px; }
  .exp-addr { font-size: 11.5px; padding: 5px 9px; }

  /* start menu grid */
  .rec-row { grid-template-columns: 1fr; }
}
