/* ==========================================================================
   WINDOWS 95 DESKTOP & SHELL DESIGN SYSTEM
   Authentic Classic Windows 95 / Internet Explorer / Explorer UI
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Theme Variables & 16/256-Color Palette
   -------------------------------------------------------------------------- */
:root {
  /* System Background & Chrome */
  --win-desktop: #008080;         /* Classic Windows 95 Teal */
  --win-gray: #c0c0c0;            /* Button Face / Dialog Gray */
  --win-light-gray: #dfdfdf;      /* Light Button Highlight */
  --win-white: #ffffff;           /* Pure White 3D Highlight */
  --win-dark-gray: #808080;       /* Button Shadow */
  --win-black: #000000;           /* Pure Black 3D Outer Shadow */
  
  /* Titlebars */
  --win-title-active-left: #000080;  /* Active Titlebar Gradient Start */
  --win-title-active-right: #1084d0; /* Active Titlebar Gradient End */
  --win-title-inactive: #808080;     /* Inactive Titlebar */
  --win-title-text: #ffffff;
  --win-title-text-inactive: #c0c0c0;

  /* Selection & Accents */
  --win-select-bg: #000080;
  --win-select-text: #ffffff;
  --win-tooltip-bg: #ffffe1;

  /* Classic Windows 95 System Typography */
  --win-font: 'Segoe UI', Tahoma, 'MS Sans Serif', Arial, sans-serif;
  --win-font-mono: 'Courier New', Courier, monospace;
}

/* --------------------------------------------------------------------------
   2. Reset & Baseline
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--win-desktop);
  font-family: var(--win-font);
  font-size: 12px;
  color: #000000;
}

/* --------------------------------------------------------------------------
   3. 3D Bevel Utilities
   -------------------------------------------------------------------------- */
/* Outset Window / Button Bevel */
.win-outset {
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-black);
  border-bottom: 2px solid var(--win-black);
  box-shadow: inset 1px 1px var(--win-light-gray), inset -1px -1px var(--win-dark-gray);
}

/* Inset Sunken Viewport Bevel */
.win-inset {
  border-top: 2px solid var(--win-dark-gray);
  border-left: 2px solid var(--win-dark-gray);
  border-right: 2px solid var(--win-white);
  border-bottom: 2px solid var(--win-white);
  box-shadow: inset 1px 1px var(--win-black), inset -1px -1px var(--win-light-gray);
  background: #ffffff;
}

/* Classic Button */
.win-btn {
  background: var(--win-gray);
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-black);
  border-bottom: 2px solid var(--win-black);
  box-shadow: inset 1px 1px var(--win-light-gray), inset -1px -1px var(--win-dark-gray);
  padding: 3px 10px;
  font-family: var(--win-font);
  font-size: 11px;
  color: #000000;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  outline: none;
  text-decoration: none;
}

.win-btn:active, .win-btn.pressed {
  border-top: 2px solid var(--win-black);
  border-left: 2px solid var(--win-black);
  border-right: 2px solid var(--win-white);
  border-bottom: 2px solid var(--win-white);
  box-shadow: inset 1px 1px var(--win-dark-gray);
  padding: 4px 9px 2px 11px;
}

/* --------------------------------------------------------------------------
   4. Desktop Shell & Icon Grid
   -------------------------------------------------------------------------- */
#desktop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 28px; /* Room for taskbar */
  overflow: hidden;
  padding: 10px;
}

/* Desktop Icon Grid */
.desktop-icons {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 14px 10px;
  height: 100%;
  width: max-content;
}

.desktop-icon {
  width: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  padding: 4px 2px;
  border-radius: 1px;
  transition: none;
}

.desktop-icon .icon-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  margin-bottom: 4px;
  filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.3));
  pointer-events: none;
}

.desktop-icon .icon-label {
  font-size: 11px;
  color: #ffffff;
  padding: 1px 4px;
  line-height: 1.2;
  word-break: break-word;
  text-shadow: 1px 1px 1px #000000;
  pointer-events: none;
}

.desktop-icon:hover .icon-label {
  background: rgba(0, 0, 128, 0.4);
}

.desktop-icon.selected {
  outline: 1px dotted #ffffff;
}

.desktop-icon.selected .icon-img {
  filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.5)) opacity(0.85);
}

