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

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    cursor: none; /* Hide default cursor */
}

/* Custom glowing cursor for menu */
#menu-screen {
    cursor: none;
}

#menu-screen::before {
    content: '';
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.8) 0%, rgba(255, 0, 0, 0.4) 50%, transparent 100%);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8),
                0 0 40px rgba(255, 0, 0, 0.6),
                0 0 60px rgba(255, 0, 0, 0.4);
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease-out;
    display: none;
}

#menu-screen.active::before {
    display: block;
}

#menu-screen.active {
    cursor: none;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000;
    transition: transform 0.1s ease-out;
}

@keyframes screenShake {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    10% { transform: translate(-4px, -2px) rotate(-1deg); }
    20% { transform: translate(4px, 2px) rotate(1deg); }
    30% { transform: translate(-2px, 4px) rotate(-0.6deg); }
    40% { transform: translate(2px, -4px) rotate(0.6deg); }
    50% { transform: translate(-4px, 2px) rotate(-0.4deg); }
    60% { transform: translate(4px, -2px) rotate(0.4deg); }
    70% { transform: translate(-2px, -2px) rotate(-0.2deg); }
    80% { transform: translate(2px, 2px) rotate(0.2deg); }
    90% { transform: translate(-2px, 0) rotate(0deg); }
}

@keyframes screenShakeStrong {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    10% { transform: translate(-10px, -6px) rotate(-2.5deg); }
    20% { transform: translate(10px, 6px) rotate(2.5deg); }
    30% { transform: translate(-6px, 10px) rotate(-2deg); }
    40% { transform: translate(6px, -10px) rotate(2deg); }
    50% { transform: translate(-10px, 6px) rotate(-1.5deg); }
    60% { transform: translate(10px, -6px) rotate(1.5deg); }
    70% { transform: translate(-6px, -6px) rotate(-1deg); }
    80% { transform: translate(6px, 6px) rotate(1deg); }
    90% { transform: translate(-4px, 0) rotate(-0.5deg); }
}

@keyframes screenShakeIntense {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    10% { transform: translate(-10px, -6px) rotate(-2deg); }
    20% { transform: translate(10px, 6px) rotate(2deg); }
    30% { transform: translate(-6px, 10px) rotate(-1.5deg); }
    40% { transform: translate(6px, -10px) rotate(1.5deg); }
    50% { transform: translate(-10px, 6px) rotate(-1.2deg); }
    60% { transform: translate(10px, -6px) rotate(1.2deg); }
    70% { transform: translate(-6px, -6px) rotate(-1deg); }
    80% { transform: translate(6px, 6px) rotate(1deg); }
    90% { transform: translate(-4px, 0) rotate(-0.5deg); }
}

@keyframes lsdEffect {
    0% { 
        filter: hue-rotate(0deg) saturate(1) blur(0px);
        transform: scale(1);
    }
    25% { 
        filter: hue-rotate(90deg) saturate(1.5) blur(2px);
        transform: scale(1.02);
    }
    50% { 
        filter: hue-rotate(180deg) saturate(2) blur(3px);
        transform: scale(1.05);
    }
    75% { 
        filter: hue-rotate(270deg) saturate(1.5) blur(2px);
        transform: scale(1.02);
    }
    100% { 
        filter: hue-rotate(360deg) saturate(1) blur(0px);
        transform: scale(1);
    }
}

.lsd-effect {
    animation: lsdEffect 3s ease-in-out infinite;
    filter: hue-rotate(0deg) saturate(1.2) blur(1px);
}

@keyframes constantShake {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(2px, 1px) rotate(0.4deg); }
    50% { transform: translate(-2px, -1px) rotate(-0.4deg); }
    75% { transform: translate(1px, -2px) rotate(0.2deg); }
}

@keyframes glowPulse {
    0%, 100% { 
        text-shadow: 0 0 20px rgba(255, 0, 0, 0.8),
                     0 0 40px rgba(255, 0, 0, 0.6),
                     0 0 60px rgba(255, 0, 0, 0.4),
                     0 0 80px rgba(255, 0, 0, 0.2);
    }
    50% { 
        text-shadow: 0 0 40px rgba(255, 0, 0, 1),
                     0 0 60px rgba(255, 0, 0, 0.8),
                     0 0 80px rgba(255, 0, 0, 0.6),
                     0 0 100px rgba(255, 0, 0, 0.4);
    }
}

