/* ==========================================================================
   macOS Terminal Portfolio - Induwara Jayalath
   Comprehensive Modern CSS with Apple Glassmorphic Design System
   ========================================================================== */

:root {
  /* Default macOS Dark Theme */
  --bg-primary: #1e1e24;
  --bg-window: rgba(22, 23, 29, 0.88);
  --bg-header: rgba(35, 36, 44, 0.92);
  --bg-tab-active: rgba(45, 47, 57, 0.95);
  --bg-tab-inactive: rgba(28, 29, 36, 0.6);
  --border-window: rgba(255, 255, 255, 0.14);
  --border-subtle: rgba(255, 255, 255, 0.08);
  
  --text-main: #f0f2f7;
  --text-dim: #8b92a5;
  --text-bright: #ffffff;
  --text-muted: #5e6475;
  
  --accent-cyan: #38bdf8;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-yellow: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #a855f7;
  --accent-pink: #ec4899;
  
  --prompt-user: #10b981;
  --prompt-host: #38bdf8;
  --prompt-path: #f59e0b;
  --prompt-symbol: #f43f5e;
  
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, Monaco, Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Inter, sans-serif;
  
  --window-radius: 12px;
  --window-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), 0 10px 30px rgba(0, 0, 0, 0.45);
  --glass-blur: blur(28px) saturate(180%);
}

/* Theme Variations */
body[data-theme="homebrew"] {
  --bg-window: rgba(10, 20, 10, 0.92);
  --bg-header: rgba(15, 30, 15, 0.95);
  --text-main: #00ff66;
  --text-dim: #00bb44;
  --text-bright: #33ff88;
  --accent-cyan: #00ffcc;
  --accent-blue: #00ff88;
  --accent-green: #00ff66;
  --prompt-user: #00ff66;
  --prompt-host: #00ffaa;
  --prompt-path: #00ffcc;
  --prompt-symbol: #33ff88;
  --border-window: rgba(0, 255, 102, 0.25);
}

body[data-theme="dracula"] {
  --bg-window: rgba(40, 42, 54, 0.92);
  --bg-header: rgba(30, 32, 42, 0.95);
  --text-main: #f8f8f2;
  --text-dim: #6272a4;
  --text-bright: #ffffff;
  --accent-cyan: #8be9fd;
  --accent-blue: #bd93f9;
  --accent-green: #50fa7b;
  --accent-yellow: #f1fa8c;
  --accent-red: #ff5555;
  --accent-purple: #ff79c6;
  --prompt-user: #50fa7b;
  --prompt-host: #bd93f9;
  --prompt-path: #8be9fd;
  --prompt-symbol: #ff79c6;
  --border-window: rgba(189, 147, 249, 0.25);
}

body[data-theme="matrix"] {
  --bg-window: rgba(3, 15, 6, 0.94);
  --bg-header: rgba(5, 25, 10, 0.96);
  --text-main: #22c55e;
  --text-dim: #15803d;
  --text-bright: #86efac;
  --accent-cyan: #34d399;
  --accent-blue: #10b981;
  --accent-green: #22c55e;
  --prompt-user: #86efac;
  --prompt-host: #4ade80;
  --prompt-path: #22c55e;
  --prompt-symbol: #10b981;
  --border-window: rgba(34, 197, 94, 0.3);
}

body[data-theme="solarized"] {
  --bg-window: rgba(0, 43, 54, 0.92);
  --bg-header: rgba(7, 54, 66, 0.96);
  --text-main: #839496;
  --text-dim: #586e75;
  --text-bright: #eee8d5;
  --accent-cyan: #2aa198;
  --accent-blue: #268bd2;
  --accent-green: #859900;
  --accent-yellow: #b58900;
  --accent-red: #dc322f;
  --accent-purple: #6c71c4;
  --prompt-user: #859900;
  --prompt-host: #268bd2;
  --prompt-path: #2aa198;
  --prompt-symbol: #d33682;
  --border-window: rgba(42, 161, 152, 0.25);
}

body[data-theme="cyberpunk"] {
  --bg-window: rgba(18, 12, 38, 0.92);
  --bg-header: rgba(30, 16, 56, 0.96);
  --text-main: #05d9e8;
  --text-dim: #a175df;
  --text-bright: #ffffff;
  --accent-cyan: #00f0ff;
  --accent-blue: #00a2ff;
  --accent-green: #05ffa1;
  --accent-yellow: #ffe600;
  --accent-red: #ff2a85;
  --accent-purple: #d600ff;
  --prompt-user: #05ffa1;
  --prompt-host: #00f0ff;
  --prompt-path: #ffe600;
  --prompt-symbol: #ff2a85;
  --border-window: rgba(255, 42, 133, 0.35);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  user-select: none;
  background-color: #0b0c10;
}

