:root {
    --bg-color: #0d0d0d;
    --text-color: #e0e0e0;
    --accent-color: #8a6cff;
    /* Soulframe-ish purple/blue */
    --accent-glow: #8a6cff80;
    --secondary-color: #2a2a2a;
    --key-bg: #1a1a1a;
    --key-border: #444;
}

.ocarina-container {
    text-align: center;
    background: radial-gradient(circle at center, #1a1b26 0%, #000000 100%);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), inset 0 0 20px var(--accent-glow);
    border: 1px solid #333;
    max-width: 900px;
    width: 90%;
}

/*h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    text-shadow: 0 0 10px var(--accent-glow);
    font-weight: 400;
}
*/
p.subtitle {
    color: #888;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.keys-grid {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    perspective: 1000px;
}

.key {
    background: var(--key-bg);
    border: 1px solid var(--key-border);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    position: relative;
    user-select: none;
}

.key span.note {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: bold;
}

.key span.kbd {
    font-size: 0.7rem;
    color: #555;
    margin-top: 2px;
    font-family: monospace;
}

.key:active,
.key.active {
    transform: scale(0.95) translateY(2px);
    background: var(--accent-color);
    border-color: #fff;
    box-shadow: 0 0 15px var(--accent-color), 0 0 30px var(--accent-color);
}

.key.active span.note,
.key.active span.kbd {
    color: #fff;
}

.visualizer {
    height: 50px;
    width: 100%;
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.bar {
    width: 4px;
    height: 10%;
    background: var(--accent-color);
    border-radius: 2px;
    transition: height 0.1s;
}

/* Specific layout adjustments for piano-like arrangement if needed, 
   but grid is safer for responsive */
@media (max-width: 600px) {
    .ocarina-container {
        padding: 1rem;
        width: 95%;
    }

    .key {
        width: 50px;
        height: 50px;
        margin: 5px;
        /* Add some margin for easier tapping */
    }

    .keys-grid {
        gap: 5px;
    }

    h2 {
        font-size: 1.5rem;
    }
}

/* Even smaller screens */
@media (max-width: 400px) {
    .key {
        width: 42px;
        height: 42px;
    }
}

/* Challenge Mode Styling */
.game-area {
    width: 100%;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
    background: #000;
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    height: 350px;
    /* Increased height for better visibility */
}

.track-container {
    width: 100%;
    height: 100%;
    background-image: url('images/partition_musique.png');
    background-size: 100% 100%;
    /* Force exact fit for alignment */
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.target-bubble {
    width: 60px;
    height: 180px;
    /* Cover all lines */
    border: 4px solid #00ff00;
    /* Green for target */
    border-radius: 30px;
    /* Oval shape */
    position: absolute;
    left: 10%;
    /* Hit zone position */
    top: 50%;
    /* Center vertically */
    transform: translateY(-50%);
    box-shadow: 0 0 15px #00ff00;
    z-index: 10;
}

.target-bubble.hit {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px #ffffff;
    transform: translateY(-50%) scale(1.1);
    transition: all 0.1s;
}

.target-bubble.miss {
    border-color: #ff0000;
    box-shadow: 0 0 20px #ff0000;
    transition: all 0.1s;
}

.moving-note {
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 100%;
    /* Start off-screen right */
    transform: translateY(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    box-shadow: 0 0 10px var(--accent-glow);
    z-index: 5;
    will-change: left;
}

.score-display {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 1.5rem;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 15px;
    border-radius: 5px;
    z-index: 20;
    font-family: 'Cinzel', serif;
}

.game-controls {
    text-align: center;
    margin-top: 1rem;
}

.action-btn {
    padding: 10px 30px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    transition: background 0.2s;
}

.action-btn:hover {
    background: #6a4ce0;
}