/* ============================================
   Easy Happy Forever - Design System Variables
   Clean + Warm + Professional style
   ============================================ */

/* ========== Color Palette ========== */
:root {
    /* Primary */
    --color-primary: #E8615C;        /* Warm coral */
    --color-primary-light: #F4A9A4;  /* Light coral */
    --color-primary-dark: #C94A45;   /* Deep coral */

    /* Secondary */
    --color-secondary: #4D9B7C;      /* Forest green */
    --color-secondary-light: #7DB89F; /* Light green */
    --color-secondary-dark: #3D7A62;  /* Deep green */

    /* Accent */
    --color-accent: #F4A340;         /* Warm amber */
    --color-accent-light: #F7BC6A;   /* Light amber */
    --color-accent-dark: #D4892A;    /* Deep amber */

    /* Backgrounds */
    --color-bg: #FAFAFA;             /* Near-white */
    --color-bg-alt: #F0F0F0;        /* Light gray */
    --color-card: #FFFFFF;           /* Pure white - cards */

    /* Text */
    --color-text: #1A1A2E;           /* Deep navy - primary text */
    --color-text-light: #6B7280;    /* Medium gray - secondary text */
    --color-text-lighter: #9CA3AF;  /* Light gray - tertiary text */

    /* Functional */
    --color-success: #10B981;       /* Success green */
    --color-warning: #F59E0B;       /* Warning amber */
    --color-error: #EF4444;         /* Error red */

    /* RGB components for rgba() usage */
    --color-primary-rgb: 232, 97, 92;
    --color-secondary-rgb: 77, 155, 124;
    --color-accent-rgb: 244, 163, 64;
    --color-text-rgb: 26, 26, 46;
    --color-success-rgb: 16, 185, 129;
    --color-warning-rgb: 245, 158, 11;
    --color-error-rgb: 239, 68, 68;

    /* Borders */
    --border: #E5E7EB;
    --border-dark: rgba(255, 255, 255, 0.08);

    /* Shadows */
    --shadow-color: rgba(0, 0, 0, 0.08);
    --shadow-color-strong: rgba(0, 0, 0, 0.12);
}

/* ========== Font Faces (self-hosted, zero third-party requests) ========== */

/* Quicksand - Latin - weights 400/500/600/700 */
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/google/quicksand-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/google/quicksand-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/google/quicksand-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/google/quicksand-700.woff2') format('woff2');
}

/* JetBrains Mono - Latin - weights 400/500/600 */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/google/jetbrainsmono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/google/jetbrainsmono-500.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/google/jetbrainsmono-600.woff2') format('woff2');
}

/* ========== Typography ========== */
:root {
    /* System font stack (Quicksand reserved for logo/titles) */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* Font sizes */
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 30px;
    --text-4xl: 36px;
    --text-5xl: 48px;

    /* Font weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
}

/* ========== Spacing ========== */
:root {
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
}

/* ========== Border Radius ========== */
:root {
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
}

/* ========== Shadows ========== */
:root {
    --shadow-sm: 0 2px 8px var(--shadow-color);
    --shadow-md: 0 4px 16px var(--shadow-color);
    --shadow-lg: 0 8px 30px var(--shadow-color);
    --shadow-xl: 0 12px 40px var(--shadow-color-strong);
}

/* ========== Transitions ========== */
:root {
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ========== Breakpoints ========== */
:root {
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
}

/* ========== Hover Effects ========== */
:root {
    --hover-lift: transform translateY(-2px);
    --hover-shadow: box-shadow var(--shadow-xl);
}

/* ========== Dark Mode ========== */
[data-theme="dark"] {
    --color-bg: #1A1A2E;
    --color-bg-alt: #16213E;
    --color-card: #242442;
    --color-text: #E8E8F0;
    --color-text-light: #A0A0B8;
    --color-text-lighter: #6B6B80;
    --color-primary: #F07B74;
    --color-primary-light: #F4A9A4;
    --color-primary-dark: #E8615C;
    --color-secondary: #7DB89F;
    --color-secondary-light: #4D9B7C;
    --color-secondary-dark: #3D7A62;
    --color-accent: #F7BC6A;
    --color-accent-light: #F4A340;
    --color-accent-dark: #D4892A;
    --color-primary-rgb: 240, 123, 116;
    --color-secondary-rgb: 125, 184, 159;
    --color-accent-rgb: 247, 188, 106;
    --color-text-rgb: 232, 232, 240;
    --color-success-rgb: 16, 185, 129;
    --color-warning-rgb: 245, 158, 11;
    --color-error-rgb: 239, 68, 68;

    --border: rgba(255, 255, 255, 0.1);
    --border-dark: rgba(255, 255, 255, 0.08);

    --shadow-color: rgba(0, 0, 0, 0.25);
    --shadow-color-strong: rgba(0, 0, 0, 0.40);
}

/* Dark mode overrides for specific elements */
[data-theme="dark"] body {
    background: var(--color-bg);
}

[data-theme="dark"] .game-card {
    background: var(--color-card);
    border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .ad-slot {
    background: var(--color-bg-alt);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--color-text-lighter);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    :root {
        --text-4xl: 28px;
        --text-5xl: 36px;
        --space-lg: 16px;
        --space-xl: 24px;
    }
}