/* Dynamic Desktop Wallpaper Background */
#desktop {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: url('../assets/wallpaper.jpg') center center / cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: background-image 0.5s ease;
}

/* Desktop Ambient Overlay / Glow */
#desktop::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(20, 25, 40, 0.2), rgba(5, 5, 10, 0.65));
  pointer-events: none;
  z-index: 1;
}

/* Matrix Digital Rain Canvas Overlay */
#matrix-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}
#matrix-canvas.active {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   macOS Top Menu Bar
   ========================================================================== */
#macos-menubar {
  position: relative;
  z-index: 100;
  height: 30px;
  background: rgba(20, 20, 28, 0.55);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 13px;
  color: #f1f5f9;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.menubar-left, .menubar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
}

.menubar-item {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 6px;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.menubar-item:hover, .menubar-item.active {
  background: rgba(255, 255, 255, 0.14);
}

.menubar-apple {
  font-size: 15px;
  padding: 0 8px;
  font-weight: 600;
}

.menubar-app-name {
  font-weight: 700;
  letter-spacing: -0.015em;
}

.menubar-icon-btn {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
}
.menubar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.clock-display {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Menu Bar Dropdowns */
.menu-dropdown {
  position: absolute;
  top: 30px;
  left: 0;
  min-width: 210px;
  background: rgba(30, 32, 42, 0.92);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  padding: 5px;
  display: none;
  flex-direction: column;
  z-index: 1000;
}
.menu-dropdown.show {
  display: flex;
}
.menu-dropdown-right {
  left: auto;
  right: 0;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12.5px;
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.12s ease;
}
.menu-item:hover {
  background: #2563eb;
  color: #ffffff;
}
.menu-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 6px;
}
.menu-shortcut {
  font-size: 11px;
  opacity: 0.7;
}

/* ==========================================================================
   macOS Windows (Terminal & GUI)
   ========================================================================== */
#windows-container {
  position: relative;
  flex: 1;
  width: 100%;
  height: calc(100vh - 100px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.macos-window {
  position: absolute;
  pointer-events: auto;
  width: 900px;
  max-width: 94vw;
  height: 580px;
  max-height: 80vh;
  background: var(--bg-window);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-window);
  border-radius: var(--window-radius);
  box-shadow: var(--window-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, box-shadow 0.25s ease, width 0.3s ease, height 0.3s ease;
  user-select: text;
}

.macos-window.minimized {
  transform: translateY(120vh) scale(0.2);
  opacity: 0;
  pointer-events: none;
}

.macos-window.maximized {
  width: calc(100vw - 20px) !important;
  max-width: 100vw !important;
  height: calc(100vh - 110px) !important;
  max-height: 100vh !important;
  border-radius: 8px;
  top: 10px !important;
  left: 10px !important;
  transform: none !important;
}

.macos-window.active-window {
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.75), 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.16);
  z-index: 50;
}

/* Window Header Bar */
.window-header {
  height: 42px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  cursor: grab;
  position: relative;
  flex-shrink: 0;
}
.window-header:active {
  cursor: grabbing;
}

/* macOS Traffic Light Buttons */
.traffic-lights {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 5;
}

.traffic-btn {
  width: 12.5px;
  height: 12.5px;
  border-radius: 50%;
  border: 0.5px solid rgba(0, 0, 0, 0.2);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  outline: none;
  transition: transform 0.1s ease, filter 0.15s ease;
}

.traffic-btn:hover {
  filter: brightness(1.1);
}

.traffic-btn.close {
  background: #ff5f57;
  border-color: #e0443e;
}
.traffic-btn.minimize {
  background: #febc2e;
  border-color: #d89e24;
}
.traffic-btn.maximize {
  background: #28c840;
  border-color: #1aab29;
}

/* Traffic light icons on group hover */
.traffic-lights:hover .traffic-btn.close::before {
  content: '×';
  color: #4a0002;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
.traffic-lights:hover .traffic-btn.minimize::before {
  content: '–';
  color: #5c3b00;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}
.traffic-lights:hover .traffic-btn.maximize::before {
  content: '+';
  color: #004d10;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

/* Window Title & Tabs */
.window-title-container {
  position: absolute;
  left: 0;
  right: 0;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-dim);
  font-family: var(--font-sans);
  font-weight: 600;
  pointer-events: none;
}

.window-folder-icon {
  width: 14px;
  height: 14px;
  opacity: 0.75;
}

.window-title-text {
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.window-controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 5;
}

.window-btn-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  color: var(--text-dim);
  padding: 4px 8px;
  font-size: 11px;
  font-family: var(--font-sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}
.window-btn-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-bright);
}

