body {
    color: white;
    background-color: black;
}

/* Dialog: lock the page so only the dialog body scrolls. Global so :has()
   is not eaten by Blazor CSS isolation on a child component. */
html:has(.app-dialog-overlay),
body:has(.app-dialog-overlay) {
    overflow: hidden;
}

/* Same rule as the prank X: hide the corner ticker while a dialog or dust storm
   is up so it is not mistaken for chrome on the overlay. Global so :has() is not
   rewritten by BurnTicker CSS isolation. */
body:has(.app-dialog-overlay) .burn-ticker,
body:has(.dust-storm) .burn-ticker {
    display: none;
}

.app-dialog-overlay {
    overflow: hidden;
}

@media only screen and (max-width: 700px) {
    :root {
        font-size: 14px;
    }
}

app {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.marquee {
    animation: marquee 15s linear infinite;
    white-space: nowrap;
    min-width: fit-content;
    width: 100%;
}

@keyframes marquee {
    0% {
        transform: translate(100%, 0);
    }

    100% {
        transform: translate(-100%, 0);
    }
}

/* ---- Art flip on every new picture (ArtSpin in site.js) ----
   One card flip, half a turn in all: the old picture (#art::before, from --art-old)
   turns away to edge-on, then the new picture turns in from the other edge. */
#art.art-flipping {
    position: relative;
    perspective: 900px;
    overflow: hidden;
    transform-style: preserve-3d;
}

#art.art-flipping::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--art-old) center / contain no-repeat;
    pointer-events: none;
    backface-visibility: hidden;
    animation: art-turn-away .32s cubic-bezier(.55,.06,.68,.19) both;
}

#art > div.art-spin {
    backface-visibility: hidden;
    will-change: transform;
    animation: art-turn-in .32s cubic-bezier(.22,.61,.36,1) both;
}

#art.art-flipping > div.art-spin {
    animation-delay: .32s; /* waits, edge-on, until the old card has turned away */
}

@keyframes art-turn-away {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(90deg); }
}

@keyframes art-turn-in {
    from { transform: rotateY(-90deg); }
    to { transform: rotateY(0deg); }
}

/* Drag-and-drop song request zone (SongDrop in site.js): dusty dashed frame on the chat. */
body.song-drop section[type="Chat"] {
    outline: 3px dashed #d9a441;
    outline-offset: -6px;
    background-color: rgba(194, 150, 90, .18);
    box-shadow: inset 0 0 40px rgba(217, 164, 65, .35);
}

/* Lets the art-colour glow (--art-glow, MainLayout) transition smoothly between songs. */
@property --art-glow {
    syntax: "<color>";
    inherits: true;
    initial-value: transparent;
}
