/* ── Page shell ──────────────────────────────────────── */
#search-container {
    width: 100%;
    max-width: 1920px;
    min-height: 100vh;
    display: flex;
    flex-flow: column;
    align-items: center;
    justify-content: flex-start;
}

/* ── Top bar ─────────────────────────────────────────── */
#top-bar {
    width: 100%;
    padding: 48px 0 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 32px;
}

#matchup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    width: 80vw;
    max-width: 1200px;
}

.match-team-name {
    font-family: Abolition, sans-serif;
    font-size: 52px;
    letter-spacing: 3px;
    color: white;
    letter-spacing: 1px;
    flex: 1;
    line-height: 1;
}

.match-team-name.home { text-align: right; }
.match-team-name.away { text-align: left; }

.vs-divider {
    font-family: "Archimoto V01", sans-serif;
    font-size: 16px;
    color: rgba(255,255,255,0.42);
    letter-spacing: 6px;
    flex-shrink: 0;
}

/* ── Series score display ────────────────────────────── */
.series-score {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: "Abolition", sans-serif;
    flex-shrink: 0;
}

.series-score-num {
    font-size: 52px;
    letter-spacing: 4px;
    line-height: 1;
    color: rgba(255,255,255,0.45);
}

.series-score-num.winner {
    color: white;
    text-shadow: 0 0 20px rgba(255,255,255,0.4);
}

.series-score-sep {
    font-family: "Archimoto V01", sans-serif;
    font-size: 28px;
    color: rgba(255,255,255,0.25);
    line-height: 1;
}

#match-meta {
    margin-top: 16px;
    font-family: "Archimoto V01", sans-serif;
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 3px;
    text-transform: uppercase;
}


#maps-progress {
    margin-top: 6px;
    font-family: "Archimoto V01", sans-serif;
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ── Content area ────────────────────────────────────── */
#match-content {
    width: 80vw;
    max-width: 1200px;
    min-height: 60vh;
    display: flex;
    flex-flow: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 24px;
    padding-bottom: 60px;
}

#match-content > .admin-link {
    align-self: flex-start;
    text-decoration: none;
    background-color: transparent;
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    padding: 8px 16px;
    font-family: "Archimoto V01 Black", sans-serif;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 150ms, border-color 150ms;
}

#match-content > .admin-link:hover { color: white; border-color: rgba(255,255,255,0.4); }

/* ── Map result cards ────────────────────────────────── */
.map-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 6px;
    transition: background 150ms;
}

.map-card:hover { background: rgba(255,255,255,0.05); }

.map-card-num {
    font-family: Abolition, sans-serif;
    font-size: 28px;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.32);
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.map-card-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.map-card-name {
    font-family: "Archimoto V01 Black", sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    color: white;
    text-transform: uppercase;
}

.map-card-mode {
    font-family: "Archimoto V01", sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
}

.map-card-score {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.map-card-team {
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-card-team-name {
    font-family: "Archimoto V01 Black", sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.map-card-team.win  .map-card-team-name { color: rgba(255,255,255,0.8); }
.map-card-team.loss .map-card-team-name { color: rgba(255,255,255,0.2); }

.map-card-val {
    font-family: Abolition, sans-serif;
    font-size: 36px;
    letter-spacing: 3px;
    line-height: 1;
    width: 40px;
    text-align: center;
}

.map-card-team.win  .map-card-val { color: white; }
.map-card-team.loss .map-card-val { color: rgba(255,255,255,0.25); }

.map-card-dash {
    font-family: "Archimoto V01", sans-serif;
    font-size: 16px;
    color: rgba(255,255,255,0.2);
}

.map-card-action { flex-shrink: 0; }

.map-card-action a {
    font-family: "Archimoto V01 Black", sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 3px;
    padding: 4px 10px;
    transition: color 150ms, border-color 150ms;
}

.map-card-action a:hover { color: white; border-color: rgba(255,255,255,0.4); }

/* ── Tables ──────────────────────────────────────────── */
.match-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-family: "Archimoto V01", sans-serif;
    font-size: 14px;
}

.match-table thead th {
    background-color: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6);
    font-family: "Archimoto V01 Black", sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    font-weight: normal;
}

.match-table th.col-player,
.match-table td.col-player {
    text-align: left;
    padding-left: 20px;
    width: 30%;
}

.map-team-header + .match-table { margin-top: 0; }
.map-team-header.away-header { margin-top: 16px; }

.match-table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.05); color: white; transition: background-color 150ms; }
.match-table tbody tr:hover { background-color: rgba(255,255,255,0.03); }
.match-table tbody td { padding: 14px 16px; text-align: center; color: rgba(255,255,255,0.85); }

.match-table .team-divider td {
    background-color: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.35);
    font-family: "Archimoto V01 Black", sans-serif;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 8px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.match-table .team-divider:first-child td { border-top: none; }


.match-table .submit-link a {
    font-family: "Archimoto V01 Black", sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 3px;
    padding: 4px 10px;
    transition: color 150ms, border-color 150ms;
}

