/* =========================================================
   DPL GROUP STAGE — PREMIUM CONTRAST LAYER
   Page-only visual treatment. No layout/data/markup changes.
   ========================================================= */

/* Keep the global cosmic background continuous on this page.
   No page-local glow rectangle: it created visible background edges. */

.group-page .group-page-heading {
    border-bottom-color: rgba(93, 115, 143, .26);
}

.group-page .group-page-heading h1 {
    text-shadow: 0 2px 18px rgba(0, 0, 0, .38);
}

/* ---------- Shared card polish ---------- */
.group-page .group-v2-card {
    position: relative;
    background:
        linear-gradient(180deg, rgba(13, 20, 29, .965), rgba(7, 12, 19, .982));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .025),
        0 18px 42px rgba(0, 0, 0, .24);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.group-page .group-v2-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: .76;
}

/* Group A / first card — restrained blue. */
.group-page .groups-v2 > .group-v2-card:nth-child(odd) {
    border-color: rgba(43, 136, 236, .62);
    box-shadow:
        inset 0 1px 0 rgba(108, 187, 255, .07),
        inset 0 0 34px rgba(16, 94, 176, .035),
        0 0 14px rgba(34, 129, 231, .10),
        0 18px 42px rgba(0, 0, 0, .24);
}

.group-page .groups-v2 > .group-v2-card:nth-child(odd)::after {
    box-shadow: inset 0 0 48px rgba(18, 111, 207, .035);
}

.group-page .groups-v2 > .group-v2-card:nth-child(odd) .group-v2-card-head {
    border-bottom-color: rgba(54, 133, 212, .32);
    background:
        radial-gradient(ellipse at 4% 0%, rgba(37, 130, 229, .18), transparent 45%),
        radial-gradient(ellipse at 100% 0%, rgba(38, 89, 164, .10), transparent 38%),
        linear-gradient(180deg, rgba(15, 30, 47, .96), rgba(12, 22, 33, .94));
}

.group-page .groups-v2 > .group-v2-card:nth-child(odd) .group-v2-kicker {
    color: #45a9ff;
    text-shadow: 0 0 13px rgba(54, 157, 255, .28);
}

.group-page .groups-v2 > .group-v2-card:nth-child(odd) .group-v2-head-badges span,
.group-page .groups-v2 > .group-v2-card:nth-child(odd) .group-v2-match-count {
    border-color: rgba(56, 132, 211, .42);
    background: rgba(9, 26, 43, .86);
    color: #91c7f3;
}

/* Group B / second card — restrained violet. */
.group-page .groups-v2 > .group-v2-card:nth-child(even) {
    border-color: rgba(157, 81, 230, .58);
    box-shadow:
        inset 0 1px 0 rgba(204, 151, 255, .065),
        inset 0 0 34px rgba(117, 47, 190, .035),
        0 0 14px rgba(142, 66, 220, .09),
        0 18px 42px rgba(0, 0, 0, .24);
}

.group-page .groups-v2 > .group-v2-card:nth-child(even)::after {
    box-shadow: inset 0 0 48px rgba(125, 58, 198, .035);
}

.group-page .groups-v2 > .group-v2-card:nth-child(even) .group-v2-card-head {
    border-bottom-color: rgba(142, 83, 199, .30);
    background:
        radial-gradient(ellipse at 4% 0%, rgba(143, 65, 218, .17), transparent 45%),
        radial-gradient(ellipse at 100% 0%, rgba(83, 57, 148, .10), transparent 38%),
        linear-gradient(180deg, rgba(30, 22, 44, .96), rgba(20, 17, 32, .94));
}

.group-page .groups-v2 > .group-v2-card:nth-child(even) .group-v2-kicker {
    color: #b37aff;
    text-shadow: 0 0 13px rgba(168, 91, 250, .25);
}

.group-page .groups-v2 > .group-v2-card:nth-child(even) .group-v2-head-badges span,
.group-page .groups-v2 > .group-v2-card:nth-child(even) .group-v2-match-count {
    border-color: rgba(148, 87, 205, .40);
    background: rgba(28, 17, 41, .86);
    color: #c8a5eb;
}

/* ---------- Standings ---------- */
.group-page .group-v2-table-head {
    background: linear-gradient(180deg, rgba(21, 31, 43, .94), rgba(14, 22, 31, .94));
    color: #9aabba;
}

.group-page .group-v2-row {
    border-bottom-color: rgba(79, 98, 116, .26);
}

.group-page .group-v2-row:not(.group-v2-table-head):not(.is-eliminated):not(.is-place-first):not(.is-place-qualified):not(.is-place-warning):not(.is-place-danger):hover {
    background: rgba(105, 145, 183, .045);
}

/* All teams that remain in the tournament use one neutral treatment.
   Only eliminated places are highlighted separately. */
.group-page .group-v2-row:not(.group-v2-table-head):not(.is-eliminated):not(.is-place-first):not(.is-place-qualified):not(.is-place-warning):not(.is-place-danger) {
    background: transparent;
    box-shadow: none;
}

.group-page .group-v2-row:not(.group-v2-table-head):not(.is-eliminated):not(.is-place-first):not(.is-place-qualified):not(.is-place-warning):not(.is-place-danger) .group-v2-place,
.group-page .group-v2-row:not(.group-v2-table-head):not(.is-eliminated):not(.is-place-first):not(.is-place-qualified):not(.is-place-warning):not(.is-place-danger) .group-v2-points {
    color: inherit;
}

