* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: radial-gradient(circle at center, #1a0b2e 0%, #05010d 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
    color: #fff;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 440px;
    height: 100vh;
    max-height: 680px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(138, 43, 226, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(20, 10, 35, 0.6) 0%, rgba(10, 5, 20, 0.8) 100%);
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.hidden {
    display: none !important;
}

/* Glassmorphism Panels */
.glass-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 88%;
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -45%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.neon-text {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px #00f0ff, 0 0 20px #00f0ff;
    color: #fff;
}

.neon-text.red {
    text-shadow: 0 0 10px #ff0055, 0 0 20px #ff0055;
}

.highlight {
    color: #00f0ff;
    font-weight: bold;
    background: rgba(0, 240, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.score-p {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    color: rgba(255,255,255,0.8);
}

#final-score {
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
}

.glass-btn {
    display: block;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.primary-btn {
    background: linear-gradient(90deg, #00f0ff, #7000ff);
    color: white;
    box-shadow: 0 4px 15px rgba(112, 0, 255, 0.4);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.6);
}

#key-guides {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 45px;
    display: flex;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.key-guide {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.25);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.key-guide:last-child {
    border-right: none;
}

#hud {
    position: absolute;
    top: 25px;
    width: 100%;
    text-align: center;
    pointer-events: none;
}

#score-display {
    font-size: 3.5rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.6);
}