/* ============================================
   DIZICLOCK PREMIUM UI/UX DESIGN SYSTEM v2.0
   Ultra-modern design with glassmorphism effects
   ============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES - DESIGN TOKENS
   ============================================ */
:root {
  /* ===== COLOR SYSTEM ===== */
  /* Primary Colors */
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-200: #bae6fd;
  --primary-300: #7dd3fc;
  --primary-400: #38bdf8;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-800: #075985;
  --primary-900: #0c4a6e;
  --primary-950: #082f49;

  /* Secondary Colors */
  --secondary-50: #f8fafc;
  --secondary-100: #f1f5f9;
  --secondary-200: #e2e8f0;
  --secondary-300: #cbd5e1;
  --secondary-400: #94a3b8;
  --secondary-500: #64748b;
  --secondary-600: #475569;
  --secondary-700: #334155;
  --secondary-800: #1e293b;
  --secondary-900: #0f172a;
  --secondary-950: #020617;

  /* Accent Colors */
  --accent-50: #fefce8;
  --accent-100: #fef9c3;
  --accent-200: #fef08a;
  --accent-300: #fde047;
  --accent-400: #facc15;
  --accent-500: #eab308;
  --accent-600: #ca8a04;
  --accent-700: #a16207;
  --accent-800: #854d0e;
  --accent-900: #713f12;
  --accent-950: #422006;

  /* Success Colors */
  --success-50: #f0fdf4;
  --success-100: #dcfce7;
  --success-200: #bbf7d0;
  --success-300: #86efac;
  --success-400: #4ade80;
  --success-500: #22c55e;
  --success-600: #16a34a;
  --success-700: #15803d;
  --success-800: #166534;
  --success-900: #14532d;
  --success-950: #052e16;

  /* Warning Colors */
  --warning-50: #fffbeb;
  --warning-100: #fef3c7;
  --warning-200: #fde68a;
  --warning-300: #fcd34d;
  --warning-400: #fbbf24;
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  --warning-700: #b45309;
  --warning-800: #92400e;
  --warning-900: #78350f;
  --warning-950: #451a03;

  /* Error Colors */
  --error-50: #fef2f2;
  --error-100: #fee2e2;
  --error-200: #fecaca;
  --error-300: #fca5a5;
  --error-400: #f87171;
  --error-500: #ef4444;
  --error-600: #dc2626;
  --error-700: #b91c1c;
  --error-800: #991b1b;
  --error-900: #7f1d1d;
  --error-950: #450a0a;

  /* ===== TYPOGRAPHY SYSTEM ===== */
  /* Font Families */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Fira Code', 'Monaco', 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  --font-display: 'Inter Tight', 'Inter', sans-serif;

  /* Font Sizes */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */
  --text-4xl: 2.25rem;    /* 36px */
  --text-5xl: 3rem;       /* 48px */
  --text-6xl: 3.75rem;    /* 60px */
  --text-7xl: 4.5rem;     /* 72px */
  --text-8xl: 6rem;       /* 96px */
  --text-9xl: 8rem;       /* 128px */

  /* Font Weights */
  --font-thin: 100;
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  --font-black: 900;

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* ===== SPACING SYSTEM ===== */
  --space-0: 0;
  --space-px: 1px;
  --space-0.5: 0.125rem; /* 2px */
  --space-1: 0.25rem;     /* 4px */
  --space-1.5: 0.375rem;  /* 6px */
  --space-2: 0.5rem;      /* 8px */
  --space-2.5: 0.625rem;  /* 10px */
  --space-3: 0.75rem;     /* 12px */
  --space-3.5: 0.875rem;  /* 14px */
  --space-4: 1rem;        /* 16px */
  --space-5: 1.25rem;     /* 20px */
  --space-6: 1.5rem;      /* 24px */
  --space-7: 1.75rem;     /* 28px */
  --space-8: 2rem;        /* 32px */
  --space-9: 2.25rem;     /* 36px */
  --space-10: 2.5rem;     /* 40px */
  --space-11: 2.75rem;    /* 44px */
  --space-12: 3rem;       /* 48px */
  --space-14: 3.5rem;     /* 56px */
  --space-16: 4rem;       /* 64px */
  --space-20: 5rem;       /* 80px */
  --space-24: 6rem;       /* 96px */
  --space-28: 7rem;       /* 112px */
  --space-32: 8rem;       /* 128px */
  --space-36: 9rem;       /* 144px */
  --space-40: 10rem;      /* 160px */
  --space-44: 11rem;      /* 176px */
  --space-48: 12rem;      /* 192px */
  --space-52: 13rem;      /* 208px */
  --space-56: 14rem;      /* 224px */
  --space-60: 15rem;      /* 240px */
  --space-64: 16rem;      /* 256px */
  --space-72: 18rem;      /* 288px */
  --space-80: 20rem;      /* 320px */
  --space-96: 24rem;      /* 384px */

  /* ===== BORDER SYSTEM ===== */
  --border-0: 0;
  --border-2: 2px;
  --border-4: 4px;
  --border-8: 8px;

  /* Border Radius */
  --radius-none: 0;
  --radius-sm: 0.125rem;  /* 2px */
  --radius-base: 0.25rem;   /* 4px */
  --radius-md: 0.375rem;  /* 6px */
  --radius-lg: 0.5rem;    /* 8px */
  --radius-xl: 0.75rem;   /* 12px */
  --radius-2xl: 1rem;     /* 16px */
  --radius-3xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;

  /* ===== SHADOW SYSTEM ===== */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-base: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
  --shadow-none: 0 0 #0000;

  /* Glassmorphism Shadows */
  --shadow-glass-sm: 0 2px 10px 0 rgb(0 0 0 / 0.05), inset 0 1px 0 rgb(255 255 255 / 0.1);
  --shadow-glass: 0 8px 32px 0 rgb(0 0 0 / 0.1), inset 0 1px 0 rgb(255 255 255 / 0.2);
  --shadow-glass-lg: 0 16px 64px 0 rgb(0 0 0 / 0.15), inset 0 1px 0 rgb(255 255 255 / 0.3);

  /* ===== ANIMATION SYSTEM ===== */
  --duration-75: 75ms;
  --duration-100: 100ms;
  --duration-150: 150ms;
  --duration-200: 200ms;
  --duration-300: 300ms;
  --duration-500: 500ms;
  --duration-700: 700ms;
  --duration-1000: 1000ms;

  /* Easing Functions */
  --ease-linear: linear;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Custom Easings */
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* ===== Z-INDEX SYSTEM ===== */
  --z-0: 0;
  --z-10: 10;
  --z-20: 20;
  --z-30: 30;
  --z-40: 40;
  --z-50: 50;
  --z-auto: auto;

  /* ===== BREAKPOINTS ===== */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;

  /* ===== CONTAINER SIZES ===== */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;

  /* ===== GLASSMORPHISM SYSTEM ===== */
  --glass-blur: blur(20px);
  --glass-blur-sm: blur(10px);
  --glass-blur-lg: blur(30px);
  --glass-saturation: saturate(180%);
  --glass-brightness: brightness(120%);
}