.desktop-icon.selected .icon-label {
  background: var(--win-select-bg);
  color: var(--win-select-text);
  outline: 1px dotted #ffff00;
}

/* --------------------------------------------------------------------------
   5. Window System
   -------------------------------------------------------------------------- */
.window {
  position: absolute;
  background: var(--win-gray);
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-black);
  border-bottom: 2px solid var(--win-black);
  box-shadow: inset 1px 1px var(--win-light-gray), inset -1px -1px var(--win-dark-gray), 2px 2px 8px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  min-width: 240px;
  min-height: 150px;
  z-index: 10;
}

.window.active {
  z-index: 50;
}

.window.minimized {
  display: none !important;
}

.window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: calc(100vh - 28px) !important;
  border-width: 0 !important;
}

/* Window Titlebar */
.window-titlebar {
  background: linear-gradient(90deg, var(--win-title-active-left) 0%, var(--win-title-active-right) 100%);
  color: var(--win-title-text);
  padding: 3px 4px 3px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: default;
  height: 22px;
  user-select: none;
}

.window:not(.active) .window-titlebar {
  background: var(--win-title-inactive);
  color: var(--win-title-text-inactive);
}

.window-title-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: bold;
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
}

.window-title-left img, .window-title-left svg {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.win-control-btn {
  width: 16px;
  height: 14px;
  background: var(--win-gray);
  border-top: 1px solid var(--win-white);
  border-left: 1px solid var(--win-white);
  border-right: 1px solid var(--win-black);
  border-bottom: 1px solid var(--win-black);
  font-family: var(--win-font);
  font-size: 9px;
  font-weight: bold;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #000000;
  padding: 0;
}

.win-control-btn:active {
  border-top: 1px solid var(--win-black);
  border-left: 1px solid var(--win-black);
  border-right: 1px solid var(--win-white);
  border-bottom: 1px solid var(--win-white);
}

/* Window Menu Bar (File, Edit, View...) */
.window-menubar {
  display: flex;
  align-items: center;
  background: var(--win-gray);
  padding: 2px 4px;
  border-bottom: 1px solid var(--win-dark-gray);
  font-size: 11px;
}

.menu-item {
  padding: 2px 6px;
  cursor: pointer;
}

.menu-item:hover {
  background: var(--win-select-bg);
  color: var(--win-select-text);
}

/* Window Toolbar (Back, Forward, View...) */
.window-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  background: var(--win-gray);
  border-bottom: 1px solid var(--win-dark-gray);
  flex-wrap: wrap;
}

.toolbar-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  font-size: 11px;
  background: var(--win-gray);
  border: 1px solid transparent;
  cursor: pointer;
}

.toolbar-btn:hover {
  border-top: 1px solid var(--win-white);
  border-left: 1px solid var(--win-white);
  border-right: 1px solid var(--win-dark-gray);
  border-bottom: 1px solid var(--win-dark-gray);
}

.toolbar-btn:active {
  border-top: 1px solid var(--win-dark-gray);
  border-left: 1px solid var(--win-dark-gray);
  border-right: 1px solid var(--win-white);
  border-bottom: 1px solid var(--win-white);
}

.toolbar-sep {
  width: 1px;
  height: 18px;
  background: var(--win-dark-gray);
  border-right: 1px solid var(--win-white);
  margin: 0 4px;
}

/* Window Address Bar */
.window-addressbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  background: var(--win-gray);
  border-bottom: 1px solid var(--win-dark-gray);
  font-size: 11px;
}

.address-label {
  color: var(--win-dark-gray);
  font-weight: bold;
}

.address-input {
  flex: 1;
  background: #ffffff;
  border-top: 2px solid var(--win-dark-gray);
  border-left: 2px solid var(--win-dark-gray);
  border-right: 2px solid var(--win-white);
  border-bottom: 2px solid var(--win-white);
  padding: 2px 4px;
  font-family: var(--win-font);
  font-size: 11px;
  color: #000000;
  user-select: text;
  -webkit-user-select: text;
}

/* Window Content Body */
.window-body {
  flex: 1;
  background: #ffffff;
  overflow: auto;
  position: relative;
  user-select: text;
  -webkit-user-select: text;
}

