/* Theme System for Pips Puzzle */

/* Default Theme (existing colors) */
:root {
    --bg-primary: #f3f4f6;
    --bg-secondary: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --accent-primary: #3b82f6;
    --accent-hover: #2563eb;
    --border-color: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.1);

    /* Ghibli-inspired theme colors */
    --ghibli-spirit-blue: #4a90e2;
    --ghibli-soft-peach: #fdb99b;
    --ghibli-warm-cream: #fef9f3;
    --ghibli-deep-green: #2d5a3d;
    --ghibli-forest-green: #4a8f5c;
    --ghibli-paper-white: #fffef9;
    --ghibli-charcoal: #3d3d3d;
    --ghibli-soft-shadow: rgba(0, 0, 0, 0.08);
    --ghibli-warm-shadow: rgba(74, 143, 92, 0.2);
    --ghibli-sky-blue: #7eb4e8;
}

/* Traditional White Word Game Theme */
[data-theme="classic"] {
    --bg-primary: #ffffff;
    --bg-secondary: #fefefe;
    --text-primary: #2c2c2c;
    --text-secondary: #666666;
    --accent-primary: #4a5568;
    --accent-hover: #2d3748;
    --border-color: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.08);

    /* Classic word game specific colors */
    --classic-charcoal: #2c2c2c;
    --classic-gray: #4a5568;
    --classic-light-gray: #a0aec0;
    --classic-border: #e2e8f0;
    --classic-white: #ffffff;
    --classic-off-white: #fefefe;
    --classic-subtle-shadow: rgba(0, 0, 0, 0.04);
}

/* Halloween Theme */
[data-theme="halloween"] {
    --bg-primary: #1a0f1f;
    --bg-secondary: #2d1b3d;
    --text-primary: #ff8c42;
    --text-secondary: #d4a574;
    --accent-primary: #ff6b35;
    --accent-hover: #ff8c42;
    --border-color: #4a2c4d;
    --shadow: rgba(255, 108, 53, 0.3);

    /* Halloween specific colors */
    --halloween-orange: #ff6b35;
    --halloween-purple: #6b2d5c;
    --halloween-green: #7cb342;
    --halloween-black: #1a0f1f;
}

/* Thanksgiving Theme */
[data-theme="thanksgiving"] {
    --bg-primary: #faf6f1;
    --bg-secondary: #fffbf5;
    --text-primary: #5c3a21;
    --text-secondary: #8b6f47;
    --accent-primary: #d97706;
    --accent-hover: #b45309;
    --border-color: #ddc5a2;
    --shadow: rgba(217, 119, 6, 0.2);

    /* Thanksgiving specific colors */
    --thanksgiving-harvest-orange: #d97706;
    --thanksgiving-pumpkin: #ea580c;
    --thanksgiving-brown: #5c3a21;
    --thanksgiving-tan: #ddc5a2;
    --thanksgiving-cream: #faf6f1;
    --thanksgiving-gold: #f59e0b;
    --thanksgiving-cranberry: #dc2626;
    --thanksgiving-autumn-red: #991b1b;
}

/* Dark Night Theme */
[data-theme="darknight"] {
    --bg-primary: #0f1419;
    --bg-secondary: #1a2332;
    --text-primary: #e3e8ef;
    --text-secondary: #9ca3af;
    --accent-primary: #60a5fa;
    --accent-hover: #3b82f6;
    --border-color: #2d3748;
    --shadow: rgba(96, 165, 250, 0.15);

    /* Dark night specific colors */
    --darknight-deep-navy: #0f1419;
    --darknight-navy: #1a2332;
    --darknight-slate: #2d3748;
    --darknight-moonlight: #60a5fa;
    --darknight-sky-blue: #3b82f6;
    --darknight-silver: #e3e8ef;
    --darknight-star-glow: rgba(96, 165, 250, 0.3);
}

/* Apply theme colors to body */
body:not(.blossom-game) {
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Halloween background effects */
[data-theme="halloween"] body:not(.blossom-game) {
    background: linear-gradient(135deg, #1a0f1f 0%, #2d1b3d 50%, #1a0f1f 100%);
    background-attachment: fixed;
    position: relative;
}

[data-theme="halloween"] body:not(.blossom-game)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 108, 53, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(107, 45, 92, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Thanksgiving background effects */
[data-theme="thanksgiving"] body:not(.blossom-game) {
    background: linear-gradient(135deg, #faf6f1 0%, #fffbf5 50%, #f5ebe0 100%);
    background-attachment: fixed;
    position: relative;
}

[data-theme="thanksgiving"] body:not(.blossom-game)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 25% 35%, rgba(217, 119, 6, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 75% 65%, rgba(245, 158, 11, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(234, 88, 12, 0.05) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

/* Dark Night background effects */
[data-theme="darknight"] body:not(.blossom-game) {
    background: linear-gradient(135deg, #0f1419 0%, #1a2332 50%, #0f1419 100%);
    background-attachment: fixed;
    position: relative;
}

[data-theme="darknight"] body:not(.blossom-game)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 15% 20%, rgba(96, 165, 250, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 40%),
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 50%, white, transparent),
        radial-gradient(1px 1px at 55% 90%, white, transparent);
    background-size:
        100% 100%,
        100% 100%,
        200% 200%,
        180% 180%,
        220% 220%,
        250% 250%,
        200% 200%,
        240% 240%,
        260% 260%;
    background-position:
        0 0,
        0 0,
        0 0,
        40% 60%,
        80% 10%,
        20% 40%,
        90% 70%,
        15% 20%,
        70% 80%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.5;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.7;
    }
}

/* Logo Section with Theme Switcher */
.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Theme Switcher Button Styles */
.theme-toggle {
    background: transparent;
    border: 2px solid transparent;
    border-radius: 50%;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    width: 44px;
    height: 44px;
    position: relative;
    animation: pumpkinPulse 2s ease-in-out infinite;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-color);
    transform: scale(1.1);
    animation: none;
}

.theme-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    display: block;
    animation: pumpkinBounce 2s ease-in-out infinite;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(20deg) scale(1.1);
    animation: none;
}

/* Pumpkin pulse animation */
@keyframes pumpkinPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 108, 53, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 108, 53, 0);
    }
}

/* Pumpkin bounce animation */
@keyframes pumpkinBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-3px) rotate(-5deg);
    }
    75% {
        transform: translateY(-3px) rotate(5deg);
    }
}

/* Tooltip hint */
.theme-toggle::after {
    content: 'Try Thanksgiving Theme! 🦃';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: linear-gradient(135deg, #d97706 0%, #ea580c 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-weight: 600;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(2px);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #d97706;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1001;
}

.theme-toggle:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(4px);
}

.theme-toggle:hover::before {
    opacity: 1;
}

/* Hide tooltip after first interaction */
.theme-toggle.used::after,
.theme-toggle.used::before {
    display: none;
}

/* Stop animations after button is used */
.theme-toggle.used {
    animation: none;
}

.theme-toggle.used .theme-icon {
    animation: none;
}

/* Theme Notification */
.theme-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    animation: slideInRight 0.4s ease-out;
}

.theme-notification-content {
    background: linear-gradient(135deg, #ff6b35 0%, #6b2d5c 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 360px;
    position: relative;
}

.theme-notification-icon {
    font-size: 2rem;
    animation: spin 0.6s ease-out;
}

.theme-notification-text {
    flex: 1;
}

.theme-notification-text strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.theme-notification-text p {
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.9;
}

.theme-notification-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    padding: 0;
    line-height: 1;
}

.theme-notification-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.theme-notification.fade-out {
    animation: slideOutRight 0.3s ease-out forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

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

/* Mobile responsive notification */
@media (max-width: 768px) {
    .theme-notification {
        right: 10px;
        left: 10px;
        top: 70px;
    }

    .theme-notification-content {
        max-width: 100%;
    }
}

[data-theme="halloween"] .theme-toggle {
    background: rgba(107, 45, 92, 0.3);
    border-color: var(--halloween-orange);
}

[data-theme="halloween"] .theme-toggle:hover {
    background: var(--halloween-purple);
    box-shadow: 0 0 20px rgba(255, 108, 53, 0.5);
    transform: scale(1.15) rotate(15deg);
}

/* Halloween decorative elements */
[data-theme="halloween"] .pumpkin-decoration {
    position: fixed;
    font-size: 2rem;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Card/Container styles */
body:not(.blossom-game):not(.crossword-game) .game-container:not(.clues-game),
.content:not(.seo-content):not(.clues-game .game-content):not(.captcha-content),
body:not(.blossom-game):not(.crossword-game) [class*="container"]:not(.casino-felt):not(.casino-felt *):not(.card-back-container):not(.seo-container):not(.clues-game):not(.clues-game *) {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="halloween"] body:not(.blossom-game):not(.crossword-game) .game-container:not(.clues-game),
[data-theme="halloween"] .content:not(.seo-content):not(.clues-game .game-content):not(.captcha-content) {
    box-shadow: none;
    border: none;
}

/* Header styles */
[data-theme="halloween"] .main-header {
    background: var(--halloween-black);
    border-bottom: 2px solid var(--halloween-orange);
}

[data-theme="halloween"] .site-title {
    color: var(--halloween-orange);
    text-shadow: 0 0 10px rgba(255, 108, 53, 0.5);
}

[data-theme="halloween"] .nav-link {
    color: var(--text-secondary);
}

[data-theme="halloween"] .nav-link:hover {
    color: var(--halloween-orange);
    background: rgba(255, 108, 53, 0.1);
}

/* Button styles */
[data-theme="halloween"] body:not(.blossom-game) button,
[data-theme="halloween"] body:not(.blossom-game) .btn {
    background: var(--halloween-purple);
    color: var(--halloween-orange);
    border-color: var(--halloween-orange);
}

[data-theme="halloween"] body:not(.blossom-game) button:hover,
[data-theme="halloween"] body:not(.blossom-game) .btn:hover {
    background: var(--halloween-orange);
    color: var(--halloween-black);
}

/* Game board cells */
[data-theme="halloween"] .cell {
    border-color: var(--halloween-orange);
}

[data-theme="halloween"] .domino {
    background: var(--halloween-purple);
    border-color: var(--halloween-orange);
    box-shadow: 0 2px 8px var(--shadow);
}

/* Spooky text effects */
[data-theme="halloween"] h1,
[data-theme="halloween"] h2,
[data-theme="halloween"] h3 {
    color: var(--halloween-orange);
}

/* Toast/notification styles */
[data-theme="halloween"] .toast,
[data-theme="halloween"] .notification {
    background: var(--halloween-black);
    border: 2px solid var(--halloween-orange);
    color: var(--halloween-orange);
}

/* Floating animations for Halloween elements */
[data-theme="halloween"] .floating-ghost {
    position: fixed;
    font-size: 3rem;
    opacity: 0.2;
    pointer-events: none;
    animation: ghostFloat 10s ease-in-out infinite;
}

@keyframes ghostFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.2;
    }
    25% {
        transform: translate(20px, -30px) scale(1.1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-10px, -20px) scale(0.9);
        opacity: 0.15;
    }
    75% {
        transform: translate(-30px, -40px) scale(1.05);
        opacity: 0.25;
    }
}

