/* ==========================================================================
   WINDOWS 98 PORTFOLIO - CORE STYLESHEET
   ========================================================================== */

* {
  box-sizing: border-box;
}

body.desktop {
  background: #008080 url('assets/win98-wallpaper.jpg') no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: 'MS Sans Serif', Arial, sans-serif;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* ==========================================================================
   BOOTLOADER, BIOS & LOGIN SCREENS
   ========================================================================== */

#bootup-overlay {
  position: fixed;
  z-index: 100000;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #000;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.bootup-screen {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  position: relative;
}

.bios-text {
  color: #00ff00;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.35rem;
  font-weight: bold;
  text-align: center;
  white-space: pre-line;
  line-height: 1.6;
  padding: 24px;
}

.bios-hint {
  font-size: 0.95rem;
  color: #aaffaa;
  margin-top: 18px;
  text-transform: uppercase;
  animation: bios-blink 1s steps(2, start) infinite;
}

@keyframes bios-blink {
  to { visibility: hidden; }
}

#windows-logo-screen {
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
}

#windows-logo-screen img.windows-logo {
  max-width: 320px;
  max-height: 220px;
  margin-bottom: 30px;
}

.loading-bar {
  width: 280px;
  height: 16px;
  background: #111;
  border: 2px outset #c0c0c0;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  box-shadow: inset 1px 1px 2px #000;
}

.loading-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #000080, #0055ff, #ffffff, #0055ff, #000080);
  background-size: 200% 100%;
  transition: width 2.2s linear;
  animation: loading-pulse 1s linear infinite;
}

@keyframes loading-pulse {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* BIOS Setup Utility (Easter Egg) */
#bios-popup {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: #000 !important;
  z-index: 100002;
}

#bios-popup-inner {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #0000aa;
  color: #fff;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.05rem;
  border: 4px double #ffffff;
  padding: 24px 36px;
  min-width: 580px;
  max-width: 90vw;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
}

#bios-popup-inner hr {
  border: none;
  border-top: 2px solid #ffffff;
  margin: 10px 0 16px 0;
}

#bios-popup-inner .bios-title {
  font-size: 1.25rem;
  color: #ffff55;
  margin-bottom: 12px;
  letter-spacing: 2px;
  text-align: center;
  font-weight: bold;
}

.bios-tabs-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.bios-tab-btn {
  background: #0000aa;
  border: none;
  color: #00ffff;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  padding: 3px 12px;
  text-transform: uppercase;
}

.bios-tab-btn.active, .bios-tab-btn:hover {
  background: #ffffff;
  color: #0000aa;
}

.bios-tab-content {
  min-height: 150px;
  margin-bottom: 14px;
  line-height: 1.8;
  color: #ffffff;
}

.bios-label {
  color: #ffff55;
  font-weight: bold;
}

.bios-exit-btn {
  margin-top: 14px;
  background: #0000aa;
  color: #ffff55;
  border: 2px solid #ffffff;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
  font-weight: bold;
  padding: 6px 18px;
  cursor: pointer;
}

.bios-exit-btn:hover {
  background: #ffffff;
  color: #0000aa;
}

/* Windows 98 Login Box */
#login-screen {
  background: url('assets/win98-wallpaper.jpg') no-repeat center center fixed;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  width: 100vw;
}

.login-box {
  background: #c0c0c0;
  border: 2px outset #fff;
  padding: 24px 30px;
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 320px;
}

.login-user-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 12px;
  border-radius: 4px;
  object-fit: cover;
  border: 2px inset #fff;
  background: #fff;
}

.login-name {
  font-size: 1.15rem;
  margin-bottom: 4px;
  font-weight: bold;
  color: #000;
}

.login-passHelp {
  font-size: 0.85rem;
  margin-bottom: 10px;
  color: #444;
}

#login-password {
  font-size: 1rem;
  padding: 4px 8px;
  border: 2px inset #888;
  background: #fff;
  margin-bottom: 12px;
  width: 100%;
}

.login-btn {
  font-size: 1rem;
  padding: 4px 20px;
  background: #c0c0c0;
  border: 2px outset #fff;
  cursor: pointer;
  font-family: 'MS Sans Serif', Arial, sans-serif;
  font-weight: bold;
}

.login-btn:active {
  border: 2px inset #888;
  background: #b0b0b0;
}

.login-error {
  color: #b00000;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: bold;
  min-height: 1.2em;
}

/* ==========================================================================
   DESKTOP & SHORTCUT ICONS
   ========================================================================== */

.desktop-icons {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 22px;
  padding: 16px;
  max-height: calc(100vh - 50px);
  width: fit-content;
  z-index: 1;
}

.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  width: 72px;
  padding: 4px 2px;
  border: 1px dotted transparent;
}

.icon:hover, .icon.selected {
  background: rgba(0, 0, 128, 0.4);
  border: 1px dotted #ffff88;
}

.icon img {
  width: 36px;
  height: 36px;
  pointer-events: none;
}

.icon span {
  font-size: 12px;
  color: #ffffff;
  margin-top: 4px;
  text-shadow: 1px 1px 1px #000000, -1px -1px 1px #000000, 1px -1px 1px #000000, -1px 1px 1px #000000;
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
}

/* ==========================================================================
   ACTIVE DESKTOP WIDGETS (DESKTOP MODE)
   ========================================================================== */

