/* AEGIS AI Passport — Y2K Desktop Shell
   A nostalgic recreation of early-2000s Windows desktop chrome
   rendered as a foundation for a futuristic AI identity platform. */

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Tahoma", "MS Sans Serif", "Microsoft Sans Serif", "Segoe UI", sans-serif;
  font-size: 11px;
  color: #000;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

body.xp-desktop {
  background: #245edb;
  position: relative;
}

.hidden { display: none !important; }

/* ============================================
   BOOT SCREEN
   ============================================ */
.boot-screen {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: "Tahoma", sans-serif;
}

.boot-logo { text-align: center; margin-bottom: 30px; }
.boot-shield {
  font-size: 56px;
  font-weight: bold;
  letter-spacing: 8px;
  background: linear-gradient(180deg, #fff 0%, #6cb6ff 50%, #1f4fb8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(108, 182, 255, 0.5);
  font-family: "Trebuchet MS", sans-serif;
}
.boot-tagline { color: #aaa; font-size: 12px; letter-spacing: 2px; margin-top: 10px; }

.boot-bar {
  width: 320px;
  height: 18px;
  border: 1px solid #444;
  background: #1a1a1a;
  margin: 20px 0;
  position: relative;
  padding: 2px;
}
.boot-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(180deg, #6cb6ff 0%, #1f4fb8 50%, #6cb6ff 100%);
  animation: bootFill 2.4s ease-out forwards;
  position: relative;
}
.boot-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 8px,
    rgba(255,255,255,0.15) 8px,
    rgba(255,255,255,0.15) 10px
  );
}
@keyframes bootFill { to { width: 100%; } }

.boot-messages {
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 11px;
  color: #6cb6ff;
  text-align: left;
  width: 320px;
  height: 140px;
}
.boot-messages div { opacity: 0; margin: 2px 0; }
.boot-messages div.boot-final { color: #fff; font-weight: bold; margin-top: 10px; }

/* ============================================
   DESKTOP
   ============================================ */
.xp-desktop-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}
.desktop-wallpaper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top right, #5a9cff 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, #1f4fb8 0%, transparent 50%),
    linear-gradient(180deg, #245edb 0%, #1a4ba0 100%);
}
/* Bliss-inspired hill silhouette */
.desktop-wallpaper::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background:
    linear-gradient(180deg, transparent 0%, rgba(0, 80, 40, 0.4) 50%, rgba(0, 60, 30, 0.6) 100%);
  clip-path: polygon(0 60%, 15% 30%, 30% 50%, 50% 20%, 70% 45%, 85% 25%, 100% 40%, 100% 100%, 0 100%);
}
/* Subtle clouds */
.desktop-wallpaper::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 200px 60px at 20% 25%, rgba(255,255,255,0.15), transparent),
    radial-gradient(ellipse 300px 80px at 75% 18%, rgba(255,255,255,0.1), transparent);
}

/* ============================================
   DESKTOP ICONS
   ============================================ */