/* Window Status Bar */
.window-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--win-gray);
  border-top: 1px solid var(--win-dark-gray);
  padding: 2px 4px;
  font-size: 11px;
  height: 20px;
}

.status-section {
  border-top: 1px solid var(--win-dark-gray);
  border-left: 1px solid var(--win-dark-gray);
  border-right: 1px solid var(--win-white);
  border-bottom: 1px solid var(--win-white);
  padding: 1px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Resize Handles */
.resizer {
  position: absolute;
  z-index: 100;
}
.resizer-r { right: -3px; top: 0; bottom: 0; width: 6px; cursor: e-resize; }
.resizer-b { bottom: -3px; left: 0; right: 0; height: 6px; cursor: s-resize; }
.resizer-rb { right: -4px; bottom: -4px; width: 10px; height: 10px; cursor: se-resize; }

/* --------------------------------------------------------------------------
   6. Taskbar & Start Menu
   -------------------------------------------------------------------------- */
#taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: var(--win-gray);
  border-top: 2px solid var(--win-white);
  display: flex;
  align-items: center;
  padding: 2px 3px;
  gap: 4px;
  z-index: 99999;
}

/* Start Button */
.start-btn {
  height: 22px;
  padding: 2px 6px;
  font-weight: bold;
  font-size: 11px;
  gap: 4px;
}

.start-btn img, .start-btn svg {
  width: 16px;
  height: 16px;
}

/* Taskbar Windows List */
.taskbar-tasks {
  flex: 1;
  display: flex;
  gap: 3px;
  overflow-x: auto;
  overflow-y: hidden;
  height: 100%;
  align-items: center;
}

.taskbar-item {
  height: 22px;
  max-width: 160px;
  min-width: 60px;
  flex: 1;
  background: var(--win-gray);
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-black);
  border-bottom: 2px solid var(--win-black);
  box-shadow: inset 1px 1px var(--win-light-gray), inset -1px -1px var(--win-dark-gray);
  font-size: 11px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  gap: 5px;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
}

.taskbar-item.active {
  background: #e0e0e0;
  background-image: radial-gradient(#c0c0c0 15%, transparent 16%);
  background-size: 3px 3px;
  border-top: 2px solid var(--win-black);
  border-left: 2px solid var(--win-black);
  border-right: 2px solid var(--win-white);
  border-bottom: 2px solid var(--win-white);
  box-shadow: inset 1px 1px var(--win-dark-gray);
  font-weight: bold;
}

.taskbar-item img, .taskbar-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.taskbar-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* System Tray */
.system-tray {
  border-top: 2px solid var(--win-dark-gray);
  border-left: 2px solid var(--win-dark-gray);
  border-right: 2px solid var(--win-white);
  border-bottom: 2px solid var(--win-white);
  padding: 2px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  height: 22px;
  background: var(--win-gray);
}

.tray-icon {
  width: 16px;
  height: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#tray-clock {
  font-size: 11px;
  cursor: default;
}

/* --------------------------------------------------------------------------
   7. Start Menu
   -------------------------------------------------------------------------- */
#start-menu {
  position: absolute;
  bottom: 28px;
  left: 2px;
  width: 220px;
  background: var(--win-gray);
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-black);
  border-bottom: 2px solid var(--win-black);
  box-shadow: 3px 3px 10px rgba(0,0,0,0.5);
  display: none;
  z-index: 100000;
}

#start-menu.open {
  display: flex !important;
}

.start-menu-banner {
  width: 26px;
  background: linear-gradient(180deg, #000080 0%, #1084d0 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
}

.start-menu-banner span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #ffffff;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 2px;
  text-shadow: 1px 1px 2px #000000;
}

.start-menu-banner span b {
  color: #c0c0c0;
  font-weight: normal;
}

.start-menu-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2px 0;
  list-style: none;
}

.start-menu-item {
  position: relative;
  display: flex;
  align-items: center;
  padding: 5px 10px;
  gap: 10px;
  cursor: pointer;
  font-size: 12px;
  text-decoration: none;
  color: #000000;
}

.start-menu-item:hover, .start-menu-item.hovered {
  background: var(--win-select-bg);
  color: var(--win-select-text);
}