#active-desktop-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: calc(100vh - 36px);
  pointer-events: none;
  z-index: 5;
  user-select: none;
  -webkit-user-select: none;
}

body.booting #active-desktop-container {
  display: none !important;
}

#active-desktop-container button {
  min-width: unset !important;
  min-height: unset !important;
  box-shadow: none !important;
}

.active-widget {
  pointer-events: auto;
  position: absolute;
}

/* 1. Internet Explorer Channel Bar */
#active-channel-bar {
  right: 18px;
  top: 18px;
  width: 132px;
  background: #333333;
  border: 2px outset #ffffff;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
}

.channel-bar-header {
  background: linear-gradient(90deg, #111111, #444444);
  color: #ffffff;
  padding: 3px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #555555;
  height: 22px;
  box-sizing: border-box;
}

.channel-bar-title {
  font-family: 'Times New Roman', serif;
  font-style: italic;
  font-weight: bold;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px #000;
  line-height: 1;
}

.channel-bar-controls {
  display: flex;
  gap: 3px;
  align-items: center;
}

.channel-ctrl-btn {
  min-width: unset !important;
  min-height: unset !important;
  width: 14px !important;
  height: 14px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #c0c0c0 !important;
  border: 1px outset #ffffff !important;
  font-family: 'MS Sans Serif', Arial, sans-serif !important;
  font-size: 9px !important;
  font-weight: bold !important;
  line-height: 11px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

.channel-ctrl-btn:active {
  border: 1px inset #808080 !important;
}

.channel-bar-body {
  display: flex;
  flex-direction: column;
  padding: 4px;
  gap: 3px;
  background: #2a2a2a;
}

.channel-bar-body.collapsed {
  display: none;
}

.channel-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: #c0c0c0;
  border: 2px outset #ffffff;
  cursor: pointer;
  text-decoration: none;
  color: #000000;
  font-family: 'MS Sans Serif', Arial, sans-serif;
  font-size: 10.5px;
  font-weight: bold;
  letter-spacing: 0.3px;
  box-sizing: border-box;
  width: 100%;
}

.channel-btn:hover {
  background: #d4d0c8;
}

.channel-btn:active {
  border: 2px inset #888;
  background: #b0b0b0;
}

.channel-icon {
  font-size: 13px;
  line-height: 1;
}

.channel-text {
  white-space: nowrap;
}

/* 2 & 3. Active Box Component (SysMon & Calendar) */
.active-box {
  background: #c0c0c0;
  border: 2px outset #ffffff;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
  font-family: 'MS Sans Serif', Arial, sans-serif;
}

.active-box-header {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #ffffff;
  padding: 3px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: bold;
  height: 22px;
  box-sizing: border-box;
}

.active-box-title {
  display: flex;
  align-items: center;
  gap: 5px;
}

.active-box-icon {
  width: 14px;
  height: 14px;
}

.active-box-glyph {
  font-size: 12px;
}

.active-box-close {
  min-width: unset !important;
  min-height: unset !important;
  width: 14px !important;
  height: 14px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #c0c0c0 !important;
  border: 1px outset #ffffff !important;
  font-size: 9px !important;
  font-weight: bold !important;
  line-height: 11px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

.active-box-close:active {
  border: 1px inset #808080 !important;
}

.active-box-body {
  padding: 8px;
}

/* SysMon Specifics */
#widget-sysmon {
  right: 162px;
  top: 18px;
  width: 246px;
}

.sysmon-metric {
  margin-bottom: 7px;
}

.sysmon-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: #000;
  margin-bottom: 2px;
}

.sysmon-val {
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  color: #000080;
}

.sysmon-bar-track {
  height: 14px;
  background: #001800;
  border: 2px inset #808080;
  padding: 1px;
  box-sizing: border-box;
}

.sysmon-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00aa00, #00ff00);
  transition: width 0.35s ease-out;
  box-shadow: 0 0 4px #00ff00;
}

.sysmon-bar-fill.mem-fill {
  background: linear-gradient(90deg, #0000aa, #0055ff);
  box-shadow: 0 0 4px #0055ff;
}

.sysmon-row-stats {
  display: flex;
  justify-content: space-between;
  background: #ffffff;
  border: 2px inset #808080;
  padding: 3px 6px;
  margin-bottom: 6px;
  font-size: 10px;
}

.stat-name {
  color: #444;
}

.stat-num {
  font-weight: bold;
  color: #000080;
}

.sysmon-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #333;
}

.net-led {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00ff00;
  border: 1px solid #005500;
  box-shadow: 0 0 4px #00ff00;
  margin-right: 2px;
}

.net-led.blink-off {
  background: #004400;
  box-shadow: none;
}

.sysmon-uptime {
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  color: #222;
}

/* Calendar & Weather Specifics */
#widget-calendar-weather {
  right: 162px;
  top: 198px;
  width: 246px;
}

.cal-widget {
  background: #ffffff;
  border: 2px inset #808080;
  padding: 4px;
  margin-bottom: 6px;
}

.cal-nav-row {
  text-align: center;
  font-size: 11px;
  font-weight: bold;
  color: #000080;
  padding: 2px 0 4px 0;
  border-bottom: 1px solid #d4d0c8;
}

.cal-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 9.5px;
  font-weight: bold;
  color: #555;
  padding: 3px 0;
}

.cal-dates-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  gap: 1px;
}

.cal-date-cell {
  font-size: 10.5px;
  padding: 2px 0;
  line-height: 14px;
}

