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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 30px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 3px solid #667eea;
    padding-bottom: 20px;
}

header h1 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

/* No Match State */
.no-match {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-match p {
    font-size: 1.3em;
    margin-bottom: 30px;
}

/* Match Info */
.match-info {
    background: #f0f4ff;
    border-left: 4px solid #667eea;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 5px;
}

.match-info h2 {
    color: #667eea;
    margin-bottom: 10px;
}

.match-info p {
    color: #555;
}

/* Scoreboard */
.scoreboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.team {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    border-top: 4px solid;
}

.team-ct {
    border-top-color: #5b8ef2;
}

.team-ct h3 {
    color: #5b8ef2;
}

.team-tr {
    border-top-color: #f25b5b;
}

.team-tr h3 {
    color: #f25b5b;
}

.team h3 {
    margin-bottom: 20px;
    font-size: 1.4em;
}

.team-players {
    display: grid;
    gap: 15px;
}

.player-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.player-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.player-card h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1em;
}

/* Match Control */
.match-control {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    color: white;
}

.map-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.map-selector label {
    font-weight: bold;
    font-size: 1.1em;
}

.map-selector select {
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    background: white;
    color: #333;
}

.scoreboard-display {
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-section {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.team-score {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.score-label {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.score-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-score {
    background: white;
    color: #333;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    font-size: 1.5em;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-score:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.score-value {
    font-size: 3em;
    font-weight: bold;
    min-width: 80px;
}

.score-divider {
    font-size: 1.5em;
    font-weight: bold;
    color: white;
}

.team-ct-score {
    border-left: 4px solid #5b8ef2;
}

.team-tr-score {
    border-left: 4px solid #f25b5b;
}

/* Stats Grid Update */
.stats-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background-color: #f0f0f0;
    border-radius: 5px;
}

.stat-label {
    font-weight: bold;
    color: #666;
    font-size: 0.85em;
    text-align: center;
}

.stat-controls {
    display: flex;
    align-items: center;
    gap: 3px;
}

.stat-input {
    flex: 1;
    padding: 6px 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    text-align: center;
    transition: border-color 0.3s;
}

.stat-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 4px rgba(102, 126, 234, 0.3);
}

.btn-stat-decrease,
.btn-stat-increase {
    background: #667eea;
    color: white;
    border: none;
    padding: 4px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background 0.3s;
    font-weight: bold;
    min-width: 30px;
}

.btn-stat-decrease:hover {
    background: #d32f2f;
}

.btn-stat-increase:hover {
    background: #4caf50;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Actions */
.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.actions .btn {
    flex: 1;
    max-width: 200px;
    text-align: center;
}

/* Match Form */
.match-form {
    margin-bottom: 30px;
}

.teams-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.team-select {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
}

.team-select h3 {
    margin-bottom: 20px;
    font-size: 1.3em;
}

.team-select h3:first-child {
    color: #5b8ef2;
}

.players-list {
    display: grid;
    gap: 15px;
}

.player-select {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-select label {
    font-weight: bold;
    color: #333;
}

.player-select select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

.player-select select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.form-actions .btn {
    flex: 1;
    max-width: 200px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 1.8em;
    }

    header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    .match-control {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 15px;
    }

    .map-selector label {
        font-size: 1em;
    }

    .map-selector select {
        padding: 10px;
        font-size: 0.95em;
    }

    .score-value {
        font-size: 2.2em;
    }

    .btn-score {
        width: 32px;
        height: 32px;
        font-size: 1.1em;
    }

    .scoreboard,
    .teams-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .team {
        padding: 12px;
    }

    .team h3 {
        font-size: 1.2em;
        margin-bottom: 12px;
    }

    .team-players {
        gap: 10px;
    }

    .player-card {
        padding: 10px;
    }

    .player-card h4 {
        font-size: 0.95em;
        margin-bottom: 8px;
    }

    .stat-label {
        font-size: 0.8em;
    }

    .stat-input {
        padding: 5px 3px;
        font-size: 0.85em;
    }

    .btn-stat-decrease,
    .btn-stat-increase {
        padding: 3px 5px;
        font-size: 0.75em;
        min-width: 26px;
    }

    .actions {
        flex-direction: column;
        gap: 10px;
    }

    .actions .btn {
        max-width: 100%;
        padding: 10px 16px;
        font-size: 0.95em;
    }

    .score-section {
        flex-direction: column;
        gap: 12px;
    }

    .team-score {
        width: 100%;
        padding: 12px;
    }

    .score-divider {
        transform: none;
        font-size: 1.2em;
    }

    .match-info {
        padding: 15px;
        margin-bottom: 20px;
    }

    .match-info h2 {
        font-size: 1.1em;
    }

    .match-info p {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
        border-radius: 5px;
    }

    header h1 {
        font-size: 1.5em;
    }

    .match-control {
        padding: 12px;
    }

    .scoreboard,
    .teams-container {
        gap: 12px;
    }

    .team {
        padding: 10px;
    }

    .team h3 {
        font-size: 1.1em;
    }

    .player-card {
        padding: 8px;
        border-radius: 6px;
    }

    .player-card h4 {
        font-size: 0.9em;
        margin-bottom: 6px;
    }

    .stat-controls {
        gap: 2px;
    }

    .stat-input {
        padding: 4px 2px;
        font-size: 0.8em;
    }

    .btn-stat-decrease,
    .btn-stat-increase {
        padding: 2px 4px;
        font-size: 0.7em;
        min-width: 24px;
    }

    .score-value {
        font-size: 1.8em;
    }

    .btn-score {
        width: 28px;
        height: 28px;
        font-size: 1em;
    }

    .actions {
        gap: 8px;
    }

    .actions .btn {
        padding: 8px 12px;
        font-size: 0.9em;
    }
}
