.knockout-page {
    max-width: 1800px;
    margin: 0 auto;
    padding: 40px 50px 60px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: var(--fs-h1);
    margin-bottom: 8px;
}

.page-header p {
    font-size: var(--fs-body);
    opacity: 0.8;
}

.bracket-wrapper {
    position: relative;
    padding-bottom: 30px;
}


.bracket-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 40px;
    align-items: start;
    min-height: 820px;
}

.round {
    position: relative;
    padding: 18px 16px 24px;
    border-radius: 18px;
    display: grid;
    grid-template-rows: repeat(9, 1fr);
    min-height: 760px;
}

.round h2 {
    text-align: center;
    margin: 6px 0 10px;
    font-size: var(--fs-h3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    grid-row: 1;
}

.match-card {
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    padding: 10px 12px;
    align-self: center;
    text-decoration: none;
    color: inherit;
    display: block;
}

.match-card:hover {
    border-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.match-card:last-child {
    margin-bottom: 0;
}

.match-card h3 {
    margin: 0 0 6px;
    font-size: var(--fs-small);
    text-align: left;
}

.kickoff {
    font-size: var(--fs-small);
    opacity: 0.8;
    margin-bottom: 6px;
}

.match-row {
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    gap: 8px;
    font-size: var(--fs-body);
    padding: 4px 0;
}

.match-row.score-row {
    justify-content: flex-end;
    gap: 6px;
}

.team {
    flex: 1;
    text-align: left;
}

.score {
    font-weight: bold;
    text-align: right;
    min-width: 50px;
}

.suffix {
    font-size: var(--fs-xs);
    opacity: 0.8;
    text-align: right;
    min-width: 50px;
    align-self: center;
}

.round-quarter .qf-1 {
    grid-row: 2 / span 2;
}

.round-quarter .qf-2 {
    grid-row: 4 / span 2;
}

.round-quarter .qf-3 {
    grid-row: 6 / span 2;
}

.round-quarter .qf-4 {
    grid-row: 8 / span 2;
}

.round-semi .sf-1 {
    grid-row: 3 / span 2;
}

.round-semi .sf-2 {
    grid-row: 7 / span 2;
}

.round-final .final-1 {
    grid-row: 5 / span 2;
}

.round-final .final-1 h3 {
    text-align: left;
    font-size: 17px;
    margin: 0 0 12px;
}

.round-final .third-place {
    grid-row: 8 / span 2;
    margin-top: 10px;
}

.empty {
    text-align: center;
    opacity: 0.8;
    padding: 10px 0;
}

.third-place {
    margin-top: 18px;
    padding-top: 0;
    border-top: none;
}

.third-place h3 {
    text-align: left;
    font-size: var(--fs-small);
    margin: 0 0 12px;
}

.podium-block {
    margin-top: 26px;
    text-align: center;
    padding: 18px 20px 22px;
    border-radius: 16px;
}

.podium-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.podium-card {
    border-radius: 14px;
    padding: 16px 12px;
}

.podium-medal {
    font-size: var(--fs-h2);
    margin-bottom: 8px;
}

.podium-team {
    font-size: var(--fs-h2);
    font-weight: 700;
}

.podium-empty {
    grid-column: 1 / -1;
    text-align: center;
    opacity: 0.8;
}

.alert {
    margin: 0 auto;
    max-width: 600px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
}

.alert p {
    margin: 0;
    font-size: var(--fs-small);
}

@media (max-width: 1200px) {
    .bracket-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .knockout-page {
        padding: 20px 16px 40px;
    }

    .page-header h1 {
        font-size: var(--fs-h2);
    }

    .bracket-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        min-height: auto;
    }

    .round {
        min-height: auto;
        grid-template-rows: auto;
        grid-auto-rows: auto;
        row-gap: 12px;
    }

    .round-quarter .qf-1,
    .round-quarter .qf-2,
    .round-quarter .qf-3,
    .round-quarter .qf-4,
    .round-semi .sf-1,
    .round-semi .sf-2,
    .round-final .final-1,
    .round-final .third-place {
        grid-row: auto;
    }

    .podium-row {
        grid-template-columns: 1fr;
    }

}