.cal-date-cell.empty {
  visibility: hidden;
}

.cal-date-cell.today {
  background: #000080;
  color: #ffffff;
  font-weight: bold;
  outline: 1px dotted #ffffff;
}

.weather-strip {
  background: #ffffff;
  border: 2px inset #808080;
  padding: 4px 8px;
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.weather-icon {
  font-size: 18px;
}

.weather-info {
  display: flex;
  flex-direction: column;
}

.weather-city {
  font-size: 11px;
  font-weight: bold;
  color: #000;
}

.weather-temp {
  font-size: 10px;
  color: #000080;
}

.weather-sub {
  font-size: 9px;
  color: #555;
  margin-top: 2px;
  border-top: 1px solid #f0f0f0;
  padding-top: 2px;
}

/* 4. Tip of the Day Sticky Note */
#widget-tip-of-the-day {
  right: 162px;
  top: 410px;
  width: 246px;
}

.tip-note {
  background: #ffffcc;
  border: 2px outset #f0e68c;
  box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.35);
  padding: 8px 10px;
  position: absolute;
  font-family: 'Comic Sans MS', 'MS Sans Serif', Arial, sans-serif;
}

.tip-note-pin {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.4));
}

.tip-note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed #d0c070;
  padding-bottom: 3px;
  margin-bottom: 6px;
  font-size: 11px;
  color: #665500;
}

.tip-close-btn {
  min-width: unset !important;
  min-height: unset !important;
  width: 14px !important;
  height: 14px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
  border: none !important;
  font-size: 10px !important;
  cursor: pointer !important;
  color: #887700 !important;
  font-weight: bold !important;
  line-height: 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.tip-close-btn:hover {
  color: #000 !important;
}

.tip-note-content {
  font-size: 11px;
  color: #222200;
  line-height: 1.35;
  min-height: 48px;
}

.tip-note-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.tip-cycle-btn {
  min-width: unset !important;
  min-height: unset !important;
  background: #f7f0b8 !important;
  border: 1px outset #ffffff !important;
  font-size: 10px !important;
  font-weight: bold !important;
  padding: 2px 8px !important;
  cursor: pointer !important;
  color: #443300 !important;
}

.tip-cycle-btn:active {
  border: 1px inset #808080 !important;
}

/* ==========================================================================
   WINDOWS & WINDOW MANAGER (RESIZABLE & CENTERED)
   ========================================================================== */

.window {
  position: absolute;
  z-index: 100;
  min-height: 160px;
  min-width: 280px;
  display: none;
  flex-direction: column;
  touch-action: none;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.45);
  resize: both;
  overflow: hidden;
}

.window .title-bar {
  flex-shrink: 0;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.window .title-bar:active {
  cursor: grabbing;
}

.window.inactive .title-bar {
  background: #808080 !important;
  color: #d4d0c8;
}

.window .title-bar-controls button[aria-label="Minimize"],
.window .title-bar-controls button[aria-label="Maximize"] {
  display: none !important;
}

.window .window-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
  padding: 10px;
}

.window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  min-width: 100vw !important;
  height: calc(100vh - 36px) !important;
  max-height: calc(100vh - 36px) !important;
  min-height: calc(100vh - 36px) !important;
  resize: none !important;
  border-radius: 0 !important;
}

/* Individual Window Default Dimensions (apply only when not maximized) */
.window:not(.maximized)#aboutMe {
  width: 540px;
  max-width: 90vw;
}

.window:not(.maximized)#resume {
  width: 680px;
  max-width: 94vw;
  height: 560px;
}

#resume .window-body {
  display: flex;
  flex-direction: column;
  height: calc(100% - 28px);
  padding: 8px;
  overflow: hidden;
}

#resume-iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 2px inset #888;
  background: #fff;
}

.window:not(.maximized)#skills {
  width: 600px;
  max-width: 95vw;
}

.window:not(.maximized)#certifications {
  width: 480px;
  max-width: 92vw;
}

.window:not(.maximized)#contacts {
  width: 400px;
  max-width: 90vw;
}

.window:not(.maximized)#minesweeper {
  width: auto;
  max-width: 95vw;
}

/* Resume Window Download Button */
.resume-download-btn {
  display: inline-flex;
  align-items: center;
  background: #c0c0c0;
  border: 2px outset #fff;
  padding: 4px 12px;
  font-weight: bold;
  cursor: pointer;
  font-size: 12px;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  margin-bottom: 8px;
}

.resume-download-btn:active {
  border: 2px inset #888;
  background: #b0b0b0;
}

/* Certifications Window */
.cert-item {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dotted #888;
}

.cert-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* Skills Window (Crisp, High-Legibility Modern Typography) */
.skills-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skills-fieldset {
  margin: 0;
  padding: 10px 14px 12px 14px;
  border: 2px groove #ffffff;
  background: #c0c0c0;
}

.skills-legend {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-weight: bold;
  color: #000080;
  padding: 0 8px;
  font-size: 13px;
  letter-spacing: 0.3px;
}

.skills-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: #dfdfdf;
  border: 2px outset #ffffff;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: #111111;
  letter-spacing: 0.2px;
  cursor: default;
  transition: all 0.08s ease;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.skill-chip:hover {
  background: #000080;
  color: #ffffff;
  border: 2px inset #ffffff;
}

/* Contacts Window */
.contact-link {
  color: #0000aa;
  text-decoration: underline;
  font-weight: bold;
}

