/* ============================================
   MODERN THEME SYSTEM - 2024-2025
   Material You + Glassmorphism Design
   ============================================ */

   :root {
    /* Light Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.7);
    --bg-hover: rgba(0, 0, 0, 0.04);
    
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --text-tertiary: #adb5bd;
    
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-info: #3b82f6;
    
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  [data-theme="dark"] {
    /* Dark Theme Colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: rgba(30, 41, 59, 0.8);
    --bg-glass: rgba(15, 23, 42, 0.7);
    --bg-hover: rgba(255, 255, 255, 0.08);
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    
    --accent-primary: #818cf8;
    --accent-secondary: #a78bfa;
    --accent-success: #34d399;
    --accent-warning: #fbbf24;
    --accent-danger: #f87171;
    --accent-info: #60a5fa;
    
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(129, 140, 248, 0.4);
  }
  
  /* ============================================
     BASE STYLES
     ============================================ */
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-base), color var(--transition-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  /* ============================================
     TYPOGRAPHY
     ============================================ */
  
  h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
  }
  
  h1 { font-size: 2.5rem; letter-spacing: -0.02em; }
  h2 { font-size: 2rem; letter-spacing: -0.01em; }
  h3 { font-size: 1.75rem; }
  h4 { font-size: 1.5rem; }
  h5 { font-size: 1.25rem; }
  h6 { font-size: 1rem; }
  
  p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
  }
  
  .text-primary { color: var(--text-primary) !important; }
  .text-secondary { color: var(--text-secondary) !important; }
  .text-tertiary { color: var(--text-tertiary) !important; }
  
  /* ============================================
     GLASSMORPHISM CARDS
     ============================================ */
  
  .glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
  }
  
  .glass-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-primary);
  }
  
  .modern-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
  }
  
  .modern-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
  }
  
  /* ============================================
     BUTTONS
     ============================================ */
  
  .btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    text-decoration: none;
  }
  
  .btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
  }
  
  .btn-modern:hover::before {
    width: 300px;
    height: 300px;
  }
  
  .btn-modern:active {
    transform: scale(0.98);
  }
  
  .btn-primary-modern {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
  }
  
  .btn-primary-modern:hover {
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: translateY(-2px);
    color: white;
  }
  
  .btn-secondary-modern {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
  }
  
  .btn-secondary-modern:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    color: var(--text-primary);
  }
  
  .btn-success-modern {
    background: var(--accent-success);
    color: white;
  }
  
  .btn-danger-modern {
    background: var(--accent-danger);
    color: white;
  }
  
  .btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  /* ============================================
     FORMS
     ============================================ */
  
  .form-modern {
    position: relative;
  }
  
  .form-modern label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
  }
  
  .form-modern input,
  .form-modern select,
  .form-modern textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
    font-family: inherit;
  }
  
  .form-modern input:focus,
  .form-modern select:focus,
  .form-modern textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  }
  
  .form-modern input::placeholder {
    color: var(--text-tertiary);
  }
  
  /* Floating Label Effect */
  .form-floating-modern {
    position: relative;
  }
  
  .form-floating-modern input {
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
  }
  
  .form-floating-modern label {
    position: absolute;
    top: 0.875rem;
    left: 1rem;
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
    pointer-events: none;
    font-weight: 500;
  }
  
  .form-floating-modern input:focus ~ label,
  .form-floating-modern input:not(:placeholder-shown) ~ label {
    top: 0.25rem;
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-weight: 600;
  }
  
  /* ============================================
     NAVBAR
     ============================================ */
  
  .navbar-modern {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    transition: all var(--transition-base);
  }
  
  .navbar-brand-modern {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary) !important;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: all var(--transition-fast);
  }
  
  .navbar-brand-modern:hover {
    color: var(--accent-primary) !important;
    transform: scale(1.05);
  }
  
  .nav-link-modern {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
  }
  
  .nav-link-modern::after {
    content: '';
    position: absolute;
    bottom: 0.25rem;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--accent-primary);
    transition: transform var(--transition-fast);
  }
  
  .nav-link-modern:hover,
  .nav-link-modern.active {
    color: var(--accent-primary) !important;
    background: var(--bg-hover);
  }
  
  .nav-link-modern.active::after {
    transform: translateX(-50%) scaleX(1);
  }
  
  /* ============================================
     THEME TOGGLE
     ============================================ */
  
  .theme-toggle {
    width: 3rem;
    height: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    position: relative;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: all var(--transition-base);
  }
  
  .theme-toggle::before {
    content: '';
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: white;
    top: 50%;
    left: 0.125rem;
    transform: translateY(-50%);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
  }
  
  [data-theme="dark"] .theme-toggle::before {
    left: calc(100% - 1.375rem);
    background: var(--bg-primary);
  }
  
  .theme-toggle-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    transition: all var(--transition-base);
  }
  
  .theme-toggle-icon.sun {
    left: 0.375rem;
    opacity: 1;
  }
  
  .theme-toggle-icon.moon {
    right: 0.375rem;
    opacity: 0;
  }
  
  [data-theme="dark"] .theme-toggle-icon.sun {
    opacity: 0;
  }
  
  [data-theme="dark"] .theme-toggle-icon.moon {
    opacity: 1;
  }
  
  /* ============================================
     BADGES & CHIPS
     ============================================ */
  
  .badge-modern {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  
  .badge-primary { background: var(--accent-primary); color: white; }
  .badge-success { background: var(--accent-success); color: white; }
  .badge-warning { background: var(--accent-warning); color: white; }
  .badge-danger { background: var(--accent-danger); color: white; }
  .badge-info { background: var(--accent-info); color: white; }
  
  /* ============================================
     ANIMATIONS
     ============================================ */
  
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes slideIn {
    from {
      opacity: 0;
      transform: translateX(-20px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  @keyframes pulse {
    0%, 100% {
      opacity: 1;
    }
    50% {
      opacity: 0.5;
    }
  }
  
  .animate-fade-in {
    animation: fadeIn 0.5s ease-out;
  }
  
  .animate-slide-in {
    animation: slideIn 0.5s ease-out;
  }
  
  .animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  }
  
  /* ============================================
     UTILITIES
     ============================================ */
  
  .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .shadow-glow {
    box-shadow: var(--shadow-glow);
  }
  
  .backdrop-blur {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
  }
  
  /* ============================================
     RESPONSIVE
     ============================================ */
  
  @media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .modern-card {
      padding: 1rem;
    }
    
    .btn-modern {
      padding: 0.625rem 1.25rem;
      font-size: 0.875rem;
    }
  }
  