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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #333;
    min-height: 100vh;
}

header {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1.5rem 2rem;
    text-align: center;
    border-bottom: 3px solid #ffd700;
}

header h1 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #ffd700;
    background: transparent;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: #ffd700;
    color: #000;
}

.tab-btn.active {
    background: #ffd700;
    color: #000;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.controls {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.controls input,
.controls select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.controls button {
    padding: 0.75rem 1.5rem;
    background: #2a5298;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.controls button:hover {
    background: #1e3c72;
}

.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.game-status {
    font-size: 0.85rem;
    font-weight: bold;
    color: #666;
    background: #f0f0f0;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.game-status.live {
    background: #ff4444;
    color: white;
}

.game-status.finished {
    background: #44aa44;
    color: white;
}

.teams-container {
    margin-bottom: 1rem;
}

.team-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.team-row.winner {
    color: #2a5298;
}

.team-name {
    flex: 1;
}

.team-score {
    font-size: 1.5rem;
    margin-left: 1rem;
    min-width: 60px;
    text-align: right;
}

.box-score-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.3s;
    margin-top: 0.5rem;
}

.box-score-btn:hover {
    background: #e0e0e0;
}

.box-score {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 5px;
    border-left: 3px solid #2a5298;
    font-size: 0.9rem;
    max-height: 400px;
    overflow-y: auto;
}

.box-score.open {
    display: block;
}

footer {
    text-align: center;
    color: white;
    padding: 2rem;
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .games-container {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .controls {
        flex-direction: column;
    }

    .controls input,
    .controls select {
        width: 100%;
    }
}
