/* ==========================================================
   DPBL PLAYOFF BRACKET
   bracket.css
   ========================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {

    --bg: #eef3f8;

    --card: #ffffff;

    --navy: #0b1b32;
    --navy-light: #16355d;

    --blue: #2b6ef3;

    --border: #d8e1eb;

    --text: #142033;
    --muted: #66778e;

    --shadow:
        0 15px 40px rgba(12, 25, 45, .08);

    --radius: 16px;

}

body{

    background:
        radial-gradient(circle at top left,
        rgba(43,110,243,.08),
        transparent 450px),

        var(--bg);

    font-family:Inter,Arial,sans-serif;

    color:var(--text);

    min-height:100vh;

}


/* ==========================================================
   HEADER
   ========================================================== */

.site-header{

    background:
        linear-gradient(
            135deg,
            var(--navy),
            var(--navy-light)
        );

    color:white;

    box-shadow:
        0 8px 24px rgba(0,0,0,.18);

}

.header-inner{

    max-width:1700px;

    margin:auto;

    padding:24px 30px;

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:30px;

}

.brand-eyebrow{

    font-size:.72rem;

    font-weight:800;

    text-transform:uppercase;

    color:#8fc4ff;

    letter-spacing:.16em;

}

.brand-block h1{

    margin-top:4px;

    font-size:2.2rem;

    font-weight:900;

    letter-spacing:-.04em;

}

.main-nav{

    display:flex;

    gap:12px;

    flex-wrap:wrap;

}

.main-nav a{

    color:white;

    text-decoration:none;

    font-weight:700;

    border:1px solid rgba(255,255,255,.18);

    padding:11px 16px;

    border-radius:10px;

    transition:.2s;

}

.main-nav a:hover{

    background:white;

    color:var(--navy);

}


/* ==========================================================
   PAGE
   ========================================================== */

.page-container{

    width:min(1700px,calc(100% - 40px));

    margin:34px auto;

}

.bracket-intro{

    display:flex;

    justify-content:space-between;

    align-items:flex-end;

    margin-bottom:28px;

    gap:30px;

}

.bracket-intro h2{

    font-size:2rem;

    margin-bottom:8px;

    font-weight:900;

}

.bracket-intro p{

    color:var(--muted);

    line-height:1.7;

}

.update-status{

    background:white;

    border:1px solid var(--border);

    border-radius:999px;

    padding:10px 16px;

    font-size:.78rem;

    font-weight:800;

    color:var(--muted);

}


/* ==========================================================
   LOADING
   ========================================================== */

.loading-panel,
.error-panel{

    background:white;

    border-radius:18px;

    padding:60px;

    text-align:center;

    border:1px solid var(--border);

    box-shadow:var(--shadow);

}

.loading-panel h2,
.error-panel h2{

    margin-bottom:10px;

}

.loading-panel p,
.error-panel p{

    color:var(--muted);

}


/* ==========================================================
   BRACKET
   ========================================================== */

.bracket-scroll{

    overflow-x:auto;

    padding-bottom:20px;

}

.bracket{

    min-width:1700px;

    display:grid;

    grid-template-columns:

        repeat(5,310px);

    gap:24px;

}


/* ==========================================================
   ROUND
   ========================================================== */

.round-column{

    display:flex;

    flex-direction:column;

}

.round-heading{

    position:sticky;

    top:0;

    z-index:5;

    background:var(--navy);

    color:white;

    border-radius:14px;

    text-align:center;

    padding:14px;

    margin-bottom:18px;

    box-shadow:var(--shadow);

}

.round-heading span{

    display:block;

    color:#8fc4ff;

    text-transform:uppercase;

    font-size:.70rem;

    letter-spacing:.12em;

    font-weight:800;

}

.round-heading strong{

    display:block;

    margin-top:4px;

    font-size:1.02rem;

}

.round-games{

    display:flex;

    flex-direction:column;

    justify-content:space-around;

    gap:18px;

    flex:1;

}

.play-in-column .round-games{

    justify-content:flex-start;

}


/* ==========================================================
   GAME CARD
   ========================================================== */

.game-card{

    background:white;

    border-radius:16px;

    border:1px solid var(--border);

    overflow:hidden;

    box-shadow:var(--shadow);

}

.game-title{

    display:flex;

    justify-content:space-between;

    align-items:center;

    background:#f8fafc;

    padding:11px 14px;

    border-bottom:1px solid var(--border);

}

.game-title strong{

    font-size:.82rem;

    font-weight:900;

}

.game-title span{

    font-size:.67rem;

    color:var(--muted);

    text-transform:uppercase;

    letter-spacing:.08em;

    font-weight:800;

}


/* ==========================================================
   TEAMS
   ========================================================== */

.team-slot{

    display:flex;

    align-items:center;

    gap:12px;

    min-height:58px;

    padding:11px 14px;

    border-bottom:1px solid rgba(148,163,184,.18);

}

.team-slot:last-of-type{

    border-bottom:none;

}