.start-menu-item img, .start-menu-item svg {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.start-menu-item .arrow-right {
  margin-left: auto;
  font-size: 9px;
}

.start-menu-sep {
  height: 1px;
  background: var(--win-dark-gray);
  border-bottom: 1px solid var(--win-white);
  margin: 3px 2px;
}

/* Submenu Flyouts */
.start-submenu {
  position: absolute;
  left: 100%;
  top: -2px;
  min-width: 190px;
  background: var(--win-gray);
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-black);
  border-bottom: 2px solid var(--win-black);
  box-shadow: 3px 3px 10px rgba(0,0,0,0.5);
  display: none;
  flex-direction: column;
  padding: 2px 0;
  z-index: 100001;
}

.start-menu-item:hover > .start-submenu {
  display: flex;
}

/* Align deeply nested submenus upward so all items remain fully visible */
.start-submenu .start-submenu {
  bottom: -2px;
  top: auto;
}

/* --------------------------------------------------------------------------
   8. Internet Explorer Window Styling
   -------------------------------------------------------------------------- */
.ie-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
}

.ie-logo-wrap {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--win-dark-gray);
  border-left: 1px solid var(--win-dark-gray);
  border-right: 1px solid var(--win-white);
  border-bottom: 1px solid var(--win-white);
  margin-right: 4px;
  background: #000000;
}

.ie-logo-spin {
  font-size: 16px;
  animation: ie-pulse 2s infinite ease-in-out;
}

@keyframes ie-pulse {
  0% { transform: scale(1); filter: hue-rotate(0deg); }
  50% { transform: scale(1.15); filter: hue-rotate(180deg); }
  100% { transform: scale(1); filter: hue-rotate(360deg); }
}

.ie-page-body {
  flex: 1;
  overflow: auto;
  padding: 16px;
  background: #ffffff;
  color: #000000;
  font-family: 'Times New Roman', Times, serif;
}

.ie-page-body h1, .ie-page-body h2, .ie-page-body h3 {
  font-family: Arial, Helvetica, sans-serif;
  color: #000080;
  border-bottom: 2px solid #000080;
  padding-bottom: 4px;
  margin-top: 16px;
  margin-bottom: 8px;
}

.ie-hero-header {
  text-align: center;
  padding: 16px;
  background: #f0f0ff;
  border: 2px solid #000080;
  margin-bottom: 20px;
}

.ie-hero-header h1 {
  font-size: 26px;
  border-bottom: none;
  margin: 6px 0;
}

.ie-nav-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  background: #e0e0e0;
  border-top: 1px solid #ffffff;
  border-bottom: 1px solid #808080;
  padding: 6px;
  margin-bottom: 16px;
  font-family: Arial, sans-serif;
  font-size: 11px;
}

.ie-nav-bar a {
  color: #0000cc;
  text-decoration: underline;
  cursor: pointer;
  padding: 2px 6px;
}

.ie-nav-bar a:hover {
  color: #ff0000;
  background: #ffffcc;
}

.ie-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.ie-project-card {
  border: 2px solid #808080;
  background: #f7f7f7;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ie-project-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border: 1px solid #000000;
}

.ie-project-card h3 {
  margin: 0;
  font-size: 15px;
  border-bottom: 1px dotted #808080;
}

.ie-project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ie-tag {
  background: #000080;
  color: #ffffff;
  font-size: 10px;
  font-family: Arial, sans-serif;
  padding: 1px 4px;
}

.ie-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 10px;
  margin-bottom: 24px;
}

.ie-video-card {
  border: 2px solid #808080;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  background: #f7f7f7;
  display: flex;
  flex-direction: column;
}

.ie-video-card:hover {
  background: #ffffec;
  border-color: #000080;
}

.ie-video-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  overflow: hidden;
  border-bottom: 1px solid #808080;
}

.ie-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.ie-video-card:hover .ie-video-thumb {
  transform: scale(1.04);
}

.ie-video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  background: rgba(0, 0, 128, 0.85);
  border: 2px solid #ffffff;
  border-radius: 50%;
  color: #ffffff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.ie-video-card:hover .ie-video-play-btn {
  transform: translate(-50%, -50%) scale(1.15);
  background: rgba(204, 0, 0, 0.9);
}