.group-page .group-v2-row.is-eliminated {
    background: linear-gradient(90deg, rgba(159, 43, 52, .17), rgba(117, 31, 39, .035));
    box-shadow: inset 3px 0 0 rgba(196, 62, 72, .70);
}

.group-page .group-v2-row.is-eliminated .group-v2-place,
.group-page .group-v2-row.is-eliminated .group-v2-points {
    color: #e2757c;
}

/* ---------- Match area ---------- */
.group-page .group-v2-matches {
    border-top-color: rgba(75, 98, 121, .30);
    background:
        linear-gradient(180deg, rgba(8, 14, 21, .94), rgba(6, 11, 17, .97));
}

.group-page .group-v2-match {
    border-color: rgba(61, 82, 102, .55);
    background: rgba(11, 18, 26, .90);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .018);
}

.group-page .group-v2-match:hover,
.group-page .group-v2-match:focus-visible {
    border-color: rgba(97, 130, 162, .70);
    background: rgba(15, 25, 35, .96);
}

.group-page .group-v2-match.is-played {
    border-left-color: #33c97a;
    background:
        linear-gradient(90deg, rgba(37, 164, 96, .10), rgba(10, 20, 25, .92) 29%, rgba(10, 17, 24, .92));
}

.group-page .group-v2-match.is-played .group-v2-match-score strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 27px;
    padding: 0 8px;
    border: 1px solid rgba(48, 190, 111, .28);
    border-radius: 6px;
    background: rgba(23, 111, 64, .20);
    color: #55df91;
    text-shadow: 0 0 12px rgba(61, 220, 139, .18);
}

.group-page .group-v2-match:not(.is-played) .group-v2-match-score strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 26px;
    padding: 0 8px;
    border: 1px solid rgba(97, 116, 139, .28);
    border-radius: 6px;
    background: rgba(31, 42, 54, .64);
    color: #a9b5c1;
    font-size: 11px;
    letter-spacing: .8px;
}

.group-page .group-v2-match-team.is-winner strong {
    color: #76e2a0;
}

/* Let each group's match cards inherit a slight hint of its group color. */
.group-page .groups-v2 > .group-v2-card:nth-child(odd) .group-v2-match:not(.is-played) {
    border-color: rgba(45, 105, 164, .42);
}

.group-page .groups-v2 > .group-v2-card:nth-child(even) .group-v2-match:not(.is-played) {
    border-color: rgba(113, 72, 151, .40);
}

/* Modal gets the same richer contrast without changing its geometry. */
.group-page .group-v2-modal-dialog,
.matches-page .group-v2-modal-dialog {
    border-color: rgba(73, 105, 137, .62);
    background:
        radial-gradient(circle at 8% 0, rgba(31, 116, 205, .11), transparent 34%),
        radial-gradient(circle at 94% 0, rgba(142, 67, 211, .10), transparent 36%),
        #0d151e;
    box-shadow:
        0 28px 100px rgba(0, 0, 0, .62),
        0 0 34px rgba(48, 105, 164, .06);
}

/* One-group tournaments should still look intentional: use the blue language
   rather than stretching a neutral card across the page. */
.group-page .groups-v2.one-group > .group-v2-card {
    border-color: rgba(43, 136, 236, .62);
}

@media (max-width: 900px) {
    .group-page .group-v2-card {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, .025),
            0 12px 30px rgba(0, 0, 0, .22);
    }
}

/* ---------- Match readability ----------
   Larger date / status / time / BO1 metadata without changing card content. */
.group-page .group-v2-match {
    grid-template-columns: 88px minmax(0, 1fr) 72px minmax(0, 1fr);
}

.group-page .group-v2-match-date {
    padding: 0 11px;
}

.group-page .group-v2-match-date strong {
    font-size: 13px;
    line-height: 1.1;
}

.group-page .group-v2-match-date span {
    margin-top: 4px;
    color: #91a3b5;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.2;
}

.group-page .group-v2-match-team strong {
    font-size: 12px;
}

.group-page .group-v2-match-score span {
    margin-top: 4px;
    color: #8194a7;
    font-size: 9px;
}

@media (max-width: 620px) {
    .group-page .group-v2-match {
        grid-template-columns: 72px minmax(0, 1fr) 58px minmax(0, 1fr);
    }

    .group-page .group-v2-match-date strong {
        font-size: 12px;
    }

    .group-page .group-v2-match-date span {
        font-size: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .group-page .group-v2-card {
        transition: none;
    }
}


/* Swiss inherits the same restrained premium language. */
.group-page.swiss-page .swiss-standings-card {
    border-color: rgba(43, 136, 236, .62);
    box-shadow: inset 0 1px 0 rgba(108, 187, 255, .07), 0 18px 42px rgba(0,0,0,.24);
}
.group-page.swiss-page .swiss-standings-card .group-v2-card-head {
    border-bottom-color: rgba(54, 133, 212, .32);
    background: radial-gradient(ellipse at 4% 0%, rgba(37, 130, 229, .18), transparent 45%), linear-gradient(180deg, rgba(15, 30, 47, .96), rgba(12, 22, 33, .94));
}
.group-page.swiss-page .swiss-round-card .group-v2-match.is-played { border-left-color: #33c97a; }
