/* Difficulty Indicator (Top Right) */
#difficulty-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 4px;
    padding: 8px;
    z-index: 10;
    pointer-events: auto; /* Allows hover */
    background: rgba(0,0,0,0.3);
    border-radius: 6px;
    transition: opacity 0.3s;
}

#difficulty-indicator.hidden {
    display: none !important;
}

#difficulty-indicator .bar {
    width: 6px;
    height: 16px;
    background: #444;
    border-radius: 2px;
    transition: background-color 0.3s;
}

#difficulty-indicator[data-difficulty="easy"] .bar:nth-child(1) { background-color: var(--success-color); }
#difficulty-indicator[data-difficulty="medium"] .bar:nth-child(1),
#difficulty-indicator[data-difficulty="medium"] .bar:nth-child(2) { background-color: #f07b3f; }
#difficulty-indicator[data-difficulty="hard"] .bar:nth-child(1),
#difficulty-indicator[data-difficulty="hard"] .bar:nth-child(2),
#difficulty-indicator[data-difficulty="hard"] .bar:nth-child(3) { background-color: var(--fail-color); }

/* Score & Level */
#score-display {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: calc(2.2rem * var(--ui-scale));
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#level-display {
    position: absolute;
    font-size: calc(8rem * var(--ui-scale));
    font-weight: bold;
    color: rgba(220, 220, 220, 0.5);
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    z-index: 0;
}

.level-in {
    animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.level-out {
    animation: bounceOut 0.4s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

/* Floating HUD Buttons */
#music-toggle-btn, #start-leaderboard-btn, #about-btn {
    position: absolute;
    background: rgba(0,0,0,0.3);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    padding: 10px;
    color: var(--text-color);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    pointer-events: auto;
}

#music-toggle-btn {
    bottom: 20px;
    right: 20px;
}

#start-leaderboard-btn {
    bottom: 20px;
    left: 20px;
}

#about-btn {
    top: 20px;
    left: 20px;
}

#music-toggle-btn:hover, #start-leaderboard-btn:hover, #about-btn:hover {
    background: rgba(0,0,0,0.5);
}

#vs-back-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0,0,0,0.3);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    padding: 10px;
    color: var(--text-color);
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    pointer-events: auto;
}

#vs-back-btn:hover {
    background: rgba(0,0,0,0.5);
}