/* ========================================
   BUZIN · Design System
   Dark + Cyan Blue + Neon Green
   ======================================== */

:root {
  /* Background palette */
  --bg-0: #050708;
  --bg-1: #0a0d14;
  --bg-2: #111820;
  --bg-3: #1a2230;
  
  /* Lines & borders */
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.04);
  
  /* Text */
  --text: #e8eef5;
  --text-dim: #9aa5b8;
  --muted: #5a6578;
  
  /* Primary colors */
  --primary: #0066ff;
  --primary-alt: #0099ff;
  --accent: #00d4ff;
  --accent-alt: #00ffcc;
  --success: #00ff88;
  --warning: #ffcc00;
  --danger: #ff4444;
  
  /* Gradients */
  --grad-primary: linear-gradient(135deg, #0066ff 0%, #00d4ff 50%, #00ffcc 100%);
  --grad-dark: linear-gradient(180deg, #0a0d14 0%, #050708 100%);
  --grad-card: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  --grad-glow: radial-gradient(circle at 50% 0%, rgba(0, 102, 255, 0.25), transparent 60%);
  
  /* Shadows */
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 32px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 32px rgba(0, 102, 255, 0.3);
  --shadow-glow-soft: 0 0 18px rgba(0, 212, 255, 0.18);
  
  /* Border radius */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;
  
  /* Timing */
  --t-fast: 160ms cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-med: 280ms cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-slow: 520ms cubic-bezier(0.2, 0.7, 0.2, 1);
  
  /* Typography */
  --font-display: 'Manrope', 'Inter', 'SF Pro Display', system-ui, sans-serif;
  --font-body: 'Inter', 'SF Pro Text', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
}

/* Dark theme override (if needed) */
[data-theme="dark"] {
  --bg-0: #050708;
  --bg-1: #0a0d14;
  --bg-2: #111820;
  --text: #e8eef5;
}

/* Light theme */
[data-theme="light"] {
  --bg-0: #f8fafb;
  --bg-1: #f0f2f5;
  --bg-2: #e5e8ec;
  --text: #1a1d24;
  --text-dim: #5a6578;
  --line: rgba(0, 0, 0, 0.1);
  --line-soft: rgba(0, 0, 0, 0.05);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

::selection {
  background: rgba(0, 102, 255, 0.3);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

input, select, textarea {
  font: inherit;
  color: inherit;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-1);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1a2230, #0a0d14);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #0066ff, #00d4ff);
}

/* ============= Utility ============= */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
}

.row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.col {
  flex: 1;
  min-width: 0;
}

.grid {
  display: grid;
  gap: 16px;
}

.center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.muted {
  color: var(--text-dim);
}

.dim {
  color: var(--muted);
}

.mono {
  font-family: var(--font-mono);
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
}

.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text-dim);
}

/* ============= Headings ============= */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 {
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(22px, 2.2vw, 34px);
  line-height: 1.15;
}

h3 {
  font-size: 18px;
  line-height: 1.25;
}

h4 {
  font-size: 14px;
  font-weight: 600;
}

/* ============= Buttons ============= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform var(--t-fast), background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--grad-primary);
  border: none;
  color: #000;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  box-shadow: 0 0 48px rgba(0, 102, 255, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(0, 102, 255, 0.1);
  border: 1px solid rgba(0, 102, 255, 0.3);
  color: #00d4ff;
}

.btn-secondary:hover {
  background: rgba(0, 102, 255, 0.2);
  border-color: rgba(0, 212, 255, 0.6);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 15px;
}

/* ============= Cards ============= */
.card {
  background: linear-gradient(180deg, rgba(10, 13, 20, 0.8), rgba(5, 7, 8, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: all var(--t-med);
}

.card:hover {
  border-color: rgba(0, 102, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 102, 255, 0.15);
  transform: translateY(-2px);
}

/* ============= Forms ============= */
input, textarea, select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  transition: all var(--t-fast);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(0, 102, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
  font-family: var(--font-body);
}

/* ============= Layout ============= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(5, 7, 8, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.main {
  margin-top: 80px;
  min-height: calc(100vh - 80px);
  padding: 40px 0;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 80px;
  width: 280px;
  height: calc(100vh - 80px);
  background: var(--bg-1);
  border-right: 1px solid var(--line);
  padding: 20px;
  overflow-y: auto;
  z-index: 50;
}

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

.nav-item {
  display: block;
  padding: 12px 16px;
  border-radius: var(--r-md);
  color: var(--text-dim);
  transition: all var(--t-fast);
  font-weight: 500;
  font-size: 14px;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(0, 102, 255, 0.1);
}

.nav-item.active {
  background: rgba(0, 102, 255, 0.2);
  color: #00d4ff;
  border-left: 2px solid #0066ff;
  padding-left: 14px;
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--t-med);
    width: 240px;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
}

@media (max-width: 600px) {
  .main {
    margin-top: 60px;
  }
  
  .sidebar {
    display: none;
  }
  
  .container {
    padding: 0 16px;
  }
}

/* ============= Tabs ============= */
.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.tab {
  padding: 12px 16px;
  border: none;
  background: none;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.05em;
  cursor: pointer;
  position: relative;
  transition: color var(--t-fast);
}

.tab::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform var(--t-fast);
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: #00d4ff;
}

.tab.active::after {
  transform: scaleX(1);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn var(--t-fast);
}

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