.contact-link:hover {
  color: #aa0000;
}

/* ==========================================================================
   MINESWEEPER STYLES
   ========================================================================== */

#msw98-root {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #c0c0c0;
}

#msw98-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #c0c0c0;
  border: 3px inset #888;
  padding: 4px 8px;
  margin-bottom: 8px;
  width: auto;
  gap: 8px;
}

#msw98-mine, #msw98-timer {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.5rem;
  font-weight: bold;
  width: 52px;
  text-align: center;
  background: #000;
  color: #ff0000;
  border: 2px inset #888;
  padding: 1px 0;
  letter-spacing: 2px;
}

#msw98-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #c0c0c0;
  border: 2px outset #ffffff;
  padding: 3px 8px;
  font-family: 'MS Sans Serif', Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 2px;
  user-select: none;
  -webkit-user-select: none;
}

#msw98-mode-btn:active {
  border: 2px inset #888;
}

#msw98-mode-btn.flag-active {
  background: #ffffcc;
  border: 2px inset #888;
  color: #cc0000;
  box-shadow: inset 1px 1px 2px rgba(0,0,0,0.3);
}

#msw98-smiley {
  width: 32px;
  height: 32px;
  background: #c0c0c0;
  border: 2px outset #fff;
  border-radius: 2px;
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 4px;
}

#msw98-smiley:active {
  border: 2px inset #888;
  background: #b0b0b0;
}

#msw98-diff {
  font-size: 11px;
  font-family: 'MS Sans Serif', Arial, sans-serif;
  margin-left: 2px;
  background: #fff;
  border: 2px inset #888;
}

/* Win / Lose Announcement Banner */
.msw98-banner {
  width: auto;
  min-width: 280px;
  max-width: 95%;
  margin: 0 auto 10px auto;
  padding: 8px 12px;
  border: 2px outset #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
  animation: bannerPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bannerPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.msw98-banner.win {
  background: #000080;
  color: #ffffff;
  border: 2px outset #ffff80;
}

.msw98-banner.win .msw98-banner-title {
  color: #ffff00;
}

.msw98-banner.win .msw98-banner-sub {
  color: #e0e0ff;
}

.msw98-banner.lose {
  background: #800000;
  color: #ffffff;
  border: 2px outset #ff8080;
}

.msw98-banner.lose .msw98-banner-title {
  color: #ffcccc;
}

.msw98-banner.lose .msw98-banner-sub {
  color: #ffe0e0;
}

.msw98-banner-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
}

.msw98-banner-body {
  flex: 1;
  text-align: left;
}

.msw98-banner-title {
  font-size: 13px;
  font-weight: bold;
  font-family: 'MS Sans Serif', Arial, sans-serif;
  letter-spacing: 0.5px;
}

.msw98-banner-sub {
  font-size: 11px;
  margin-top: 2px;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.msw98-banner-btn {
  background: #c0c0c0;
  border: 2px outset #ffffff;
  font-size: 11px;
  font-weight: bold;
  padding: 4px 10px;
  cursor: pointer;
  font-family: 'MS Sans Serif', Arial, sans-serif;
  flex-shrink: 0;
}

.msw98-banner-btn:active {
  border: 2px inset #888;
}

#msw98-board-wrapper {
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

#msw98-board {
  display: grid;
  grid-gap: 1px;
  background: #808080;
  border: 3px inset #888;
  padding: 2px;
  margin: 0 auto;
}

