/* =========================================================
   DPL GLOBAL COSMIC THEME
   Shared outer-canvas treatment for every public page.
   Intentionally does NOT change card geometry or content.
   ========================================================= */

:root {
    --dpl-cosmos-base: #080c12;
    --dpl-header-bg-a: rgba(9, 15, 23, .975);
    --dpl-header-bg-b: rgba(12, 16, 25, .97);
    --dpl-header-bg-c: rgba(17, 13, 29, .965);
}

body.home-page,
body.players-page,
body.group-page,
body.bracket-page,
body.bracket-page-v2,
body.streams-page,
body.archive-page,
body.player-profile-page,
body.matches-page {
    background-color: var(--dpl-cosmos-base) !important;
    background-image: url('/static/core/dpl-cosmic-bg.svg') !important;
    background-size: cover !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
}

/* The header is deliberately cooler and slightly more violet than the page
   canvas, so the outer space background reads separately from navigation. */
body.home-page > header,
body.players-page > header,
body.group-page > header,
body.bracket-page > header,
body.streams-page > header,
body.archive-page > header,
body.player-profile-page > header,
body.matches-page > header {
    background:
        radial-gradient(circle at 8% 45%, rgba(44, 82, 117, .11), transparent 23%),
        radial-gradient(circle at 87% 30%, rgba(78, 51, 116, .11), transparent 26%),
        linear-gradient(90deg, var(--dpl-header-bg-a), var(--dpl-header-bg-b) 52%, var(--dpl-header-bg-c)) !important;
    border-bottom-color: rgba(100, 113, 137, .20) !important;
    box-shadow:
        0 10px 28px rgba(0, 0, 0, .26),
        inset 0 -1px 0 rgba(104, 132, 174, .035),
        inset 0 1px 0 rgba(255, 255, 255, .018);
}

/* Keep the page center clean. The cosmic texture should read mostly in the
   margins and through intentionally transparent areas, not wash over cards. */
body.home-page main,
body.players-page main,
body.group-page main,
body.bracket-page main,
body.streams-page main,
body.archive-page main,
body.player-profile-page main,
body.matches-page main {
    background-color: transparent;
}

/* Subtle viewport-edge falloff gives the side areas a little more depth
   without turning them into separate panels. */
@media (min-width: 1100px) {
    body.home-page,
    body.players-page,
    body.group-page,
    body.bracket-page,
    body.bracket-page-v2,
    body.streams-page,
    body.archive-page,
    body.player-profile-page,
    body.matches-page {
        background-blend-mode: normal;
    }
}

@media (max-width: 900px) {
    body.home-page,
    body.players-page,
    body.group-page,
    body.bracket-page,
    body.bracket-page-v2,
    body.streams-page,
    body.archive-page,
    body.player-profile-page,
    body.matches-page {
        background-size: auto 100vh !important;
        background-position: center top !important;
    }
}

/* =========================================================
   ARCHIVE PAGE — tournament status frames
   Current tournament = red, completed tournaments = purple.
   Geometry, banner images and card contents remain untouched.
   ========================================================= */

/* Current tournament — the same red language as the homepage hero. */
.archive-page .archive-current-card {
    border-color: rgba(255, 72, 78, .74) !important;
    border-top-color: rgba(255, 90, 96, .96) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 120, 124, .08),
        inset 0 0 32px rgba(185, 30, 40, .035),
        0 0 14px rgba(239, 54, 61, .12),
        0 0 30px rgba(239, 54, 61, .045),
        0 14px 34px rgba(0, 0, 0, .20) !important;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.archive-page .archive-current-card:hover {
    border-color: rgba(255, 88, 94, .90) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 135, 139, .10),
        inset 0 0 34px rgba(196, 34, 44, .045),
        0 0 18px rgba(244, 60, 67, .18),
        0 0 38px rgba(244, 60, 67, .065),
        0 14px 34px rgba(0, 0, 0, .22) !important;
}

/* Completed tournaments — restrained purple archive glow, matching the
   previous-champion block on the homepage. */
.archive-page .archive-tournament-card {
    border-color: rgba(164, 91, 242, .58) !important;
    box-shadow:
        inset 0 1px 0 rgba(208, 157, 255, .08),
        inset 0 0 30px rgba(131, 56, 210, .035),
        0 0 12px rgba(139, 67, 224, .10),
        0 0 27px rgba(139, 67, 224, .04),
        0 12px 28px rgba(0, 0, 0, .19) !important;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.archive-page .archive-tournament-card:hover {
    border-color: rgba(180, 108, 250, .78) !important;
    box-shadow:
        inset 0 1px 0 rgba(220, 174, 255, .10),
        inset 0 0 34px rgba(142, 66, 218, .045),
        0 0 17px rgba(151, 76, 232, .15),
        0 0 34px rgba(151, 76, 232, .055),
        0 13px 30px rgba(0, 0, 0, .21) !important;
}
