/* ============================================================
   Windows XP desktop — cchio.org
   ============================================================ */

/* ---- Custom XP-style arrow cursor (inline SVG data URIs) ---- */
:root {
  --xp-arrow: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIj48cGF0aCBkPSJNNCAyIEw0IDIzIEwxMCAxNyBMMTQgMjYgTDE3LjUgMjQuNSBMMTMuNSAxNiBMMjEgMTYgWiIgZmlsbD0iI2ZmZiIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==") 2 2, auto;
  --xp-hand: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIj48cGF0aCBkPSJNMTIgMiBDMTAuOSAyIDEwIDIuOSAxMCA0IEwxMCAxNCBMOSAxNCBMOSAxMCBDOSA4LjkgOC4xIDggNyA4IEM1LjkgOCA1IDguOSA1IDEwIEw1IDE5IEM1IDI0LjUgOS41IDI5IDE1IDI5IEwxNyAyOSBDMjIuNSAyOSAyNyAyNC41IDI3IDE5IEwyNyAxMSBDMjcgOS45IDI2LjEgOSAyNSA5IEMyNCA5IDIzLjIgOS43IDIzLjEgMTAuNiBDMjIuOSA5LjcgMjIuMiA5IDIxLjIgOSBDMjAuMiA5IDE5LjQgOS43IDE5LjIgMTAuNiBDMTkgOS43IDE4LjIgOSAxNy4yIDkgQzE2LjcgOSAxNi4zIDkuMiAxNiA5LjQgTDE2IDQgQzE2IDIuOSAxNS4xIDIgMTQgMiBaIiBmaWxsPSIjZmZmIiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+") 10 2, pointer;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  font-family: Tahoma, "Segoe UI", Geneva, Verdana, sans-serif;
  font-size: 11px;
  cursor: var(--xp-arrow);
}

a, button, .clickable, .xp-icon, .start-button,
.win-controls button, .start-menu-item, .taskbar-app {
  cursor: var(--xp-hand);
}

/* ============================================================
   WELCOME / BOOT SCREEN
   ============================================================ */
#welcome {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(180deg, #5a7edc 0%, #3f6cce 45%, #2f5bc0 100%);
  display: flex;
  flex-direction: column;
  color: #fff;
  cursor: var(--xp-arrow);
}
#welcome .wl-bar {
  height: 2px;
  background: linear-gradient(90deg, #ff9d2f, #ffd479, #ff9d2f);
}
#welcome .wl-top { border-bottom: 2px solid; border-image: linear-gradient(90deg,#7da2ff,#cdd9ff,#7da2ff) 1; }
#welcome .wl-bot { border-top: 2px solid; border-image: linear-gradient(90deg,#7da2ff,#cdd9ff,#7da2ff) 1; }
#welcome .wl-mid {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 70px;
  flex-wrap: wrap;
}
#welcome .wl-brand {
  font-size: 42px;
  font-style: italic;
  font-weight: bold;
  text-shadow: 1px 2px 3px rgba(0,0,0,.35);
}
#welcome .wl-brand small { font-size: 16px; font-weight: normal; font-style: normal; }
#welcome .wl-user {
  display: flex; align-items: center; gap: 16px;
  background: rgba(255,255,255,.08);
  padding: 14px 26px; border-radius: 6px;
}
#welcome .wl-avatar {
  width: 60px; height: 60px; border-radius: 6px;
  background: linear-gradient(135deg,#ffd479,#e98b2f);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; border: 2px solid #fff;
}
#welcome .wl-name { font-size: 20px; }
#welcome .wl-hint { font-size: 12px; opacity: .85; margin-top: 4px; }
#welcome .wl-foot {
  text-align: center; padding: 14px; font-size: 12px; opacity: .9;
}

/* ============================================================
   DESKTOP
   ============================================================ */
#desktop {
  position: fixed;
  inset: 0;
  background: #3a7611 url("../img/bliss.svg") center/cover no-repeat;
  overflow: hidden;
}

