/* ==========================================================================
   WissOS 2.0 – Central Design System
   Style Framework: High-End Neobrutalismus × Modern Retro
   Design Concept & Implementation: Wolf Sebastian (2026)
   License: CC-BY-SA 4.0
   ========================================================================== */

/* ===== 1. Fonts & Variable Tokens ===== */
@import url('../../css/fonts.css');

/* === Outfit (Sans-Serif Display Font) === */

/* Outfit 400 */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../../css/fonts/font-1-12.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../../css/fonts/font-1-13.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Outfit 600 */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../../css/fonts/font-1-26.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../../css/fonts/font-1-27.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Outfit 800 */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../../css/fonts/font-1-34.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../../css/fonts/font-1-35.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Outfit 900 */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(../../css/fonts/font-1-34.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(../../css/fonts/font-1-35.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Common System Layout Constants */
  --taskbar-height: 48px;
  --icon-size: 54px;
  --icon-grid-gap: 24px;
  --icon-col-width: 120px;
  --icon-row-height: 110px;
  --desktop-padding: 24px;
  --border-width: 4px;
  --shadow-offset: 8px;
  
  /* Fonts */
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Z-Indices */
  --z-desktop: 1;
  --z-icons: 10;
  --z-window-base: 100;
  --z-start-menu: 900;
  --z-taskbar: 1000;
  --z-overlay: 2000;
}

/* ==========================================================================
   2. Theme Configurations (Neobrutalist Saturated Palettes)
   ========================================================================== */

/* --- THEME: NEO CLASSIC (Default) --- */
.theme-retro-classic, :root {
  --color-primary: #7DFFC2;        /* Saturated Neon Mint */
  --color-secondary: #FF6B9D;      /* Hot Punch Pink */
  --color-accent: #FFE66D;         /* Cyber Canary Yellow */
  --color-bg: #EAE6FF;             /* Soft Lavender-Gray */
  --color-text: #000000;           /* Pure Obsidian Black */
  --color-shadow: #000000;
  --color-window-bg: #FFFFFF;      /* Clean White */
  --color-button-face: #FFE66D;    /* Vibrant Yellow Buttons */
  --color-button-hover: #FFF1AA;
  --color-titlebar-active: #7DFFC2;
  --color-titlebar-inactive: #B8B5C7;
  --color-selection: rgba(125, 255, 194, 0.4);
}

/* --- THEME: NEO DARK (Chunky Dark Mode) --- */
.theme-neo-dark {
  --color-primary: #3B82F6;        /* Electric Blue */
  --color-secondary: #EC4899;      /* Saturated Pink */
  --color-accent: #10B981;         /* Bright Emerald */
  --color-bg: #111827;             /* Dark Gray-Blue Slate */
  --color-text: #FFFFFF;           /* High Contrast White */
  --color-shadow: #000000;         /* Still Solid Black Shadow */
  --color-window-bg: #1F2937;      /* Dark Window Interior */
  --color-button-face: #374151;    /* Slate Buttons */
  --color-button-hover: #4B5563;
  --color-titlebar-active: #3B82F6;
  --color-titlebar-inactive: #4B5563;
  --color-selection: rgba(59, 130, 246, 0.4);
}

/* --- THEME: CYBERPUNK NEON (Maximum Saturation) --- */
.theme-vaporwave {
  --color-primary: #FF007F;        /* Deep Neon Pink */
  --color-secondary: #00F0FF;      /* Laser Cyan */
  --color-accent: #FFE600;         /* Neon Yellow */
  --color-bg: #03001C;             /* Deep Cyber Void */
  --color-text: #00F0FF;           /* Cyan Text */
  --color-shadow: #FF007F;         /* Pink Shadows! */
  --color-window-bg: #0B001A;      /* Indigo-Black Window Interior */
  --color-button-face: #30005C;    /* Cyber Purple Buttons */
  --color-button-hover: #5B0E9C;
  --color-titlebar-active: #FF007F;
  --color-titlebar-inactive: #5B0E9C;
  --color-selection: rgba(0, 240, 255, 0.4);
}

/* --- THEME: SCHREIBSTUBE (Minimalist Retro-Paper) --- */
.theme-schreibstube {
  --color-primary: #C3B091;        /* Antique Sepia */
  --color-secondary: #4A3E3D;      /* Ink Black-Brown */
  --color-accent: #E1D7C6;         /* Old Parchment */
  --color-bg: #F4F1EA;             /* Warm Paper Tone */
  --color-text: #2B2118;           /* Ink Black */
  --color-shadow: #2B2118;
  --color-window-bg: #FCFAF6;
  --color-button-face: #EAE3D2;
  --color-button-hover: #DFD5C0;
  --color-titlebar-active: #C3B091;
  --color-titlebar-inactive: #DFD5C0;
  --color-selection: rgba(195, 176, 145, 0.4);
}

/* ==========================================================================
   3. Reset & Base System Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-bg);
  user-select: none;
  -webkit-user-select: none;
}

/* Utility to ensure text inside inputs/buttons uses the right fonts */
input, button, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ==========================================================================
   4. Neobrutalist OS Components
   ========================================================================== */

/* --- DESKTOP WALLPAPER --- */
#desktop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--taskbar-height);
  background: var(--color-bg);
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.05) 2px, transparent 2px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.05) 2px, transparent 2px);
  background-size: 32px 32px;
  z-index: var(--z-desktop);
  overflow: hidden;
  transition: background-color 0.3s ease;
}