/* Dropdown menu styles */
[data-theme="halloween"] .dropdown-menu {
    background: var(--halloween-black);
    border: 2px solid var(--halloween-orange);
}

[data-theme="halloween"] .dropdown-link {
    color: var(--text-secondary);
}

[data-theme="halloween"] .dropdown-link:hover {
    background: var(--halloween-purple);
    color: var(--halloween-orange);
}

/* Form elements */
[data-theme="halloween"] input,
[data-theme="halloween"] select,
[data-theme="halloween"] textarea {
    background: var(--halloween-black);
    color: var(--halloween-orange);
    border-color: var(--halloween-orange);
}

[data-theme="halloween"] input:focus,
[data-theme="halloween"] select:focus,
[data-theme="halloween"] textarea:focus {
    outline: none;
    border-color: var(--halloween-orange);
    box-shadow: 0 0 10px rgba(255, 108, 53, 0.3);
}

/* Thanksgiving Theme Styles */
[data-theme="thanksgiving"] body {
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.7;
}

/* Thanksgiving header styles */
[data-theme="thanksgiving"] .main-header {
    background: var(--thanksgiving-cream);
    border-bottom: 3px solid var(--thanksgiving-harvest-orange);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.1);
}

[data-theme="thanksgiving"] .site-title {
    color: var(--thanksgiving-brown);
    font-weight: 700;
    letter-spacing: -0.025em;
    text-shadow: 0 1px 2px rgba(217, 119, 6, 0.2);
}

[data-theme="thanksgiving"] .nav-link {
    color: var(--text-secondary);
    font-weight: 600;
}

[data-theme="thanksgiving"] .nav-link:hover {
    color: var(--thanksgiving-harvest-orange);
    background: rgba(217, 119, 6, 0.1);
}

/* Thanksgiving button styles - transparent like classic */
[data-theme="thanksgiving"] body:not(.blossom-game) button,
[data-theme="thanksgiving"] body:not(.blossom-game) .btn {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
    box-shadow: none;
}

[data-theme="thanksgiving"] body:not(.blossom-game) button:hover,
[data-theme="thanksgiving"] body:not(.blossom-game) .btn:hover {
    background: var(--thanksgiving-brown);
    color: white;
    border-color: var(--thanksgiving-brown);
    transform: translateY(-1px);
    box-shadow: none;
}

/* Thanksgiving container styles */
[data-theme="thanksgiving"] body:not(.blossom-game):not(.crossword-game) .game-container:not(.clues-game),
[data-theme="thanksgiving"] .content:not(.seo-content):not(.clues-game .game-content):not(.captcha-content),
[data-theme="thanksgiving"] body:not(.blossom-game):not(.crossword-game) [class*="container"]:not(.casino-felt):not(.casino-felt *):not(.card-back-container):not(.seo-container):not(.clues-game):not(.clues-game *) {
    background: var(--bg-secondary);
    border: none;
    border-radius: 12px;
    box-shadow: none;
}

/* Thanksgiving game board elements */
[data-theme="thanksgiving"] .cell {
    background: var(--bg-secondary);
    border: 2px solid var(--thanksgiving-tan);
    color: var(--text-primary);
}

[data-theme="thanksgiving"] .cell:hover {
    background: #fff8ed;
    border-color: var(--thanksgiving-harvest-orange);
}

[data-theme="thanksgiving"] .domino,
[data-theme="thanksgiving"] .letter-tile {
    background: linear-gradient(135deg, #fffbf5 0%, #fff8ed 100%);
    border: 2px solid var(--thanksgiving-harvest-orange);
    color: var(--thanksgiving-brown);
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(217, 119, 6, 0.2);
}

[data-theme="thanksgiving"] .domino:hover,
[data-theme="thanksgiving"] .letter-tile:hover {
    border-color: var(--thanksgiving-pumpkin);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(217, 119, 6, 0.3);
}

/* Thanksgiving text styles */
[data-theme="thanksgiving"] h1,
[data-theme="thanksgiving"] h2,
[data-theme="thanksgiving"] h3,
[data-theme="thanksgiving"] h4,
[data-theme="thanksgiving"] h5,
[data-theme="thanksgiving"] h6 {
    color: var(--thanksgiving-brown);
    font-weight: 700;
    line-height: 1.3;
}

[data-theme="thanksgiving"] h1 {
    color: var(--thanksgiving-harvest-orange);
}

/* Thanksgiving form elements */
[data-theme="thanksgiving"] input,
[data-theme="thanksgiving"] select,
[data-theme="thanksgiving"] textarea {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--thanksgiving-tan);
    border-radius: 8px;
}

[data-theme="thanksgiving"] input:focus,
[data-theme="thanksgiving"] select:focus,
[data-theme="thanksgiving"] textarea:focus {
    outline: none;
    border-color: var(--thanksgiving-harvest-orange);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

/* Thanksgiving dropdown styles */
[data-theme="thanksgiving"] .dropdown-menu {
    background: var(--bg-secondary);
    border: 2px solid var(--thanksgiving-tan);
    box-shadow: 0 8px 24px rgba(217, 119, 6, 0.2);
}

[data-theme="thanksgiving"] .dropdown-link {
    color: var(--text-secondary);
}

[data-theme="thanksgiving"] .dropdown-link:hover {
    background: rgba(217, 119, 6, 0.1);
    color: var(--thanksgiving-harvest-orange);
}

/* Thanksgiving notification styles */
[data-theme="thanksgiving"] .toast,
[data-theme="thanksgiving"] .notification {
    background: var(--bg-secondary);
    border: 2px solid var(--thanksgiving-harvest-orange);
    color: var(--text-primary);
    box-shadow: 0 4px 16px rgba(217, 119, 6, 0.2);
}

/* Thanksgiving theme toggle */
[data-theme="thanksgiving"] .theme-toggle {
    background: rgba(217, 119, 6, 0.1);
    border-color: var(--thanksgiving-harvest-orange);
}

[data-theme="thanksgiving"] .theme-toggle:hover {
    background: var(--thanksgiving-harvest-orange);
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.4);
    transform: scale(1.15);
}

/* Thanksgiving decorative elements */
[data-theme="thanksgiving"] .autumn-decoration {
    position: fixed;
    font-size: 2rem;
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
    animation: autumnFloat 8s ease-in-out infinite;
}

@keyframes autumnFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.25;
    }
    25% {
        transform: translateY(-15px) rotate(10deg);
        opacity: 0.35;
    }
    50% {
        transform: translateY(-25px) rotate(-5deg);
        opacity: 0.2;
    }
    75% {
        transform: translateY(-15px) rotate(5deg);
        opacity: 0.3;
    }
}

/* Thanksgiving word game elements */
[data-theme="thanksgiving"] .letter-square {
    background: var(--bg-secondary);
    border: 2px solid var(--thanksgiving-tan);
    color: var(--thanksgiving-brown);
    font-weight: 700;
}

[data-theme="thanksgiving"] .letter-square.filled {
    background: var(--thanksgiving-harvest-orange);
    color: white;
    border-color: var(--thanksgiving-pumpkin);
}

[data-theme="thanksgiving"] .letter-square.correct {
    background: #16a34a;
    color: white;
    border-color: #16a34a;
}

[data-theme="thanksgiving"] .letter-square.partial {
    background: var(--thanksgiving-gold);
    color: white;
    border-color: var(--thanksgiving-gold);
}

[data-theme="thanksgiving"] .letter-square.incorrect {
    background: var(--thanksgiving-tan);
    color: var(--thanksgiving-brown);
    border-color: var(--thanksgiving-tan);
}

/* Thanksgiving section borders - make them blend with theme */
[data-theme="thanksgiving"] .game-controls {
    border-top-color: var(--thanksgiving-tan);
}

[data-theme="thanksgiving"] .game-footer {
    background: var(--thanksgiving-cream);
    border-top-color: var(--thanksgiving-tan);
}

[data-theme="thanksgiving"] .footer-meta {
    border-top-color: var(--thanksgiving-tan);
}

/* Classic Theme Styles */
[data-theme="classic"] body {
    background: var(--classic-white);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
}

/* Classic theme header styles */
[data-theme="classic"] .main-header {
    background: var(--classic-white);
    border-bottom: 1px solid var(--classic-border);
    box-shadow: 0 1px 3px var(--classic-subtle-shadow);
}

[data-theme="classic"] .site-title {
    color: var(--classic-charcoal);
    font-weight: 700;
    letter-spacing: -0.025em;
}

