/* Ultra-Premium Design System - Netflix Quality */

/* === DESIGN TOKENS === */
:root {
  /* Core Brand Colors - Sophisticated Palette */
  --primary: #0F172A;           /* Deep Navy - Premium & trustworthy */
  --primary-light: #1E293B;     /* Lighter navy */
  --accent: #3B82F6;            /* Vibrant blue - CTA & highlights */
  --accent-light: #60A5FA;      /* Light blue */
  --success: #10B981;           /* Emerald - Success/money */
  --warning: #F59E0B;           /* Amber */
  --error: #EF4444;             /* Red */
  
  /* Ultra-Clean Neutrals */
  --white: #FFFFFF;
  --gray-50: #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #E5E5E5;
  --gray-300: #D4D4D4;
  --gray-400: #A3A3A3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;
  --black: #000000;
  
  /* Ultra-Sophisticated Gradients */
  --gradient-primary: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  --gradient-accent: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
  --gradient-light: linear-gradient(135deg, #FAFAFA 0%, #FFFFFF 100%);
  --gradient-success: linear-gradient(135deg, #10B981 0%, #059669 100%);
  --gradient-hero: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #334155 100%);
  
  /* Typography Scale - Inter Font System */
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Inter', system-ui, sans-serif;
  
  /* Spacing System - 8pt Grid */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  
  /* Border Radius - Modern Scale */
  --radius-sm: 0.375rem;   /* 6px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */
  --radius-2xl: 1.5rem;    /* 24px */
  --radius-3xl: 2rem;      /* 32px */
  --radius-full: 50rem;
  
  /* Shadow System - Netflix-style depth */
  --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-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-premium: 0 32px 64px rgba(99, 102, 241, 0.15);
  
  /* Animation & Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 1050;
  --z-toast: 1080;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--gray-900);
  background-color: var(--gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  min-height: 100vh;
}

/* === TYPOGRAPHY === */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1.1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* === CONTAINER SYSTEM === */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

@media (max-width: 640px) {
  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

/* === BUTTON SYSTEM === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border-radius: var(--radius-xl);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  min-height: 48px;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary Button - Premium gradient */
.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-premium);
}

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

/* Secondary Button - Clean outline */
.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* Ghost Button - Minimal */
.btn-ghost {
  background: transparent;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-ghost:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
  color: var(--gray-900);
}

/* Success Button */
.btn-success {
  background: var(--gradient-success);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.3);
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: 0.75rem;
  min-height: 36px;
  border-radius: var(--radius-lg);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: 1rem;
  min-height: 56px;
  border-radius: var(--radius-2xl);
}

.btn-xl {
  padding: var(--space-5) var(--space-10);
  font-size: 1.125rem;
  min-height: 64px;
  border-radius: var(--radius-2xl);
}

/* === CARD SYSTEM === */
.card {
  background: var(--white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--gray-300);
}

.card-interactive:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-2xl);
  border-color: var(--primary);
}

.card-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-6);
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

/* === FORM SYSTEM === */
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  padding: var(--space-4);
  font-family: var(--font-family);
  font-size: 1rem;
  color: var(--gray-900);
  background: var(--white);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-xl);
  transition: all var(--transition-normal);
  min-height: 48px;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
  color: var(--gray-400);
}

.form-input:invalid {
  border-color: var(--error);
}

/* === NAVIGATION === */
.nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 var(--space-6);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--gray-900);
  text-decoration: none;
}

.nav-logo {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  font-size: 1.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  color: var(--gray-600);
  text-decoration: none;
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  font-weight: 500;
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.nav-link.active {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

/* === MOBILE NAVIGATION === */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--gray-200);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: var(--z-fixed);
  padding: var(--space-2) 0;
}

.mobile-nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 100vw;
  margin: 0 auto;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2);
  color: var(--gray-500);
  text-decoration: none;
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  min-width: 48px;
  min-height: 48px;
  justify-content: center;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.mobile-nav-icon {
  font-size: 1.25rem;
}

.mobile-nav-label {
  font-size: 0.75rem;
  font-weight: 500;
}

/* === BADGE SYSTEM === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-primary {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.badge-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

/* === AVATAR SYSTEM === */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--gradient-primary);
  color: var(--white);
  font-weight: 600;
  position: relative;
}

.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-md { width: 40px; height: 40px; font-size: 0.875rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1rem; }
.avatar-xl { width: 64px; height: 64px; font-size: 1.25rem; }
.avatar-2xl { width: 80px; height: 80px; font-size: 1.5rem; }

/* === STATS SYSTEM === */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
  font-size: 0.75rem;
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
}

.stat-change.positive {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent);
}

.stat-change.negative {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translateY(30px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

.animate-fadeInUp { animation: fadeInUp 0.6s ease-out; }
.animate-fadeIn { animation: fadeIn 0.4s ease-out; }
.animate-slideIn { animation: slideIn 0.5s ease-out; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* Animation delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* === RESPONSIVE GRID === */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .grid { gap: var(--space-4); }
  .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* === UTILITIES === */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-effect {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.rounded-full { border-radius: var(--radius-full); }
.shadow-premium { box-shadow: var(--shadow-premium); }

/* Mobile-specific optimizations */
@media (max-width: 640px) {
  .container { padding: 0 var(--space-4); }
  .card-body, .card-header, .card-footer { padding: var(--space-4); }
  .stat-card { padding: var(--space-4); }
  .btn { min-height: 44px; }
  .form-input { min-height: 44px; }
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
  :root {
    --gray-50: #1F2937;
    --gray-100: #374151;
    --gray-900: #F9FAFB;
    --white: #1F2937;
  }
}

/* === BOTTOM NAVIGATION === */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.95) 0%, #111111 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 0;
  z-index: 1000;
  box-shadow: 
    0 -8px 30px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
  backdrop-filter: blur(20px);
}

.bottom-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
}

.nav-items {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: #A0A0A0;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.375rem;
  border-radius: 12px;
  min-width: 48px;
  min-height: 48px;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
  transition: left 0.6s;
}

.nav-item.active,
.nav-item:hover {
  color: #3B82F6;
  background: rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.nav-item:hover::before {
  left: 100%;
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(96, 165, 250, 0.1));
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

/* Remove more-nav-item class as it's been standardized to nav-item */

.nav-icon {
  font-size: 1.125rem;
}

.nav-label {
  font-size: 0.7rem;
  font-weight: 500;
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
  .nav-item {
    min-height: 48px;
  }
  
  .nav-item:active {
    background: rgba(59, 130, 246, 0.12);
  }
}