/* highscore.css - Styles for High Score Overlay, Signature Wheels, and Fireworks */

/* --- Styles for High Score Overlay & Effects --- */
#highScoreOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none; /* JS will toggle this */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 180; /* Higher than gameOverMessage, below optionsMenu */
    background-color: rgba(0, 0, 0, 0.2); /* MODIFIED: Was transparent, now semi-transparent black at 20% opacity */
}


#starBackground {
    position: absolute;
    width: 70vmin;
    height: 70vmin;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, #ffee58 0%, #ffc107 60%, rgba(255,193,7,0) 100%);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.5s ease-in, transform 0.5s ease-in;
    z-index: 181;
    animation: sun-pulse 3s infinite ease-in-out;
    box-shadow: 0 0 30px 15px rgba(255, 235, 59, 0.5), 0 0 60px 30px rgba(255, 193, 7, 0.3);
    pointer-events: none;
}

#starBackground.visible {
    opacity: 0.85;
    transform: scale(1);
}

@keyframes sun-pulse {
    0%, 100% {
        box-shadow: 0 0 35px 18px rgba(255, 235, 59, 0.55), 0 0 65px 33px rgba(255, 193, 7, 0.35);
    }
    50% {
        box-shadow: 0 0 75px 38px rgba(255, 235, 59, 0.75), 0 0 145px 73px rgba(255, 193, 7, 0.5);
    }
}

#highScoreTitle {
    position: relative;
    font-size: clamp(26px, 7.5vmin, 64px);
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.95);
    margin-bottom: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out 0.3s, transform 0.5s ease-out 0.3s;
    z-index: 182;
    text-align: center;
    pointer-events: none;
}
#highScoreTitle:not(.visible) {
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}


#insigniaPrompt {
    position: relative;
    font-size: clamp(15px, 3.2vmin, 26px);
    color: #f0f0f0;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
    margin-bottom: 25px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out 0.4s, transform 0.5s ease-out 0.4s;
    z-index: 182;
    text-align: center;
    pointer-events: none;
}
#insigniaPrompt:not(.visible) {
     transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}


#highScoreTitle.visible,
#insigniaPrompt.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Styles for the <signature-wheels> custom element host */
signature-wheels {
    display: none; /* Managed by JS in the component (show/hide methods) */
    position: relative;
    z-index: 182;
    margin-top: 0; /* Or adjust as needed for layout */
}

/* Fireworks styles */
#fireworksContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 190; /* Above HS overlay content, but can be below options if options is 200+ */
}

.firework {
    position: absolute;
    border-radius: 50%;
    opacity: 1;
    animation: firework-burst var(--firework-duration, 0.8s) ease-out forwards;
    box-shadow: 0 0 var(--glow-blur, 4px) var(--glow-spread, 1px) var(--glow-color, rgba(255, 255, 255, 0.7));
}

@keyframes firework-burst {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(2.0) translate(var(--tx, 0), var(--ty, 0));
        opacity: 0;
    }
}

/* Desktop overrides - size relative to 430x780 container, not full viewport */
@media (min-width: 500px) {
    #starBackground {
        width: 300px;
        height: 300px;
    }
    #highScoreTitle {
        font-size: 32px;
    }
    #insigniaPrompt {
        font-size: 16px;
    }
}