[data-theme="classic"] .nav-link {
    color: var(--classic-gray);
    font-weight: 500;
    transition: color 0.2s ease;
}

[data-theme="classic"] .nav-link:hover {
    color: var(--classic-charcoal);
    background: transparent;
}

/* Classic theme button styles */
[data-theme="classic"] button,
[data-theme="classic"] .btn {
    background: var(--classic-white);
    color: var(--classic-charcoal);
    border: 2px solid var(--classic-border);
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
}

[data-theme="classic"] button:hover,
[data-theme="classic"] .btn:hover {
    background: var(--classic-charcoal);
    color: var(--classic-white);
    border-color: var(--classic-charcoal);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px var(--classic-subtle-shadow);
}

/* Classic theme container styles */
[data-theme="classic"] body:not(.blossom-game):not(.crossword-game) .game-container:not(.clues-game),
[data-theme="classic"] .content:not(.seo-content):not(.clues-game .game-content):not(.captcha-content),
[data-theme="classic"] body:not(.blossom-game):not(.crossword-game) [class*="container"]:not(.casino-felt):not(.casino-felt *):not(.card-back-container):not(.seo-container):not(.clues-game):not(.clues-game *) {
    background: var(--classic-white);
    border: none;
    border-radius: 8px;
    box-shadow: none;
}

/* Classic theme game board elements */
[data-theme="classic"] .cell {
    background: var(--classic-white);
    border: 1px solid var(--classic-border);
    color: var(--classic-charcoal);
}

[data-theme="classic"] .cell:hover {
    background: #f8f9fa;
}

[data-theme="classic"] .domino,
[data-theme="classic"] .letter-tile {
    background: var(--classic-white);
    border: 2px solid var(--classic-border);
    color: var(--classic-charcoal);
    font-weight: 700;
    box-shadow: 0 1px 3px var(--classic-subtle-shadow);
}

[data-theme="classic"] .domino:hover,
[data-theme="classic"] .letter-tile:hover {
    border-color: var(--classic-gray);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px var(--classic-subtle-shadow);
}