/* Terminal Quick Action Chips Bar */
.terminal-actions-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(15, 16, 22, 0.65);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.terminal-actions-bar::-webkit-scrollbar {
  display: none;
}

.action-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-dim);
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-family: var(--font-mono);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.action-chip:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--accent-cyan);
  transform: translateY(-1px);
}

/* ==========================================================================
   Terminal Screen & Shell Output
   ========================================================================== */
.terminal-screen {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 24px 18px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-main);
  background: transparent;
  cursor: text;
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
.terminal-screen::-webkit-scrollbar {
  width: 8px;
}
.terminal-screen::-webkit-scrollbar-track {
  background: transparent;
}
.terminal-screen::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.terminal-screen::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* Boot & ASCII Banner */
.ascii-banner {
  white-space: pre;
  font-weight: 700;
  line-height: 1.15;
  color: var(--accent-cyan);
  margin-bottom: 12px;
  text-shadow: 0 0 15px rgba(56, 189, 248, 0.35);
  overflow-x: auto;
}

.boot-log {
  margin-bottom: 14px;
  color: var(--text-dim);
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.boot-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.boot-tag {
  color: var(--accent-green);
  font-weight: 600;
}
.boot-tag.info {
  color: var(--accent-cyan);
}

/* Terminal Command History Output */
.terminal-output-group {
  margin-bottom: 12px;
}

.command-line-history {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.prompt-badge {
  font-weight: 600;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.prompt-user {
  color: var(--prompt-user);
}
.prompt-host {
  color: var(--prompt-host);
}
.prompt-path {
  color: var(--prompt-path);
}
.prompt-char {
  color: var(--prompt-symbol);
  font-weight: 700;
}

.command-text {
  color: var(--text-bright);
  font-weight: 600;
}

.command-response {
  margin-bottom: 12px;
  padding-left: 2px;
}

/* Interactive Command Output Components */
.response-table {
  width: 100%;
  max-width: 650px;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 13px;
}
.response-table th {
  text-align: left;
  padding: 6px 12px 6px 0;
  color: var(--accent-cyan);
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 600;
}
.response-table td {
  padding: 5px 12px 5px 0;
  color: var(--text-main);
  vertical-align: top;
}
.response-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.cmd-badge {
  color: var(--accent-green);
  font-weight: 600;
  cursor: pointer;
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
  transition: all 0.15s ease;
}
.cmd-badge:hover {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

/* File Listing Styling */
.file-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px 16px;
  margin: 8px 0;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  transition: background 0.15s ease;
}
.file-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.file-item.directory {
  color: var(--accent-cyan);
  font-weight: 700;
}
.file-item.executable {
  color: var(--accent-green);
  font-weight: 600;
}
.file-item.text {
  color: var(--text-main);
}
.file-item.link {
  color: var(--accent-yellow);
}

/* Neofetch Card Layout */
.neofetch-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  padding: 12px 0;
}

.neofetch-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1.15;
  color: var(--accent-cyan);
  white-space: pre;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.neofetch-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.neofetch-header {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-bright);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 4px;
  margin-bottom: 4px;
}

.neofetch-row {
  display: flex;
  gap: 12px;
}
.neofetch-label {
  color: var(--accent-cyan);
  min-width: 90px;
  font-weight: 600;
}
.neofetch-val {
  color: var(--text-main);
}

/* Bio & Profile Card inside Terminal */
.bio-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 16px;
  margin: 10px 0;
  display: flex;
  gap: 20px;
  align-items: center;
  max-width: 680px;
}

.bio-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.25);
  flex-shrink: 0;
}

.bio-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bio-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-bright);
}

.bio-role {
  font-size: 13px;
  color: var(--accent-cyan);
  font-weight: 500;
}

.bio-desc {
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.5;
}

.bio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.bio-tag {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  color: var(--text-main);
}

/* Skills Matrix */
.skills-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 10px 0;
  max-width: 600px;
}

.skill-category {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.skill-category-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-yellow);
}

.skill-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.skill-name {
  width: 110px;
  color: var(--text-main);
  flex-shrink: 0;
}

.skill-bar-outer {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.skill-bar-inner {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(to right, var(--accent-cyan), var(--accent-green));
}

.skill-level-text {
  font-size: 11px;
  color: var(--text-dim);
  width: 35px;
  text-align: right;
}

/* Contact Card in Terminal */
.contact-terminal-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 10px 0;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-label {
  width: 90px;
  color: var(--accent-cyan);
  font-weight: 600;
}

.contact-link {
  color: var(--text-bright);
  text-decoration: none;
  transition: color 0.15s ease;
}
.contact-link:hover {
  color: var(--accent-green);
  text-decoration: underline;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-dim);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.copy-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text-bright);
}

