/* Baby Name Guesser - Theme Variations */

/* Dark Theme */
body.dark-theme {
    --bg-primary: #1a1a1b;
    --bg-secondary: #2d2d30;
    --bg-overlay: rgba(26, 26, 27, 0.95);
    
    --text-primary: #ffffff;
    --text-secondary: #d7dadc;
    --text-light: #ffffff;
    
    --border-color: #565758;
    --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-heavy: 0 8px 24px rgba(0, 0, 0, 0.5);
    
    --empty: #2d2d30;
    
    background: linear-gradient(135deg, #2d2d30 0%, #1a1a1b 50%, #0d1117 100%);
}

body.dark-theme .tile {
    background: var(--empty);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-theme .tile.filled {
    border-color: var(--text-primary);
}

body.dark-theme .tile.correct {
    background: var(--correct);
    border-color: var(--correct);
    color: var(--text-light);
}

body.dark-theme .tile.present {
    background: var(--present);
    border-color: var(--present);
    color: var(--text-light);
}

body.dark-theme .tile.absent {
    background: var(--absent);
    border-color: var(--absent);
    color: var(--text-light);
}

body.dark-theme .key {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

body.dark-theme .key:hover {
    background: var(--soft-pink);
    color: var(--text-primary);
}

body.dark-theme .modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

body.dark-theme .action-btn:disabled {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

/* High Contrast Theme */
body.high-contrast {
    --primary-pink: #ff0080;
    --soft-pink: #ff4da6;
    --light-pink: #ffb3d9;
    --baby-blue: #0099ff;
    --soft-yellow: #ffff00;
    --mint-green: #00ff00;
    --lavender: #cc99ff;
    
    --correct: #00ff00;
    --present: #ffff00;
    --absent: #ff0000;
    --empty: #ffffff;
    
    --text-primary: #000000;
    --text-secondary: #333333;
    --text-light: #ffffff;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f0f0f0;
    --bg-overlay: rgba(255, 255, 255, 0.98);
    
    --border-color: #000000;
    --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-heavy: 0 8px 24px rgba(0, 0, 0, 0.5);
}

body.high-contrast .tile {
    border-width: 3px;
    font-weight: 900;
}

body.high-contrast .key {
    border: 2px solid var(--border-color);
    font-weight: 700;
}

body.high-contrast .action-btn,
body.high-contrast .icon-btn {
    border: 2px solid var(--border-color);
    font-weight: 700;
}

body.high-contrast .modal-content {
    border: 3px solid var(--border-color);
}

/* Dark + High Contrast Theme */
body.dark-theme.high-contrast {
    --bg-primary: #000000;
    --bg-secondary: #1a1a1a;
    --bg-overlay: rgba(0, 0, 0, 0.98);
    
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-light: #ffffff;
    
    --border-color: #ffffff;
    --empty: #1a1a1a;
    
    background: #000000;
}

body.dark-theme.high-contrast .tile {
    background: var(--empty);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-theme.high-contrast .key {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

/* Font Size Variations */
body.font-small {
    --font-size-xs: 10px;
    --font-size-sm: 12px;
    --font-size-md: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 20px;
    --font-size-xxl: 26px;
}

body.font-small .tile {
    width: 40px;
    height: 40px;
}

body.font-small .key {
    min-width: 26px;
    height: 38px;
}

body.font-small .key-large {
    min-width: 50px;
}

body.font-large {
    --font-size-xs: 14px;
    --font-size-sm: 16px;
    --font-size-md: 18px;
    --font-size-lg: 22px;
    --font-size-xl: 28px;
    --font-size-xxl: 38px;
}

body.font-large .tile {
    width: 60px;
    height: 60px;
}

body.font-large .key {
    min-width: 36px;
    height: 52px;
}

body.font-large .key-large {
    min-width: 72px;
}

body.font-large .container {
    max-width: 600px;
}

/* Color Blind Friendly Theme */
body.colorblind-friendly {
    --correct: #0173b2;
    --present: #de8f05;
    --absent: #949494;
}

body.colorblind-friendly .tile.correct {
    background: var(--correct);
    position: relative;
}

body.colorblind-friendly .tile.correct::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    color: white;
    font-weight: bold;
}

body.colorblind-friendly .tile.present {
    background: var(--present);
    position: relative;
}

body.colorblind-friendly .tile.present::after {
    content: '?';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    color: white;
    font-weight: bold;
}

body.colorblind-friendly .tile.absent {
    background: var(--absent);
    position: relative;
}

body.colorblind-friendly .tile.absent::after {
    content: '✗';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    color: white;
    font-weight: bold;
}

/* Keyboard state indicators for colorblind users */
body.colorblind-friendly .key.correct::before {
    content: '✓ ';
    font-size: 10px;
}

body.colorblind-friendly .key.present::before {
    content: '? ';
    font-size: 10px;
}

body.colorblind-friendly .key.absent::before {
    content: '✗ ';
    font-size: 10px;
}

/* Reduced Motion Theme */
body.reduced-motion,
body.reduced-motion * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

body.reduced-motion .confetti,
body.reduced-motion .sparkle::before,
body.reduced-motion .sparkle::after {
    display: none !important;
}

body.reduced-motion .tile-flip,
body.reduced-motion .row-shake,
body.reduced-motion .bounce {
    animation: none !important;
}

/* Focus Visible Support */
body.focus-visible .key:focus-visible,
body.focus-visible .action-btn:focus-visible,
body.focus-visible .icon-btn:focus-visible {
    outline: 3px solid var(--primary-pink);
    outline-offset: 2px;
}

body.focus-visible .key:focus:not(:focus-visible),
body.focus-visible .action-btn:focus:not(:focus-visible),
body.focus-visible .icon-btn:focus:not(:focus-visible) {
    outline: none;
}

/* Print Theme */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    .tile {
        border: 2px solid black !important;
        background: white !important;
        color: black !important;
    }
    
    .tile.correct {
        background: #ddd !important;
    }
    
    .tile.present {
        background: #eee !important;
    }
    
    .tile.absent {
        background: #f5f5f5 !important;
    }
    
    .header {
        background: white !important;
        box-shadow: none !important;
    }
    
    .game-board {
        background: white !important;
        box-shadow: none !important;
    }
}

/* Seasonal Themes (Optional) */
body.theme-spring {
    background: linear-gradient(135deg, #98fb98 0%, #fff8dc 50%, #ffb6c1 100%);
}

body.theme-summer {
    background: linear-gradient(135deg, #87ceeb 0%, #ffff00 50%, #ffa500 100%);
}

body.theme-autumn {
    background: linear-gradient(135deg, #daa520 0%, #cd853f 50%, #bc8f8f 100%);
}

body.theme-winter {
    background: linear-gradient(135deg, #e6e6fa 0%, #b0e0e6 50%, #f0f8ff 100%);
}

/* Mobile-specific theme adjustments */
@media (max-width: 480px) {
    body.font-large .tile {
        width: 50px;
        height: 50px;
    }
    
    body.font-large .key {
        min-width: 32px;
        height: 46px;
    }
    
    body.font-large .key-large {
        min-width: 64px;
    }
    
    body.font-small .tile {
        width: 35px;
        height: 35px;
    }
    
    body.font-small .key {
        min-width: 24px;
        height: 34px;
    }
    
    body.font-small .key-large {
        min-width: 46px;
    }
}

/* Touch-friendly theme for mobile */
@media (hover: none) and (pointer: coarse) {
    /* Don't override keyboard key sizes to maintain 3-row layout */
    .icon-btn {
        min-width: 48px;
        min-height: 48px;
    }
    
    .action-btn {
        min-height: 48px;
        padding: 12px 24px;
    }
}

/* Theme transition animations */
body {
    transition: background 0.5s ease, color 0.3s ease;
}

.tile,
.key,
.action-btn,
.icon-btn,
.modal-content {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Custom scrollbar for webkit browsers */
body.dark-theme ::-webkit-scrollbar {
    width: 8px;
}

body.dark-theme ::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

body.dark-theme ::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

body.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Selection colors */
::selection {
    background: var(--primary-pink);
    color: white;
}

body.dark-theme ::selection {
    background: var(--soft-pink);
    color: var(--text-primary);
} 