/* ===================================
   Arc Design System - Global Styles
   Based on DESIGN_SYSTEM.md
   =================================== */

/* ===================================
   CSS VARIABLES (Design Tokens)
   =================================== */
:root {
  /* === Backgrounds === */
  --bg-primary: #0a0a0a;        /* Deep black */
  --bg-secondary: #111111;      /* Card backgrounds */
  --bg-tertiary: #1a1a1a;       /* Elevated surfaces */
  --bg-hover: #222222;          /* Hover states */

  /* === Brand Colors === */
  --brand-purple: #667eea;      /* Primary brand */
  --brand-purple-light: #7c8ff0;
  --brand-violet: #764ba2;      /* Secondary brand */
  --brand-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

  /* === Accent Colors === */
  --accent-blue: #3b82f6;       /* Info */
  --accent-green: #10b981;      /* Success */
  --accent-yellow: #f59e0b;     /* Warning */
  --accent-red: #ef4444;        /* Error */
  --accent-pink: #ec4899;       /* Fun/motivation */

  /* === Text Colors === */
  --text-primary: #ffffff;      /* Headings */
  --text-secondary: #a0a0a0;    /* Body text */
  --text-tertiary: #666666;     /* Muted text */
  --text-disabled: #444444;     /* Disabled */

  /* === Borders === */
  --border-primary: #222222;
  --border-secondary: #333333;
  --border-focus: var(--brand-purple);

  /* === Shadows & Glows === */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.7);
  --glow-purple: 0 0 20px rgba(102, 126, 234, 0.3);
  --glow-blue: 0 0 20px rgba(59, 130, 246, 0.3);

  /* === Typography === */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Courier New', monospace;

  /* === Spacing === */
  --spacing-unit: 8px;
  --container-max: 1200px;
}

/* === Light Mode (Optional) === */
:root[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --text-primary: #0a0a0a;
  --text-secondary: #4b5563;
}

/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   TYPOGRAPHY UTILITIES
   =================================== */
.text-display {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
}

.text-h1 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.text-h2 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.text-h3 {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

.text-h4 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

.text-body-lg {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
}

.text-body {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
}

.text-body-sm {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.text-caption {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-tertiary);
}

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

/* ===================================
   BUTTON COMPONENTS
   =================================== */
.btn-primary {
  background: var(--brand-gradient);
  color: white;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  border: none;
  box-shadow: var(--glow-purple);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
}

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

.btn-primary:disabled {
  background: var(--text-disabled);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  border: 2px solid var(--border-secondary);
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--brand-purple);
  background: rgba(102, 126, 234, 0.1);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 14px 28px;
  border: none;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* ===================================
   CARD COMPONENTS
   =================================== */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--border-secondary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-glow {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border: 1px solid rgba(102, 126, 234, 0.3);
  box-shadow: var(--glow-purple);
}

/* ===================================
   INPUT COMPONENTS
   =================================== */
.input {
  background: var(--bg-tertiary);
  border: 2px solid var(--border-primary);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--text-primary);
  transition: all 0.2s ease;
  font-family: var(--font-body);
  width: 100%;
}

.input:focus {
  outline: none;
  border-color: var(--brand-purple);
  box-shadow: var(--glow-purple);
}

.input::placeholder {
  color: var(--text-tertiary);
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes gradient-x {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.3); }
  50% { box-shadow: 0 0 30px rgba(102, 126, 234, 0.6); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes checkmark {
  0% { stroke-dashoffset: 50; }
  100% { stroke-dashoffset: 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === Animation Utility Classes === */
.animated-gradient {
  background-size: 200% 200%;
  animation: gradient-x 10s ease infinite;
}

.glow-pulse {
  animation: glow-pulse 2s ease-in-out infinite;
}

.float {
  animation: float 3s ease-in-out infinite;
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(102, 126, 234, 0.2) 0%, transparent 50%);
  filter: blur(60px);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: 40px;
}

/* ===================================
   DASHBOARD LAYOUT
   =================================== */
.dashboard {
  display: flex;
  min-height: 100vh;
  background: var(--bg-primary);
}

.sidebar {
  width: 240px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-primary);
  padding: 24px;
}

.main-content {
  flex: 1;
  overflow-y: auto;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
  border-bottom: 1px solid var(--border-primary);
}

.content-area {
  padding: 40px;
}

/* ===================================
   LOADING STATES
   =================================== */
.skeleton {
  border-radius: 4px;
  overflow: hidden;
}

.skeleton-line {
  height: 20px;
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 0%,
    var(--bg-tertiary) 50%,
    var(--bg-secondary) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
  margin-bottom: 12px;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ===================================
   RESPONSIVE BREAKPOINTS
   =================================== */
@media (max-width: 1280px) { /* xl */ }
@media (max-width: 1024px) { /* lg */ }
@media (max-width: 768px) {
  /* md */
  .text-display { font-size: 40px; }
  .text-h1 { font-size: 36px; }
  .text-h2 { font-size: 28px; }

  .dashboard {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-primary);
  }
}
@media (max-width: 640px) {
  /* sm */
  .text-display { font-size: 32px; }
  .text-h1 { font-size: 28px; }
  .text-h2 { font-size: 24px; }

  .hero-content {
    padding: 24px;
  }

  .content-area {
    padding: 24px;
  }
}
