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

body {
    font-family: 'Arial', sans-serif;
    background: #000;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    color: white;
    overflow-y: auto;
    padding: 20px 0;
}

#game-container {
    text-align: center;
    max-width: 1280px;
    width: 100%;
    padding: 0 20px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#info-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

#instructions {
    text-align: left;
}

#instructions p {
    margin: 3px 0;
    font-size: 0.95rem;
}

#game-stats {
    font-size: 1.2rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 10px;
}

#bubble-count {
    color: #ffeb3b;
    font-size: 1.5rem;
}

#video-container {
    position: relative;
    display: inline-block;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
}

#webcam {
    display: none;
}

#game-canvas {
    display: block;
    width: 1280px;
    height: 720px;
    max-width: 100%;
}

#controls {
    margin-top: 10px;
    margin-bottom: 20px;
}

button {
    background: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
    border: none;
    color: white;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(-1px);
}

#game-over {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

#game-over h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #4caf50;
}

#game-over p {
    font-size: 1.3rem;
    margin: 10px 0;
}

#final-time {
    color: #ffeb3b;
    font-weight: bold;
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    #info-panel {
        flex-direction: column;
        gap: 15px;
    }

    #instructions p {
        font-size: 0.9rem;
    }

    #game-stats {
        font-size: 1.2rem;
    }

    button {
        padding: 12px 30px;
        font-size: 1rem;
    }
}