/* --- DESKTOP ICON GRID --- */
#icon-container {
  position: absolute;
  top: var(--desktop-padding);
  left: var(--desktop-padding);
  right: var(--desktop-padding);
  bottom: var(--desktop-padding);
  z-index: var(--z-icons);
}

.desktop-icon {
  position: absolute;
  width: var(--icon-col-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 6px;
  border: var(--border-width) solid transparent;
  border-radius: 0;
  cursor: pointer;
  background: transparent;
  transition: transform 0.1s, border-color 0.1s, background-color 0.1s;
}

.desktop-icon:hover {
  border-color: var(--color-text);
  background-color: var(--color-primary);
  box-shadow: 4px 4px 0px var(--color-shadow);
  transform: translate(-3px, -3px);
}

.desktop-icon.selected {
  border-color: var(--color-text);
  background-color: var(--color-secondary);
  color: #FFFFFF;
  box-shadow: 4px 4px 0px var(--color-shadow);
  transform: translate(-3px, -3px);
}

.desktop-icon__img {
  width: var(--icon-size);
  height: var(--icon-size);
  image-rendering: auto;
  pointer-events: none;
  filter: drop-shadow(2px 2px 0px #000);
  transition: transform 0.2s;
}

/* Inline SVG icon wrapper – injected via WissOS.ICONS[...] */
.desktop-icon__img-wrap {
  width: var(--icon-size);
  height: var(--icon-size);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  filter: drop-shadow(2px 2px 0px rgba(0,0,0,0.6));
  transition: transform 0.2s, filter 0.2s;
}

.desktop-icon__img-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.desktop-icon:hover .desktop-icon__img-wrap {
  transform: scale(1.1);
  filter: drop-shadow(3px 3px 0px rgba(0,0,0,0.8));
}

.desktop-icon:hover .desktop-icon__img {
  transform: scale(1.1);
}

.desktop-icon__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  /* No automatic hyphens – German compound words must not be split */
  hyphens: none;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
  pointer-events: none;
  padding: 2px 4px;
}

/* --- TASKBAR (Footer) --- */
#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--taskbar-height);
  background: var(--color-bg);
  border-top: var(--border-width) solid var(--color-text);
  display: flex;
  align-items: center;
  padding: 4px var(--desktop-padding);
  gap: 12px;
  z-index: var(--z-taskbar);
}