/* ---- Desktop icons ---- */
#icons {
  position: absolute;
  top: 8px; left: 8px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 4px;
  max-height: calc(100vh - 50px);
}
.xp-icon {
  width: 78px;
  padding: 6px 4px 4px;
  text-align: center;
  color: #fff;
  border: 1px solid transparent;
}
.xp-icon .glyph {
  width: 44px; height: 44px;
  margin: 0 auto 3px;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,.45));
}
.xp-icon .glyph svg { width: 40px; height: 40px; }
.xp-icon .label {
  font-size: 11px;
  line-height: 1.15;
  text-shadow: 0 1px 2px #000, 0 0 3px #000;
  padding: 1px 2px;
}
.xp-icon.selected {
  background: rgba(11,89,201,.45);
  border: 1px dotted rgba(255,255,255,.7);
}
.xp-icon.selected .label { background: #0b3da8; }

/* ============================================================
   WINDOWS
   ============================================================ */
.window {
  position: absolute;
  min-width: 280px;
  min-height: 160px;
  background: #ece9d8;
  border: 1px solid #0831d9;
  border-top: none;
  border-radius: 8px 8px 0 0;
  box-shadow: 3px 3px 16px rgba(0,0,0,.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.window.maximized {
  border-radius: 0;
}
.window .titlebar {
  height: 28px;
  flex: 0 0 28px;
  background: linear-gradient(180deg,#0058ee 0%, #3593ff 8%, #288eff 40%, #127fff 88%, #0054e3 100%);
  border-radius: 7px 7px 0 0;
  display: flex;
  align-items: center;
  padding: 0 3px 0 6px;
  color: #fff;
  font-weight: bold;
  font-size: 12px;
  text-shadow: 1px 1px 1px rgba(0,0,0,.5);
}
.window.inactive .titlebar {
  background: linear-gradient(180deg,#7aa5ee 0%, #97bdf5 40%, #7ba6ef 100%);
}
.window .titlebar .ico { width: 16px; height: 16px; margin-right: 5px; flex: 0 0 16px; }
.window .titlebar .ico svg { width: 16px; height: 16px; }
.window .titlebar .title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.win-controls { display: flex; gap: 2px; }
.win-controls button {
  width: 21px; height: 21px;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 3px;
  color: #fff;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 12px; font-weight: bold;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg,#3f8bf5,#1568e8);
  box-shadow: inset 0 0 2px rgba(255,255,255,.6);
}
.win-controls .min { align-items: flex-end; padding-bottom: 4px; font-size: 14px; }
.win-controls .max { font-size: 11px; }
.win-controls .close { font-size: 13px; }
.win-controls button:hover { filter: brightness(1.15); }
.win-controls .close {
  background: linear-gradient(180deg,#f08a6e,#e0492a);
}
.win-controls .close:hover { background: linear-gradient(180deg,#ff9d80,#f04a23); }

.window .menubar {
  flex: 0 0 auto;
  background: #ece9d8;
  border-bottom: 1px solid #aca899;
  padding: 2px 6px;
  font-size: 11px;
  color: #222;
  display: flex; gap: 12px;
}
.window .menubar span:hover { background: #316ac5; color:#fff; padding:0 3px; }

.window .content {
  flex: 1 1 auto;
  background: #fff;
  margin: 0;
  border: 1px solid #aca899;
  border-top: none;
  overflow: auto;
  position: relative;
}
.window .content.padded { padding: 16px 20px; }
.window .content iframe { width: 100%; height: 100%; border: 0; display: block; }

.window .statusbar {
  flex: 0 0 20px;
  background: #ece9d8;
  border-top: 1px solid #fff;
  box-shadow: inset 0 1px 0 #aca899;
  font-size: 11px;
  color: #333;
  display: flex; align-items: center;
  padding: 0 8px;
}

.resize-handle {
  position: absolute;
  width: 14px; height: 14px;
  right: 0; bottom: 0;
  cursor: nwse-resize;
}

/* ---- Window content typography ---- */
.content.padded { color:#000; line-height: 1.5; font-size: 12px; }
.content.padded h1 { font-size: 17px; color:#0a246a; margin: 14px 0 6px; font-weight: bold; }
.content.padded h1:first-child { margin-top: 0; }
.content.padded h2 { font-size: 14px; color:#0a246a; margin: 10px 0 4px; }
.content.padded p { margin: 6px 0; }
.content.padded ul { margin: 4px 0 8px 22px; }
.content.padded li { margin: 2px 0; }
.content.padded a { color:#0a3cc6; text-decoration: underline; }
.content.padded a:hover { color:#e0492a; }

/* About window specifics */
.about-hero { display:flex; gap:16px; align-items:center; margin-bottom: 12px; }
.about-hero .pfp {
  width:72px;height:72px;border-radius:8px;flex:0 0 72px;
  background:linear-gradient(135deg,#3a8ee0,#0a246a);
  display:flex;align-items:center;justify-content:center;color:#fff;font-size:34px;
  border:2px solid #fff; box-shadow:0 1px 4px rgba(0,0,0,.3);
}
.about-hero h1 { margin:0; }
.about-hero .role { color:#444; font-size:12px; }
.social-row { margin-top:14px; padding-top:10px; border-top:1px solid #d6d2c2; }
.social-row a { margin-right:14px; font-weight:bold; }
.eml:before { content:"\006d\0061\0069\006c\0040\0063"; }
.eml:after  { content:"\0063\0068\0069\006f\002e\006f\0072\0067"; }

.book-shell { display:flex;align-items:center;justify-content:center;height:100%;background:#5b6b7b;padding:18px; }
.book-shell img { max-height:100%; max-width:100%; box-shadow:0 6px 24px rgba(0,0,0,.5); }

/* ============================================================
   TASKBAR
   ============================================================ */
#taskbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 30px;
  z-index: 5000;
  display: flex;
  align-items: stretch;
  background: linear-gradient(180deg,#2a8ae4 0%, #2178e0 4%, #2461d6 10%, #235ed4 90%, #1c46b8 100%);
  border-top: 1px solid #0746c6;
  box-shadow: inset 0 1px 0 #4b9bf0;
}

.start-button {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 22px 3px 10px;
  font-size: 15px;
  font-style: italic;
  font-weight: bold;
  color: #fff;
  text-shadow: 1px 1px 1px rgba(0,0,0,.4);
  background: linear-gradient(180deg,#5cb85c 0%, #3fa53f 8%, #399b39 45%, #2f8f2f 80%, #267d26 100%);
  border-radius: 0 9px 9px 0;
  border-right: 1px solid #1c5e1c;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.start-button .flag {
  width: 20px; height: 20px; border-radius: 3px;
  background: conic-gradient(from 90deg at 50% 50%, #f35325 0 25%, #81bc06 0 50%, #ffffff 0 75%, #05a6f0 0 100%);
  box-shadow: 0 0 1px #000;
  transform: skewX(-8deg);
}
.start-button:hover { filter: brightness(1.08); }
.start-button.active { filter: brightness(.92); box-shadow: inset 1px 1px 4px rgba(0,0,0,.4); }

#taskbar-apps {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 4px;
  overflow: hidden;
}
.taskbar-app {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 130px;
  max-width: 160px;
  height: 100%;
  padding: 0 8px;
  color: #fff;
  font-size: 11px;
  border-radius: 3px;
  background: linear-gradient(180deg,#3f8bf5,#1d6ad6);
  border: 1px solid #1855b8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.taskbar-app .ico { width:16px;height:16px;flex:0 0 16px; }
.taskbar-app .ico svg { width:16px;height:16px; }
.taskbar-app .tlabel { overflow:hidden; text-overflow:ellipsis; }
.taskbar-app.active {
  background: linear-gradient(180deg,#1a5bc0,#2f7ce8);
  box-shadow: inset 1px 1px 4px rgba(0,0,0,.4);
}
.taskbar-app:hover { filter: brightness(1.1); }

#systray {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: #fff;
  font-size: 11px;
  background: linear-gradient(180deg,#1290e8 0%, #138be2 40%, #0d75d6 100%);
  border-left: 1px solid #0d5bb5;
  box-shadow: inset 1px 0 0 #45a3ef;
}
#systray .tray-ico { font-size: 13px; }
#clock { min-width: 52px; text-align: center; }

/* ============================================================
   START MENU
   ============================================================ */
#start-menu {
  position: fixed;
  left: 0; bottom: 30px;
  width: 340px;
  z-index: 6000;
  background: #fff;
  border: 1px solid #0831d9;
  border-radius: 8px 8px 0 0;
  box-shadow: 3px 3px 16px rgba(0,0,0,.5);
  overflow: hidden;
  display: none;
}
#start-menu.open { display: block; }

.sm-header {
  height: 56px;
  background: linear-gradient(180deg,#1f70e0 0%, #2d83ec 50%, #1c5fd0 100%);
  border-bottom: 2px solid #ff9d2f;
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px;
  color: #fff;
}
.sm-header .pfp {
  width: 38px; height: 38px; border-radius: 4px;
  background: linear-gradient(135deg,#ffd479,#e98b2f);
  display:flex;align-items:center;justify-content:center;font-size:20px;
  border: 2px solid #cfe0ff;
}
.sm-header .uname { font-size: 15px; font-weight: bold; text-shadow:1px 1px 1px rgba(0,0,0,.4); }

.sm-body { display: flex; }
.sm-left { flex: 1; background:#fff; padding: 6px 0; }
.sm-right {
  width: 130px;
  background: linear-gradient(180deg,#d3e5fa,#b6d2f3);
  padding: 6px 0;
  border-left: 1px solid #aac6ee;
}
.start-menu-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 10px;
  font-size: 12px;
  color: #00146e;
}
.sm-right .start-menu-item { color:#0a1f5c; font-weight:bold; }
.start-menu-item .ico { width: 24px; height: 24px; flex:0 0 24px; display:flex;align-items:center;justify-content:center; }
.sm-right .start-menu-item .ico { width:20px;height:20px;flex:0 0 20px; }
.start-menu-item .ico svg { width:100%;height:100%; }
.start-menu-item:hover { background:#2f71d9; color:#fff; }
.start-menu-item .sub { font-size:11px; color:#555; font-weight:normal; }
.start-menu-item:hover .sub { color:#dbe8ff; }
.sm-sep { height:1px; background:#c3d6f0; margin:5px 12px; }

.sm-footer {
  background: linear-gradient(180deg,#2d83ec,#1c5fd0);
  border-top: 2px solid #ff9d2f;
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 6px 12px;
}
.sm-footer .start-menu-item { color:#fff; font-weight:bold; border-radius:4px; }
.sm-footer .ico { font-size:15px; }

/* Shutdown overlay */
#shutdown {
  position: fixed; inset: 0; z-index: 99999;
  background: #2f5bc0;
  display: none;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 20px;
  color:#fff; cursor: var(--xp-arrow);
}
#shutdown.show { display:flex; }
#shutdown .msg { font-size: 22px; text-shadow:1px 1px 2px rgba(0,0,0,.4); }
#shutdown .reboot { font-size:12px; opacity:.85; }

/* mobile niceties */
@media (max-width: 640px) {
  .window { min-width: 240px; }
  #start-menu { width: 290px; }
  .taskbar-app { min-width: 80px; }
}
