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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #1a1a2e;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

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

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#score-display {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    pointer-events: auto;
}

#accuracy-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 48px;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#accuracy-display.show {
    opacity: 1;
}

#perfect-indicator {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: #ffd700;
    font-size: 64px;
    font-weight: bold;
    text-shadow: 
        0 0 10px #ffd700,
        0 0 20px #ffd700,
        0 0 30px #ff8c00;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

#perfect-indicator.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.85);
    pointer-events: auto;
    transition: opacity 0.5s ease;
}

#start-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

#start-screen h1 {
    color: #fff;
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255,255,255,0.5);
}

#start-screen p {
    color: #ccc;
    font-size: 18px;
    margin: 10px 0;
    text-align: center;
}

#start-btn {
    margin-top: 30px;
    padding: 15px 40px;
    font-size: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

#start-btn:active {
    transform: scale(0.98);
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    pointer-events: none;
    animation: confetti-fall 2s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(300px) rotate(720deg);
        opacity: 0;
    }
}