/* Celebration Overlay */
#celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* --- BACKGROUND RAYS --- */
.sunburst {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150vmax;
    height: 150vmax;
    background: radial-gradient(
        circle,
        rgba(255,255,255,0.1) 0%,
        transparent 70%
    );
    opacity: 0;
    z-index: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: opacity 0.5s;
}

.sunburst.active {
    opacity: 1;
}

/* --- SCENE CONTAINER --- */
.scene-container {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateZ(0);
}

/* 
    WRAPPER: Handles Entrance (Slam) and Exit (Zoom) 
*/
.plaque-wrapper {
    opacity: 0;
    will-change: transform, opacity;
}

.anim-enter {
    animation: slam-enter 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes slam-enter {
    0% { opacity: 0; transform: scale(0.5) translateY(50px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.anim-exit {
    animation: zoom-exit 0.4s ease-in forwards;
}

@keyframes zoom-exit {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.8) translateY(-20px); }
}

/* 
    CONTENT: Handles Idle Float 
*/
.plaque-content {
    transform-origin: center;
}

.anim-float {
    animation: float-idle 3s ease-in-out infinite;
}

@keyframes float-idle {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* --- GAME PLAQUE (CSS Only, No SVG) --- */
.game-plaque {
    background: var(--c-theme-mid);
    border: 4px solid #fff;
    border-radius: 20px;
    padding: 0;
    width: min(360px, 85vw);
    box-shadow: 
        0 8px 0 var(--c-theme-shadow),
        0 20px 40px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.plaque-header {
    width: 100%;
    background: rgba(0,0,0,0.1);
    padding: 10px;
    display: flex;
    justify-content: center;
    border-bottom: 2px solid rgba(0,0,0,0.1);
}

.plaque-stars {
    display: flex;
    gap: 8px;
    color: #fff;
    text-shadow: 0 2px 0 rgba(0,0,0,0.2);
}

.star { font-size: 1.5rem; opacity: 0.6; }
.star.big { font-size: 2rem; opacity: 1; transform: translateY(-2px); }

.plaque-body {
    padding: 24px 32px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), transparent);
}

#plaque-label {
    margin: 0;
    font-family: 'Black Ops One', cursive, sans-serif;
    font-size: 2.2rem;
    color: #fff;
    text-transform: uppercase;
    text-shadow: 
        0 3px 0 var(--c-theme-shadow),
        0 4px 8px rgba(0,0,0,0.2);
    letter-spacing: 2px;
    line-height: 1.2;
    text-align: center;
}

.plaque-footer {
    height: 12px;
    width: 100%;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* --- PARTICLES --- */
.particle {
    position: absolute;
    pointer-events: none;
    will-change: transform, opacity;
    z-index: -1;
}

/* Screen Shake */
.shake {
    animation: shake-anim 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake-anim {
    10%, 90% { transform: translate3d(-1px, -1px, 0); }
    20%, 80% { transform: translate3d(2px, 2px, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, -4px, 0); }
    40%, 60% { transform: translate3d(4px, 4px, 0); }
}

/* --- THEMES --- */

/* Night Theme */
[data-theme="night"] .game-plaque {
    background: rgba(30, 41, 59, 0.95) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(99, 102, 241, 0.5);
    box-shadow: 
        0 0 30px rgba(99, 102, 241, 0.2),
        0 10px 20px rgba(0,0,0,0.5) !important;
}

[data-theme="night"] #plaque-label {
    text-shadow: 0 0 10px currentColor;
    font-family: 'Cinzel', serif;
}

[data-theme="night"] .star {
    text-shadow: 0 0 8px currentColor;
}

/* Wood Theme */
[data-theme="wood"] .game-plaque {
    background: #5d4037 !important;
    border: 6px solid #3e2723;
    border-radius: 8px;
    box-shadow: 
        0 8px 0 #271c19,
        0 10px 20px rgba(0,0,0,0.6) !important;
}

[data-theme="wood"] .plaque-header {
    background: rgba(0,0,0,0.2);
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

[data-theme="wood"] #plaque-label {
    font-family: serif;
    text-shadow: 0 2px 0 #3e2723 !important;
    letter-spacing: 1px;
}

[data-theme="wood"] .plaque-footer {
    background: rgba(0,0,0,0.3);
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Retro Theme */
[data-theme="retro"] .game-plaque {
    background: #000 !important;
    border: 2px solid #33ff33;
    border-radius: 0;
    box-shadow: 
        0 0 15px #33ff33,
        inset 0 0 20px rgba(0, 50, 0, 0.8) !important;
}

[data-theme="retro"] #plaque-label {
    font-family: 'Courier New', monospace;
    color: #33ff33 !important;
    text-shadow: 0 0 5px #33ff33 !important;
}

[data-theme="retro"] .star {
    color: #33ff33 !important;
    text-shadow: 0 0 5px #33ff33;
}

[data-theme="retro"] .plaque-header,
[data-theme="retro"] .plaque-footer {
    border-color: #33ff33;
    background: transparent;
}

[data-theme="night"] .sunburst {
    background: radial-gradient(
        circle,
        rgba(99, 102, 241, 0.15) 0%,
        transparent 70%
    );
}

[data-theme="wood"] .sunburst {
    background: radial-gradient(
        circle,
        rgba(255, 200, 100, 0.1) 0%,
        transparent 70%
    );
}

[data-theme="retro"] .sunburst {
    background: radial-gradient(
        circle,
        rgba(51, 255, 51, 0.1) 0%,
        transparent 70%
    );
}