@keyframes buttonGlow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.6),
                   0 0 40px rgba(255, 0, 0, 0.4),
                   0 0 60px rgba(255, 0, 0, 0.3);
    }
    50% { 
        box-shadow: 0 0 40px rgba(255, 255, 255, 0.8),
                   0 0 60px rgba(255, 0, 0, 0.6),
                   0 0 80px rgba(255, 0, 0, 0.4),
                   0 0 100px rgba(255, 0, 0, 0.2);
    }
}

.screen-shake {
    animation: screenShake 0.3s ease-out;
}

.screen-shake-strong {
    animation: screenShakeStrong 0.7s ease-out;
}

.screen-shake-intense {
    animation: screenShakeIntense 1s ease-out;
}

.constant-shake {
    animation: constantShake 2s ease-in-out infinite;
}

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

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

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

.screen {
    display: none;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: all;
}

.screen.active {
    display: flex;
}

#menu-screen h1 {
    color: #fff;
    font-size: 3em;
    margin-bottom: 2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    animation: glowPulse 2s ease-in-out infinite;
}

.difficulty-selector {
    display: flex;
    gap: 1em;
    margin-bottom: 2em;
}

.difficulty-btn {
    padding: 1em 2em;
    font-size: 1.2em;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    animation: buttonGlow 3s ease-in-out infinite;
}

.difficulty-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.8),
                0 0 70px rgba(255, 0, 0, 0.6),
                0 0 90px rgba(255, 0, 0, 0.4);
}

.difficulty-btn.selected {
    background: rgba(255, 0, 0, 0.6);
    border-color: #ff0000;
    box-shadow: 0 0 40px rgba(255, 0, 0, 1),
                0 0 60px rgba(255, 0, 0, 0.8),
                0 0 80px rgba(255, 0, 0, 0.6);
}

#start-btn, #restart-btn, #menu-btn {
    padding: 1em 2em;
    font-size: 1.2em;
    background: #ff0000;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.8),
                0 0 50px rgba(255, 0, 0, 0.6),
                0 0 70px rgba(255, 0, 0, 0.4);
    animation: buttonGlow 2.5s ease-in-out infinite;
}

#start-btn:hover, #restart-btn:hover, #menu-btn:hover {
    background: #cc0000;
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(255, 0, 0, 1),
                0 0 70px rgba(255, 0, 0, 0.8),
                0 0 90px rgba(255, 0, 0, 0.6),
                0 0 110px rgba(255, 0, 0, 0.4);
}

#game-screen {
    align-items: flex-start;
    padding: 2em;
}

#score-display, #combo-display, #accuracy-display {
    color: #fff;
    font-size: 1.5em;
    margin-bottom: 0.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

#game-over-screen h2 {
    color: #fff;
    font-size: 2.5em;
    margin-bottom: 1em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

#final-score {
    color: #fff;
    font-size: 1.5em;
    margin-bottom: 2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

#game-over-screen button {
    margin: 0.5em;
}

#loss-screen h2 {
    color: #ff0000;
    font-size: 2.5em;
    margin-bottom: 1em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

#loss-message {
    color: #fff;
    font-size: 1.3em;
    margin-bottom: 1em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

#loss-score {
    color: #fff;
    font-size: 1.5em;
    margin-bottom: 2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

#loss-screen button {
    margin: 0.5em;
}

#loss-video, #streak-video, #streak2-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.7;
}

.instructions {
    color: #fff;
    text-align: center;
    margin: 2em 0;
    font-size: 1.1em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.instructions p {
    margin: 0.5em 0;
}

.key {
    display: inline-block;
    padding: 0.2em 0.5em;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid #fff;
    border-radius: 4px;
    font-weight: bold;
    margin: 0 0.2em;
}

#credit-text {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    z-index: 10;
}