.desktop-icons {
  position: fixed;
  top: 10px;
  left: 10px;
  bottom: 48px; /* stay above taskbar */
  z-index: 1;
  display: grid;
  grid-template-columns: 80px;
  grid-auto-rows: min-content;
  align-content: start;
  gap: 6px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none; /* hide scrollbar on Firefox */
  -ms-overflow-style: none; /* hide scrollbar on IE/Edge */
}
/* hide scrollbar on Webkit */
.desktop-icons::-webkit-scrollbar {
  display: none;
}
.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 2px;
  text-align: center;
  transition: background 0.1s;
}
.desktop-icon:hover { background: rgba(108, 182, 255, 0.2); }
.desktop-icon.selected { background: rgba(108, 182, 255, 0.45); }
.desktop-icon .icon-img {
  width: 48px;
  height: 48px;
  background: linear-gradient(180deg, #fff 0%, #d4d4d4 100%);
  border: 1px solid #fff;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 #888,
    1px 1px 2px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  position: relative;
}
/* CSS pixel icons */
.icon-monitor::before, .icon-monitor-sm::before {
  content: '';
  width: 28px; height: 20px;
  background: #1a4ba0;
  border: 1px solid #000;
  position: relative;
  box-shadow: 0 12px 0 -10px #333, 0 14px 0 -10px #000;
}
.icon-monitor::after {
  content: '';
  position: absolute;
  top: 4px; left: 2px; right: 2px; bottom: 4px;
  background: linear-gradient(180deg, #6cb6ff 0%, #245edb 100%);
  border: 1px solid #fff;
}
.icon-monitor-sm::after {
  content: '';
  position: absolute;
  top: 4px; left: 2px; right: 2px; bottom: 4px;
  background: linear-gradient(180deg, #6cb6ff 0%, #245edb 100%);
  border: 1px solid #fff;
}

.icon-passport::before, .icon-passport-sm::before {
  content: '🛡';
  font-size: 28px;
  filter: drop-shadow(1px 1px 0 #fff);
}
.icon-registry::before, .icon-registry-sm::before {
  content: '📋';
  font-size: 28px;
  filter: drop-shadow(1px 1px 0 #fff);
}
.icon-shield::before, .icon-shield-sm::before {
  content: '🔒';
  font-size: 28px;
  filter: drop-shadow(1px 1px 0 #fff);
}
.icon-log::before, .icon-log-sm::before {
  content: '📜';
  font-size: 28px;
  filter: drop-shadow(1px 1px 0 #fff);
}
.icon-trust::before, .icon-trust-sm::before {
  content: '🕸';
  font-size: 28px;
  filter: drop-shadow(1px 1px 0 #fff);
}
.icon-gemma::before, .icon-gemma-sm::before {
  content: '🧠';
  font-size: 28px;
  filter: drop-shadow(1px 1px 0 #fff);
}
.icon-info::before, .icon-info-sm::before {
  content: 'ⓘ';
  font-size: 32px;
  color: #1f4fb8;
  font-weight: bold;
  text-shadow: 1px 1px 0 #fff;
}
.icon-folder::before, .icon-folder-sm::before {
  content: '📁';
  font-size: 28px;
}

.icon-label {
  color: #fff;
  font-size: 11px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.9);
  font-weight: bold;
  margin-top: 2px;
  word-wrap: break-word;
  max-width: 70px;
}

/* ============================================
   TASKBAR
   ============================================ */
.xp-taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 38px;
  background: linear-gradient(180deg, #3168d5 0%, #4e8cee 3%, #245edb 5%, #1941a5 95%, #1941a5 100%);
  z-index: 1000;
  display: flex;
  align-items: center;
  border-top: 2px solid #6cb6ff;
  box-shadow: 0 -1px 0 rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.15);
  padding: 2px 6px;
}
.taskbar-start {
  display: flex !important;
  align-items: center !important;
  padding: 0 14px 0 10px !important;
  height: 34px !important;
  cursor: pointer !important;
  border-radius: 0 17px 17px 0 !important;
  background: linear-gradient(to bottom,
    #74d44e 0%,
    #4db82a 20%,
    #3aa018 45%,
    #2d8812 70%,
    #358018 100%) !important;
  border: 1px solid #1d6010 !important;
  border-left: 2px solid #0f3a08 !important;
  color: #fff !important;
  font-weight: bold !important;
  font-size: 14px !important;
  font-family: "Franklin Gothic Medium", "Trebuchet MS", Arial, sans-serif !important;
  font-style: italic !important;
  letter-spacing: 1px !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    inset 1px 0 0 rgba(255,255,255,0.2),
    inset 0 -2px 0 rgba(0,0,0,0.3),
    2px 2px 6px rgba(0,0,0,0.5) !important;
  gap: 8px !important;
  position: relative !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  margin-left: -6px !important;
  margin-right: 4px !important;
  z-index: 10 !important;
}
.taskbar-start::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important; left: 0 !important; right: 0 !important;
  height: 50% !important;
  background: linear-gradient(to bottom,
    rgba(255,255,255,0.45) 0%,
    rgba(255,255,255,0.1) 100%) !important;
  pointer-events: none !important;
}
.taskbar-start::after { display: none !important; }
.taskbar-start:hover {
  background: linear-gradient(to bottom,
    #88e85e 0%,
    #5ecc3a 20%,
    #48b424 45%,
    #389818 70%,
    #429020 100%) !important;
}
.taskbar-start.active {
  background: linear-gradient(to bottom,
    #2a7010 0%,
    #328018 20%,
    #3a9820 45%,
    #4ab02c 70%,
    #60c840 100%) !important;
  box-shadow: inset 0 3px 8px rgba(0,0,0,0.45) !important;
}

/* Windows XP 4-square flag */
.start-flag {
  width: 22px !important;
  height: 22px !important;
  flex-shrink: 0 !important;
  position: relative !important;
  z-index: 1 !important;
  transform: skewX(-8deg) !important;
}
.start-flag-inner {
  width: 20px !important;
  height: 20px !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  grid-template-rows: 1fr 1fr !important;
  gap: 2px !important;
  border-radius: 2px !important;
}
.start-flag-inner span {
  display: block !important;
  border-radius: 1px !important;
}
.sf-r  { background: #e83030 !important; }
.sf-g  { background: #48c840 !important; }
.sf-b2 { background: #2858e8 !important; }
.sf-y  { background: #f0c030 !important; }

.start-label {
  font-size: 14px !important;
  font-family: "Franklin Gothic Medium", "Trebuchet MS", Arial, sans-serif !important;
  font-style: italic !important;
  font-weight: bold !important;
  letter-spacing: 1px !important;
  line-height: 1 !important;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8) !important;
  position: relative !important;
  z-index: 1 !important;
}

.taskbar-windows {
  flex: 1;
  display: flex;
  gap: 2px;
  margin: 0 6px;
  height: 30px;
  align-items: center;
  overflow: hidden;
  flex-wrap: nowrap;
}

.taskbar-window {
  height: 26px;
  min-width: 120px;
  max-width: 160px;
  background: linear-gradient(180deg,
    #4a8ce0 0%,
    #2c68c0 30%,
    #1a50a8 60%,
    #1848a0 100%);
  border: 1px solid #0e3880;
  border-top-color: #6aace8;
  border-radius: 3px;
  color: #fff;
  font-size: 11px;
  font-family: "Tahoma", sans-serif;
  font-weight: bold;
  padding: 0 8px 0 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.3),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 1px 2px rgba(0,0,0,0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  position: relative;
}
/* top gloss on inactive */
.taskbar-window::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: rgba(255,255,255,0.15);
  border-radius: 3px 3px 0 0;
  pointer-events: none;
}
.taskbar-window .tb-icon {
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1;
}
.taskbar-window .tb-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

/* Active / focused window — sunken pressed look */
.taskbar-window.active {
  background: linear-gradient(180deg,
    #1a3a80 0%,
    #2050a8 30%,
    #2858b8 60%,
    #2060c0 100%);
  border-color: #0a2860;
  border-top-color: #3060a0;
  box-shadow:
    inset 1px 1px 2px rgba(0,0,0,0.4),
    inset 0 0 0 1px rgba(0,0,0,0.2);
  text-shadow: 0 1px 1px rgba(0,0,0,0.5);
}
.taskbar-window.active::before {
  background: rgba(0,0,0,0.1);
}

/* Hover on inactive */
.taskbar-window:hover:not(.active) {
  background: linear-gradient(180deg,
    #60a0f0 0%,
    #3c78d0 30%,
    #2860b8 60%,
    #2058b0 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.4),
    0 1px 3px rgba(0,0,0,0.35);
}

/* Minimized indicator — slightly faded */
.taskbar-window.minimized {
  opacity: 0.75;
}

.taskbar-tray {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #0e7ad1 0%, #0a5fa8 100%);
  border: 1px solid #1941a5;
  height: 30px;
  padding: 0 10px;
  border-radius: 2px;
  color: #fff;
  font-size: 11px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.tray-clock { font-weight: bold; }
.tray-aegis { color: #aaffaa; font-size: 10px; }

/* ============================================
   START MENU — XP Single-Column Style
   ============================================ */
.start-menu {
  position: fixed;
  bottom: 38px;
  left: 0;
  width: 280px;
  background: linear-gradient(180deg, #dce8f8 0%, #c4d8f4 100%);
  border: 2px solid #1848b8;
  border-bottom: none;
  border-left: none;
  border-radius: 0 10px 0 0;
  z-index: 999;
  box-shadow: 4px -3px 20px rgba(0,0,0,0.45);
  overflow: hidden;
  font-family: "Tahoma", "Segoe UI", sans-serif;
}

/* ── App list ── */
.sm-list {
  padding: 8px 0 4px;
  background: linear-gradient(180deg, #dce8f8 0%, #c8d8f0 100%);
}

.sm-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px 6px 10px;
  cursor: pointer;
  color: #0a1a5c;
  font-size: 12px;
  font-weight: bold;
  transition: background 0.08s;
}
.sm-item:hover {
  background: linear-gradient(90deg, #4890e8 0%, #1848c8 100%);
  color: #fff;
}
.sm-item:hover .sm-icon {
  box-shadow: 0 1px 4px rgba(0,0,0,0.4), 0 0 0 2px rgba(255,255,255,0.3);
}

.sm-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.3);
}

.sm-label {
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.2px;
}

.sm-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 8px, #a8bce0 8px, #a8bce0 calc(100% - 8px), transparent calc(100% - 8px));
  margin: 5px 0;
}

/* Shutdown item */
.sm-shutdown {
  color: #8b0000 !important;
}
.sm-shutdown:hover {
  background: linear-gradient(90deg, #e03030 0%, #a00000 100%) !important;
  color: #fff !important;
}

/* All Programs row */
.sm-all-programs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px 6px 14px;
  cursor: pointer;
  color: #0a1a5c;
  font-size: 12px;
  font-weight: bold;
  margin-top: 2px;
}
.sm-all-programs:hover {
  background: linear-gradient(90deg, #4890e8 0%, #1848c8 100%);
  color: #fff;
}
.sm-arrow {
  color: #2a6cc8;
  font-size: 10px;
}
.sm-all-programs:hover .sm-arrow {
  color: #fff;
}

/* ── ZYANIX brand bar at bottom ── */
.sm-brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: linear-gradient(90deg, #0a0f3c 0%, #1030a0 60%, #1848c8 100%);
  border-top: 1px solid #6090d8;
}
.sm-brand-left {
  display: flex;
  flex-direction: column;
}
.sm-brand-name {
  font-size: 13px;
  font-weight: 900;
  font-family: "Trebuchet MS", sans-serif;
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 0 0 10px rgba(108,182,255,0.8);
}
.sm-brand-sub {
  font-size: 9px;
  color: #90b8f0;
  letter-spacing: 1px;
  margin-top: 1px;
}
.sm-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4890e8 0%, #0a1a7c 100%);
  border: 2px solid #6cb6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  font-family: "Trebuchet MS", sans-serif;
  color: #fff;
  text-shadow: 0 0 8px rgba(108,182,255,0.9);
  box-shadow: 0 0 10px rgba(108,182,255,0.4);
}
