:root {
  --bg-primary: #090b10;
  --bg-surface: rgba(18, 22, 32, 0.78);
  --bg-surface-elevated: rgba(26, 32, 47, 0.88);
  --bg-card: rgba(22, 28, 42, 0.65);
  --bg-hover: rgba(255, 255, 255, 0.07);
  --bg-active: rgba(255, 255, 255, 0.12);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(0, 229, 255, 0.35);
  --text-primary: #f0f4fc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-cyan: #00e5ff;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --taskbar-height: 48px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-window: 0 20px 45px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--border-subtle);
  --shadow-window-focused: 0 24px 60px -10px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(0, 229, 255, 0.25);
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", Consolas, "Fira Code", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body, html {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-primary);
  font-family: var(--font-main);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* Desktop Background - High-Res Dark Nature Misty Forest Photography */
#desktop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--taskbar-height);
  background: 
    linear-gradient(rgba(5, 8, 14, 0.4), rgba(5, 8, 14, 0.65)),
    url('https://images.pexels.com/photos/167699/pexels-photo-167699.jpeg?auto=compress&cs=tinysrgb&w=1920') center center / cover no-repeat;
  overflow: hidden;
  transition: background 0.35s ease;
}

/* Subtle desktop grid pattern */
#desktop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Desktop Icons Grid */
.desktop-shortcuts {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 16px;
  height: calc(100% - 40px);
  z-index: 5;
}

.desktop-icon {
  width: 82px;
  height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.desktop-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.desktop-icon:active {
  background: rgba(255, 255, 255, 0.14);
}

.desktop-icon svg {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.desktop-icon-label {
  margin-top: 6px;
  font-size: 11.5px;
  font-weight: 500;
  text-align: center;
  color: #e2e8f0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Window Manager */
.os-window {
  position: absolute;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-window);
  overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.15s ease, opacity 0.15s ease;
  min-width: 320px;
  min-height: 220px;
  border: 1px solid var(--border-subtle);
}

.os-window.focused {
  box-shadow: var(--shadow-window-focused);
  border-color: rgba(0, 229, 255, 0.28);
}

.os-window.minimized {
  opacity: 0;
  transform: scale(0.85) translateY(40px);
  pointer-events: none;
}

.os-window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: calc(100vh - var(--taskbar-height)) !important;
  border-radius: 0 !important;
  border: none !important;
}

/* Window Titlebar */
.window-titlebar {
  height: 38px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: rgba(14, 18, 28, 0.7);
  border-bottom: 1px solid var(--border-subtle);
  cursor: grab;
}

.window-titlebar:active {
  cursor: grabbing;
}

.window-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.window-title-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.window-title-text {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window-badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.window-badge.linux {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

.window-badge.win32 {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.win-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s ease;
}

.win-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.win-btn.close:hover {
  background: #e11d48;
  color: #fff;
}

/* Window Content Body */
.window-content {
  flex: 1;
  overflow: auto;
  position: relative;
  background: rgba(10, 13, 20, 0.5);
  display: flex;
  flex-direction: column;
}

/* Resize Handles */
.resize-handle {
  position: absolute;
  z-index: 10;
}
.resize-n { top: 0; left: 6px; right: 6px; height: 6px; cursor: n-resize; }
.resize-s { bottom: 0; left: 6px; right: 6px; height: 6px; cursor: s-resize; }
.resize-e { top: 6px; bottom: 6px; right: 0; width: 6px; cursor: e-resize; }
.resize-w { top: 6px; bottom: 6px; left: 0; width: 6px; cursor: w-resize; }
.resize-ne { top: 0; right: 0; width: 10px; height: 10px; cursor: ne-resize; }
.resize-nw { top: 0; left: 0; width: 10px; height: 10px; cursor: nw-resize; }
.resize-se { bottom: 0; right: 0; width: 10px; height: 10px; cursor: se-resize; }
.resize-sw { bottom: 0; left: 0; width: 10px; height: 10px; cursor: sw-resize; }

/* Taskbar */
#taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--taskbar-height);
  background: rgba(12, 16, 24, 0.85);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  z-index: 1000;
}

.taskbar-left, .taskbar-center, .taskbar-right {
  display: flex;
  align-items: center;
  height: 100%;
}

.taskbar-left {
  gap: 8px;
}

.taskbar-center {
  gap: 6px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.taskbar-right {
  gap: 4px;
}

/* Start Button */
.start-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.start-btn:hover, .start-btn.active {
  background: rgba(0, 229, 255, 0.14);
  border-color: rgba(0, 229, 255, 0.35);
  color: #fff;
}

.start-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Taskbar App Icons */
.taskbar-item {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.taskbar-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.taskbar-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.taskbar-item.active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 14px;
  height: 3px;
  background: var(--accent-cyan);
  border-radius: 2px;
}

.taskbar-item.focused::after {
  width: 20px;
  box-shadow: 0 0 8px var(--accent-cyan);
}

/* System Tray */
.tray-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-secondary);
  font-size: 12px;
}

.tray-pill:hover, .tray-pill.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.tray-clock {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
}

.tray-date {
  font-size: 10.5px;
  color: var(--text-muted);
}

/* Start Menu */
#start-menu {
  position: absolute;
  bottom: calc(var(--taskbar-height) + 8px);
  left: 12px;
  width: 480px;
  max-width: calc(100vw - 24px);
  height: 560px;
  max-height: calc(100vh - var(--taskbar-height) - 24px);
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(35px) saturate(190%);
  -webkit-backdrop-filter: blur(35px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  z-index: 1100;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

#start-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.start-header {
  padding: 16px 16px 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.start-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(10, 14, 22, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  transition: border-color 0.15s ease;
}

.start-search-box:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2);
}