.team-seed{

    width:32px;

    height:32px;

    flex-shrink:0;

    border-radius:8px;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:.75rem;

    font-weight:900;

    background:rgba(0,0,0,.18);

}

.team-details{

    display:flex;

    flex-direction:column;

    gap:2px;

    min-width:0;

}

.team-name{

    font-weight:800;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;

    font-size:.9rem;

}

.team-name a{

    color:inherit;

    text-decoration:none;

}

.team-name a:hover{

    text-decoration:underline;

}

.team-record{

    font-size:.69rem;

    opacity:.82;

    font-weight:700;

}


/* ==========================================================
   PLACEHOLDERS
   ========================================================== */

.team-slot.placeholder{

    background:

    repeating-linear-gradient(

        -45deg,

        #fafbfc,

        #fafbfc 12px,

        #f1f5f9 12px,

        #f1f5f9 24px

    );

    color:#56677f;

}

.team-slot.placeholder .team-seed{

    background:#d9e3ef;

    color:#516174;

}

.team-slot.placeholder .team-name{

    font-weight:700;

}


/* ==========================================================
   META
   ========================================================== */

.game-meta{

    display:grid;

    grid-template-columns:1fr 1fr;

    border-top:1px solid var(--border);

}

.meta-item{

    text-align:center;

    padding:10px;

    background:#fbfdff;

}

.meta-item+.meta-item{

    border-left:1px solid var(--border);

}

.meta-label{

    display:block;

    font-size:.60rem;

    text-transform:uppercase;

    letter-spacing:.08em;

    color:var(--muted);

    font-weight:800;

    margin-bottom:3px;

}

.meta-value{

    font-size:.75rem;

    font-weight:800;

}


/* ==========================================================
   STANDINGS
   ========================================================== */

.standings-card{

    margin-top:34px;

    background:white;

    border-radius:18px;

    border:1px solid var(--border);

    box-shadow:var(--shadow);

    padding:22px;

}

.standings-card h2{

    font-size:1.35rem;

    margin-bottom:4px;

}

.standings-card>p{

    color:var(--muted);

    margin-bottom:18px;

}

.standings-table-wrap{

    overflow-x:auto;

}

.standings-table{

    width:100%;

    border-collapse:collapse;

    min-width:720px;

}

.standings-table th{

    text-align:left;

    padding:13px;

    color:var(--muted);

    font-size:.68rem;

    text-transform:uppercase;

    letter-spacing:.08em;

    border-bottom:2px solid var(--border);

}

.standings-table td{

    padding:13px;

    border-bottom:1px solid var(--border);

}

.standings-team-cell{

    font-weight:800;

}

.standings-table tbody tr:hover{

    background:#f8fbff;

}


/* ==========================================================
   FOOTER
   ========================================================== */

.site-footer{

    margin-top:45px;

    padding:24px;

    text-align:center;

    color:var(--muted);

    font-size:.78rem;

}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width:900px){

    .header-inner{

        flex-direction:column;

        align-items:flex-start;

    }

    .bracket-intro{

        flex-direction:column;

        align-items:flex-start;

    }

    .page-container{

        width:calc(100% - 20px);

    }

}

/* ==========================================================
   PLAYOFF SUMMARY
   ========================================================== */

.playoff-summary {
    margin-bottom: 24px;

    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 14px;
}