.ie-video-tag {
  position: absolute;
  bottom: 5px;
  left: 5px;
  background: rgba(0, 0, 0, 0.8);
  color: #00ffcc;
  font-size: 10px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.ie-video-title {
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  color: #000080;
  line-height: 1.35;
}


/* --------------------------------------------------------------------------
   9. Explorer Folder Views
   -------------------------------------------------------------------------- */
.explorer-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.explorer-view {
  flex: 1;
  overflow: auto;
  padding: 12px;
  background: #ffffff;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 16px;
  align-content: flex-start;
}

.explorer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6px 4px;
  cursor: pointer;
}

.explorer-item img, .explorer-item svg {
  width: 32px;
  height: 32px;
  object-fit: contain;
  margin-bottom: 4px;
}

.explorer-item span {
  font-size: 11px;
  line-height: 1.2;
  word-break: break-word;
}

.explorer-item:hover span {
  background: rgba(0, 0, 128, 0.2);
}

.explorer-item.selected span {
  background: var(--win-select-bg);
  color: var(--win-select-text);
}

/* --------------------------------------------------------------------------
   10. Games Styling
   -------------------------------------------------------------------------- */

/* Game: Flying Toasters */
.toasters-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000008;
  overflow: hidden;
}

.toasters-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.toasters-toolbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(192, 192, 192, 0.9);
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 2px solid var(--win-white);
  font-size: 11px;
  gap: 8px;
  flex-wrap: wrap;
}

/* Game: Solitaire */
.solitaire-table {
  width: 100%;
  height: 100%;
  background: #008000; /* Green Felt */
  position: relative;
  overflow: auto;
  padding: 14px;
  user-select: none;
}

.solitaire-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #006000;
  color: #ffffff;
  padding: 4px 12px;
  border-bottom: 2px solid #004000;
  margin: -14px -14px 14px -14px;
  font-size: 12px;
  font-weight: bold;
}

.solitaire-top-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.solitaire-deck-area, .solitaire-foundation-area {
  display: flex;
  gap: 12px;
}

.solitaire-card-slot {
  width: 71px;
  height: 96px;
  border: 1px solid #005000;
  border-radius: 4px;
  background: rgba(0, 70, 0, 0.4);
  position: relative;
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.5);
}

