* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #000;
    background-image: url('fireworkbackground.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #fff;
    overflow: hidden;
}

.container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#fireworksCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#webcam {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 320px;
    height: 240px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    z-index: 2;
    transform: scaleX(-1);
}

#handCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    overflow: hidden;
}

.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.start-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.start-content h1 {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    color: white;
}

.instructions {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.instructions h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #ffff00;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.instructions ul {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.instructions li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
    text-align: left;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.instructions li:before {
    content: "🎯";
    position: absolute;
    left: 0;
}

.instructions strong {
    color: #00ff00;
}

.warning {
    font-size: 1.1em;
    color: #ff6b6b;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    font-weight: bold;
    margin: 0;
}

.start-button {
    padding: 15px 40px;
    font-size: 1.2em;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.start-button:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.youtube-container {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 2;
    display: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    width: 320px;
    height: 180px;
}

.youtube-container iframe {
    display: block;
    width: 100%;
    height: 100%;
}

.mirror-button {
    position: absolute;
    top: 260px;
    right: 10px;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: none;
    z-index: 4;
    transition: all 0.3s ease;
}

.mirror-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.mirror-button.active {
    background-color: rgba(255, 107, 107, 0.3);
    border-color: #ff6b6b;
}

.audio-button {
    position: absolute;
    bottom: 200px;
    left: 10px;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: none;
    z-index: 4;
    transition: all 0.3s ease;
}

.audio-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.audio-button.active {
    background-color: rgba(107, 255, 107, 0.3);
    border-color: #6bff6b;
}

.change-song-button {
    position: absolute;
    bottom: 200px;
    left: 80px;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: none;
    z-index: 4;
    transition: all 0.3s ease;
}

.change-song-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.whitehouse {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: auto;
    z-index: 2;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.game-ui {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 4;
    display: none;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.game-ui div {
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: bold;
}

.game-ui .score {
    color: #00ff00;
}

.game-ui .health {
    color: #ff6b6b;
}

.game-ui .wave {
    color: #ffff00;
}

.game-over-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 20;
    backdrop-filter: blur(10px);
}

.game-over-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 40px;
    border-radius: 20px;
    border: 3px solid #ff6b6b;
    text-align: center;
    box-shadow: 0 0 50px rgba(255, 107, 107, 0.5);
    max-width: 500px;
    width: 90%;
}

.game-over-content h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    animation: pulse 2s infinite;
}

.destruction-text {
    font-size: 1.2em;
    color: #ff8888;
    margin-bottom: 30px;
    font-style: italic;
}

.final-stats {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-label {
    font-weight: bold;
    color: #ffffff;
}

.stat-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #00ff00;
}

.play-again-button {
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    text-transform: uppercase;
}

.play-again-button:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e53e3e 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #webcam {
        width: 160px;
        height: 120px;
    }
    
    .youtube-container {
        width: 160px;
        height: 90px;
    }
    
    .youtube-container iframe {
        width: 160px;
        height: 90px;
    }
    
    .start-content {
        padding: 20px;
        margin: 0 20px;
    }
    
    .start-content h1 {
        font-size: 2em;
    }
    
    .instructions {
        padding: 15px;
    }
    
    .instructions h2 {
        font-size: 1.2em;
    }
    
    .instructions li {
        font-size: 0.9em;
        margin-bottom: 8px;
    }
    
    .warning {
        font-size: 1em;
    }
    
    .whitehouse {
        width: 120px;
        bottom: 30px;
    }
    
    .game-ui {
        font-size: 12px;
        padding: 10px;
    }
    
    .game-over-content {
        padding: 20px;
        margin: 0 10px;
    }
    
    .game-over-content h1 {
        font-size: 1.8em;
    }
    
    .destruction-text {
        font-size: 1em;
    }
    
    .play-again-button {
        font-size: 0.9em;
        padding: 12px 20px;
    }
}