/* ============================================
   DARK MODE VARIABLES
   ============================================ */
[data-theme="dark"] {
  /* Dark mode color overrides */
  --primary-50: #0f172a;
  --primary-100: #1e293b;
  --primary-200: #334155;
  --primary-300: #475569;
  --primary-400: #64748b;
  --primary-500: #94a3b8;
  --primary-600: #cbd5e1;
  --primary-700: #e2e8f0;
  --primary-800: #f1f5f9;
  --primary-900: #f8fafc;
  --primary-950: #ffffff;

  /* Glassmorphism adjustments for dark mode */
  --shadow-glass-sm: 0 2px 10px 0 rgb(0 0 0 / 0.2), inset 0 1px 0 rgb(255 255 255 / 0.05);
  --shadow-glass: 0 8px 32px 0 rgb(0 0 0 / 0.3), inset 0 1px 0 rgb(255 255 255 / 0.1);
  --shadow-glass-lg: 0 16px 64px 0 rgb(0 0 0 / 0.4), inset 0 1px 0 rgb(255 255 255 / 0.15);
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */
@media (prefers-contrast: high) {
  :root {
    /* High contrast adjustments */
    --primary-500: #0066cc;
    --primary-600: #0052a3;
    --secondary-500: #333333;
    --secondary-600: #000000;
    --border-2: 3px;
    --border-4: 6px;
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-75: 0ms;
    --duration-100: 0ms;
    --duration-150: 0ms;
    --duration-200: 0ms;
    --duration-300: 0ms;
    --duration-500: 0ms;
    --duration-700: 0ms;
    --duration-1000: 0ms;
  }
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--secondary-800);
  background-color: var(--secondary-50);
  transition: background-color var(--duration-300) var(--ease-in-out), 
               color var(--duration-300) var(--ease-in-out);
}

