/* On Wisconsin Easter egg only. Loaded after the main layout styles. */
/* All availability dots stay busy through the end-of-egg dialog. */
.easter-egg-busy .status .status-dot,
.easter-egg-busy .hover-status .status-dot,
.easter-egg-busy .hover-card-status-dot,
.easter-egg-busy .profile-status,
.easter-egg-busy .home-status-dot {
    background: #f04452;
    box-shadow: 0 0 0 3px rgba(240, 68, 82, 0.16);
}
.marching-band-bar {
    position: relative;
    width: 100%;
    height: 0;
    flex: 0 0 auto;
    overflow: hidden;
    /* Madison's State Capitol sits behind the On Wisconsin parade. */
    background-color: #1686e7;
    /* Trees fill the width; the Capitol is a transparent cutout above them. */
    background-image: url("../Images/EasterEggs/UW_MarchingBand_Trees.png");
    background-position: center center;
    background-size: auto 100%;
    background-repeat: repeat-x;
    border-top: 0 solid var(--accent, #7b83eb);
    border-bottom: 0 solid var(--accent, #7b83eb);
    transition: height 600ms ease-in-out, border-width 600ms ease-in-out;
}
.marching-band-bar.active {
    height: 136px;
    border-top-width: 1px;
    border-bottom-width: 1px;
}
.marching-band-capitol {
    position: absolute;
    inset: 0 auto 0 50%;
    width: auto;
    aspect-ratio: 2172 / 724;
    transform: translateX(-50%);
    background: url("../Images/EasterEggs/UW_MarchingBand_Background.png") center / 100% 100% no-repeat;
    image-rendering: pixelated;
    pointer-events: none;
}
/* Same expandable stage, but with a cinematic red glow for ILLBEBACK. */
.marching-band-bar.terminator-mode {
    background:
        radial-gradient(ellipse at 50% 115%, rgba(197, 72, 32, .42), transparent 70%),
        linear-gradient(#17151b, #3a3030 80%, #4a3c33);
    border-color: #b92f3c;
}
.marching-band-bar.terminator-mode .marching-band-capitol {
    display: none;
}
.marching-band-bar.terminator-mode::before {
    height: 36px;
    border-top: 0;
    box-shadow: none;
    /* Looping 8-bit art: cracked sand, concrete slabs, dead grass, and fires. */
    background: url("../Images/EasterEggs/Terminator_Battlefield_Ground.png") left bottom / auto 36px repeat-x;
}
.marching-band-bar.terminator-mode::after {
    display: none;
}
/* A low, 8-bit roadway sits behind the marching feet and vehicle wheels. */
.marching-band-bar::before {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 17px;
    background: #24252d;
    border-top: 3px solid #777b86;
    box-shadow: inset 0 3px 0 #41444d;
    pointer-events: none;
}
.marching-band-bar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    height: 3px;
    background: repeating-linear-gradient(
        90deg,
        #e8d28b 0 20px,
        transparent 20px 38px
    );
    pointer-events: none;
}
/* The primary layout is unchanged until an easter egg is active. */
.app-shell.band-open {
    height: 100vh;
    overflow: hidden;
}
.app-shell.band-open .app-body {
    height: auto;
    flex: 1 1 0;
    min-height: 0;
}
.marching-band-sprite {
    position: absolute;
    z-index: 1;
    left: 0;
    top: 6px;
    display: block;
    /* Preserve the full 6x3 unit's natural proportions. */
    height: 124px;
    width: 100%;
    max-width: none;
    image-rendering: pixelated;
    pointer-events: none;
}
/* Place the parade feet and car tires on the road, not the sidewalk. */
.marching-band-bar:not(.terminator-mode) .marching-band-sprite {
    top: 12px;
}
@media (max-width: 700px) {
    .marching-band-bar.active { height: 106px; }
    .marching-band-bar::before { height: 13px; border-top-width: 2px; }
    .marching-band-bar::after { bottom: 3px; height: 2px; }
    .marching-band-bar.terminator-mode::before {
        height: 28px;
        border-top: 0;
        background-size: auto 28px;
    }
    .marching-band-sprite {
        height: 94px;
        width: auto;
    }
}
/* The bar grows downward from the top edge, then closes upward from
   the bottom edge. The canvas remains anchored to its top padding. */

/* End-of-parade thank-you message and blue 8-bit confetti. */
.band-celebration {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(8, 13, 30, .65);
    animation: band-celebration-appear 250ms ease-out both;
}
.band-celebration-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    padding: 30px 28px;
    color: #f8fbff;
    text-align: center;
    background: #18213e;
    border: 3px solid #4392ff;
    box-shadow: 7px 7px 0 #071329;
}
.band-celebration-dialog h2 {
    margin: 0 0 14px;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    line-height: 1.3;
}
.band-celebration-dialog p {
    margin: 0 0 24px;
    line-height: 1.5;
    color: #d0e4ff;
}
.band-celebration-dialog button {
    padding: 10px 20px;
    border: 2px solid #d6e9ff;
    border-radius: 0;
    color: #fff;
    background: #2468d9;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.band-celebration-dialog button:hover,
.band-celebration-dialog button:focus-visible {
    background: #3687f8;
    outline-offset: 3px;
}
.band-confetti {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.band-confetti span {
    position: absolute;
    top: -12px;
    left: var(--x);
    width: 8px;
    height: 8px;
    background: #348eff;
    box-shadow: 3px 0 #a4d7ff;
    opacity: 0;
    animation: band-blue-confetti var(--duration) linear var(--delay) 2 both;
}
.band-confetti span:nth-child(3n) { background: #0d53ce; }
.band-confetti span:nth-child(4n) { background: #65bdff; }
/* The Terminator ending uses the same popup with fiery red accents. */
.band-celebration--red .band-celebration-dialog {
    background: #29171c;
    border-color: #ef4b4b;
    box-shadow: 7px 7px 0 #180a0d;
}
.band-celebration--red .band-celebration-dialog p { color: #ffd5d3; }
.band-celebration--red .band-celebration-dialog button { background: #bc3038; }
.band-celebration--red .band-celebration-dialog button:hover,
.band-celebration--red .band-celebration-dialog button:focus-visible {
    background: #e34a50;
}
.band-celebration--red .band-confetti span {
    background: #f04747;
    box-shadow: 3px 0 #ffb16f;
}
.band-celebration--red .band-confetti span:nth-child(3n) { background: #ae202b; }
.band-celebration--red .band-confetti span:nth-child(4n) { background: #ff7957; }
@keyframes band-celebration-appear {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes band-blue-confetti {
    0% { opacity: 0; transform: translate3d(0, -10px, 0) rotate(0); }
    8% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; transform: translate3d(var(--drift), 105vh, 0) rotate(90deg); }
}
