/* AISniper OS - Main Styles */
:root {
  --accent: #667eea;
  --accent2: #764ba2;
  --glass-bg: rgba(255,255,255,0.12);
  --glass-border: rgba(255,255,255,0.18);
  --glass-shadow: rgba(0,0,0,0.25);
  --text: #ffffff;
  --text-secondary: rgba(255,255,255,0.7);
  --danger: #ff6b6b;
  --success: #51cf66;
  --warning: #ffd43b;
}

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', 'PingFang SC', sans-serif;
  overflow: hidden;
  width: 100vw; height: 100vh;
  background: #000;
  color: var(--text);
  user-select: none;
  -webkit-user-select: none;
}

/* Boot Screen */
#boot-screen {
  position: fixed; inset:0; z-index: 9999;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 50%, #0a1628 100%);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  transition: opacity 0.8s ease;
}
#boot-screen.fade-out { opacity:0; pointer-events:none; }
.boot-logo { text-align: center; }
.boot-icon { width:100px; height:100px; margin-bottom:24px; }
.boot-logo h1 {
  font-size: 28px; font-weight: 700;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 32px;
}
.boot-progress {
  width: 200px; height: 3px; background: rgba(255,255,255,0.1);
  border-radius: 2px; overflow: hidden; margin: 0 auto;
}
.boot-progress-bar {
  height: 100%; width: 0%; border-radius: 2px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: width 0.3s ease;
}

/* Desktop */
#desktop {
  position: fixed; inset:0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
}
#desktop.hidden { display:none; }

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

/* Menu Bar */
#menubar {
  position: fixed; top:0; left:0; right:0; height:32px; z-index:1000;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; font-size: 13px;
  border-bottom: 0.5px solid rgba(255,255,255,0.1);
}
.menu-left, .menu-right { display:flex; align-items:center; gap:16px; }
.menu-right { font-variant-numeric: tabular-nums; }
.apple-menu { cursor:pointer; opacity:0.9; }
.apple-menu:hover { opacity:1; }
.menu-item { cursor:pointer; opacity:0.85; }
.menu-item:hover { opacity:1; }

/* Control Center */
#control-center {
  position: fixed; top:36px; right:6px; z-index:999;
  width: 300px; max-height:80vh;
  background: rgba(30,30,40,0.85);
  backdrop-filter: blur(50px); -webkit-backdrop-filter: blur(50px);
  border-radius: 16px; padding:16px;
  border: 0.5px solid rgba(255,255,255,0.15);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  opacity: 0; transform: translateY(-10px) scale(0.95);
  transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
}
#control-center.show {
  opacity:1; transform: translateY(0) scale(1); pointer-events:auto;
}
.cc-grid { display:grid; grid-template-columns: 1fr 1fr; gap:10px; margin-bottom:12px; }
.cc-tile {
  background: rgba(255,255,255,0.08); border-radius:12px; padding:14px;
  display:flex; flex-direction:column; gap:8px; cursor:pointer;
  transition: background 0.2s;
}
.cc-tile:active { background: rgba(255,255,255,0.15); }
.cc-tile.active-tile { background: rgba(102,126,234,0.4); }
.cc-tile svg { flex-shrink:0; }
.cc-tile span:first-of-type { font-size:13px; font-weight:600; }
.cc-status { font-size:11px; opacity:0.6; }
.cc-slider {
  grid-column: 1 / -1;
  display:flex; align-items:center; gap:12px;
  background: rgba(255,255,255,0.08); border-radius:12px; padding:14px;
}
.cc-slider input[type=range] {
  flex:1; -webkit-appearance:none; appearance:none; height:6px;
  border-radius:3px; background:rgba(255,255,255,0.2); outline:none;
}
.cc-slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance:none; width:20px; height:20px; border-radius:50%;
  background:#fff; cursor:pointer; box-shadow:0 2px 6px rgba(0,0,0,0.3);
}

/* System Health Modal */
.modal { position:fixed; inset:0; z-index:2000; display:flex; align-items:center; justify-content:center; }
.modal.hidden { display:none; }
.modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,0.5); }
.health-panel {
  position:relative; background:rgba(30,30,40,0.92);
  backdrop-filter:blur(50px); -webkit-backdrop-filter:blur(50px);
  border-radius:20px; padding:28px; min-width:320px; max-width:90vw;
  border:0.5px solid rgba(255,255,255,0.15);
  box-shadow:0 25px 70px rgba(0,0,0,0.5);
}
.health-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:24px; }
.health-header h2 { font-size:20px; font-weight:700; }
.close-btn {
  background:rgba(255,255,255,0.12); border:none; color:#fff;
  width:28px; height:28px; border-radius:50%; cursor:pointer;
  font-size:16px; display:flex; align-items:center; justify-content:center;
}
.close-btn:hover { background:rgba(255,255,255,0.2); }
.health-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-bottom:24px; }
.health-item { text-align:center; }
.health-circle {
  width:80px; height:80px; border-radius:50%; margin:0 auto 8px;
  display:flex; align-items:center; justify-content:center;
  border: 4px solid var(--accent);
  background: radial-gradient(circle, rgba(102,126,234,0.15) 0%, transparent 70%);
  position:relative;
}
.health-value { font-size:18px; font-weight:700; }
.health-item label { font-size:12px; opacity:0.6; }
.health-info { opacity:0.5; font-size:12px; line-height:2; }

/* Dock */
#dock {
  position:fixed; bottom:8px; left:50%; transform:translateX(-50%); z-index:900;
  background: rgba(0,0,0,0.35);
  backdrop-filter:blur(30px); -webkit-backdrop-filter:blur(30px);
  border-radius:22px; padding:6px 8px;
  border:0.5px solid rgba(255,255,255,0.15);
  display:flex; align-items:flex-end; gap:4px;
  box-shadow:0 10px 40px rgba(0,0,0,0.3);
}
.dock-item {
  width:52px; height:52px; border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; transition: all 0.2s cubic-bezier(0.16,1,0.3,1);
  position:relative; font-size:28px;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
}
.dock-item:hover { transform:translateY(-8px) scale(1.15); }
.dock-item:active { transform:translateY(-4px) scale(1.05); }
.dock-item .tooltip {
  position:absolute; top:-32px; background:rgba(0,0,0,0.75);
  padding:4px 10px; border-radius:6px; font-size:12px;
  white-space:nowrap; opacity:0; transition:opacity 0.15s;
  pointer-events:none;
}
.dock-item:hover .tooltip { opacity:1; }
.dock-dot {
  position:absolute; bottom:-4px; width:4px; height:4px;
  border-radius:50%; background:rgba(255,255,255,0.5);
}

/* Modal for apps */
.app-modal {
  position:fixed; inset:0; z-index:800;
  display:flex; align-items:center; justify-content:center;
}
.app-modal.hidden { display:none; }

/* Responsive */
@media (max-width: 400px) {
  #control-center { width: calc(100vw - 12px); right:6px; }
  .health-panel { min-width:auto; width:90vw; }
  .dock-item { width:46px; height:46px; font-size:24px; }
}
