/* Design Tokens - Based on ux-steve design specifications */

:root {
  /* ========================================
     COLORS
     ======================================== */

  /* Brand */
  --color-primary: #0F766E;
  --color-primary-hover: #0D6560;
  --color-accent: #F59E0B;

  /* Neutrals */
  --color-white: #FFFFFF;
  --color-gray-50: #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-300: #D1D5DB;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;
  --color-gray-700: #374151;
  --color-gray-900: #111827;

  /* Semantic Colors */
  --color-success: #059669;
  --color-success-bg: #D1FAE5;
  --color-error: #DC2626;
  --color-error-bg: #FEE2E2;
  --color-warning: #D97706;
  --color-warning-bg: #FEF3C7;
  --color-info: #2563EB;
  --color-info-bg: #DBEAFE;

  /* Teal shades */
  --color-teal-50: #ECFDF5;
  --color-teal-700: #0F766E;
  --color-teal-800: #0D6560;

  /* ========================================
     TYPOGRAPHY - Mobile (320px - 767px)
     ======================================== */

  /* Font Family */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;

  /* Font Sizes */
  --font-size-display: 1.5rem;      /* 24px - Logo */
  --font-size-headline: 1.125rem;   /* 18px - Puzzle #, Stats */
  --font-size-subhead: 1rem;        /* 16px - Attempts, Timer */
  --font-size-body: 1rem;           /* 16px - Instructions, Feedback */
  --font-size-word-slot: 1.375rem;  /* 22px - Words in slots (increased from 20px) */
  --font-size-word-bank: 1rem;      /* 16px - Words in bank (reduced from 18px to prevent wrapping) */
  --font-size-button: 1.125rem;     /* 18px - Buttons */
  --font-size-caption: 0.875rem;    /* 14px - Hints, Helper text */
  --font-size-micro: 0.75rem;       /* 12px - Slot numbers */

  /* Font Weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Line Heights */
  --line-height-tight: 1.2;
  --line-height-normal: 1.3;
  --line-height-relaxed: 1.4;
  --line-height-loose: 1.5;

  /* Letter Spacing */
  --letter-spacing-tight: -0.02em;
  --letter-spacing-snug: -0.01em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.01em;
  --letter-spacing-wider: 0.02em;

  /* ========================================
     SPACING
     ======================================== */

  --space-xs: 0.5rem;    /* 8px */
  --space-sm: 0.75rem;   /* 12px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */

  /* ========================================
     LAYOUT
     ======================================== */

  --container-padding: var(--space-md);  /* 16px */
  --header-height: 56px;
  --header-info-height: 40px;
  --status-bar-height: 32px;
  --touch-target-min: 48px;
  --slot-height: 56px;  /* Mobile: compact layout */

  /* ========================================
     BORDERS & SHADOWS
     ======================================== */

  --border-width: 2px;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(15, 118, 110, 0.3);
  --glow-primary: 0 0 0 4px rgba(15, 118, 110, 0.2);

  /* ========================================
     TRANSITIONS & ANIMATIONS
     ======================================== */

  /* Durations */
  --duration-instant: 100ms;
  --duration-fast: 150ms;
  --duration-normal: 200ms;
  --duration-medium: 300ms;
  --duration-slow: 400ms;

  /* Easing Curves */
  --ease-standard: cubic-bezier(0.4, 0.0, 0.2, 1);
  --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0.0, 1, 1);
  --ease-in-out: cubic-bezier(0.4, 0.0, 0.6, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* ========================================
     Z-INDEX
     ======================================== */

  --z-menu: 100;
  --z-modal-backdrop: 200;
  --z-modal: 201;
}

/* ========================================
   TABLET (768px - 1024px)
   ======================================== */

@media (min-width: 768px) {
  :root {
    --font-size-display: 1.6875rem;   /* 27px */
    --font-size-headline: 1.25rem;    /* 20px */
    --font-size-subhead: 1.125rem;    /* 18px */
    --font-size-body: 1.125rem;       /* 18px */
    --font-size-word-slot: 1.375rem;  /* 22px */
    --font-size-word-bank: 1.125rem;  /* 18px - Reduced from 20px for tablet */
    --font-size-button: 1.25rem;      /* 20px */
    --font-size-caption: 1rem;        /* 16px */
    --font-size-micro: 0.875rem;      /* 14px */

    --container-padding: var(--space-lg);  /* 24px */
    --header-height: 64px;
    --slot-height: 64px;  /* Tablet+: restore larger slots */
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.colorblind-mode .slot--correct {
  background-image: repeating-linear-gradient(
    45deg,
    var(--color-success-bg),
    var(--color-success-bg) 10px,
    #A7F3D0 10px,
    #A7F3D0 20px
  );
}

.colorblind-mode .slot--wrong {
  background-image: repeating-linear-gradient(
    45deg,
    var(--color-error-bg),
    var(--color-error-bg) 10px,
    #FECACA 10px,
    #FECACA 20px
  );
}
