/* --------------------------------------------------
   IssamOS - Core Styling & Design System
-------------------------------------------------- */

:root {
  /* Colors */
  --bg-primary: #03001e;
  --bg-dark: #0a0518;
  --glass-bg: rgba(12, 8, 24, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-focus: rgba(0, 242, 254, 0.35);
  
  --cyan: #00f2fe;
  --magenta: #bd00ff;
  --green: #39ff14;
  --orange: #ff9f1c;
  --red: #ff3366;
  --blue: #007aff;
  --text-primary: #f0f0f5;
  --text-muted: #8a88a0;
  
  /* Shadows & Effects */
  --shadow-neon: 0 0 15px rgba(0, 242, 254, 0.15);
  --shadow-neon-focus: 0 0 25px rgba(0, 242, 254, 0.3);
  --shadow-window: 0 10px 30px rgba(0, 0, 0, 0.5);
  --glass-blur: blur(16px);
  
  /* Fonts */
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Fira Code', 'Courier New', Courier, monospace;
}

/* --------------------------------------------------
   General Reset & Body
-------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-dark);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* Background Canvas */
#bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: auto; /* Allow dragging stars if implemented, or click through */
}

/* --------------------------------------------------
   CRT Monitor Overlay Effects
-------------------------------------------------- */
#crt-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, transparent 50%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
  z-index: 9998;
  transition: opacity 0.3s ease;
}

#scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.12) 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% 4px, 6px 100%;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

/* Turn off class */
.crt-off {
  opacity: 0 !important;
}

/* --------------------------------------------------
   Virtual Desktop Setup
-------------------------------------------------- */
#desktop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% - 45px); /* leave room for taskbar */
  z-index: 10;
  padding: 20px;
  overflow: hidden;
}

/* Desktop Icons Grid */
.desktop-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
  grid-template-rows: repeat(auto-fill, minmax(95px, 1fr));
  grid-auto-flow: column;
  gap: 15px;
  height: 100%;
  width: min-content;
  max-width: 400px;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 5px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.desktop-icon:hover {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.desktop-icon.selected {
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.35);
  box-shadow: var(--shadow-neon);
}

.icon-wrapper {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(15, 12, 30, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 8px;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.desktop-icon i {
  width: 24px;
  height: 24px;
}

.icon-cyan { color: var(--cyan); filter: drop-shadow(0 0 5px rgba(0, 242, 254, 0.5)); }
.icon-magenta { color: var(--magenta); filter: drop-shadow(0 0 5px rgba(189, 0, 255, 0.5)); }
.icon-green { color: var(--green); filter: drop-shadow(0 0 5px rgba(57, 255, 20, 0.5)); }
.icon-orange { color: var(--orange); filter: drop-shadow(0 0 5px rgba(255, 159, 28, 0.5)); }
.icon-red { color: var(--red); filter: drop-shadow(0 0 5px rgba(255, 51, 102, 0.5)); }

.icon-label {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-primary);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  word-break: break-word;
  max-width: 75px;
}

/* --------------------------------------------------
   Window Containers & Windows
-------------------------------------------------- */
#window-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Let clicks pass to desktop if not hitting a window */
}

.window {
  position: absolute;
  width: 700px;
  height: 500px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: var(--shadow-window);
  backdrop-filter: var(--glass-blur);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
  pointer-events: auto; /* Re-enable pointer events for windows */
  transition: opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  will-change: transform, width, height;
}

/* Active / Focused Window */
.window.focus {
  border-color: var(--glass-border-focus);
  box-shadow: var(--shadow-window), var(--shadow-neon-focus);
}

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

.window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
}

/* Window Header */
.window-header {
  height: 38px;
  background: rgba(10, 5, 20, 0.8);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  cursor: move;
  flex-shrink: 0;
}

