/* ========================================
   DITTAH - Theme System
   Dark Theme (Default) + Light Theme
   ======================================== */

/* ========================================
   CSS VARIABLES - SHARED
   ======================================== */
:root {
    /* Brand Gradient Colors (from logo) */
    --color-red: #E85A4F;
    --color-red-dark: #D64545;
    --color-orange: #F5A623;
    --color-yellow: #F7D046;
    --color-pink: #FF6B6B;

    /* Gradients */
    --gradient-brand: linear-gradient(135deg, var(--color-red) 0%, var(--color-orange) 50%, var(--color-yellow) 100%);
    --gradient-brand-reverse: linear-gradient(135deg, var(--color-yellow) 0%, var(--color-orange) 50%, var(--color-red) 100%);
    --gradient-text: linear-gradient(90deg, var(--color-red) 0%, var(--color-orange) 100%);

    /* Typography */
    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 40px;

    /* Animation */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========================================
   DARK THEME (Default)
   ======================================== */
:root,
[data-theme="dark"] {
    /* Backgrounds */
    --bg-primary: #1a1d21;
    --bg-secondary: #23272b;
    --bg-tertiary: #2d3238;
    --bg-card: #2d3238;
    --bg-card-hover: #363c42;
    --bg-navbar: rgba(26, 29, 33, 0.95);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b8bcc4;
    --text-muted: #6c7580;

    /* Borders */
    --border-color: #3d4349;
    --border-color-light: #4a5058;

    /* Speech Bubbles - Dark theme gets gradient-tinted bubbles */
    --bubble-di-bg: linear-gradient(135deg, rgba(232, 90, 79, 0.15) 0%, rgba(245, 166, 35, 0.1) 100%);
    --bubble-di-border: rgba(232, 90, 79, 0.3);
    --bubble-di-text: #ffffff;

    --bubble-ta-bg: linear-gradient(135deg, rgba(245, 166, 35, 0.15) 0%, rgba(247, 208, 70, 0.1) 100%);
    --bubble-ta-border: rgba(245, 166, 35, 0.3);
    --bubble-ta-text: #ffffff;

    /* Feature Cards */
    --card-bg: var(--bg-card);
    --card-border: var(--border-color);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);

    /* Steps/How it works */
    --steps-line-bg: var(--gradient-brand);

    /* Footer */
    --footer-bg: #13161a;
}

/* ========================================
   LIGHT THEME
   ======================================== */
[data-theme="light"] {
    /* Backgrounds */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef0f2;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fa;
    --bg-navbar: rgba(255, 255, 255, 0.95);

    /* Text Colors */
    --text-primary: #1a1d21;
    --text-secondary: #4a5058;
    --text-muted: #6c7580;

    /* Borders */
    --border-color: #e0e3e7;
    --border-color-light: #eef0f2;

    /* Speech Bubbles - Light theme gets subtle tinted bubbles */
    --bubble-di-bg: linear-gradient(135deg, rgba(232, 90, 79, 0.08) 0%, rgba(245, 166, 35, 0.05) 100%);
    --bubble-di-border: rgba(232, 90, 79, 0.25);
    --bubble-di-text: #1a1d21;

    --bubble-ta-bg: linear-gradient(135deg, rgba(245, 166, 35, 0.08) 0%, rgba(247, 208, 70, 0.05) 100%);
    --bubble-ta-border: rgba(245, 166, 35, 0.25);
    --bubble-ta-text: #1a1d21;

    /* Feature Cards */
    --card-bg: var(--bg-card);
    --card-border: var(--border-color);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.15);

    /* Steps/How it works */
    --steps-line-bg: var(--gradient-brand);

    /* Footer */
    --footer-bg: #1a1d21;
}

/* ========================================
   THEME TOGGLE BUTTON
   ======================================== */
.theme-toggle {
    position: relative;
    width: 56px;
    height: 28px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    padding: 2px;
}

.theme-toggle:hover {
    border-color: var(--color-orange);
}

.theme-toggle-slider {
    width: 20px;
    height: 20px;
    background: var(--gradient-brand);
    border-radius: 50%;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

[data-theme="dark"] .theme-toggle-slider {
    transform: translateX(0);
}

[data-theme="light"] .theme-toggle-slider {
    transform: translateX(26px);
}

.theme-toggle-slider::before {
    content: '🌙';
}

[data-theme="light"] .theme-toggle-slider::before {
    content: '☀️';
}

/* ========================================
   GRADIENT TEXT UTILITY
   ======================================== */
.gradient-text,
.highlight {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   THEME TRANSITION
   ======================================== */
body,
.navbar,
.feature-card,
.speech-bubble,
.footer {
    transition: background-color var(--transition-normal),
                color var(--transition-normal),
                border-color var(--transition-normal);
}