/* ============================================
   GLASSMORPHISM CLASSES
   ============================================ */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-glass);
  transition: all var(--duration-300) var(--ease-out);
}

.glass-sm {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: var(--glass-blur-sm);
  -webkit-backdrop-filter: var(--glass-blur-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-glass-sm);
}

.glass-lg {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: var(--glass-blur-lg);
  -webkit-backdrop-filter: var(--glass-blur-lg);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-glass-lg);
}

.glass-hover:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glass-lg);
}

/* Dark mode glassmorphism */
[data-theme="dark"] .glass {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .glass-hover:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* ============================================
   ANIMATION CLASSES
   ============================================ */
.animate-fade-in {
  animation: fadeIn var(--duration-500) var(--ease-out) forwards;
}

.animate-fade-in-up {
  animation: fadeInUp var(--duration-500) var(--ease-out) forwards;
}

.animate-fade-in-down {
  animation: fadeInDown var(--duration-500) var(--ease-out) forwards;
}

.animate-fade-in-left {
  animation: fadeInLeft var(--duration-500) var(--ease-out) forwards;
}

.animate-fade-in-right {
  animation: fadeInRight var(--duration-500) var(--ease-out) forwards;
}

.animate-scale-in {
  animation: scaleIn var(--duration-500) var(--ease-bounce) forwards;
}

.animate-slide-in-up {
  animation: slideInUp var(--duration-300) var(--ease-out) forwards;
}

.animate-slide-in-down {
  animation: slideInDown var(--duration-300) var(--ease-out) forwards;
}

.animate-bounce {
  animation: bounce var(--duration-1000) var(--ease-in-out) infinite;
}

.animate-pulse {
  animation: pulse var(--duration-2000) var(--ease-in-out) infinite;
}

.animate-spin {
  animation: spin var(--duration-1000) linear infinite;
}

/* Keyframe Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes fadeInDown {
  from { 
    opacity: 0;
    transform: translateY(-20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from { 
    opacity: 0;
    transform: translateX(-20px);
  }
  to { 
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  0% { 
    opacity: 0;
    transform: translateX(20px);
  }
  100% { 
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from { 
    opacity: 0;
    transform: scale(0.9);
  }
  to { 
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes slideInDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    transform: translate3d(0, -8px, 0);
  }
  70% {
    transform: translate3d(0, -4px, 0);
  }
  90% {
    transform: translate3d(0, -2px, 0);
  }
}

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

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

/* ============================================
   HOVER EFFECTS
   ============================================ */
.hover-lift {
  transition: transform var(--duration-300) var(--ease-out), 
               box-shadow var(--duration-300) var(--ease-out);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.hover-glow {
  transition: all var(--duration-300) var(--ease-out);
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.hover-scale {
  transition: transform var(--duration-300) var(--ease-out);
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-rotate {
  transition: transform var(--duration-300) var(--ease-out);
}

.hover-rotate:hover {
  transform: rotate(5deg) scale(1.1);
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-600);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform var(--duration-700) var(--ease-in-out);
}

.page-transition.active {
  transform: translateY(0);
}

.page-transition.exit {
  transform: translateY(-100%);
}

/* ============================================
   PARALLAX SCROLLING
   ============================================ */
.parallax-container {
  position: relative;
  overflow: hidden;
}

.parallax-element {
  will-change: transform;
  transform: translateZ(0);
}

/* ============================================
   ACCESSIBILITY UTILITIES
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only.focusable:active,
.sr-only.focusable:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.focus-ring {
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color var(--duration-200) var(--ease-out);
}

.focus-ring:focus {
  outline-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .glass {
    border-width: 2px;
    border-color: currentColor;
  }
  
  .focus-ring:focus {
    outline-width: 3px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .no-print {
    display: none !important;
  }
  
  .glass {
    background: white !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }
}