.window-title-area {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

.window-title-icon {
  width: 14px;
  height: 14px;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.win-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.win-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.close-btn:hover {
  background: var(--red);
  border-color: var(--red);
}

.win-btn i {
  width: 10px;
  height: 10px;
}

/* Window Content */
.window-content {
  flex-grow: 1;
  overflow: auto;
  position: relative;
  background: rgba(5, 2, 10, 0.3);
}

/* Resize Handles */
.resize-handle {
  position: absolute;
  background: transparent;
  z-index: 10;
}

.resizer-r {
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
  cursor: e-resize;
}

.resizer-b {
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  cursor: s-resize;
}

.resizer-rb {
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  cursor: se-resize;
}

/* --------------------------------------------------
   App Templates Styling
-------------------------------------------------- */

/* --- PROFILE APP --- */
.profile-container {
  display: flex;
  height: 100%;
  width: 100%;
}

.profile-sidebar {
  width: 180px;
  background: rgba(10, 5, 20, 0.6);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px 10px;
  flex-shrink: 0;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.tab-btn.active {
  background: rgba(0, 242, 254, 0.08);
  border-color: rgba(0, 242, 254, 0.2);
  color: var(--cyan);
  box-shadow: var(--shadow-neon);
}

.tab-btn i {
  width: 16px;
  height: 16px;
}

.profile-body {
  flex-grow: 1;
  padding: 25px;
  overflow-y: auto;
}

.profile-tab-content {
  display: none;
  height: 100%;
  animation: fadeIn 0.3s ease forwards;
}

.profile-tab-content.active {
  display: block;
}

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

/* Profile Bio Layout */
.bio-header {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}

.profile-avatar-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: bold;
  font-size: 32px;
  box-shadow: 0 0 15px rgba(189, 0, 255, 0.4);
}

.bio-title h2 {
  font-family: 'Orbitron', var(--font-sans);
  font-size: 24px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.bio-title p {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 13px;
}

.bio-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 20px;
}

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

/* Skills System */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.skill-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 15px;
}

.skill-card h4 {
  font-size: 14px;
  color: var(--cyan);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-family: var(--font-mono);
}

.skill-bar-bg {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  border-radius: 3px;
  width: 0; /* Animated dynamically */
  transition: width 1s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.fill-cyan { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.fill-magenta { background: var(--magenta); box-shadow: 0 0 8px var(--magenta); }
.fill-green { background: var(--green); box-shadow: 0 0 8px var(--green); }
.fill-orange { background: var(--orange); box-shadow: 0 0 8px var(--orange); }

/* Metrics Log */
.metrics-logs {
  font-family: var(--font-mono);
  background: #05020c;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 15px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  font-size: 12px;
}

.log-line {
  display: flex;
  gap: 10px;
  color: var(--text-muted);
}

.log-time { color: var(--magenta); }
.log-tag { color: var(--cyan); }
.log-msg { color: var(--text-primary); }
.log-success { color: var(--green); }

/* --- TERMINAL APP --- */
.terminal-container {
  background: #05020a;
  height: 100%;
  padding: 15px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--green);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
}

.terminal-history {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.terminal-output-line {
  white-space: pre-wrap;
  word-break: break-all;
}

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

.terminal-prompt {
  color: var(--cyan);
}

.terminal-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 13px;
  flex-grow: 1;
}

.neofetch-container {
  display: flex;
  gap: 20px;
  margin: 15px 0;
  align-items: center;
}

.neofetch-logo {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.1;
  white-space: pre;
}

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

.neofetch-field {
  color: var(--magenta);
}

.neofetch-val {
  color: var(--text-primary);
}

/* --- PROJECTS APP --- */
.projects-container {
  display: flex;
  height: 100%;
}

.projects-explorer {
  width: 200px;
  background: rgba(10, 5, 20, 0.6);
  border-right: 1px solid var(--glass-border);
  padding: 15px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  overflow-y: auto;
}

.explorer-title {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 5px;
  font-family: var(--font-mono);
  padding-left: 5px;
}

.folder-tree {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tree-folder {
  display: flex;
  flex-direction: column;
}

.folder-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-primary);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.folder-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.folder-header i {
  width: 14px;
  height: 14px;
  color: var(--orange);
}

.folder-contents {
  display: flex;
  flex-direction: column;
  padding-left: 18px;
  gap: 2px;
  margin-top: 2px;
}

.folder-contents.hidden {
  display: none;
}

.tree-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tree-file:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.tree-file.active {
  background: rgba(189, 0, 255, 0.08);
  border-left: 2px solid var(--magenta);
  color: var(--text-primary);
}

.tree-file i {
  width: 12px;
  height: 12px;
  color: var(--cyan);
}

.projects-viewer {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
  position: relative;
}

.project-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
}

.project-view-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-family: var(--font-mono);
  gap: 15px;
}

.project-view-placeholder i {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  opacity: 0.3;
}

.project-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  height: 100%;
}

@media (max-width: 600px) {
  .project-content-grid {
    grid-template-columns: 1fr;
  }
}

.project-info-panel {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.project-info-panel h2 {
  font-family: 'Orbitron', var(--font-sans);
  font-size: 22px;
  color: var(--cyan);
}

.collab-tag-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(189, 0, 255, 0.1);
  border: 1px solid rgba(189, 0, 255, 0.3);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: #ea80fc;
  width: max-content;
}

.project-description {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
}