/* Active Command Line Input Row */
.active-command-row {
  display: flex;
  align-items: center;
  position: relative;
  margin-top: 4px;
  font-family: var(--font-mono);
}

.prompt-prefix {
  display: flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
  margin-right: 8px;
  user-select: none;
}

.input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.terminal-real-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: text;
  border: none;
  background: transparent;
  color: transparent;
  outline: none;
  font-family: inherit;
  font-size: inherit;
  z-index: 5;
}

.input-mirror {
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-bright);
  display: inline-flex;
  align-items: center;
}

.ghost-suggestion {
  color: var(--text-muted);
  user-select: none;
  pointer-events: none;
}

/* Blinking Terminal Cursor */
.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background-color: var(--text-bright);
  vertical-align: middle;
  margin-left: 1px;
  animation: blinkCursor 1s step-end infinite;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ==========================================================================
   macOS GUI Portfolio Window (Finder-like Window)
   ========================================================================== */
#gui-window {
  width: 840px;
  height: 520px;
  display: none;
}
#gui-window.open {
  display: flex;
}

.gui-layout {
  display: flex;
  height: calc(100% - 42px);
  width: 100%;
}

.gui-sidebar {
  width: 200px;
  background: rgba(25, 27, 35, 0.75);
  border-right: 1px solid var(--border-subtle);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.sidebar-group-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 8px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.sidebar-nav-item.active {
  background: #2563eb;
  color: #ffffff;
  font-weight: 500;
}

.gui-content-pane {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: rgba(18, 19, 25, 0.6);
}

.gui-tab-panel {
  display: none;
  animation: fadeIn 0.25s ease;
}
.gui-tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   About This Mac Dialog
   ========================================================================== */
#about-mac-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 440px;
  background: rgba(32, 34, 44, 0.94);
  backdrop-filter: blur(35px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.7);
  z-index: 2000;
  display: none;
  flex-direction: column;
  padding: 24px;
  color: #f1f5f9;
  font-family: var(--font-sans);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#about-mac-modal.open {
  display: flex;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.about-mac-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.about-mac-body {
  display: flex;
  gap: 20px;
  align-items: center;
}

.about-chip-icon {
  width: 76px;
  height: 76px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.about-specs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.about-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.about-spec-row {
  display: flex;
  gap: 8px;
  color: #94a3b8;
}
.about-spec-row strong {
  color: #f1f5f9;
}

/* ==========================================================================
   macOS Dock
   ========================================================================== */
#macos-dock-container {
  position: relative;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding-bottom: 12px;
  pointer-events: none;
}

.macos-dock {
  pointer-events: auto;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: rgba(30, 32, 44, 0.45);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 6px 14px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dock-item:hover {
  transform: translateY(-8px) scale(1.18);
}

.dock-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.dock-icon-wrapper svg, .dock-icon-wrapper img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* Running App Indicator Dot */
.dock-indicator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  margin-top: 3px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.dock-item.running .dock-indicator {
  opacity: 1;
}

/* Dock Tooltips */
.dock-tooltip {
  position: absolute;
  top: -34px;
  background: rgba(20, 22, 30, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.dock-item:hover .dock-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Control Center Modal
   ========================================================================== */
#control-center-modal {
  position: absolute;
  top: 36px;
  right: 14px;
  width: 300px;
  background: rgba(28, 30, 40, 0.92);
  backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  padding: 14px;
  z-index: 2000;
  display: none;
  flex-direction: column;
  gap: 12px;
}

#control-center-modal.open {
  display: flex;
}

.control-tile {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.control-label {
  font-size: 12.5px;
  font-weight: 500;
  color: #e2e8f0;
}

.control-slider {
  width: 100%;
  accent-color: #3b82f6;
  cursor: pointer;
}

/* Responsive Rules */
@media (max-width: 768px) {
  #macos-menubar {
    font-size: 12px;
    padding: 0 8px;
  }
  .menubar-hide-mobile {
    display: none !important;
  }
  .macos-window {
    width: 96vw !important;
    height: 82vh !important;
    top: 5px !important;
    left: 2vw !important;
  }
  .dock-icon-wrapper {
    width: 40px;
    height: 40px;
  }
  .dock-icon-wrapper svg {
    width: 24px;
    height: 24px;
  }
  .ascii-banner {
    font-size: 8px;
  }
  .terminal-screen {
    font-size: 12px;
    padding: 10px;
  }
  .bio-card {
    flex-direction: column;
    text-align: center;
  }
  .bio-tags {
    justify-content: center;
  }
}