.summary-card {
    padding: 17px 19px;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: var(--card);
    box-shadow: var(--shadow);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.summary-card span {
    color: var(--muted);

    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.summary-card strong {
    color: var(--navy);

    font-size: 1.6rem;
    font-weight: 900;
}


/* ==========================================================
   UPDATED BRACKET WIDTH
   ========================================================== */

.bracket {
    min-width: 1700px;

    display: grid;
    grid-template-columns: repeat(5, 310px);
    gap: 24px;
}


/* ==========================================================
   GAME CARD
   ========================================================== */

.game-card {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 16px;

    background: white;
    box-shadow: var(--shadow);

    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        border-color 160ms ease;
}

.game-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 18px 45px rgba(12, 25, 45, 0.12);
}

.game-card.status-final {
    border-color: rgba(22, 163, 74, 0.42);
}

.game-card.status-in-progress {
    border-color: rgba(220, 38, 38, 0.55);
}

.game-card.status-postponed {
    border-color: rgba(217, 119, 6, 0.48);
}

.game-card.status-cancelled {
    opacity: 0.72;
}

.game-title {
    padding: 11px 14px;

    border-bottom: 1px solid var(--border);

    background: #f8fafc;

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.game-title div {
    min-width: 0;
}

.game-title strong {
    display: block;

    color: var(--text);

    font-size: 0.82rem;
    font-weight: 900;
}

.game-title small {
    display: block;
    margin-top: 4px;

    color: var(--muted);

    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.35;
}

.game-title > span {
    flex: 0 0 auto;
    padding: 5px 7px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: white;
    color: var(--muted);

    font-size: 0.61rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.status-final .game-title > span {
    border-color: rgba(22, 163, 74, 0.24);
    background: rgba(22, 163, 74, 0.08);
    color: #15803d;
}

.status-in-progress .game-title > span {
    border-color: rgba(220, 38, 38, 0.24);
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
}


/* ==========================================================
   TEAMS
   ========================================================== */

.team-slot {
    position: relative;

    min-height: 62px;
    padding: 11px 14px;

    border-bottom: 1px solid rgba(148, 163, 184, 0.18);

    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.team-slot.winner {
    box-shadow:
        inset 5px 0 0 rgba(255, 255, 255, 0.8);
}

.team-seed {
    width: 32px;
    height: 32px;

    border-radius: 8px;

    background: rgba(0, 0, 0, 0.18);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 0.75rem;
    font-weight: 900;
}

.team-details {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 2px;
}

.team-name {
    overflow: hidden;

    font-size: 0.88rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-name a {
    color: inherit;
    text-decoration: none;
}

.team-name a:hover {
    text-decoration: underline;
}

.team-record {
    font-size: 0.68rem;
    font-weight: 700;
    opacity: 0.82;
}

.team-score {
    min-width: 30px;

    font-size: 1.15rem;
    font-weight: 900;
    text-align: right;
}

.winner-badge {
    position: absolute;
    top: 5px;
    right: 5px;

    width: 18px;
    height: 18px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.88);
    color: #15803d;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 0.58rem;
    font-weight: 900;
}


/* ==========================================================
   PLACEHOLDERS
   ========================================================== */

.team-slot.placeholder {
    background:
        repeating-linear-gradient(
            -45deg,
            #fafbfc,
            #fafbfc 12px,
            #f1f5f9 12px,
            #f1f5f9 24px
        );

    color: #56677f;
}

.team-slot.placeholder .team-seed {
    background: #d9e3ef;
    color: #516174;
}

.team-slot.placeholder .team-score {
    color: #8090a4;
}


/* ==========================================================
   GAME META
   ========================================================== */

.game-meta {
    border-top: 1px solid var(--border);

    display: grid;
    grid-template-columns: 1fr 1fr;
}

.meta-item {
    padding: 10px;

    background: #fbfdff;

    text-align: center;
}

.meta-item + .meta-item {
    border-left: 1px solid var(--border);
}

.location-item {
    grid-column: 1 / -1;

    border-top: 1px solid var(--border);
    border-left: none !important;
}

.meta-label {
    display: block;
    margin-bottom: 3px;

    color: var(--muted);

    font-size: 0.59rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.meta-value {
    font-size: 0.73rem;
    font-weight: 800;
}


/* ==========================================================
   MOBILE ADDITIONS
   ========================================================== */

@media (max-width: 700px) {
    .playoff-summary {
        grid-template-columns: 1fr;
    }

    .summary-card {
        padding: 14px 16px;
    }
}

/* ==========================================================
   PLAYOFF ARCHIVE
   ========================================================== */

.archive-intro {
    align-items: center;
}

.archive-eyebrow {
    display: block;
    margin-bottom: 7px;

    color: var(--blue);

    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.archive-controls {
    min-width: 230px;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.archive-controls label {
    color: var(--muted);

    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.archive-season-select {
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;

    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;

    background: white;
    color: var(--text);

    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 800;

    cursor: pointer;
}

.archive-season-select:focus {
    border-color: var(--blue);

    box-shadow:
        0 0 0 3px rgba(43, 110, 243, 0.12);
}

.archive-controls .update-status {
    width: 100%;
    text-align: center;
}

.champion-summary-name {
    overflow: hidden;

    max-width: 220px;

    font-size: 1rem !important;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.champion-banner {
    margin-bottom: 24px;
    padding: 25px 30px;

    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 18px;

    background:
        radial-gradient(
            circle at top left,
            rgba(255, 215, 0, 0.22),
            transparent 40%
        ),
        linear-gradient(
            135deg,
            #0b1b32,
            #16355d
        );

    color: white;
    box-shadow: var(--shadow);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.champion-banner-eyebrow {
    color: #ffd700;

    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.champion-banner strong {
    flex: 1;

    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 900;
    letter-spacing: -0.035em;
    text-align: center;
}

.champion-banner > span:last-child {
    color: #d8e8fa;

    font-size: 0.75rem;
    font-weight: 800;
}

.archive-empty-state {
    padding: 55px 25px;

    border: 1px solid var(--border);
    border-radius: 18px;

    background: white;
    box-shadow: var(--shadow);

    text-align: center;
}

.archive-empty-state h2 {
    margin-bottom: 9px;
}

.archive-empty-state p {
    color: var(--muted);
    line-height: 1.6;
}

@media (max-width: 700px) {
    .archive-controls {
        width: 100%;
    }

    .champion-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    .champion-banner strong {
        text-align: left;
    }

    .champion-summary-name {
        max-width: 150px;
    }
}