.taskbar-divider {
  width: var(--border-width);
  height: 28px;
  background: var(--color-text);
  margin: 0 4px;
}

/* Chunky Neobrutalist Button styling – shared base class */
.os-button {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  background: var(--color-button-face);
  color: var(--color-text);
  border: var(--border-width) solid var(--color-text);
  box-shadow: 3px 3px 0px var(--color-shadow);
  padding: 4px 12px;
  cursor: pointer;
  outline: none;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: transform 0.1s, box-shadow 0.1s, background-color 0.1s;
}

.os-button:hover {
  background: var(--color-button-hover);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px var(--color-shadow);
}

.os-button:active,
.os-button.active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px var(--color-shadow);
  background-color: var(--color-primary);
  color: #000;
}

.os-button.tray-icon {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  min-height: unset;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.1s;
}

.os-button.tray-icon:hover {
  background: transparent;
  box-shadow: none;
  transform: scale(1.2) rotate(-5deg);
}

.os-button.start-btn-active {
  font-size: 18px;
  padding: 4px 22px;
  background-color: var(--color-accent);
  box-shadow: 4px 4px 0px var(--color-shadow);
  transform: translate(-2px, -2px);
}

.os-button.start-btn-active:hover {
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0px var(--color-shadow);
}

.bevel-btn {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  background: var(--color-button-face);
  color: var(--color-text);
  border: var(--border-width) solid var(--color-text);
  box-shadow: 4px 4px 0px var(--color-shadow);
  padding: 4px 16px;
  cursor: pointer;
  outline: none;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  transform: translate(-2px, -2px);
  transition: transform 0.1s, box-shadow 0.1s, background-color 0.1s;
}

.bevel-btn:hover {
  background: var(--color-button-hover);
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0px var(--color-shadow);
}

.bevel-btn:active,
.bevel-btn.active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px var(--color-shadow);
  background-color: var(--color-primary);
  color: #000;
}

#start-button {
  font-size: 18px;
  padding: 4px 22px;
  background-color: var(--color-accent);
}

#taskbar-programs {
  flex: 1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  min-width: 0;
}

#taskbar-programs .bevel-btn {
  max-width: 160px;
  justify-content: flex-start;
  text-overflow: ellipsis;
  overflow: hidden;
}

#taskbar-tray {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 16px;
  background: var(--color-window-bg);
  border: var(--border-width) solid var(--color-text);
  box-shadow: 3px 3px 0px var(--color-shadow);
  height: 36px;
  margin-left: auto;
}

#taskbar-clock {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

#taskbar-clock:hover {
  color: var(--color-secondary);
}

#volume-icon, #cookie-icon {
  cursor: pointer;
  font-size: 18px;
  transition: transform 0.1s;
}

#volume-icon:hover, #cookie-icon:hover {
  transform: scale(1.2) rotate(-5deg);
}

/* --- START MENU --- */
#start-menu {
  position: fixed;
  bottom: var(--taskbar-height);
  left: var(--desktop-padding);
  width: 320px;
  background: var(--color-window-bg);
  border: var(--border-width) solid var(--color-text);
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--color-shadow);
  z-index: var(--z-start-menu);
  display: none;
  flex-direction: column;
  animation: startMenuOpen 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

@keyframes startMenuOpen {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.start-menu__header {
  background: var(--color-primary);
  color: #000;
  padding: 16px;
  border-bottom: var(--border-width) solid var(--color-text);
  display: flex;
  align-items: center;
  gap: 12px;
}

.start-menu__header h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
}

.start-menu__body {
  display: flex;
  flex-direction: column;
  max-height: 380px;
  overflow-y: auto;
}

.start-menu__folder {
  border-bottom: 2px solid var(--color-text);
}

.start-menu__folder-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  background: var(--color-accent);
  color: #000;
  border-bottom: 2px solid var(--color-text);
}

