:root {
    --primary: #1a5f7a;
    --primary-dark: #134b61;
    --accent: #ff6b35;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --bg: #f8f9fa;
    --card: #ffffff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #e1e8ed;
    --shadow: 0 4px 6px rgba(0,0,0,0.07);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(135deg, var(--primary) 0%, #159895 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tagline {
    opacity: 0.9;
    font-size: 1.1rem;
}

nav {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

nav .container {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 20px;
}

.nav-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    color: var(--text);
}

.nav-btn:hover, .nav-btn.active {
    background: var(--primary);
    color: white;
}

main {
    padding: 2rem 0 4rem;
    min-height: 60vh;
}

.sport-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.sport-card {
    background: var(--card);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}

.sport-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.sport-card h3 {
    font-size: 1.5rem;
    margin: 1rem 0 0.5rem;
}

.sport-icon {
    font-size: 3rem;
}

.card {
    background: var(--card);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

h2 {
    margin-bottom: 1rem;
    color: var(--primary);
}

form {
    display: grid;
    gap: 1rem;
}

label {
    font-weight: 500;
    display: block;
    margin-bottom: 0.25rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.1);
}

.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--text-light);
}

.btn-success {
    background: var(--success);
}

.btn-danger {
    background: var(--danger);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    header h1 {
        font-size: 2rem;
    }
}

.scoreboard {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(135deg, #1a5f7a, #159895);
    color: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.team-score {
    text-align: center;
}

.team-score h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.score {
    font-size: 4rem;
    font-weight: 700;
}

.vs {
    font-size: 1.5rem;
    opacity: 0.7;
}

.event-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

.events-log {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem;
}

.event-item {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-item:last-child {
    border-bottom: none;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.stats-table th, .stats-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.stats-table th {
    background: var(--bg);
    font-weight: 600;
}

.player-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.player-chip {
    background: var(--bg);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player-chip button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--danger);
    font-weight: bold;
}

.match-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.match-card:hover {
    transform: translateX(4px);
}

.badge {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

footer {
    background: var(--text);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}