.match-table .submit-link a:hover { color: white; border-color: rgba(255,255,255,0.4); }
.submitted-label { color: rgba(255,255,255,0.25); font-size: 13px; letter-spacing: 1px; }

/* ── Tabs ────────────────────────────────────────────── */
.nav-tabs {
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    gap: 0;
    margin-bottom: 24px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tabs .nav-link {
    font-family: "Archimoto V01 Black", sans-serif;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.52);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 12px 20px;
    background: transparent;
    transition: color 150ms, border-color 150ms;
    margin-bottom: -1px;
}

.nav-tabs .nav-link:hover { color: rgba(255,255,255,0.7); border-bottom-color: rgba(255,255,255,0.25); }
.nav-tabs .nav-link.active { color: white; border-bottom-color: white; background: transparent; }

/* ── Per-map table sections ──────────────────────────── */
.map-section { display: flex; flex-direction: column; gap: 2px; }

.map-team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background-color: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.map-team-header .team-label {
    font-family: "Archimoto V01 Black", sans-serif;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
}

.map-team-header .team-score { font-family: Abolition, sans-serif; font-size: 36px; letter-spacing: 3px; color: white; }
.map-team-header.winner .team-label,
.map-team-header.winner .team-score { color: white; }
.map-team-header.loser .team-label  { color: white; }

.map-mode-label {
    font-family: "Archimoto V01 Black", sans-serif;
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    padding: 10px 16px 6px;
}

.map-section + .map-section { margin-top: 32px; }

/* ── Finalize section ───────────────────────────────── */
#finalize-section {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

#finalize-section .finalize-label {
    font-family: "Archimoto V01 Black", sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    flex-shrink: 0;
}

#finalize-section .winner-badge { font-family: "Archimoto V01 Black", sans-serif; font-size: 15px; letter-spacing: 2px; color: white; }

.finalize-radio-group { display: flex; gap: 12px; }

.finalize-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "Archimoto V01", sans-serif;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    transition: border-color 120ms, color 120ms;
}

.finalize-radio-label:has(input:checked) { border-color: rgba(255,255,255,0.5); color: white; }
.finalize-radio-label input { display: none; }

.finalize-submit-btn {
    height: 34px;
    padding: 0 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 4px;
    color: white;
    font-family: "Archimoto V01 Black", sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 130ms, border-color 130ms;
}

.finalize-submit-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.35); }

/* ── Responsive ──────────────────────────────────────── */
@media screen and (max-width: 1024px) {
    #match-content { width: 95%; }
    #matchup { gap: 20px; }
    .match-team-name { font-size: 36px; }
    .match-table thead th,
    .match-table tbody td { padding: 10px 10px; }
}

@media screen and (max-width: 768px) {
    #match-content        { width: 100%; padding: 0 16px; box-sizing: border-box; }
    #top-bar              { padding: 20px 0 16px; }
    #matchup              { gap: 12px; width: 100%; padding: 0 16px; box-sizing: border-box; }
    .match-team-name      { font-size: 22px; letter-spacing: 0; }
    .series-score-num     { font-size: 36px; letter-spacing: 2px; }
    .series-score-sep     { font-size: 20px; }
    .map-team-header .team-score { font-size: 24px; }
    .table-scroll         { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .nav-tabs .nav-link   { padding: 10px 14px; font-size: 12px; letter-spacing: 1px; }
}

@media screen and (max-width: 480px) {
    .match-team-name        { font-size: 16px; }
    .series-score-num       { font-size: 28px; letter-spacing: 1px; }
    .series-score-sep       { font-size: 16px; }
    #matchup                { gap: 8px; }
    .map-card               { padding: 10px 12px; gap: 10px; }
    .map-card-num           { font-size: 18px; width: 20px; }
    .map-card-val           { font-size: 24px; width: 36px; letter-spacing: 0; }
    .map-card-team          { gap: 4px; }
    /* Hide team names inside score — teams already visible in matchup header */
    .map-card-team-name     { display: none; }
    .map-card-score         { gap: 6px; }
    /* Tables: drop fixed layout, give min-width so content fits and scrolls */
    .match-table            { table-layout: auto; min-width: 480px; font-size: 13px; }
    .match-table thead th   { padding: 10px 12px; font-size: 11px; letter-spacing: 1px; white-space: nowrap; }
    .match-table tbody td   { padding: 12px 12px; white-space: nowrap; }
    .match-table th.col-player,
    .match-table td.col-player { width: auto; padding-left: 14px; white-space: nowrap; }
    .map-team-header        { padding: 8px 12px; }
    .map-team-header .team-label { font-size: 11px; letter-spacing: 1px; }
    .map-team-header .team-score { font-size: 20px; }
    .map-card-action a      { padding: 4px 8px; font-size: 10px; letter-spacing: 0; }
    #match-content          { gap: 16px; padding-bottom: 100px; }
}