.solitaire-tableau {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.solitaire-column {
  width: 71px;
  min-height: 380px;
  position: relative;
}

.solitaire-card {
  width: 71px;
  height: 96px;
  background: #ffffff;
  border: 1px solid #333333;
  border-radius: 4px;
  position: absolute;
  cursor: pointer;
  box-shadow: 1px 2px 4px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 6px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  user-select: none;
}

.solitaire-card.red { color: #cc0000; }
.solitaire-card.black { color: #000000; }

.solitaire-card.card-back {
  background: #000080;
  background-image: repeating-linear-gradient(45deg, #000099 0, #000099 4px, #000066 4px, #000066 8px);
  border: 2px solid #ffffff;
}

.solitaire-card.selected {
  outline: 3px solid #ffff00 !important;
  box-shadow: 0 0 10px #ffff00, inset 0 0 5px rgba(255, 255, 0, 0.4) !important;
  z-index: 500 !important;
}

.solitaire-column {
  border-radius: 4px;
}

.solitaire-column:empty {
  border: 1px dashed rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.1);
}

/* Solitaire Drag & Drop Floating Proxy */
.solitaire-drag-proxy {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  cursor: grabbing;
}

.solitaire-drag-proxy .solitaire-card {
  position: absolute;
  box-shadow: 4px 8px 20px rgba(0, 0, 0, 0.65), 0 0 2px rgba(0, 0, 0, 0.9);
  cursor: grabbing;
}

.solitaire-card.is-dragged {
  opacity: 0.3;
  filter: grayscale(40%);
}

.solitaire-card:not(.card-back) {
  cursor: grab;
}

.solitaire-card:not(.card-back):active {
  cursor: grabbing;
}


/* Solitaire Win Canvas Overlay */
#solitaire-win-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* Game: HOVER! */
.hover-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hover-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hover-cockpit-hud {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.hover-hud-box {
  background: rgba(0, 0, 0, 0.75);
  border: 2px solid #00ffcc;
  padding: 4px 10px;
  color: #00ffcc;
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  font-size: 13px;
  box-shadow: 0 0 8px rgba(0, 255, 204, 0.4);
}

.hover-radar-wrap {
  width: 100px;
  height: 100px;
  background: rgba(0, 20, 10, 0.85);
  border: 2px solid #00ff66;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.5);
  overflow: hidden;
}

.hover-touch-controls {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   11. Screensaver Fullscreen Overlay
   -------------------------------------------------------------------------- */
#screensaver-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000000;
  z-index: 999999;
  display: none;
  cursor: none;
}

#screensaver-overlay.active {
  display: block;
}

/* --------------------------------------------------------------------------
   12. Shut Down Screen
   -------------------------------------------------------------------------- */
#shutdown-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000000;
  color: #ff8800;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', Courier, monospace;
  z-index: 1000000;
  cursor: pointer;
}

#shutdown-screen.active {
  display: flex;
}

.shutdown-text {
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  line-height: 1.6;
}

.shutdown-sub {
  font-size: 14px;
  color: #888888;
  margin-top: 30px;
}

/* --------------------------------------------------------------------------
   13. Retro Games (Minesweeper)
   -------------------------------------------------------------------------- */
/* Minesweeper LED & Cells */
.minesweeper-led {
  background: #000000;
  border: 1px solid #808080;
  color: #ff0000;
  font-family: 'Courier New', Courier, monospace;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 1px 4px;
  min-width: 44px;
  text-align: right;
  line-height: 1;
}

.mine-cell {
  width: 18px;
  height: 18px;
  background: var(--win-gray);
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}

.mine-cell:active:not(.revealed) {
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
}

.mine-cell.revealed {
  border: 1px solid #7b7b7b;
  background: #c0c0c0;
}

.mine-cell.mine-hit {
  background: #ff0000;
}

.mine-cell.n1 { color: #0000ff; }
.mine-cell.n2 { color: #008000; }
.mine-cell.n3 { color: #ff0000; }
.mine-cell.n4 { color: #000080; }
.mine-cell.n5 { color: #800000; }
.mine-cell.n6 { color: #008080; }
.mine-cell.n7 { color: #000000; }
.mine-cell.n8 { color: #808080; }

/* --------------------------------------------------------------------------
   14. Windows 95 Themed Modal Notifications & Message Boxes
   -------------------------------------------------------------------------- */
.win95-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.win95-message-box {
  background: var(--win-gray);
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-black);
  border-bottom: 2px solid var(--win-black);
  box-shadow: inset 1px 1px var(--win-light-gray), inset -1px -1px var(--win-dark-gray), 3px 3px 0px rgba(0, 0, 0, 0.5);
  min-width: 320px;
  max-width: 460px;
  width: auto;
  display: flex;
  flex-direction: column;
  animation: win95DialogPop 0.05s ease-out;
}

@keyframes win95DialogPop {
  0% { transform: scale(0.98); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

.win95-message-box-body {
  padding: 18px 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--win-gray);
  min-height: 60px;
}

.win95-message-box-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.win95-message-box-text {
  flex: 1;
  font-family: var(--win-font);
  font-size: 11px;
  line-height: 1.45;
  color: #000000;
  white-space: pre-wrap;
  user-select: text;
}

.win95-message-box-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 6px 16px 14px 16px;
  background: var(--win-gray);
}

/* ==========================================================================
   MICROSOFT ENCARTA '95 STYLESHEET
   Authentic 1995 CD-ROM Multimedia Encyclopedia Styling
   ========================================================================== */
.encarta-app-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #000814;
  color: #000000;
  overflow: hidden;
  font-family: var(--win-font);
}

/* 1. Encarta Top Banner */
.encarta-top-banner {
  background: linear-gradient(180deg, #001233 0%, #000814 100%);
  border-bottom: 2px solid #ffd700;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.encarta-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.encarta-logo-e {
  width: 28px;
  height: 28px;
  background: #001844;
  border: 2px solid #ffd700;
  color: #ffd700;
  font-family: 'Times New Roman', serif;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

.encarta-brand-titles {
  display: flex;
  flex-direction: column;
}

.encarta-main-title {
  font-family: 'Times New Roman', serif;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1.5px;
  color: #ffea79;
  text-shadow: 1px 1px 2px #000000;
}

.encarta-sub-title {
  font-size: 10px;
  color: #8da2c0;
}

.encarta-banner-tools {
  display: flex;
  gap: 6px;
}

.encarta-tool-btn {
  background: var(--win-gray);
  border: 2px outset #ffffff;
  padding: 3px 10px;
  font-family: var(--win-font);
  font-size: 11px;
  font-weight: bold;
  color: #000000;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.encarta-tool-btn:active, .encarta-tool-btn.active {
  border-style: inset;
  background: #d8d8d8;
  color: #000080;
}

/* 2. Main Canvas & Split Layout */
.encarta-canvas {
  flex: 1;
  display: flex;
  overflow: hidden;
  background: #ffffff;
}

.encarta-layout {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Left Pinpointer Index Pane */
.encarta-pinpointer {
  width: 250px;
  background: #ebebeb;
  border-right: 2px solid #808080;
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 6px;
  flex-shrink: 0;
}

.pinpointer-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pinpointer-title {
  font-size: 11px;
  font-weight: bold;
  color: #000000;
}

.pinpointer-search {
  border: 2px inset #ffffff;
  padding: 4px 6px;
  font-size: 11px;
  font-family: var(--win-font);
  outline: none;
  background: #ffffff;
}

.pinpointer-select {
  width: 100%;
  font-size: 11px;
  padding: 2px;
  font-family: var(--win-font);
}

.pinpointer-list {
  flex: 1;
  background: #ffffff;
  border: 2px inset #ffffff;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.pinpointer-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  font-size: 11px;
  cursor: pointer;
  color: #000000;
  user-select: none;
}

.pinpointer-item:hover {
  background: #000080;
  color: #ffffff;
}

.pinpointer-item.active {
  background: #000080;
  color: #ffffff;
  font-weight: bold;
}

.pinpointer-empty {
  padding: 10px;
  font-size: 11px;
  color: #777;
  text-align: center;
  font-style: italic;
}

/* Right Article Pane */
.encarta-article-pane {
  flex: 1;
  overflow-y: auto;
  background: #ffffff;
  padding: 18px 24px;
  font-family: 'Times New Roman', Georgia, serif;
  color: #111111;
}

.article-header {
  margin-bottom: 14px;
}

.article-badge {
  font-family: var(--win-font);
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #000080;
  margin-bottom: 2px;
}

.article-heading {
  font-size: 24px;
  color: #001233;
  margin: 0;
  border-bottom: 2px solid #ffd700;
  padding-bottom: 4px;
}

.article-subheading {
  font-size: 12px;
  color: #555555;
  font-style: italic;
  margin-top: 4px;
  font-family: var(--win-font);
}

.article-action-strip {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.encarta-pill-btn {
  background: var(--win-gray);
  border: 2px outset #ffffff;
  padding: 2px 10px;
  font-size: 11px;
  font-family: var(--win-font);
  cursor: pointer;
  color: #000000;
}

.encarta-pill-btn:active {
  border-style: inset;
}

/* Multimedia Box */
.encarta-media-box {
  float: right;
  width: 230px;
  margin: 0 0 14px 18px;
  background: #f8f8f8;
  border: 2px outset #ffffff;
  padding: 6px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
}

.media-frame img {
  width: 100%;
  height: 145px;
  object-fit: cover;
  border: 1px solid #000000;
  display: block;
}

.media-caption {
  font-family: var(--win-font);
  font-size: 10px;
  color: #333333;
  margin-top: 4px;
  line-height: 1.35;
}

/* Article Body */
.article-text {
  font-size: 14px;
  line-height: 1.55;
}

.article-text p {
  margin-bottom: 12px;
}

.article-text h3 {
  font-size: 16px;
  color: #000080;
  margin: 14px 0 6px 0;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 2px;
}

.article-text ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.article-text li {
  margin-bottom: 6px;
}

.encarta-lead::first-letter {
  font-size: 34px;
  float: left;
  line-height: 0.8;
  padding-right: 6px;
  font-weight: bold;
  color: #000080;
}

/* See Also Links */
.article-see-also {
  clear: both;
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid #c0c0c0;
  font-family: var(--win-font);
  font-size: 11px;
}

.see-also-label {
  font-weight: bold;
  color: #555555;
  margin-right: 6px;
}

.see-also-link {
  color: #000080;
  text-decoration: underline;
  cursor: pointer;
}

.see-also-link:hover {
  color: #ff0000;
}

/* 3. Ask Encarta Research Desk */
.encarta-ask-pane {
  flex: 1;
  background: #f4f6f9;
  padding: 18px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ask-header-box {
  border-bottom: 2px solid #ffd700;
  padding-bottom: 8px;
}

.ask-title {
  font-family: 'Times New Roman', serif;
  font-size: 20px;
  font-weight: bold;
  color: #001233;
}

.ask-description {
  font-size: 12px;
  color: #555555;
  margin-top: 4px;
}

.ask-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ask-chip-btn {
  background: #ffffff;
  border: 1px solid #808080;
  box-shadow: 1px 1px 0px #ffffff;
  padding: 6px 12px;
  font-size: 11px;
  font-family: var(--win-font);
  cursor: pointer;
  text-align: left;
}

.ask-chip-btn:hover {
  background: #000080;
  color: #ffffff;
}

.ask-custom-row {
  display: flex;
  gap: 8px;
}

.ask-input {
  flex: 1;
  border: 2px inset #ffffff;
  padding: 6px 8px;
  font-size: 12px;
  font-family: var(--win-font);
  outline: none;
}

.ask-result-card {
  background: #ffffff;
  border: 2px outset #ffffff;
  padding: 16px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ask-result-badge {
  font-size: 10px;
  font-weight: bold;
  color: #000080;
  letter-spacing: 1px;
}

.ask-result-question {
  font-family: 'Times New Roman', serif;
  font-size: 17px;
  margin: 0;
  color: #001233;
}

.ask-result-answer {
  font-size: 13px;
  line-height: 1.5;
  color: #222222;
  white-space: pre-wrap;
}

.ask-citation {
  font-size: 10px;
  color: #888888;
  font-style: italic;
  border-top: 1px solid #eee;
  padding-top: 6px;
  margin-top: 8px;
}

/* 4. Encarta MindMaze Castle */
.encarta-mindmaze-pane {
  flex: 1;
  background: #1a1a24;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mindmaze-chamber-frame {
  width: 100%;
  max-width: 680px;
  background: #2a2c3a;
  border: 4px solid #4a4d64;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.8), inset 0 0 12px rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  overflow: hidden;
}

.mindmaze-header {
  background: #14151f;
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #ffd700;
}

.mindmaze-logo {
  font-family: 'Times New Roman', serif;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1.5px;
  color: #ffd700;
}

.mindmaze-score {
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  color: #00ffcc;
}

.mindmaze-chamber-inner {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.mindmaze-torch {
  font-size: 32px;
  animation: torchFlicker 0.4s infinite alternate;
}

@keyframes torchFlicker {
  0% { transform: scale(1) translateY(0); filter: drop-shadow(0 0 4px #ff9900); }
  100% { transform: scale(1.1) translateY(-2px); filter: drop-shadow(0 0 8px #ff4400); }
}

.mindmaze-content-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mindmaze-scholar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 12px;
  border: 1px solid #5a5e78;
}

.scholar-dialogue {
  font-size: 12px;
  color: #ffea79;
  font-style: italic;
  line-height: 1.4;
}

.mindmaze-question-text {
  font-family: 'Times New Roman', serif;
  font-size: 16px;
  font-weight: bold;
  color: #ffffff;
  background: #181a24;
  padding: 12px;
  border: 1px solid #ffd700;
  line-height: 1.4;
}

.mindmaze-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mindmaze-opt-btn {
  background: #3a3d52;
  color: #ffffff;
  border: 2px outset #606482;
  padding: 8px 10px;
  font-size: 12px;
  font-family: var(--win-font);
  cursor: pointer;
  text-align: left;
  line-height: 1.3;
}

.mindmaze-opt-btn:hover {
  background: #4a4e6a;
}

.mindmaze-opt-btn.correct {
  background: #006622 !important;
  border-color: #00ff66 !important;
  color: #ffffff !important;
}

.mindmaze-opt-btn.incorrect {
  background: #880000 !important;
  border-color: #ff4444 !important;
  color: #ffffff !important;
}

.mindmaze-feedback {
  min-height: 20px;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
}

/* 5. Encarta Statusbar */
.encarta-statusbar {
  background: var(--win-gray);
  border-top: 1px solid #808080;
  padding: 3px 8px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #000000;
  flex-shrink: 0;
}


