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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0a1628;
    color: #e0e0e0;
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, #1a3a5c 0%, #0d2137 100%);
    padding: 1.2rem 2rem;
    text-align: center;
    border-bottom: 3px solid #2e7d32;
}

header h1 {
    font-size: 1.6rem;
    color: #ffffff;
    letter-spacing: 0.5px;
}

header .subtitle {
    font-size: 0.95rem;
    color: #8bb8d0;
    margin-top: 0.25rem;
}

main {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: flex-start;
}

.pane {
    background: #111d2e;
    border-radius: 8px;
    padding: 1.2rem;
    border: 1px solid #1e3a5f;
}

.left-pane {
    flex: 0 0 480px;
    position: sticky;
    top: 1rem;
}

.right-pane {
    flex: 1;
    min-width: 0;
}

h2 {
    font-size: 1.1rem;
    color: #6db3f2;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #1e3a5f;
}

/* Standings */
.standings-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.standings-table {
    flex: 1;
}

.standings-table h2 {
    font-size: 0.9rem;
    text-align: center;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

thead th {
    background: #1a3050;
    color: #8bb8d0;
    padding: 0.4rem 0.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

thead th:first-child {
    text-align: center;
    width: 40px;
}

thead th:last-child {
    text-align: center;
    width: 45px;
}

tbody td {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid #152540;
}

tbody td:first-child {
    text-align: center;
    color: #6db3f2;
    font-weight: 600;
}

tbody td:last-child {
    text-align: center;
    font-weight: 600;
}

tbody tr:hover {
    background: #162a45;
}

/* Finals */
#finals-section {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

#finals-section > h2 {
    color: #4caf50;
    border-bottom-color: #2e7d32;
}

.finals-day {
    margin-bottom: 1rem;
}

.finals-day:last-child {
    margin-bottom: 0;
}

.finals-day-title {
    font-size: 0.85rem;
    color: #81c784;
    font-weight: 600;
    margin-bottom: 0.4rem;
    padding: 0.25rem 0.5rem;
    background: #1a3a1a;
    border-radius: 4px;
    display: inline-block;
}

.finals-match {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.5rem;
    gap: 0.5rem;
    font-size: 0.85rem;
    border-bottom: 1px solid #1a3a1a;
}

.finals-match:last-child {
    border-bottom: none;
}

.finals-placement {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    width: 65px;
    flex-shrink: 0;
}

.finals-placement.placement-1st { color: #ffd700; }
.finals-placement.placement-2nd { color: #c0c0c0; }
.finals-placement.placement-3rd { color: #cd7f32; }
.finals-placement.placement-4th { color: #b0c4d8; }
.finals-placement.placement-5th { color: #7a8fa6; }
.finals-placement.placement-6th { color: #7a8fa6; }

.finals-teams {
    flex: 1;
    color: #e0e0e0;
}

.finals-vs {
    color: #556b85;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Fixtures */
.round-group {
    margin-bottom: 1.2rem;
}

.round-group:last-child {
    margin-bottom: 0;
}

.round-header {
    font-size: 0.95rem;
    color: #6db3f2;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding: 0.3rem 0.6rem;
    background: #1a3050;
    border-radius: 4px;
    display: inline-block;
}

.fixture-row {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid #152540;
    gap: 0.4rem;
    font-size: 0.85rem;
    transition: background 0.15s;
}

.fixture-row:hover {
    background: #162a45;
}

.fixture-num {
    color: #556b85;
    font-size: 0.75rem;
    width: 24px;
    text-align: right;
    flex-shrink: 0;
}

.fixture-date {
    color: #7a8fa6;
    font-size: 0.75rem;
    width: 110px;
    flex-shrink: 0;
}

.fixture-teams {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 0.3rem;
}

.team-btn {
    padding: 0.3rem 0.6rem;
    border: 2px solid transparent;
    border-radius: 4px;
    background: #1a2a40;
    color: #b0c4d8;
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.15s;
    flex: 1;
    text-align: center;
    font-family: inherit;
}

.team-btn:hover {
    background: #223a55;
    color: #ffffff;
}

.team-btn.southern {
    border-color: #1e3a5f;
}

.team-btn.northern {
    border-color: #1e3a5f;
}

.team-btn.selected {
    background: #2e7d32;
    border-color: #4caf50;
    color: #ffffff;
    font-weight: 600;
}

.team-btn.selected.southern {
    background: #1b5e20;
    border-color: #4caf50;
}

.team-btn.selected.northern {
    background: #1b5e20;
    border-color: #4caf50;
}

.fixture-vs {
    color: #556b85;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 900px) {
    main {
        flex-direction: column;
    }

    .left-pane {
        flex: none;
        width: 100%;
        position: static;
    }

    .right-pane {
        width: 100%;
    }
}

@media (max-width: 500px) {
    .standings-container {
        flex-direction: column;
    }

    header h1 {
        font-size: 1.2rem;
    }

    .fixture-date {
        display: none;
    }
}