.start-menu__folder-header:hover {
  background: var(--color-primary);
}

.start-menu__folder-header .folder-arrow {
  margin-left: auto;
  transition: transform 0.15s;
  font-size: 12px;
  font-weight: bold;
}

.start-menu__folder.open .folder-arrow {
  transform: rotate(90deg);
}

.start-menu__folder-items {
  display: none;
  flex-direction: column;
  background: var(--color-bg);
}

.start-menu__folder.open .start-menu__folder-items {
  display: flex;
}

.start-menu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 32px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  transition: background-color 0.1s, color 0.1s;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.start-menu__item:hover {
  background: var(--color-secondary);
  color: #FFFFFF !important;
}

.start-menu__system {
  border-top: var(--border-width) solid var(--color-text);
  padding: 6px 0;
  background: var(--color-accent);
}

.start-menu__system .start-menu__item {
  padding-left: 20px;
  border-bottom: none;
  color: #000;
}

.start-menu__system .start-menu__item:hover {
  background-color: var(--color-primary);
  color: #000 !important;
}

.menu-icon {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   5. Window System Styles
   ========================================================================== */
.os-window {
  position: absolute;
  background: var(--color-window-bg);
  border: var(--border-width) solid var(--color-text);
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--color-shadow);
  min-width: 320px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  resize: both;
  overflow: hidden;
  transition: opacity 0.15s, transform 0.15s;
}

.os-window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: calc(100vh - var(--taskbar-height)) !important;
  resize: none;
  box-shadow: none;
  border-left: none;
  border-right: none;
  border-top: none;
}

.os-window--opening {
  opacity: 0;
  transform: scale(0.95);
}

.os-window--closing {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

.os-window__titlebar {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--color-titlebar-active);
  color: #000;
  border-bottom: var(--border-width) solid var(--color-text);
  cursor: grab;
  gap: 10px;
  min-height: 38px;
  user-select: none;
}

.os-window__titlebar.inactive {
  background: var(--color-titlebar-inactive);
  color: rgba(0, 0, 0, 0.6);
}

.os-window__titlebar-icon {
  width: 20px;
  height: 20px;
}

/* Inline SVG wrapper for titlebar icons */
.os-window__titlebar-icon-wrap {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.os-window__titlebar-icon-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.os-window__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.os-window__btn-group {
  display: flex;
  gap: 6px;
}

.os-window__btn {
  width: 24px;
  height: 24px;
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-window-bg);
  border: 2px solid var(--color-text);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: background-color 0.1s, transform 0.05s;
}

.os-window__btn:hover {
  background: var(--color-secondary);
  color: #FFFFFF;
}

.os-window__btn:active {
  transform: translate(1px, 1px);
}

.os-window__content {
  flex: 1;
  padding: 0; /* Let application control margins internally */
  overflow: hidden;
  background: var(--color-window-bg);
  position: relative;
}

.os-window__iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  display: block;
}

/* ==========================================================================
   6. Custom System Applications (Terminal & Dialogs)
   ========================================================================== */

/* --- TERMINAL WINDOW --- */
.terminal-content {
  background: #000000;
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border: none;
}

.terminal-output {
  flex: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.terminal-prompt {
  font-weight: bold;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  outline: none;
  caret-color: var(--color-primary);
}

/* Terminal blink cursor animation */
.terminal-input:focus {
  animation: terminalBlink 1s step-end infinite;
}

@keyframes terminalBlink {
  50% { caret-color: transparent; }
}

/* --- TOOLTIP --- */
.os-tooltip {
  position: fixed;
  background: var(--color-accent);
  color: #000;
  border: 2px solid var(--color-text);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  pointer-events: none;
  z-index: var(--z-overlay);
  max-width: 280px;
  white-space: normal;
  word-wrap: break-word;
  display: none;
  box-shadow: 4px 4px 0px var(--color-shadow);
}

/* --- BOOT SCREEN --- */
#boot-screen {
  position: fixed;
  inset: 0;
  background-color: #000000;
  color: #00FF9F;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  z-index: 99999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  opacity: 1;
  visibility: visible;
}