.msw98-cell {
  width: 26px;
  height: 26px;
  background: #c0c0c0;
  border: 2px outset #fff;
  text-align: center;
  font-family: 'Arial Black', Arial, sans-serif;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.msw98-cell.open {
  background: #c0c0c0;
  border: 1px solid #808080;
  cursor: default;
}

.msw98-cell.flag {
  color: #ff0000;
}

.msw98-cell.qmark {
  color: #0000ff;
}

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

/* Minesweeper Numbers */
.msw-num-1 { color: #0000ff !important; }
.msw-num-2 { color: #008000 !important; }
.msw-num-3 { color: #ff0000 !important; }
.msw-num-4 { color: #000080 !important; }
.msw-num-5 { color: #800000 !important; }
.msw-num-6 { color: #008080 !important; }
.msw-num-7 { color: #000000 !important; }
.msw-num-8 { color: #808080 !important; }

/* ==========================================================================
   TASKBAR & SYSTEM TRAY
   ========================================================================== */

.taskbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 36px;
  background: #c0c0c0;
  display: flex;
  align-items: center;
  z-index: 99999;
  border-top: 2px outset #fff;
  padding: 2px 4px;
}

.start-button {
  display: inline-flex;
  align-items: center;
  background: #c0c0c0;
  border: 2px outset #fff;
  height: 28px;
  padding: 0 10px 0 6px;
  cursor: pointer;
  font-family: 'MS Sans Serif', Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  gap: 5px;
  flex-shrink: 0;
}

.start-button:active, .start-button.pressed {
  background: #e0e0e0;
  border: 2px inset #888;
}

.start-button img {
  width: 18px;
  height: 18px;
}

.taskbar-windows {
  display: flex;
  align-items: center;
  flex: 1;
  margin: 0 8px;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.taskbar-windows::-webkit-scrollbar {
  display: none;
}

.taskbar-window-btn {
  background: #c0c0c0;
  border: 2px outset #fff;
  height: 26px;
  flex: 0 1 140px;
  min-width: 90px;
  max-width: 160px;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0 6px;
  gap: 6px;
  font-family: 'MS Sans Serif', Arial, sans-serif;
  font-size: 11px;
  text-align: left;
}

.taskbar-window-btn img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.taskbar-window-btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.taskbar-window-btn.active {
  background: #e0e0e0;
  border: 2px inset #888;
  font-weight: bold;
}

.taskbar-window-btn.minimized {
  opacity: 0.65;
  font-style: italic;
}

.taskbar-tray {
  display: flex;
  align-items: center;
  gap: 3px;
  border: 2px inset #808080;
  height: 26px;
  padding: 0 4px;
  background: #c0c0c0;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-select: none;
}

.tray-btn {
  min-width: unset !important;
  min-height: unset !important;
  width: 20px !important;
  height: 20px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 11.5px !important;
  line-height: 1 !important;
  box-shadow: none !important;
  color: #000 !important;
  box-sizing: border-box !important;
}

.tray-btn:hover {
  border: 1px outset #ffffff !important;
  background: #d4d0c8 !important;
}

.tray-btn:active, .tray-btn.tray-active {
  border: 1px inset #808080 !important;
  background: #b4b0a8 !important;
}

.taskbar-clock {
  font-family: 'MS Sans Serif', Arial, sans-serif;
  font-size: 11px;
  color: #000;
  user-select: none;
  padding: 0 4px;
  cursor: pointer;
}

.taskbar-clock:hover {
  background: #000080;
  color: #ffffff;
}

/* ==========================================================================
   DESKTOP CONTROL CENTER POPUP
   ========================================================================== */

#desktop-control-center {
  display: none;
  position: fixed;
  right: 4px;
  bottom: 34px;
  width: 290px;
  background: #c0c0c0;
  border: 2px outset #ffffff;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
  z-index: 100004;
  flex-direction: column;
  user-select: none;
  -webkit-user-select: none;
  font-family: 'MS Sans Serif', Arial, sans-serif;
  animation: ccSlideUp 0.18s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes ccSlideUp {
  0% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.desktop-cc-titlebar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #ffffff;
  padding: 3px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: bold;
}

.desktop-cc-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.desktop-cc-title img {
  width: 14px;
  height: 14px;
}

.desktop-cc-close {
  min-width: unset !important;
  min-height: unset !important;
  width: 16px !important;
  height: 14px !important;
  padding: 0 !important;
  font-size: 9px !important;
  font-weight: bold !important;
  line-height: 12px !important;
  background: #c0c0c0 !important;
  border: 1px outset #ffffff !important;
  cursor: pointer !important;
}

.desktop-cc-close:active {
  border: 1px inset #808080 !important;
}

.desktop-cc-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.desktop-cc-user-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 2px inset #808080;
  padding: 6px 8px;
}

.desktop-cc-avatar {
  width: 28px;
  height: 28px;
  background: #000080;
  color: #ffffff;
  font-weight: bold;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  flex-shrink: 0;
}

.desktop-cc-user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.desktop-cc-user-info strong {
  font-size: 11.5px;
  color: #000;
}

.desktop-cc-user-info span {
  font-size: 10px;
  color: #555;
}

.desktop-cc-power-btns {
  display: flex;
  gap: 4px;
}

.desktop-cc-mini-btn {
  min-width: unset !important;
  min-height: unset !important;
  width: 22px !important;
  height: 22px !important;
  padding: 0 !important;
  background: #c0c0c0 !important;
  border: 2px outset #ffffff !important;
  font-size: 11px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.desktop-cc-mini-btn:active {
  border: 2px inset #808080 !important;
  background: #b0b0b0 !important;
}

.desktop-cc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.desktop-cc-tile {
  min-width: unset !important;
  min-height: unset !important;
  width: 100% !important;
  height: 60px !important;
  background: #c0c0c0 !important;
  border: 2px outset #ffffff !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 4px !important;
  cursor: pointer !important;
  gap: 1px !important;
  box-sizing: border-box !important;
  text-align: center !important;
}

.desktop-cc-tile:active {
  border: 2px inset #808080 !important;
}

.desktop-cc-tile.active {
  background: #d4e0f0 !important;
  border: 2px inset #808080 !important;
}

.dcc-tile-icon {
  font-size: 16px;
  line-height: 1;
}

.dcc-tile-label {
  font-size: 10px;
  font-weight: bold;
  color: #000;
  white-space: nowrap;
}

.dcc-tile-status {
  font-size: 9px;
  color: #000080;
}

.desktop-cc-tile:not(.active) .dcc-tile-status {
  color: #777;
}

.desktop-cc-actions {
  display: flex;
  gap: 6px;
}

.desktop-cc-btn {
  flex: 1;
  min-width: unset !important;
  height: 24px !important;
  background: #c0c0c0 !important;
  border: 2px outset #ffffff !important;
  font-size: 10.5px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  font-family: 'MS Sans Serif', Arial, sans-serif !important;
  padding: 2px 4px !important;
}

.desktop-cc-btn:active {
  border: 2px inset #808080 !important;
}

.desktop-cc-footer {
  background: #e8e8e8;
  border: 1px inset #a0a0a0;
  padding: 3px 6px;
  font-size: 9px;
  color: #333;
  text-align: center;
}

/* ==========================================================================
   AUTHENTIC WINDOWS 98 START MENU
   ========================================================================== */

.start-menu {
  display: none;
  position: fixed;
  left: 2px;
  bottom: 36px;
  background: #c0c0c0;
  border: 2px outset #fff;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  z-index: 100000;
  padding: 2px;
}

.start-menu-inner {
  display: flex;
  min-height: 240px;
}

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

.start-menu-banner span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'Arial Black', Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 2px;
  font-weight: 900;
  white-space: nowrap;
}

.start-menu-banner span b {
  font-weight: 300;
  opacity: 0.85;
}

.start-menu-list {
  margin: 0;
  padding: 4px 0;
  list-style: none;
  width: 190px;
  display: flex;
  flex-direction: column;
}

.start-menu-item {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  color: #000;
  gap: 8px;
}

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

.start-menu-item img {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.start-menu-divider {
  border-top: 1px solid #808080;
  border-bottom: 1px solid #ffffff;
  margin: 4px 6px;
  height: 0;
}

/* ==========================================================================
   DESKTOP RIGHT-CLICK CONTEXT MENU
   ========================================================================== */

#desktop-context-menu {
  display: none;
  position: fixed;
  background: #c0c0c0;
  border: 2px outset #fff;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 100005;
  padding: 2px;
  min-width: 150px;
}

.context-menu-item {
  padding: 4px 14px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.context-menu-divider {
  border-top: 1px solid #808080;
  border-bottom: 1px solid #ffffff;
  margin: 3px 2px;
}

/* ==========================================================================
   CRT MONITOR SCANLINE FILTER OVERLAY
   ========================================================================== */

.crt-filter {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 99998;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
              linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  background-size: 100% 3px, 6px 100%;
}

/* ==========================================================================
   MOBILE OS RETRO STYLES (HIDDEN ON DESKTOP, ACTIVE <= 768px)
   ========================================================================== */

#mobile-status-bar,
#mobile-home-widget,
#mobile-app-drawer,
#mobile-nav-bar,
#mobile-notification-center,
#mobile-tabs-switcher {
  display: none;
}

/* Booting state - completely hides all mobile chrome while OS boots/logs in */
body.booting #mobile-status-bar,
body.booting #mobile-home-widget,
body.booting #mobile-app-drawer,
body.booting #mobile-nav-bar,
body.booting #mobile-notification-center,
body.booting #mobile-tabs-switcher {
  display: none !important;
}

@media (max-width: 768px) {
  /* Global Mobile Reset */
  body.desktop {
    overflow: hidden;
    touch-action: pan-y;
  }

  /* Hide Desktop-Only Chrome */
  .taskbar,
  .start-menu,
  #active-desktop-container,
  #desktop-control-center {
    display: none !important;
  }

  /* 1. Mobile Status Bar */
  #mobile-status-bar {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 26px;
    background: #000080;
    color: #ffffff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    font-weight: bold;
    padding: 0 10px;
    z-index: 100000;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px outset #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
  }

  .mobile-status-center {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
  }

  .mobile-notif-arrow {
    font-size: 11px;
    animation: bounceDown 1.8s infinite;
    display: inline-block;
  }

  @keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(2px); }
  }

  .mobile-status-left, .mobile-status-right {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .mobile-carrier {
    font-family: 'MS Sans Serif', Arial, sans-serif;
    font-size: 10px;
    letter-spacing: 0.5px;
  }

  .mobile-sound-icon {
    cursor: pointer;
    font-size: 12px;
  }

  /* 2. Mobile Homescreen Widget */
  #mobile-home-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 40px auto 14px auto;
    padding: 10px 16px;
    background: rgba(192, 192, 192, 0.9);
    border: 2px outset #ffffff;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    text-align: center;
    border-radius: 4px;
    max-width: 90vw;
  }

  .mobile-widget-date {
    font-size: 11px;
    font-weight: bold;
    color: #000080;
    margin-bottom: 2px;
    text-transform: uppercase;
  }

  .mobile-widget-user {
    font-size: 17px;
    font-weight: bold;
    color: #000;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  }

  .mobile-widget-sub {
    font-size: 11px;
    color: #333;
    margin-top: 2px;
  }

  /* 3. Mobile Homescreen App Grid */
  .desktop-icons {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
    margin: 0 auto !important;
    max-width: 92vw !important;
    padding: 4px !important;
    justify-items: center;
    max-height: calc(100vh - 180px) !important;
  }

  .icon {
    width: 82px !important;
    padding: 8px 4px !important;
    border-radius: 4px;
  }

  .icon img {
    width: 42px !important;
    height: 42px !important;
  }

  .icon span {
    font-size: 11.5px !important;
    margin-top: 5px !important;
  }

  /* 4. Mobile Full-Screen App Windows */
  .window {
    position: fixed !important;
    top: 26px !important;
    bottom: 44px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    resize: none !important;
    border: none !important;
    border-top: 2px outset #ffffff !important;
    border-bottom: 2px outset #ffffff !important;
    box-shadow: none !important;
    z-index: 99995 !important;
    border-radius: 0 !important;
    display: none;
    flex-direction: column;
  }

  .window .title-bar {
    height: 32px !important;
    flex-shrink: 0 !important;
    padding: 4px 8px !important;
    font-size: 13px !important;
  }

  .window .title-bar-controls button {
    width: 22px !important;
    height: 20px !important;
  }

  .window .window-body {
    flex: 1 1 auto !important;
    height: calc(100% - 32px) !important;
    max-height: calc(100% - 32px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 10px 10px 50px 10px !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y !important;
  }

  /* Resume window on mobile */
  #resume .window-body {
    height: calc(100% - 32px) !important;
    padding: 6px 6px 50px 6px !important;
  }

  #resume-iframe {
    min-height: calc(100% - 44px) !important;
  }

  /* Skills chips mobile adjustments */
  .skills-container {
    padding-bottom: 30px;
  }

  .skills-fieldset {
    padding: 8px 10px 10px 10px;
  }

  .skill-chip {
    font-size: 12px;
    padding: 5px 9px;
  }

  /* Minesweeper Mobile Responsiveness */
  #msw98-root {
    width: 100%;
    padding: 4px 2px 20px 2px;
  }

  #msw98-panel {
    width: 100%;
    max-width: 380px;
    padding: 6px 8px;
    gap: 6px;
    justify-content: space-between;
    box-sizing: border-box;
  }

  #msw98-mine, #msw98-timer {
    font-size: 1.25rem;
    width: 44px;
    padding: 1px 0;
  }

  #msw98-mode-btn {
    font-size: 11.5px;
    padding: 4px 8px;
  }

  #msw98-smiley {
    width: 34px;
    height: 34px;
    font-size: 1.3rem;
    margin: 0 2px;
  }

  #msw98-diff {
    font-size: 10px;
    max-width: 95px;
    padding: 1px;
  }

  #msw98-banner {
    max-width: 380px;
    box-sizing: border-box;
  }

  #msw98-board-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    overflow-x: auto;
    padding: 4px 0 24px 0;
    -webkit-overflow-scrolling: touch;
  }

  #msw98-board {
    margin: 4px auto;
    padding: 3px;
    touch-action: manipulation;
  }

  .msw98-cell {
    border-width: 2px;
    font-weight: 900;
  }

  /* 5. Mobile App Drawer (Swipe Up / Swipe Down) */
  #mobile-app-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; right: 0;
    bottom: 44px;
    height: 76vh;
    max-height: 520px;
    background: #c0c0c0;
    border: 2px outset #ffffff;
    border-radius: 14px 14px 0 0;
    z-index: 99998;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.6);
    transform: translateY(calc(100% - 36px));
    transition: transform 0.28s cubic-bezier(0.15, 0.9, 0.25, 1), opacity 0.2s;
  }

  /* Tucked completely offscreen when an app window is open so it NEVER occludes window content */
  body.has-open-window #mobile-app-drawer:not(.open) {
    transform: translateY(100%) !important;
    pointer-events: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }

  #mobile-app-drawer.open {
    transform: translateY(0%) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  #drawer-handle {
    height: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #d4d0c8;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #888;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-select: none;
  }

  .drawer-pill {
    width: 38px;
    height: 4px;
    background: #555;
    border-radius: 2px;
    margin-bottom: 2px;
  }

  .drawer-handle-text {
    font-size: 10px;
    font-weight: bold;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'MS Sans Serif', Arial, sans-serif;
  }

  .drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
  }

  .drawer-search-bar input {
    width: 100%;
    padding: 6px 10px;
    font-size: 13px;
    border: 2px inset #888;
    background: #ffffff;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  }

  .drawer-apps-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .drawer-app-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #e4e4e4;
    border: 2px outset #ffffff;
    cursor: pointer;
    border-radius: 3px;
  }

  .drawer-app-item:active {
    background: #b0b0b0;
    border: 2px inset #888;
  }

  .drawer-app-item img {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }

  .drawer-app-info {
    display: flex;
    flex-direction: column;
  }

  .drawer-app-title {
    font-weight: bold;
    font-size: 13px;
    color: #000;
  }

  .drawer-app-desc {
    font-size: 11px;
    color: #444;
  }

  .drawer-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 2px groove #ffffff;
  }

  .drawer-action-btn {
    padding: 6px 2px;
    font-size: 11px;
    font-weight: bold;
    background: #c0c0c0;
    border: 2px outset #fff;
    cursor: pointer;
    font-family: 'MS Sans Serif', Arial, sans-serif;
  }

  .drawer-action-btn:active {
    border: 2px inset #888;
    background: #b0b0b0;
  }

  /* 6. Mobile Bottom Navigation Bar */
  #mobile-nav-bar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 44px;
    background: #c0c0c0;
    border-top: 2px outset #ffffff;
    z-index: 100000;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.3);
  }

  .mobile-nav-btn {
    flex: 1;
    height: 100%;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #000;
    cursor: pointer;
    gap: 1px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
  }

  .mobile-nav-btn:active {
    background: #b0b0b0;
  }

  .nav-icon {
    font-size: 14px;
    font-weight: bold;
  }

  .nav-label {
    font-size: 9.5px;
    font-family: 'MS Sans Serif', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  /* 7. Mobile Notification Shade & Control Center (Droppable from top) */
  #mobile-notification-center {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    background: #c0c0c0;
    border: 2px outset #ffffff;
    border-radius: 0 0 12px 12px;
    z-index: 100002;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
    transform: translateY(-100%);
    transition: transform 0.28s cubic-bezier(0.15, 0.9, 0.25, 1);
    overflow: hidden;
  }

  #mobile-notification-center.open {
    transform: translateY(0%);
  }

  .notif-center-header {
    height: 32px;
    background: #000080;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    font-family: 'MS Sans Serif', Arial, sans-serif;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
  }

  .notif-close-btn {
    background: #c0c0c0;
    border: 2px outset #ffffff;
    font-size: 10px;
    padding: 1px 6px;
    cursor: pointer;
    font-weight: bold;
  }

  .notif-close-btn:active {
    border: 2px inset #888;
  }

  .control-center-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 10px;
    background: #d4d0c8;
    border-bottom: 2px groove #ffffff;
    flex-shrink: 0;
  }

  .control-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #c0c0c0;
    border: 2px outset #ffffff;
    padding: 8px 4px;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
  }

  .control-card:active {
    border: 2px inset #888;
    background: #a0a0a0;
  }

  .control-card.active {
    background: #000080;
    color: #ffffff;
    border: 2px inset #000050;
  }

  .control-card.active .ctrl-label,
  .control-card.active .ctrl-sub {
    color: #ffffff;
  }

  .ctrl-icon {
    font-size: 16px;
    margin-bottom: 2px;
  }

  .ctrl-label {
    font-size: 10px;
    font-weight: bold;
    color: #000;
  }

  .ctrl-sub {
    font-size: 8.5px;
    color: #555;
  }

  .notifications-section {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    max-height: 48vh;
    -webkit-overflow-scrolling: touch;
  }

  .notif-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: bold;
    color: #222;
    text-transform: uppercase;
  }

  .notif-clear-btn {
    font-size: 10px;
    background: #c0c0c0;
    border: 2px outset #ffffff;
    padding: 1px 6px;
    cursor: pointer;
  }

  .notif-clear-btn:active {
    border: 2px inset #888;
  }

  .notif-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #ffffff;
    border: 2px inset #888;
    padding: 8px 10px;
    border-radius: 3px;
    cursor: pointer;
  }

  .notif-item:active {
    background: #eef2ff;
  }

  .notif-app-icon {
    width: 26px;
    height: 26px;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 2px;
  }

  .notif-body {
    flex: 1;
    min-width: 0;
  }

  .notif-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2px;
  }

  .notif-top strong {
    font-size: 11.5px;
    color: #000080;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .notif-top small {
    font-size: 9.5px;
    color: #666;
    margin-left: 6px;
  }

  .notif-body p {
    font-size: 11px;
    color: #333;
    line-height: 1.35;
    margin: 0;
  }

  .notif-pull-handle {
    height: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #d4d0c8;
    border-top: 1px solid #888;
    cursor: pointer;
    font-size: 10px;
    color: #444;
    font-weight: bold;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-select: none;
  }

  /* 8. Mobile Recent Tabs Switcher */
  #mobile-tabs-switcher {
    display: none;
    position: fixed;
    top: 26px;
    left: 0; right: 0;
    bottom: 44px;
    background: rgba(0, 128, 128, 0.96); /* Classic Win98 Teal backdrop */
    z-index: 100001;
    flex-direction: column;
    padding: 10px;
    overflow: hidden;
    backdrop-filter: blur(4px);
  }

  #mobile-tabs-switcher.open {
    display: flex;
  }

  .tabs-switcher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #c0c0c0;
    border: 2px outset #ffffff;
    padding: 6px 10px;
    margin-bottom: 10px;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.4);
    flex-shrink: 0;
  }

  .tabs-switcher-title {
    font-weight: bold;
    font-size: 13px;
    color: #000080;
    font-family: 'MS Sans Serif', Arial, sans-serif;
  }

  .tabs-switcher-actions {
    display: flex;
    gap: 6px;
  }

  .tabs-close-all-btn,
  .tabs-exit-btn {
    background: #c0c0c0;
    border: 2px outset #ffffff;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    cursor: pointer;
    font-family: 'MS Sans Serif', Arial, sans-serif;
  }

  .tabs-close-all-btn:active,
  .tabs-exit-btn:active {
    border: 2px inset #888;
  }

  .tabs-switcher-body {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 4px;
    align-content: start;
    -webkit-overflow-scrolling: touch;
  }

  .tab-card {
    background: #c0c0c0;
    border: 2px outset #ffffff;
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    height: 135px;
    transition: transform 0.15s;
  }

  .tab-card:active {
    transform: scale(0.97);
  }

  .tab-card-header {
    background: #000080;
    color: #fff;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: bold;
    flex-shrink: 0;
  }

  .tab-card-header.inactive {
    background: #808080;
  }

  .tab-card-title {
    display: flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .tab-card-title img {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }

  .tab-card-close {
    background: #c0c0c0;
    border: 1px outset #fff;
    color: #000;
    font-size: 10px;
    font-weight: bold;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    padding: 0;
  }

  .tab-card-close:active {
    border: 1px inset #888;
  }

  .tab-card-preview {
    flex: 1;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-top: 1px solid #888;
    gap: 6px;
    text-align: center;
  }

  .tab-card-preview img {
    width: 36px;
    height: 36px;
  }

  .tab-card-preview span {
    font-size: 11px;
    color: #333;
    font-weight: 600;
  }

  .tabs-empty-state {
    grid-column: span 2;
    background: #c0c0c0;
    border: 2px outset #ffffff;
    padding: 24px 16px;
    text-align: center;
    margin-top: 30px;
  }

  .tabs-empty-state h4 {
    margin: 0 0 6px 0;
    font-size: 14px;
    color: #000080;
  }

  .tabs-empty-state p {
    margin: 0;
    font-size: 11.5px;
    color: #444;
  }
}