.start-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13px;
  width: 100%;
  user-select: text;
  -webkit-user-select: text;
}

.start-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.start-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.start-apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.start-app-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}

.start-app-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.start-app-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.start-app-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.start-app-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hybrid Architecture Subsystem Card */
.subsystem-banner {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 12px;
}

.subsystem-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.subsystem-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.subsystem-stat {
  background: rgba(10, 13, 20, 0.5);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
}

.stat-value {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
}

.start-footer {
  padding: 12px 16px;
  background: rgba(10, 13, 20, 0.6);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #000;
}

.user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.power-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.power-btn:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
}

/* Quick Settings Flyout */
#quick-settings-panel {
  position: absolute;
  bottom: calc(var(--taskbar-height) + 8px);
  right: 12px;
  width: 320px;
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(35px) saturate(190%);
  -webkit-backdrop-filter: blur(35px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 1100;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

#quick-settings-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.quick-tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.quick-tile {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-tile.active {
  background: rgba(0, 229, 255, 0.16);
  border-color: rgba(0, 229, 255, 0.4);
  color: var(--accent-cyan);
}

.quick-tile:hover {
  background: rgba(255, 255, 255, 0.09);
}

.quick-tile-label {
  font-size: 11px;
  font-weight: 500;
}

.slider-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-group input[type="range"] {
  flex: 1;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

/* ========================================================
   APP SPECIFIC STYLING
   ======================================================== */

/* 1. TERMINAL APP */
.terminal-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #090c13;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 12px;
  overflow: hidden;
  user-select: text;
  -webkit-user-select: text;
}

.terminal-output {
  flex: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.term-line {
  display: flex;
  flex-wrap: wrap;
}

.term-prompt {
  color: var(--accent-cyan);
  font-weight: 600;
  margin-right: 8px;
}

.term-prompt .path {
  color: #38bdf8;
}

.term-prompt .symbol {
  color: #94a3b8;
}

.term-input-row {
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  user-select: text;
  -webkit-user-select: text;
}

.term-success { color: #34d399; }
.term-info { color: #38bdf8; }
.term-warn { color: #fbbf24; }
.term-error { color: #f87171; }
.term-magenta { color: #c084fc; }

/* 2. FILE EXPLORER APP */
.explorer-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.explorer-toolbar {
  height: 42px;
  background: rgba(14, 18, 28, 0.7);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  gap: 12px;
}

.explorer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.toolbar-btn {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.explorer-breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(10, 13, 20, 0.6);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  flex: 1;
  max-width: 380px;
}

.breadcrumb-segment {
  cursor: pointer;
  color: var(--text-primary);
}

.breadcrumb-segment:hover {
  color: var(--accent-cyan);
  text-decoration: underline;
}

.explorer-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.explorer-sidebar {
  width: 170px;
  background: rgba(12, 16, 26, 0.5);
  border-right: 1px solid var(--border-subtle);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-heading {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 8px 4px;
  letter-spacing: 0.5px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s ease;
}

.sidebar-item:hover, .sidebar-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.explorer-main {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  align-content: flex-start;
  gap: 14px;
}

.file-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.12s ease;
}

.file-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.file-item.selected {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.35);
}

.file-name {
  font-size: 11.5px;
  color: var(--text-primary);
  margin-top: 6px;
  text-align: center;
  word-break: break-all;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 3. BROWSER APP */
.browser-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.browser-tabs {
  height: 34px;
  background: rgba(14, 18, 28, 0.9);
  display: flex;
  align-items: flex-end;
  padding: 0 8px;
  gap: 4px;
  border-bottom: 1px solid var(--border-subtle);
}

.browser-tab {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: rgba(22, 28, 42, 0.7);
  border-radius: 6px 6px 0 0;
  font-size: 11.5px;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  cursor: pointer;
}

.browser-tab.active {
  background: rgba(28, 36, 54, 0.95);
  color: var(--text-primary);
  font-weight: 500;
}

.browser-toolbar {
  height: 42px;
  background: rgba(16, 21, 33, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
}

.browser-omnibox {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 13, 20, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12.5px;
  color: var(--text-primary);
  transition: border-color 0.15s ease;
}

.browser-omnibox:focus-within {
  border-color: var(--accent-cyan);
}

.browser-url-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 12.5px;
  user-select: text;
  -webkit-user-select: text;
}

.browser-view {
  flex: 1;
  border: none;
  background: #fff;
  position: relative;
}

.browser-proxy-notice {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-secondary);
  padding: 8px 12px;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 229, 255, 0.25);
  z-index: 5;
}

/* 4. HYBRID RUNTIME MANAGER APP */
.runtime-container {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.runtime-hero {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.runtime-hero-text h2 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.runtime-hero-text p {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.runtime-subsystems {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.subsystem-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.subsystem-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.subsystem-badge-active {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.subsystem-app-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(10, 13, 20, 0.4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.subsystem-app-name {
  font-size: 12.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 5. TEXT EDITOR APP */
.editor-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.editor-toolbar {
  height: 38px;
  background: rgba(14, 18, 28, 0.7);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
}

.editor-textarea {
  flex: 1;
  background: #090c13;
  color: #f1f5f9;
  border: none;
  outline: none;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  resize: none;
  user-select: text;
  -webkit-user-select: text;
}

/* Context Menu */
#context-menu {
  position: absolute;
  width: 190px;
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 2000;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-primary);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.1s ease;
}

.menu-item:hover {
  background: rgba(0, 229, 255, 0.15);
  color: #fff;
}

.menu-separator {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

@keyframes indeterminate {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(50%); }
  100% { transform: translateX(200%); }
}