#boot-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

#boot-screen[hidden] {
  display: none !important;
}

.boot-output {
  flex: 1;
  overflow-y: auto;
  line-height: 1.7;
}

.boot-progress-wrap {
  width: 100%;
  max-width: 500px;
  margin: 20px auto 0;
}

.boot-progress-label {
  margin-bottom: 8px;
  text-align: center;
  font-weight: bold;
}

.boot-progress-track {
  width: 100%;
  height: 24px;
  background: #111;
  border: 2px solid #00FF9F;
  position: relative;
  overflow: hidden;
}

.boot-progress-fill {
  height: 100%;
  background: #00FF9F;
  width: 0%;
  transition: width 0.15s ease;
}

.boot-skip {
  position: absolute;
  bottom: 30px;
  right: 30px;
  background: transparent;
  color: #00FF9F;
  border: 2px solid #00FF9F;
  padding: 6px 16px;
  cursor: pointer;
}

.boot-skip:hover {
  background: #00FF9F;
  color: #000;
}

/* --- SYSTEM DIALOGS (E.g. Loading bar, alerts) --- */
.loading-bar {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  background: var(--color-window-bg);
  border: var(--border-width) solid var(--color-text);
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--color-shadow);
  padding: 24px;
  z-index: var(--z-overlay);
  text-align: center;
  display: none;
}

.loading-bar__track {
  width: 100%;
  height: 26px;
  background: var(--color-bg);
  border: var(--border-width) solid var(--color-text);
  margin-top: 12px;
  position: relative;
  overflow: hidden;
}

.loading-bar__fill {
  height: 100%;
  background: repeating-linear-gradient(
    45deg,
    var(--color-primary) 0px,
    var(--color-primary) 10px,
    var(--color-accent) 10px,
    var(--color-accent) 20px
  );
  width: 0%;
}

.loading-bar__label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
}

/* ==========================================================================
   7. Scrollbars & Accessibility
   ========================================================================== */

/* Retro Neobrutalist Thick Scrollbars */
::-webkit-scrollbar {
  width: 18px;
  height: 18px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
  border-left: var(--border-width) solid var(--color-text);
}
::-webkit-scrollbar-thumb {
  background: var(--color-button-face);
  border: var(--border-width) solid var(--color-text);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-button-hover);
}
::-webkit-scrollbar-button {
  display: block;
  background: var(--color-accent);
  border: var(--border-width) solid var(--color-text);
  width: 18px;
  height: 18px;
}

/* Focus styles for enhanced accessibility */
:focus-visible {
  outline: var(--border-width) dashed var(--color-secondary);
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ==========================================================================
   8. Responsive: Neobrutalist Mobile Mode
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --icon-size: 60px;
    --icon-col-width: 90px;
    --icon-row-height: 100px;
    --taskbar-height: 56px;
    --desktop-padding: 16px;
  }

  #icon-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, var(--icon-col-width));
    gap: 12px;
    justify-content: center;
    position: static;
    padding: var(--desktop-padding);
  }

  .desktop-icon {
    position: static !important;
    width: auto;
  }

  #start-menu {
    width: 100%;
    bottom: var(--taskbar-height);
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--taskbar-height));
  }

  .start-menu__body {
    max-height: calc(100vh - var(--taskbar-height) - 100px);
  }

  #start-button {
    font-size: 16px;
    padding: 4px 14px;
  }

  .bevel-btn {
    min-height: 40px;
  }

  .os-window {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: var(--taskbar-height) !important;
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    box-shadow: none;
    border: none;
    border-bottom: var(--border-width) solid var(--color-text);
  }

  .os-window__titlebar {
    cursor: default;
  }

  .os-tooltip {
    display: none !important;
  }
}
