.theme-controls {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 999;
}

.theme-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.theme-btn:hover {
    transform: scale(1.05);
}

.theme-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.theme-menu.active {
    display: flex;
}

.theme-menu button {
    background: var(--bg-light);
    border: 2px solid transparent;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.theme-menu button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

/* Diwali Theme */
body[data-theme="diwali"] {
    --primary-color: #ff6b35;
    --secondary-color: #f7931e;
    --accent-color: #ffd700;
}

body[data-theme="diwali"] .hero,
body[data-theme="diwali"] .page-header {
    background: linear-gradient(135deg, #ff6b35, #f7931e, #ffd700);
    position: relative;
    overflow: hidden;
}

/* Diwali Sparkles Animation */
body[data-theme="diwali"]::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background-image: 
        radial-gradient(circle, #ffd700 2px, transparent 2px),
        radial-gradient(circle, #ff6b35 1.5px, transparent 1.5px),
        radial-gradient(circle, #f7931e 2.5px, transparent 2.5px);
    background-size: 80px 80px, 120px 120px, 150px 150px;
    background-position: 0 0, 40px 60px, 80px 30px;
    animation: diwaliSparkle 4s linear infinite;
    opacity: 0.5;
}

/* Floating Diyas Container */
body[data-theme="diwali"]::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    background-image: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><text y="40" font-size="30">🪔</text></svg>');
    background-size: 40px 40px;
    background-repeat: repeat;
    animation: floatDiya 15s linear infinite;
    opacity: 0.7;
}

@keyframes diwaliSparkle {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
        transform: translateY(-10px) rotate(180deg) scale(1.1);
    }
    100% {
        transform: translateY(0) rotate(360deg) scale(1);
        opacity: 0.5;
    }
}

@keyframes floatDiya {
    0% {
        transform: translateX(0) translateY(0);
    }
    100% {
        transform: translateX(-50px) translateY(-100vh);
    }
}

/* Christmas Theme */
body[data-theme="christmas"] {
    --primary-color: #c41e3a;
    --secondary-color: #0f8a5f;
    --accent-color: #ffd700;
}

body[data-theme="christmas"] .hero,
body[data-theme="christmas"] .page-header {
    background: linear-gradient(135deg, #c41e3a, #0f8a5f);
    position: relative;
    overflow: hidden;
}

/* Snowflakes Animation */
body[data-theme="christmas"]::before {
    content: '';
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    height: 200%;
    pointer-events: none;
    z-index: 9999;
    background-image: 
        radial-gradient(circle, #ffffff 2px, transparent 2px),
        radial-gradient(circle, #e8f4f8 3px, transparent 3px),
        radial-gradient(circle, #d4e9f0 2.5px, transparent 2.5px),
        radial-gradient(circle, #ffffff 1.5px, transparent 1.5px);
    background-size: 100px 100px, 150px 150px, 200px 200px, 80px 80px;
    background-position: 0 0, 50px 50px, 100px 100px, 150px 150px;
    animation: snowfall 20s linear infinite;
    opacity: 0.8;
}

/* Additional Snowflakes Layer */
body[data-theme="christmas"]::after {
    content: '';
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    height: 200%;
    pointer-events: none;
    z-index: 9998;
    background-image: 
        radial-gradient(circle, #ffffff 1px, transparent 1px),
        radial-gradient(circle, #f0f8ff 2px, transparent 2px);
    background-size: 120px 120px, 180px 180px;
    background-position: 30px 30px, 90px 90px;
    animation: snowfall 15s linear infinite;
    opacity: 0.6;
}

/* New Year Theme */
body[data-theme="newyear"] {
    --primary-color: #4a00e0;
    --secondary-color: #8e2de2;
    --accent-color: #ffd700;
}

body[data-theme="newyear"] .hero,
body[data-theme="newyear"] .page-header {
    background: linear-gradient(135deg, #4a00e0, #8e2de2, #ffd700);
    position: relative;
    overflow: hidden;
}

/* Fireworks Animation */
body[data-theme="newyear"]::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background-image: 
        radial-gradient(circle, #ffd700 3px, transparent 3px),
        radial-gradient(circle, #ff1493 2.5px, transparent 2.5px),
        radial-gradient(circle, #00ffff 3px, transparent 3px),
        radial-gradient(circle, #ff4500 2px, transparent 2px),
        radial-gradient(circle, #7fff00 2.5px, transparent 2.5px);
    background-size: 200px 200px, 250px 250px, 180px 180px, 220px 220px, 190px 190px;
    background-position: 20% 30%, 80% 40%, 50% 60%, 30% 70%, 70% 20%;
    animation: fireworksBurst 2s ease-out infinite;
    opacity: 0;
}

/* Additional Fireworks Layer */
body[data-theme="newyear"]::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    background-image: 
        radial-gradient(circle, #ffffff 2px, transparent 2px),
        radial-gradient(circle, #ffd700 2.5px, transparent 2.5px),
        radial-gradient(circle, #ff69b4 2px, transparent 2px);
    background-size: 150px 150px, 200px 200px, 180px 180px;
    background-position: 40% 50%, 60% 30%, 80% 70%;
    animation: fireworksBurst 2.5s ease-out infinite 0.5s;
    opacity: 0;
}

/* Pongal Theme */
body[data-theme="pongal"] {
    --primary-color: #ff9933;
    --secondary-color: #138808;
    --accent-color: #ffd700;
}

body[data-theme="pongal"] .hero,
body[data-theme="pongal"] .page-header {
    background: linear-gradient(135deg, #ff9933, #138808, #ffd700);
    position: relative;
    overflow: hidden;
}

/* Falling Rice Grains / Harvest Animation */
body[data-theme="pongal"]::before {
    content: '';
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    height: 200%;
    pointer-events: none;
    z-index: 9999;
    background-image: 
        radial-gradient(ellipse 2px 4px, #ffd700 50%, transparent 50%),
        radial-gradient(ellipse 2.5px 5px, #ffeb3b 50%, transparent 50%),
        radial-gradient(ellipse 2px 4.5px, #fff9c4 50%, transparent 50%),
        radial-gradient(ellipse 1.5px 3.5px, #ffd54f 50%, transparent 50%);
    background-size: 80px 80px, 120px 120px, 100px 100px, 90px 90px;
    background-position: 0 0, 40px 40px, 80px 20px, 120px 60px;
    animation: harvestFall 18s linear infinite;
    opacity: 0.7;
}

/* Additional Harvest Elements */
body[data-theme="pongal"]::after {
    content: '';
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    height: 200%;
    pointer-events: none;
    z-index: 9998;
    background-image: 
        radial-gradient(ellipse 3px 6px, #ff9933 50%, transparent 50%),
        radial-gradient(ellipse 2px 5px, #ffb74d 50%, transparent 50%);
    background-size: 110px 110px, 140px 140px;
    background-position: 30px 30px, 90px 70px;
    animation: harvestFall 22s linear infinite;
    opacity: 0.6;
}

/* Animations */
@keyframes snowfall {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(50px) rotate(360deg);
        opacity: 0.8;
    }
}

@keyframes fireworksBurst {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    20% {
        transform: scale(0.5);
        opacity: 1;
    }
    40% {
        transform: scale(1);
        opacity: 0.8;
    }
    60% {
        transform: scale(1.5);
        opacity: 0.5;
    }
    80% {
        transform: scale(2);
        opacity: 0.2;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

@keyframes harvestFall {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        opacity: 0.9;
    }
    100% {
        transform: translateY(100vh) translateX(-30px) rotate(180deg);
        opacity: 0.7;
    }
}

@media (max-width: 768px) {
    .theme-controls {
        top: 80px;
        right: 10px;
    }
    
    .theme-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}
