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

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#instructions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    padding: 40px 60px;
    border-radius: 20px;
    border: 3px solid #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

#instructions h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#instructions p {
    font-size: 1.2rem;
    margin: 10px 0;
    color: #e0e0e0;
}

#start-btn {
    margin-top: 30px;
    padding: 15px 50px;
    font-size: 1.5rem;
    background: linear-gradient(45deg, #c41e3a, #ff6b6b);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(196, 30, 58, 0.5);
}

#start-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(196, 30, 58, 0.7);
}

#game-screen {
    width: 100%;
    height: 100%;
    position: relative;
}

#webcam {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 200px;
    height: 150px;
    border: 3px solid #ffd700;
    border-radius: 10px;
    transform: scaleX(-1);
    z-index: 10;
    object-fit: cover;
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

#score {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.8rem;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 10;
}

#twirl-counter {
    position: absolute;
    top: 80px;
    left: 20px;
    text-align: left;
    z-index: 10;
}

#twirl-count-display {
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 5px;
}

#height-text {
    font-size: 1.4rem;
    color: #4ecdc4;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-top: 5px;
    font-weight: bold;
}

#twirl-meter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
}

#twirl-label {
    color: #ffd700;
    font-size: 1.2rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

#twirl-bar-bg {
    width: 300px;
    height: 25px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    border: 2px solid #ffd700;
    overflow: hidden;
}

#twirl-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ffd700, #4ecdc4);
    border-radius: 15px;
    transition: width 0.1s ease;
}

/* Snowflake animation */
.snowflake {
    position: absolute;
    color: white;
    font-size: 1rem;
    pointer-events: none;
    animation: fall linear infinite;
    z-index: 5;
}

@keyframes fall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0.3;
    }
}