/* Classic theme text styles */
[data-theme="classic"] h1,
[data-theme="classic"] h2,
[data-theme="classic"] h3,
[data-theme="classic"] h4,
[data-theme="classic"] h5,
[data-theme="classic"] h6 {
    color: var(--classic-charcoal);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

[data-theme="classic"] p,
[data-theme="classic"] .text {
    color: var(--classic-gray);
    line-height: 1.6;
}

/* Classic theme form elements */
[data-theme="classic"] input,
[data-theme="classic"] select,
[data-theme="classic"] textarea {
    background: var(--classic-white);
    color: var(--classic-charcoal);
    border: 2px solid var(--classic-border);
    border-radius: 6px;
    font-weight: 500;
}

[data-theme="classic"] input:focus,
[data-theme="classic"] select:focus,
[data-theme="classic"] textarea:focus {
    outline: none;
    border-color: var(--classic-gray);
    box-shadow: 0 0 0 3px rgba(74, 85, 104, 0.1);
}

/* Classic theme dropdown and menu styles */
[data-theme="classic"] .dropdown-menu {
    background: var(--classic-white);
    border: 1px solid var(--classic-border);
    box-shadow: 0 4px 12px var(--classic-subtle-shadow);
    border-radius: 8px;
}

[data-theme="classic"] .dropdown-link {
    color: var(--classic-gray);
    font-weight: 500;
}

[data-theme="classic"] .dropdown-link:hover {
    background: #f8f9fa;
    color: var(--classic-charcoal);
}

/* Classic theme notification styles */
[data-theme="classic"] .toast,
[data-theme="classic"] .notification {
    background: var(--classic-white);
    color: var(--classic-charcoal);
    border: 1px solid var(--classic-border);
    box-shadow: 0 4px 12px var(--classic-subtle-shadow);
}

/* Classic theme word game specific elements */
[data-theme="classic"] .word-grid {
    border: 2px solid var(--classic-border);
    background: var(--classic-white);
}

[data-theme="classic"] .letter-square {
    background: var(--classic-white);
    border: 1px solid var(--classic-border);
    color: var(--classic-charcoal);
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

[data-theme="classic"] .letter-square.filled {
    background: var(--classic-charcoal);
    color: var(--classic-white);
    border-color: var(--classic-charcoal);
}

[data-theme="classic"] .letter-square.correct {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

[data-theme="classic"] .letter-square.partial {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

[data-theme="classic"] .letter-square.incorrect {
    background: var(--classic-light-gray);
    color: var(--classic-charcoal);
    border-color: var(--classic-light-gray);
}

/* Dark Night Theme Styles */
[data-theme="darknight"] body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
}

/* Dark night header styles */
[data-theme="darknight"] .main-header {
    background: var(--darknight-deep-navy);
    border-bottom: 1px solid var(--darknight-slate);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="darknight"] .site-title {
    color: var(--darknight-moonlight);
    font-weight: 700;
    letter-spacing: -0.025em;
    text-shadow: 0 0 10px var(--darknight-star-glow);
}

[data-theme="darknight"] .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s ease, background 0.2s ease;
}

[data-theme="darknight"] .nav-link:hover {
    color: var(--darknight-moonlight);
    background: rgba(96, 165, 250, 0.1);
}

[data-theme="darknight"] .nav-link.active {
    color: var(--darknight-moonlight);
    background: rgba(96, 165, 250, 0.15);
}

/* Dark night button styles */
[data-theme="darknight"] body:not(.blossom-game) button,
[data-theme="darknight"] body:not(.blossom-game) .btn {
    background: var(--darknight-navy);
    color: var(--darknight-moonlight);
    border: 2px solid var(--darknight-slate);
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

[data-theme="darknight"] body:not(.blossom-game) button:hover,
[data-theme="darknight"] body:not(.blossom-game) .btn:hover {
    background: var(--darknight-moonlight);
    color: var(--darknight-deep-navy);
    border-color: var(--darknight-moonlight);
    box-shadow: 0 0 15px var(--darknight-star-glow);
    transform: translateY(-2px);
}

[data-theme="darknight"] body:not(.blossom-game) button:active,
[data-theme="darknight"] body:not(.blossom-game) .btn:active {
    transform: translateY(0);
}

/* Dark night container styles */
[data-theme="darknight"] body:not(.blossom-game):not(.crossword-game) .game-container:not(.clues-game),
[data-theme="darknight"] .content:not(.seo-content):not(.clues-game .game-content):not(.captcha-content),
[data-theme="darknight"] body:not(.blossom-game):not(.crossword-game) [class*="container"]:not(.casino-felt):not(.casino-felt *):not(.card-back-container):not(.seo-container):not(.clues-game):not(.clues-game *) {
    background: var(--darknight-navy);
    border: none;
    border-radius: 12px;
    box-shadow: none;
}

/* Dark night game board elements */
[data-theme="darknight"] .cell {
    background: var(--darknight-navy);
    border: 1px solid var(--darknight-slate);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

[data-theme="darknight"] .cell:hover {
    background: var(--darknight-slate);
    border-color: var(--darknight-moonlight);
    box-shadow: 0 0 10px var(--darknight-star-glow);
}

[data-theme="darknight"] .domino,
[data-theme="darknight"] .letter-tile {
    background: var(--darknight-navy);
    border: 2px solid var(--darknight-slate);
    color: var(--darknight-moonlight);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="darknight"] .domino:hover,
[data-theme="darknight"] .letter-tile:hover {
    border-color: var(--darknight-moonlight);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--darknight-star-glow);
}

[data-theme="darknight"] .pip-dot {
    background: var(--darknight-moonlight);
    box-shadow: 0 0 5px var(--darknight-star-glow);
}

/* Dark night text styles */
[data-theme="darknight"] h1,
[data-theme="darknight"] h2,
[data-theme="darknight"] h3,
[data-theme="darknight"] h4,
[data-theme="darknight"] h5,
[data-theme="darknight"] h6 {
    color: var(--darknight-moonlight);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

[data-theme="darknight"] p,
[data-theme="darknight"] .text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Dark night form elements */
[data-theme="darknight"] input,
[data-theme="darknight"] select,
[data-theme="darknight"] textarea {
    background: var(--darknight-deep-navy);
    color: var(--text-primary);
    border: 2px solid var(--darknight-slate);
    border-radius: 8px;
    font-weight: 500;
}

[data-theme="darknight"] input:focus,
[data-theme="darknight"] select:focus,
[data-theme="darknight"] textarea:focus {
    outline: none;
    border-color: var(--darknight-moonlight);
    box-shadow: 0 0 0 3px var(--darknight-star-glow);
}

[data-theme="darknight"] input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Dark night dropdown and menu styles */
[data-theme="darknight"] .dropdown-menu {
    background: var(--darknight-navy);
    border: 1px solid var(--darknight-slate);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px var(--shadow);
    border-radius: 8px;
}

[data-theme="darknight"] .dropdown-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
}

[data-theme="darknight"] .dropdown-link:hover {
    background: var(--darknight-slate);
    color: var(--darknight-moonlight);
}

/* Dark night notification styles */
[data-theme="darknight"] .toast,
[data-theme="darknight"] .notification {
    background: var(--darknight-navy);
    color: var(--text-primary);
    border: 1px solid var(--darknight-moonlight);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 20px var(--darknight-star-glow);
}

/* Dark night word game specific elements */
[data-theme="darknight"] .word-grid {
    border: 2px solid var(--darknight-slate);
    background: var(--darknight-navy);
}

[data-theme="darknight"] .letter-square {
    background: var(--darknight-navy);
    border: 2px solid var(--darknight-slate);
    color: var(--text-primary);
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

[data-theme="darknight"] .letter-square.filled {
    background: var(--darknight-moonlight);
    color: var(--darknight-deep-navy);
    border-color: var(--darknight-moonlight);
    box-shadow: 0 0 10px var(--darknight-star-glow);
}

[data-theme="darknight"] .letter-square.correct {
    background: #10b981;
    color: white;
    border-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

[data-theme="darknight"] .letter-square.partial {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

[data-theme="darknight"] .letter-square.incorrect {
    background: var(--darknight-slate);
    color: var(--text-secondary);
    border-color: var(--darknight-slate);
}

/* Dark night game cards */
[data-theme="darknight"] .game-card {
    background: var(--darknight-navy);
    border: 1px solid var(--darknight-slate);
    transition: all 0.3s ease;
}

[data-theme="darknight"] .game-card:hover {
    border-color: var(--darknight-moonlight);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px var(--darknight-star-glow);
    transform: translateY(-4px);
}

/* Dark night theme toggle button */
[data-theme="darknight"] .theme-toggle {
    background: rgba(96, 165, 250, 0.1);
    border-color: var(--darknight-moonlight);
}

[data-theme="darknight"] .theme-toggle:hover {
    background: var(--darknight-moonlight);
    box-shadow: 0 0 20px var(--darknight-star-glow);
    transform: scale(1.15);
}

/* Dark night decorative elements */
[data-theme="darknight"] .star-decoration {
    position: fixed;
    font-size: 1.5rem;
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
    animation: starFloat 8s ease-in-out infinite;
    color: var(--darknight-moonlight);
    text-shadow: 0 0 10px var(--darknight-star-glow);
}

@keyframes starFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translateY(-15px) rotate(90deg) scale(1.1);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-25px) rotate(180deg) scale(0.9);
        opacity: 0.5;
    }
    75% {
        transform: translateY(-15px) rotate(270deg) scale(1.05);
        opacity: 0.7;
    }
}

/* Dark night footer styles */
[data-theme="darknight"] .main-footer {
    background: var(--darknight-deep-navy);
    border-top: 1px solid var(--darknight-slate);
    color: var(--text-secondary);
}

/* Dark night hero section */
[data-theme="darknight"] .hero-section {
    background: linear-gradient(135deg, var(--darknight-deep-navy) 0%, var(--darknight-navy) 100%);
    border: 1px solid var(--darknight-slate);
}

/* Dark night difficulty buttons */
[data-theme="darknight"] .btn-difficulty {
    background: var(--darknight-navy);
    border-color: var(--darknight-slate);
    color: var(--text-secondary);
}

[data-theme="darknight"] .btn-difficulty:hover,
[data-theme="darknight"] .btn-difficulty.active {
    background: var(--darknight-moonlight);
    border-color: var(--darknight-moonlight);
    color: var(--darknight-deep-navy);
    box-shadow: 0 0 15px var(--darknight-star-glow);
}

/* Dark night language toggle */
[data-theme="darknight"] .language-toggle {
    background: transparent;
    border-color: var(--darknight-slate);
    color: var(--text-primary);
}

[data-theme="darknight"] .language-toggle:hover {
    border-color: var(--darknight-moonlight);
    color: var(--darknight-moonlight);
}

/* Dark night minimal header language button - override generic button styles */
[data-theme="darknight"] .minimal-header-language {
    background: transparent;
    border: none;
}

[data-theme="darknight"] .minimal-header-language:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    transform: none;
}

/* Dark night header dropdowns */
[data-theme="darknight"] .minimal-header-dropdown,
[data-theme="darknight"] .language-dropdown,
[data-theme="darknight"] .minimal-header-breadcrumb-dropdown,
[data-theme="darknight"] .dropdown-menu,
[data-theme="darknight"] .minimal-theme-dropdown {
    background: var(--darknight-deep-navy);
    border: 1px solid var(--darknight-slate);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

[data-theme="darknight"] .dropdown-item,
[data-theme="darknight"] .language-option,
[data-theme="darknight"] .breadcrumb-item,
[data-theme="darknight"] .dropdown-link,
[data-theme="darknight"] .minimal-theme-option {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-bottom-color: rgba(45, 55, 72, 0.5);
}

[data-theme="darknight"] .dropdown-item:hover,
[data-theme="darknight"] .language-option:hover,
[data-theme="darknight"] .breadcrumb-item:hover,
[data-theme="darknight"] .dropdown-link:hover,
[data-theme="darknight"] .minimal-theme-option:hover {
    background: rgba(45, 55, 72, 0.5);
    color: var(--darknight-moonlight);
    box-shadow: none;
    transform: none;
}

[data-theme="darknight"] .minimal-theme-option .theme-name {
    color: var(--text-primary);
}

[data-theme="darknight"] .minimal-theme-option .theme-desc {
    color: var(--text-secondary);
}

[data-theme="darknight"] .minimal-theme-option.active {
    background: rgba(96, 165, 250, 0.1);
}

[data-theme="darknight"] .minimal-theme-option.active .theme-name {
    color: var(--darknight-moonlight);
}

[data-theme="darknight"] .breadcrumb-item.breadcrumb-all-games {
    background: rgba(96, 165, 250, 0.05);
}

[data-theme="darknight"] .breadcrumb-item.breadcrumb-all-games:hover {
    background: rgba(96, 165, 250, 0.1);
}

/* Dark night minimal header - main header bar */
[data-theme="darknight"] .minimal-header {
    background: rgba(15, 20, 25, 0.95);
    border-bottom: 1px solid var(--darknight-slate);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="darknight"] .minimal-header-breadcrumb {
    color: var(--text-primary);
}

[data-theme="darknight"] .minimal-header-breadcrumb:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="darknight"] .minimal-header-logo {
    color: var(--text-primary);
}

[data-theme="darknight"] .minimal-header-theme {
    color: var(--text-primary);
}

[data-theme="darknight"] .minimal-header-theme:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="darknight"] .nav-link {
    color: var(--text-secondary);
}

[data-theme="darknight"] .nav-link:hover {
    color: var(--darknight-moonlight);
    background: rgba(96, 165, 250, 0.1);
}

[data-theme="darknight"] .minimal-header-signin {
    color: var(--text-primary);
    border-color: var(--darknight-slate);
}

[data-theme="darknight"] .minimal-header-signin:hover {
    background: var(--darknight-moonlight);
    color: var(--darknight-deep-navy);
    border-color: var(--darknight-moonlight);
}

/* Dark night language dropdown */
[data-theme="darknight"] .minimal-lang-dropdown {
    background: var(--darknight-deep-navy);
    border: 1px solid var(--darknight-slate);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

[data-theme="darknight"] .minimal-lang-option {
    background: transparent;
    color: var(--text-secondary);
}

[data-theme="darknight"] .minimal-lang-option:hover {
    background: rgba(45, 55, 72, 0.5);
    color: var(--darknight-moonlight);
}

[data-theme="darknight"] .minimal-lang-option.active {
    background: rgba(96, 165, 250, 0.1);
    color: var(--darknight-moonlight);
}

/* Dark night mobile navigation menu */
[data-theme="darknight"] .mobile-nav-menu {
    background: var(--darknight-deep-navy);
    border-bottom: 1px solid var(--darknight-slate);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="darknight"] .mobile-nav-menu a {
    color: var(--text-secondary);
    border-left-color: transparent;
}

[data-theme="darknight"] .mobile-nav-menu a:hover {
    background: rgba(96, 165, 250, 0.1);
    color: var(--darknight-moonlight);
    border-left-color: var(--darknight-moonlight);
}

[data-theme="darknight"] .mobile-nav-menu .mobile-nav-section {
    color: var(--text-secondary);
}

[data-theme="darknight"] .mobile-nav-menu hr {
    border-top-color: var(--darknight-slate);
}

/* Dark night mobile menu toggle */
[data-theme="darknight"] .mobile-menu-toggle {
    color: var(--text-secondary);
}

[data-theme="darknight"] .mobile-menu-toggle:hover {
    background: rgba(96, 165, 250, 0.1);
    color: var(--darknight-moonlight);
}

/* Dark night username */
[data-theme="darknight"] .minimal-header-username {
    color: var(--text-primary);
}

/* Dark night search input */
[data-theme="darknight"] .search-input {
    background: var(--darknight-deep-navy);
    border-color: var(--darknight-slate);
    color: var(--text-primary);
}

[data-theme="darknight"] .search-input:focus {
    border-color: var(--darknight-moonlight);
    box-shadow: 0 0 15px var(--darknight-star-glow);
}

/* Casino Felt - Preserve green felt background for card games */
.casino-felt,
[data-theme="classic"] .casino-felt,
[data-theme="halloween"] .casino-felt,
[data-theme="thanksgiving"] .casino-felt,
[data-theme="darknight"] .casino-felt {
    background: #0a5c3d !important;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 50%) !important;
    border-radius: 12px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.casino-felt .foundation-container,
.casino-felt .tableau-container,
[data-theme="classic"] .casino-felt .foundation-container,
[data-theme="classic"] .casino-felt .tableau-container,
[data-theme="halloween"] .casino-felt .foundation-container,
[data-theme="halloween"] .casino-felt .tableau-container,
[data-theme="thanksgiving"] .casino-felt .foundation-container,
[data-theme="thanksgiving"] .casino-felt .tableau-container,
[data-theme="darknight"] .casino-felt .foundation-container,
[data-theme="darknight"] .casino-felt .tableau-container {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* SEO Content Theme Styles - Better contrast for each theme */
[data-theme="classic"] .seo-content {
    background: var(--classic-off-white);
    border: 1px solid var(--classic-border);
}
[data-theme="classic"] .seo-container h2,
[data-theme="classic"] .seo-container h3 {
    color: var(--classic-charcoal);
}
[data-theme="classic"] .seo-container p,
[data-theme="classic"] .seo-container li {
    color: var(--classic-gray);
}

[data-theme="thanksgiving"] .seo-content {
    background: var(--bg-secondary);
    border: 2px solid var(--thanksgiving-tan);
}
[data-theme="thanksgiving"] .seo-container h2,
[data-theme="thanksgiving"] .seo-container h3 {
    color: var(--thanksgiving-brown);
}
[data-theme="thanksgiving"] .seo-container p,
[data-theme="thanksgiving"] .seo-container li {
    color: var(--text-secondary);
}

[data-theme="halloween"] .seo-content {
    background: var(--halloween-black);
    border: 2px solid var(--halloween-orange);
}
[data-theme="halloween"] .seo-container h2,
[data-theme="halloween"] .seo-container h3 {
    color: var(--halloween-orange);
}
[data-theme="halloween"] .seo-container p,
[data-theme="halloween"] .seo-container li {
    color: var(--text-secondary);
}

[data-theme="darknight"] .seo-content {
    background: var(--darknight-navy);
    border: 1px solid var(--darknight-slate);
}
[data-theme="darknight"] .seo-container h2,
[data-theme="darknight"] .seo-container h3 {
    color: var(--darknight-moonlight);
}
[data-theme="darknight"] .seo-container p,
[data-theme="darknight"] .seo-container li {
    color: var(--text-secondary);
}

/* Clues Game Header Theme Styles - Use dark blue to match game container */
[data-theme="classic"] .header:not(.games-page-header) {
    background: linear-gradient(135deg, #1e2430 0%, #2d3748 100%) !important;
    color: white !important;
}

[data-theme="thanksgiving"] .header:not(.games-page-header) {
    background: linear-gradient(135deg, #1e2430 0%, #2d3748 100%) !important;
    color: white !important;
}

[data-theme="halloween"] .header:not(.games-page-header) {
    background: linear-gradient(135deg, #1e2430 0%, #2d3748 100%) !important;
    color: white !important;
}

[data-theme="darknight"] .header:not(.games-page-header) {
    background: linear-gradient(135deg, #1e2430 0%, #2d3748 100%) !important;
    color: white !important;
}

[data-theme="darknight"] .header:not(.games-page-header) .how-to-play-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border-color: white !important;
}

[data-theme="darknight"] .header:not(.games-page-header) .how-to-play-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* General Game Container Theme Styles - Apply to all games except clues, crossword, blossom */
[data-theme="classic"] body:not(.blossom-game):not(.crossword-game) .game-container:not(.casino-felt):not(.casino-felt *):not(.clues-game) {
    background: var(--classic-white) !important;
    color: var(--classic-charcoal) !important;
}

[data-theme="thanksgiving"] body:not(.blossom-game):not(.crossword-game) .game-container:not(.casino-felt):not(.casino-felt *):not(.clues-game) {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

[data-theme="halloween"] body:not(.blossom-game):not(.crossword-game) .game-container:not(.casino-felt):not(.casino-felt *):not(.clues-game) {
    background: var(--halloween-black) !important;
    color: var(--text-primary) !important;
}

[data-theme="darknight"] body:not(.blossom-game):not(.crossword-game) .game-container:not(.casino-felt):not(.casino-felt *):not(.clues-game) {
    background: var(--darknight-navy) !important;
    color: var(--text-primary) !important;
}

/* Nav bar theme support - exclude clues game nav-bar */
[data-theme="classic"] .clues-game .nav-bar,
[data-theme="thanksgiving"] .clues-game .nav-bar,
[data-theme="halloween"] .clues-game .nav-bar,
[data-theme="darknight"] .clues-game .nav-bar {
    background: #151b23 !important;
    border-bottom-color: #2d3748 !important;
}

[data-theme="classic"] .nav-bar:not(.clues-game .nav-bar) {
    background: var(--classic-off-white) !important;
    border-bottom-color: var(--classic-border) !important;
}

[data-theme="thanksgiving"] .nav-bar:not(.clues-game .nav-bar) {
    background: var(--thanksgiving-cream) !important;
    border-bottom-color: var(--thanksgiving-tan) !important;
}

[data-theme="halloween"] .nav-bar:not(.clues-game .nav-bar) {
    background: var(--halloween-black) !important;
    border-bottom-color: var(--halloween-orange) !important;
}

[data-theme="darknight"] .nav-bar:not(.clues-game .nav-bar) {
    background: var(--darknight-deep-navy) !important;
    border-bottom-color: var(--darknight-slate) !important;
}

/* Nav links theme support - exclude clues game */
[data-theme="classic"] .clues-game .nav-link,
[data-theme="classic"] .clues-game .nav-links a,
[data-theme="thanksgiving"] .clues-game .nav-link,
[data-theme="thanksgiving"] .clues-game .nav-links a,
[data-theme="halloween"] .clues-game .nav-link,
[data-theme="halloween"] .clues-game .nav-links a,
[data-theme="darknight"] .clues-game .nav-link,
[data-theme="darknight"] .clues-game .nav-links a {
    color: #a0aec0 !important;
}

[data-theme="classic"] .clues-game .nav-link:hover,
[data-theme="classic"] .clues-game .nav-links a:hover,
[data-theme="thanksgiving"] .clues-game .nav-link:hover,
[data-theme="thanksgiving"] .clues-game .nav-links a:hover,
[data-theme="halloween"] .clues-game .nav-link:hover,
[data-theme="halloween"] .clues-game .nav-links a:hover,
[data-theme="darknight"] .clues-game .nav-link:hover,
[data-theme="darknight"] .clues-game .nav-links a:hover {
    color: #667eea !important;
}

[data-theme="classic"] .nav-link:not(.clues-game .nav-link):not(.clues-game .nav-links a),
[data-theme="classic"] .nav-links a:not(.clues-game .nav-link):not(.clues-game .nav-links a) {
    color: var(--classic-gray) !important;
}

[data-theme="classic"] .nav-link:not(.clues-game .nav-link):not(.clues-game .nav-links a):hover,
[data-theme="classic"] .nav-links a:not(.clues-game .nav-link):not(.clues-game .nav-links a):hover {
    color: var(--classic-charcoal) !important;
}

[data-theme="thanksgiving"] .nav-link:not(.clues-game .nav-link):not(.clues-game .nav-links a),
[data-theme="thanksgiving"] .nav-links a:not(.clues-game .nav-link):not(.clues-game .nav-links a) {
    color: var(--text-secondary) !important;
}

[data-theme="thanksgiving"] .nav-link:not(.clues-game .nav-link):not(.clues-game .nav-links a):hover,
[data-theme="thanksgiving"] .nav-links a:not(.clues-game .nav-link):not(.clues-game .nav-links a):hover {
    color: var(--thanksgiving-harvest-orange) !important;
}

[data-theme="halloween"] .nav-link:not(.clues-game .nav-link):not(.clues-game .nav-links a),
[data-theme="halloween"] .nav-links a:not(.clues-game .nav-link):not(.clues-game .nav-links a) {
    color: var(--text-secondary) !important;
}

[data-theme="halloween"] .nav-link:not(.clues-game .nav-link):not(.clues-game .nav-links a):hover,
[data-theme="halloween"] .nav-links a:not(.clues-game .nav-link):not(.clues-game .nav-links a):hover {
    color: var(--halloween-orange) !important;
}

[data-theme="darknight"] .nav-link:not(.clues-game .nav-link):not(.clues-game .nav-links a),
[data-theme="darknight"] .nav-links a:not(.clues-game .nav-link):not(.clues-game .nav-links a) {
    color: var(--text-secondary) !important;
}

[data-theme="darknight"] .nav-link:not(.clues-game .nav-link):not(.clues-game .nav-links a):hover,
[data-theme="darknight"] .nav-links a:not(.clues-game .nav-link):not(.clues-game .nav-links a):hover {
    color: var(--darknight-moonlight) !important;
}

/* Mahjong Game - Keep container and body the same teal/green color across all themes */
body:has(.canvas-container),
body:has(.canvas-container) .container,
body:has(.canvas-container) .canvas-container,
[data-theme="classic"] body:has(.canvas-container),
[data-theme="classic"] body:has(.canvas-container) .container,
[data-theme="classic"] body:has(.canvas-container) .canvas-container,
[data-theme="thanksgiving"] body:has(.canvas-container),
[data-theme="thanksgiving"] body:has(.canvas-container) .container,
[data-theme="thanksgiving"] body:has(.canvas-container) .canvas-container,
[data-theme="halloween"] body:has(.canvas-container),
[data-theme="halloween"] body:has(.canvas-container) .container,
[data-theme="halloween"] body:has(.canvas-container) .canvas-container,
[data-theme="darknight"] body:has(.canvas-container),
[data-theme="darknight"] body:has(.canvas-container) .container,
[data-theme="darknight"] body:has(.canvas-container) .canvas-container {
    background: #007f6a !important;
    color: #fff !important;
}

/* Connections Unlimited - Theme support (targets elements with .game-container > .logo) */
body:has(.game-container > .logo) {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.game-container > .logo,
.header .stats {
    color: var(--text-primary);
}

.header:has(+ .game-container > .logo) {
    background: transparent !important;
    border-bottom: none !important;
}

body:has(.game-container > .logo) .game-board {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

body:has(.game-container > .logo) .mistakes-display {
    color: var(--text-primary);
}

/* Classic theme */
[data-theme="classic"] body:has(.game-container > .logo) {
    background: var(--classic-off-white);
    color: var(--classic-charcoal);
}

[data-theme="classic"] .header:has(+ .game-container > .logo) {
    background: transparent !important;
    border-bottom: none !important;
}

[data-theme="classic"] .game-container > .logo,
[data-theme="classic"] .header .stats {
    color: var(--classic-charcoal);
}

[data-theme="classic"] body:has(.game-container > .logo) .game-board {
    background: var(--classic-white);
    border: 1px solid var(--classic-border);
}

/* Thanksgiving theme */
[data-theme="thanksgiving"] body:has(.game-container > .logo) {
    background: var(--thanksgiving-tan);
    color: var(--text-primary);
}

[data-theme="thanksgiving"] .header:has(+ .game-container > .logo) {
    background: transparent !important;
    border-bottom: none !important;
}

[data-theme="thanksgiving"] .game-container > .logo,
[data-theme="thanksgiving"] .header .stats {
    color: var(--thanksgiving-brown);
}

[data-theme="thanksgiving"] body:has(.game-container > .logo) .game-board {
    background: var(--bg-secondary);
    border: 1px solid var(--thanksgiving-tan);
}

/* Halloween theme */
[data-theme="halloween"] body:has(.game-container > .logo) {
    background: var(--halloween-purple);
    color: var(--text-primary);
}

[data-theme="halloween"] .header:has(+ .game-container > .logo) {
    background: transparent !important;
    border-bottom: none !important;
}

[data-theme="halloween"] .game-container > .logo,
[data-theme="halloween"] .header .stats {
    color: var(--halloween-orange);
}

[data-theme="halloween"] body:has(.game-container > .logo) .game-board {
    background: var(--halloween-black);
    border: 1px solid var(--halloween-orange);
}

/* Darknight theme */
[data-theme="darknight"] body:has(.game-container > .logo) {
    background: var(--darknight-deep-navy);
    color: var(--text-primary);
}

[data-theme="darknight"] .header:has(+ .game-container > .logo) {
    background: transparent !important;
    border-bottom: none !important;
}

[data-theme="darknight"] .game-container > .logo,
[data-theme="darknight"] .header .stats {
    color: var(--darknight-moonlight);
}

[data-theme="darknight"] body:has(.game-container > .logo) .game-board {
    background: var(--darknight-navy);
    border: 1px solid var(--darknight-slate);
}

/* Connections Unlimited Archive - Theme support (header contains logo) */
body:has(.header > .logo) {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.header:has(> .logo) {
    background: transparent !important;
    border-bottom: none !important;
}

.header > .logo {
    color: var(--text-primary);
}

body:has(.header > .logo) .game-board {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

/* Classic theme */
[data-theme="classic"] body:has(.header > .logo) {
    background: var(--classic-off-white);
    color: var(--classic-charcoal);
}

[data-theme="classic"] .header:has(> .logo) {
    background: transparent !important;
    border-bottom: none !important;
}

[data-theme="classic"] .header > .logo {
    color: var(--classic-charcoal);
}

[data-theme="classic"] body:has(.header > .logo) .game-board {
    background: var(--classic-white);
    border: 1px solid var(--classic-border);
}

/* Thanksgiving theme */
[data-theme="thanksgiving"] body:has(.header > .logo) {
    background: var(--thanksgiving-tan);
    color: var(--text-primary);
}

[data-theme="thanksgiving"] .header:has(> .logo) {
    background: transparent !important;
    border-bottom: none !important;
}

[data-theme="thanksgiving"] .header > .logo {
    color: var(--thanksgiving-brown);
}

[data-theme="thanksgiving"] body:has(.header > .logo) .game-board {
    background: var(--bg-secondary);
    border: 1px solid var(--thanksgiving-tan);
}

/* Halloween theme */
[data-theme="halloween"] body:has(.header > .logo) {
    background: var(--halloween-purple);
    color: var(--text-primary);
}

[data-theme="halloween"] .header:has(> .logo) {
    background: transparent !important;
    border-bottom: none !important;
}

[data-theme="halloween"] .header > .logo {
    color: var(--halloween-orange);
}

[data-theme="halloween"] body:has(.header > .logo) .game-board {
    background: var(--halloween-black);
    border: 1px solid var(--halloween-orange);
}

/* Darknight theme */
[data-theme="darknight"] body:has(.header > .logo) {
    background: var(--darknight-deep-navy);
    color: var(--text-primary);
}

[data-theme="darknight"] .header:has(> .logo) {
    background: transparent !important;
    border-bottom: none !important;
}

[data-theme="darknight"] .header > .logo {
    color: var(--darknight-moonlight);
}

[data-theme="darknight"] body:has(.header > .logo) .game-board {
    background: var(--darknight-navy);
    border: 1px solid var(--darknight-slate);
}

/* Crossword Game - Preserve original styling regardless of theme */
body.crossword-game,
[data-theme="classic"] body.crossword-game,
[data-theme="thanksgiving"] body.crossword-game,
[data-theme="halloween"] body.crossword-game,
[data-theme="darknight"] body.crossword-game {
    background-color: #f8f9fa !important;
    color: #333 !important;
}

body.crossword-game .game-container,
body.crossword-game .puzzle-info,
body.crossword-game .grid-container,
body.crossword-game .clues-container,
body.crossword-game .clues-section,
[data-theme="classic"] body.crossword-game .game-container,
[data-theme="classic"] body.crossword-game .puzzle-info,
[data-theme="classic"] body.crossword-game .grid-container,
[data-theme="classic"] body.crossword-game .clues-container,
[data-theme="classic"] body.crossword-game .clues-section,
[data-theme="thanksgiving"] body.crossword-game .game-container,
[data-theme="thanksgiving"] body.crossword-game .puzzle-info,
[data-theme="thanksgiving"] body.crossword-game .grid-container,
[data-theme="thanksgiving"] body.crossword-game .clues-container,
[data-theme="thanksgiving"] body.crossword-game .clues-section,
[data-theme="halloween"] body.crossword-game .game-container,
[data-theme="halloween"] body.crossword-game .puzzle-info,
[data-theme="halloween"] body.crossword-game .grid-container,
[data-theme="halloween"] body.crossword-game .clues-container,
[data-theme="halloween"] body.crossword-game .clues-section,
[data-theme="darknight"] body.crossword-game .game-container,
[data-theme="darknight"] body.crossword-game .puzzle-info,
[data-theme="darknight"] body.crossword-game .grid-container,
[data-theme="darknight"] body.crossword-game .clues-container,
[data-theme="darknight"] body.crossword-game .clues-section {
    color: #333 !important;
    background: white !important;
}

body.crossword-game .game-controls,
[data-theme="classic"] body.crossword-game .game-controls,
[data-theme="thanksgiving"] body.crossword-game .game-controls,
[data-theme="halloween"] body.crossword-game .game-controls,
[data-theme="darknight"] body.crossword-game .game-controls {
    background: transparent !important;
}

body.crossword-game .nav-btn,
[data-theme="classic"] body.crossword-game .nav-btn,
[data-theme="thanksgiving"] body.crossword-game .nav-btn,
[data-theme="halloween"] body.crossword-game .nav-btn,
[data-theme="darknight"] body.crossword-game .nav-btn {
    background: white !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
}

body.crossword-game .grid-cell:not(.black-cell),
body.crossword-game .cell-input,
[data-theme="classic"] body.crossword-game .grid-cell:not(.black-cell),
[data-theme="classic"] body.crossword-game .cell-input,
[data-theme="thanksgiving"] body.crossword-game .grid-cell:not(.black-cell),
[data-theme="thanksgiving"] body.crossword-game .cell-input,
[data-theme="halloween"] body.crossword-game .grid-cell:not(.black-cell),
[data-theme="halloween"] body.crossword-game .cell-input,
[data-theme="darknight"] body.crossword-game .grid-cell:not(.black-cell),
[data-theme="darknight"] body.crossword-game .cell-input {
    color: #333 !important;
    background: white !important;
    border: none !important;
}

/* Specific backgrounds for crossword elements */
body.crossword-game .cell-number,
[data-theme="classic"] body.crossword-game .cell-number,
[data-theme="thanksgiving"] body.crossword-game .cell-number,
[data-theme="halloween"] body.crossword-game .cell-number,
[data-theme="darknight"] body.crossword-game .cell-number {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: #333 !important;
}

body.crossword-game .crossword-grid,
[data-theme="classic"] body.crossword-game .crossword-grid,
[data-theme="thanksgiving"] body.crossword-game .crossword-grid,
[data-theme="halloween"] body.crossword-game .crossword-grid,
[data-theme="darknight"] body.crossword-game .crossword-grid {
    background: #333 !important;
    border: 2px solid #333 !important;
}

body.crossword-game .black-cell,
[data-theme="classic"] body.crossword-game .black-cell,
[data-theme="thanksgiving"] body.crossword-game .black-cell,
[data-theme="halloween"] body.crossword-game .black-cell,
[data-theme="darknight"] body.crossword-game .black-cell {
    background: #333 !important;
}

body.crossword-game .game-area,
[data-theme="classic"] body.crossword-game .game-area,
[data-theme="thanksgiving"] body.crossword-game .game-area,
[data-theme="halloween"] body.crossword-game .game-area,
[data-theme="darknight"] body.crossword-game .game-area {
    background: transparent !important;
}

body.crossword-game .current-clue,
[data-theme="classic"] body.crossword-game .current-clue,
[data-theme="thanksgiving"] body.crossword-game .current-clue,
[data-theme="halloween"] body.crossword-game .current-clue,
[data-theme="darknight"] body.crossword-game .current-clue {
    background: #e3f2fd !important;
    border-color: #bbdefb !important;
    color: #333 !important;
}

body.crossword-game .clues-header,
body.crossword-game .stat,
[data-theme="classic"] body.crossword-game .clues-header,
[data-theme="classic"] body.crossword-game .stat,
[data-theme="thanksgiving"] body.crossword-game .clues-header,
[data-theme="thanksgiving"] body.crossword-game .stat,
[data-theme="halloween"] body.crossword-game .clues-header,
[data-theme="halloween"] body.crossword-game .stat,
[data-theme="darknight"] body.crossword-game .clues-header,
[data-theme="darknight"] body.crossword-game .stat {
    background: #f8f9fa !important;
    color: #333 !important;
}

body.crossword-game .clues-header,
[data-theme="classic"] body.crossword-game .clues-header,
[data-theme="thanksgiving"] body.crossword-game .clues-header,
[data-theme="halloween"] body.crossword-game .clues-header,
[data-theme="darknight"] body.crossword-game .clues-header {
    border-bottom-color: #e0e0e0 !important;
}

body.crossword-game .stat,
[data-theme="classic"] body.crossword-game .stat,
[data-theme="thanksgiving"] body.crossword-game .stat,
[data-theme="halloween"] body.crossword-game .stat,
[data-theme="darknight"] body.crossword-game .stat {
    color: #495057 !important;
}

body.crossword-game .nav-btn:hover,
[data-theme="classic"] body.crossword-game .nav-btn:hover,
[data-theme="thanksgiving"] body.crossword-game .nav-btn:hover,
[data-theme="halloween"] body.crossword-game .nav-btn:hover,
[data-theme="darknight"] body.crossword-game .nav-btn:hover {
    background: #f0f0f0 !important;
    border-color: #999 !important;
}

/* 2048 Game - Preserve original styling regardless of theme */
body.game-2048 .btn,
body.game-2048 button,
[data-theme="classic"] body.game-2048 .btn,
[data-theme="classic"] body.game-2048 button,
[data-theme="thanksgiving"] body.game-2048 .btn,
[data-theme="thanksgiving"] body.game-2048 button,
[data-theme="halloween"] body.game-2048 .btn,
[data-theme="halloween"] body.game-2048 button,
[data-theme="darknight"] body.game-2048 .btn,
[data-theme="darknight"] body.game-2048 button {
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #1a1a1a !important;
    font-weight: 600 !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

body.game-2048 .btn:hover,
body.game-2048 button:hover,
[data-theme="classic"] body.game-2048 .btn:hover,
[data-theme="classic"] body.game-2048 button:hover,
[data-theme="thanksgiving"] body.game-2048 .btn:hover,
[data-theme="thanksgiving"] body.game-2048 button:hover,
[data-theme="halloween"] body.game-2048 .btn:hover,
[data-theme="halloween"] body.game-2048 button:hover,
[data-theme="darknight"] body.game-2048 .btn:hover,
[data-theme="darknight"] body.game-2048 button:hover {
    background: rgba(255, 255, 255, 0.6) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
}

/* Blossom Word Game - Preserve original styling regardless of theme */
body.blossom-game,
[data-theme="classic"] body.blossom-game,
[data-theme="thanksgiving"] body.blossom-game,
[data-theme="halloween"] body.blossom-game,
[data-theme="darknight"] body.blossom-game {
    background: linear-gradient(135deg, #fdf2f8 0%, #faf5ff 50%, #eff6ff 100%) !important;
    color: #1f2937 !important;
}

body.blossom-game .game-container,
body.blossom-game .game-wrapper,
[data-theme="classic"] body.blossom-game .game-container,
[data-theme="classic"] body.blossom-game .game-wrapper,
[data-theme="thanksgiving"] body.blossom-game .game-container,
[data-theme="thanksgiving"] body.blossom-game .game-wrapper,
[data-theme="halloween"] body.blossom-game .game-container,
[data-theme="halloween"] body.blossom-game .game-wrapper,
[data-theme="darknight"] body.blossom-game .game-container,
[data-theme="darknight"] body.blossom-game .game-wrapper {
    background: transparent !important;
}

body.blossom-game .game-board,
body.blossom-game .found-words-panel,
[data-theme="classic"] body.blossom-game .game-board,
[data-theme="classic"] body.blossom-game .found-words-panel,
[data-theme="thanksgiving"] body.blossom-game .game-board,
[data-theme="thanksgiving"] body.blossom-game .found-words-panel,
[data-theme="halloween"] body.blossom-game .game-board,
[data-theme="halloween"] body.blossom-game .found-words-panel,
[data-theme="darknight"] body.blossom-game .game-board,
[data-theme="darknight"] body.blossom-game .found-words-panel {
    background: white !important;
    color: #1f2937 !important;
}

body.blossom-game .petal,
[data-theme="classic"] body.blossom-game .petal,
[data-theme="thanksgiving"] body.blossom-game .petal,
[data-theme="halloween"] body.blossom-game .petal,
[data-theme="darknight"] body.blossom-game .petal {
    border-radius: 50% !important;
}

body.blossom-game .center-petal,
[data-theme="classic"] body.blossom-game .center-petal,
[data-theme="thanksgiving"] body.blossom-game .center-petal,
[data-theme="halloween"] body.blossom-game .center-petal,
[data-theme="darknight"] body.blossom-game .center-petal {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    color: white !important;
    border: none !important;
}

body.blossom-game .outer-petal,
[data-theme="classic"] body.blossom-game .outer-petal,
[data-theme="thanksgiving"] body.blossom-game .outer-petal,
[data-theme="halloween"] body.blossom-game .outer-petal,
[data-theme="darknight"] body.blossom-game .outer-petal {
    background: linear-gradient(135deg, #e9d5ff 0%, #d8b4fe 100%) !important;
    color: #6b21a8 !important;
    border: none !important;
}

body.blossom-game .bonus-petal,
[data-theme="classic"] body.blossom-game .bonus-petal,
[data-theme="thanksgiving"] body.blossom-game .bonus-petal,
[data-theme="halloween"] body.blossom-game .bonus-petal,
[data-theme="darknight"] body.blossom-game .bonus-petal {
    background: linear-gradient(135deg, #fbcfe8 0%, #f9a8d4 100%) !important;
    color: #9d174d !important;
}

body.blossom-game .pot-container,
body.blossom-game .flower-pot,
[data-theme="classic"] body.blossom-game .pot-container,
[data-theme="classic"] body.blossom-game .flower-pot,
[data-theme="thanksgiving"] body.blossom-game .pot-container,
[data-theme="thanksgiving"] body.blossom-game .flower-pot,
[data-theme="halloween"] body.blossom-game .pot-container,
[data-theme="halloween"] body.blossom-game .flower-pot,
[data-theme="darknight"] body.blossom-game .pot-container,
[data-theme="darknight"] body.blossom-game .flower-pot {
    background: transparent !important;
}

body.blossom-game .btn,
body.blossom-game button,
[data-theme="classic"] body.blossom-game .btn,
[data-theme="classic"] body.blossom-game button,
[data-theme="thanksgiving"] body.blossom-game .btn,
[data-theme="thanksgiving"] body.blossom-game button,
[data-theme="halloween"] body.blossom-game .btn,
[data-theme="halloween"] body.blossom-game button,
[data-theme="darknight"] body.blossom-game .btn,
[data-theme="darknight"] body.blossom-game button {
    border-radius: 0.75rem !important;
}

/* Word Salad Game - Dark Theme Grid Cell Letters */
[data-theme="darknight"] body:has(.word-grid) .grid-cell {
    color: #1a1a1b !important;
}

/* Captcha Game - Preserve Default Styling Regardless of Theme */
[data-theme="classic"] .captcha-box,
[data-theme="thanksgiving"] .captcha-box,
[data-theme="halloween"] .captcha-box,
[data-theme="darknight"] .captcha-box {
    background: #ffffff !important;
    border: 2px solid #bdc3c7 !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="classic"] .captcha-header,
[data-theme="thanksgiving"] .captcha-header,
[data-theme="halloween"] .captcha-header,
[data-theme="darknight"] .captcha-header {
    background: #ecf0f1 !important;
    border-bottom: 2px solid #bdc3c7 !important;
}

[data-theme="classic"] .captcha-header h2,
[data-theme="thanksgiving"] .captcha-header h2,
[data-theme="halloween"] .captcha-header h2,
[data-theme="darknight"] .captcha-header h2 {
    color: #2c3e50 !important;
}

[data-theme="classic"] .captcha-content,
[data-theme="thanksgiving"] .captcha-content,
[data-theme="halloween"] .captcha-content,
[data-theme="darknight"] .captcha-content {
    background: #ffffff !important;
    color: #2c3e50 !important;
}

[data-theme="classic"] .captcha-footer,
[data-theme="thanksgiving"] .captcha-footer,
[data-theme="halloween"] .captcha-footer,
[data-theme="darknight"] .captcha-footer {
    background: #ecf0f1 !important;
    border-top: 2px solid #bdc3c7 !important;
}

/* The World Map Game - Preserve original styling regardless of theme */
body:has(#world-map-svg),
[data-theme="classic"] body:has(#world-map-svg),
[data-theme="thanksgiving"] body:has(#world-map-svg),
[data-theme="halloween"] body:has(#world-map-svg),
[data-theme="darknight"] body:has(#world-map-svg) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #333 !important;
}

body:has(#world-map-svg)::before,
[data-theme="classic"] body:has(#world-map-svg)::before,
[data-theme="thanksgiving"] body:has(#world-map-svg)::before,
[data-theme="halloween"] body:has(#world-map-svg)::before,
[data-theme="darknight"] body:has(#world-map-svg)::before {
    display: none !important;
}

body:has(#world-map-svg) .container,
body:has(#world-map-svg) .map-container,
body:has(#world-map-svg) .game-container,
body:has(#world-map-svg) .start-button-container,
body:has(#world-map-svg) .controls,
[data-theme="classic"] body:has(#world-map-svg) .container,
[data-theme="classic"] body:has(#world-map-svg) .map-container,
[data-theme="classic"] body:has(#world-map-svg) .game-container,
[data-theme="classic"] body:has(#world-map-svg) .start-button-container,
[data-theme="classic"] body:has(#world-map-svg) .controls,
[data-theme="thanksgiving"] body:has(#world-map-svg) .container,
[data-theme="thanksgiving"] body:has(#world-map-svg) .map-container,
[data-theme="thanksgiving"] body:has(#world-map-svg) .game-container,
[data-theme="thanksgiving"] body:has(#world-map-svg) .start-button-container,
[data-theme="thanksgiving"] body:has(#world-map-svg) .controls,
[data-theme="halloween"] body:has(#world-map-svg) .container,
[data-theme="halloween"] body:has(#world-map-svg) .map-container,
[data-theme="halloween"] body:has(#world-map-svg) .game-container,
[data-theme="halloween"] body:has(#world-map-svg) .start-button-container,
[data-theme="halloween"] body:has(#world-map-svg) .controls,
[data-theme="darknight"] body:has(#world-map-svg) .container,
[data-theme="darknight"] body:has(#world-map-svg) .map-container,
[data-theme="darknight"] body:has(#world-map-svg) .game-container,
[data-theme="darknight"] body:has(#world-map-svg) .start-button-container,
[data-theme="darknight"] body:has(#world-map-svg) .controls {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body:has(#world-map-svg) .header,
[data-theme="classic"] body:has(#world-map-svg) .header,
[data-theme="thanksgiving"] body:has(#world-map-svg) .header,
[data-theme="halloween"] body:has(#world-map-svg) .header,
[data-theme="darknight"] body:has(#world-map-svg) .header {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body:has(#world-map-svg) .logo,
body:has(#world-map-svg) .stats,
body:has(#world-map-svg) .stat-value,
body:has(#world-map-svg) .stat-label,
[data-theme="classic"] body:has(#world-map-svg) .logo,
[data-theme="classic"] body:has(#world-map-svg) .stats,
[data-theme="classic"] body:has(#world-map-svg) .stat-value,
[data-theme="classic"] body:has(#world-map-svg) .stat-label,
[data-theme="thanksgiving"] body:has(#world-map-svg) .logo,
[data-theme="thanksgiving"] body:has(#world-map-svg) .stats,
[data-theme="thanksgiving"] body:has(#world-map-svg) .stat-value,
[data-theme="thanksgiving"] body:has(#world-map-svg) .stat-label,
[data-theme="halloween"] body:has(#world-map-svg) .logo,
[data-theme="halloween"] body:has(#world-map-svg) .stats,
[data-theme="halloween"] body:has(#world-map-svg) .stat-value,
[data-theme="halloween"] body:has(#world-map-svg) .stat-label,
[data-theme="darknight"] body:has(#world-map-svg) .logo,
[data-theme="darknight"] body:has(#world-map-svg) .stats,
[data-theme="darknight"] body:has(#world-map-svg) .stat-value,
[data-theme="darknight"] body:has(#world-map-svg) .stat-label {
    color: white !important;
}

body:has(#world-map-svg) #world-map-svg,
[data-theme="classic"] body:has(#world-map-svg) #world-map-svg,
[data-theme="thanksgiving"] body:has(#world-map-svg) #world-map-svg,
[data-theme="halloween"] body:has(#world-map-svg) #world-map-svg,
[data-theme="darknight"] body:has(#world-map-svg) #world-map-svg {
    background: transparent !important;
}

body:has(#world-map-svg) .country,
body:has(#world-map-svg) .country path,
body:has(#world-map-svg) #world-map-svg g,
body:has(#world-map-svg) #world-map-svg path,
[data-theme="classic"] body:has(#world-map-svg) .country,
[data-theme="classic"] body:has(#world-map-svg) .country path,
[data-theme="classic"] body:has(#world-map-svg) #world-map-svg g,
[data-theme="classic"] body:has(#world-map-svg) #world-map-svg path,
[data-theme="thanksgiving"] body:has(#world-map-svg) .country,
[data-theme="thanksgiving"] body:has(#world-map-svg) .country path,
[data-theme="thanksgiving"] body:has(#world-map-svg) #world-map-svg g,
[data-theme="thanksgiving"] body:has(#world-map-svg) #world-map-svg path,
[data-theme="halloween"] body:has(#world-map-svg) .country,
[data-theme="halloween"] body:has(#world-map-svg) .country path,
[data-theme="halloween"] body:has(#world-map-svg) #world-map-svg g,
[data-theme="halloween"] body:has(#world-map-svg) #world-map-svg path,
[data-theme="darknight"] body:has(#world-map-svg) .country,
[data-theme="darknight"] body:has(#world-map-svg) .country path,
[data-theme="darknight"] body:has(#world-map-svg) #world-map-svg g,
[data-theme="darknight"] body:has(#world-map-svg) #world-map-svg path {
    fill: rgba(255, 255, 255, 0.8) !important;
    stroke: rgba(255, 255, 255, 0.3) !important;
    stroke-width: 0.5 !important;
}

body:has(#world-map-svg) .country:hover,
body:has(#world-map-svg) .country:hover path,
[data-theme="classic"] body:has(#world-map-svg) .country:hover,
[data-theme="classic"] body:has(#world-map-svg) .country:hover path,
[data-theme="thanksgiving"] body:has(#world-map-svg) .country:hover,
[data-theme="thanksgiving"] body:has(#world-map-svg) .country:hover path,
[data-theme="halloween"] body:has(#world-map-svg) .country:hover,
[data-theme="halloween"] body:has(#world-map-svg) .country:hover path,
[data-theme="darknight"] body:has(#world-map-svg) .country:hover,
[data-theme="darknight"] body:has(#world-map-svg) .country:hover path {
    fill: rgba(255, 255, 255, 0.95) !important;
    stroke: rgba(255, 255, 255, 0.8) !important;
}

body:has(#world-map-svg) .country.highlighted,
body:has(#world-map-svg) .country.highlighted path,
[data-theme="classic"] body:has(#world-map-svg) .country.highlighted,
[data-theme="classic"] body:has(#world-map-svg) .country.highlighted path,
[data-theme="thanksgiving"] body:has(#world-map-svg) .country.highlighted,
[data-theme="thanksgiving"] body:has(#world-map-svg) .country.highlighted path,
[data-theme="halloween"] body:has(#world-map-svg) .country.highlighted,
[data-theme="halloween"] body:has(#world-map-svg) .country.highlighted path,
[data-theme="darknight"] body:has(#world-map-svg) .country.highlighted,
[data-theme="darknight"] body:has(#world-map-svg) .country.highlighted path {
    fill: #ffff00 !important;
    stroke: #ff0000 !important;
    stroke-width: 1px !important;
}

body:has(#world-map-svg) .country.correct,
body:has(#world-map-svg) .country.correct path,
[data-theme="classic"] body:has(#world-map-svg) .country.correct,
[data-theme="classic"] body:has(#world-map-svg) .country.correct path,
[data-theme="thanksgiving"] body:has(#world-map-svg) .country.correct,
[data-theme="thanksgiving"] body:has(#world-map-svg) .country.correct path,
[data-theme="halloween"] body:has(#world-map-svg) .country.correct,
[data-theme="halloween"] body:has(#world-map-svg) .country.correct path,
[data-theme="darknight"] body:has(#world-map-svg) .country.correct,
[data-theme="darknight"] body:has(#world-map-svg) .country.correct path {
    fill: #4ecdc4 !important;
    stroke: #26a69a !important;
    stroke-width: 2px !important;
}

body:has(#world-map-svg) .control-btn,
[data-theme="classic"] body:has(#world-map-svg) .control-btn,
[data-theme="thanksgiving"] body:has(#world-map-svg) .control-btn,
[data-theme="halloween"] body:has(#world-map-svg) .control-btn,
[data-theme="darknight"] body:has(#world-map-svg) .control-btn {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    color: #333 !important;
    border: none !important;
}

body:has(#world-map-svg) .control-btn:hover,
[data-theme="classic"] body:has(#world-map-svg) .control-btn:hover,
[data-theme="thanksgiving"] body:has(#world-map-svg) .control-btn:hover,
[data-theme="halloween"] body:has(#world-map-svg) .control-btn:hover,
[data-theme="darknight"] body:has(#world-map-svg) .control-btn:hover {
    background: white !important;
    transform: scale(1.1) !important;
}

body:has(#world-map-svg) .start-game-btn,
[data-theme="classic"] body:has(#world-map-svg) .start-game-btn,
[data-theme="thanksgiving"] body:has(#world-map-svg) .start-game-btn,
[data-theme="halloween"] body:has(#world-map-svg) .start-game-btn,
[data-theme="darknight"] body:has(#world-map-svg) .start-game-btn {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    color: #333 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

body:has(#world-map-svg) .start-game-btn:hover,
[data-theme="classic"] body:has(#world-map-svg) .start-game-btn:hover,
[data-theme="thanksgiving"] body:has(#world-map-svg) .start-game-btn:hover,
[data-theme="halloween"] body:has(#world-map-svg) .start-game-btn:hover,
[data-theme="darknight"] body:has(#world-map-svg) .start-game-btn:hover {
    background: rgba(102, 126, 234, 0.9) !important;
    color: white !important;
}

body:has(#world-map-svg) .question-panel,
[data-theme="classic"] body:has(#world-map-svg) .question-panel,
[data-theme="thanksgiving"] body:has(#world-map-svg) .question-panel,
[data-theme="halloween"] body:has(#world-map-svg) .question-panel,
[data-theme="darknight"] body:has(#world-map-svg) .question-panel {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
}

body:has(#world-map-svg) .question-text,
body:has(#world-map-svg) .choice,
[data-theme="classic"] body:has(#world-map-svg) .question-text,
[data-theme="classic"] body:has(#world-map-svg) .choice,
[data-theme="thanksgiving"] body:has(#world-map-svg) .question-text,
[data-theme="thanksgiving"] body:has(#world-map-svg) .choice,
[data-theme="halloween"] body:has(#world-map-svg) .question-text,
[data-theme="halloween"] body:has(#world-map-svg) .choice,
[data-theme="darknight"] body:has(#world-map-svg) .question-text,
[data-theme="darknight"] body:has(#world-map-svg) .choice {
    color: #333 !important;
}

body:has(#world-map-svg) .choice,
[data-theme="classic"] body:has(#world-map-svg) .choice,
[data-theme="thanksgiving"] body:has(#world-map-svg) .choice,
[data-theme="halloween"] body:has(#world-map-svg) .choice,
[data-theme="darknight"] body:has(#world-map-svg) .choice {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