.project-meta-item h4 {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.project-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.project-links {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn-project {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-project:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--bg-dark);
  box-shadow: var(--shadow-neon);
}

.btn-project i {
  width: 14px;
  height: 14px;
}

/* 3D Model Display Container inside Project Card */
.project-3d-panel {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.project-3d-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(10, 5, 20, 0.8);
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--glass-border);
}

.project-3d-hint i {
  width: 10px;
  height: 10px;
}

/* --- 3D SANDBOX APP --- */
.sandbox-container {
  display: flex;
  height: 100%;
}

.sandbox-canvas-wrapper {
  flex-grow: 1;
  position: relative;
}

#sandbox-canvas {
  width: 100%;
  height: 100%;
}

.sandbox-controls {
  width: 200px;
  background: rgba(10, 5, 20, 0.6);
  border-left: 1px solid var(--glass-border);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex-shrink: 0;
  overflow-y: auto;
}

.control-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 5px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-group label {
  font-size: 11px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  display: flex;
  justify-content: space-between;
}

.control-group input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  box-shadow: 0 0 6px var(--cyan);
}

.control-group select {
  background: rgba(10, 5, 20, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 5px;
  color: var(--text-primary);
  font-size: 11px;
  font-family: var(--font-mono);
  outline: none;
}

.control-group select:focus {
  border-color: var(--cyan);
}

.sandbox-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sandbox-btn:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--bg-dark);
  box-shadow: var(--shadow-neon);
}

.sandbox-btn.active {
  background: var(--magenta);
  border-color: var(--magenta);
  color: var(--text-primary);
  box-shadow: 0 0 10px var(--magenta);
}

/* --------------------------------------------------
   Taskbar, Dock & Start Menu
-------------------------------------------------- */
#taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 45px;
  background: rgba(8, 4, 18, 0.8);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
}

.taskbar-left {
  display: flex;
  align-items: center;
  gap: 15px;
  height: 100%;
  overflow: hidden;
}

#start-btn {
  background: linear-gradient(135deg, var(--magenta), var(--blue));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  cursor: pointer;
  color: var(--text-primary);
  font-family: 'Orbitron', var(--font-sans);
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 0 10px rgba(189, 0, 255, 0.25);
  transition: all 0.2s ease;
}

#start-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 15px rgba(189, 0, 255, 0.45);
}

.start-icon {
  width: 14px;
  height: 14px;
  color: var(--cyan);
}

#running-apps {
  display: flex;
  gap: 8px;
  align-items: center;
  height: 100%;
}

.running-tab {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  transition: all 0.2s ease;
}

.running-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.running-tab.active {
  background: rgba(0, 242, 254, 0.08);
  border-color: rgba(0, 242, 254, 0.35);
  color: var(--cyan);
  box-shadow: var(--shadow-neon);
}

.running-tab.minimized {
  opacity: 0.6;
}

.running-tab i {
  width: 12px;
  height: 12px;
}

.taskbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

#crt-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  height: 28px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#crt-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

#crt-toggle i {
  width: 12px;
  height: 12px;
  color: var(--green);
}

#system-clock {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* Start Menu Dropup */
#start-menu {
  position: absolute;
  bottom: 50px;
  left: 15px;
  width: 250px;
  background: rgba(12, 6, 22, 0.92);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), var(--shadow-neon-focus);
  backdrop-filter: var(--glass-blur);
  z-index: 1005;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#start-menu.hidden {
  display: none;
  opacity: 0;
  transform: translateY(10px);
}

.start-header {
  padding: 15px;
  background: rgba(10, 5, 20, 0.6);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.start-header .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', var(--font-sans);
  font-weight: 900;
  color: var(--text-primary);
  font-size: 18px;
}

.start-header .user-info h3 {
  font-size: 13px;
  font-weight: 600;
}

.start-header .user-info p {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.start-items {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

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

.start-item i {
  width: 16px;
  height: 16px;
  color: var(--cyan);
}

.start-items hr {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 6px 0;
}

/* --------------------------------------------------
   Matrix Screen Rain Overlay inside Window
-------------------------------------------------- */
.matrix-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  background: rgba(0, 0, 0, 0.95);
  pointer-events: auto;
}

/* --------------------------------------------------
   Custom Scrollbar Styling
-------------------------------------------------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(5, 2, 10, 0.2);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  border: 2px solid transparent;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
}

.window.focus ::-webkit-scrollbar-thumb {
  background: rgba(0, 242, 254, 0.25);
}

.window.focus ::-webkit-scrollbar-thumb:hover {
  background: var(--cyan);
}
