/* === THIS IS FOOTBALL - MAIN STYLESHEET === */
:root {
    --pitch-green: #1B5E20;
    --pitch-light: #2E7D32;
    --pitch-lighter: #4CAF50;
    --gold: #FFD700;
    --gold-dark: #FFA000;
    --dark: #0d1117;
    --dark-card: #161b22;
    --body-bg: #f0f2f5;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--body-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

/* === NAVBAR === */
.soccer-nav {
    background: linear-gradient(135deg, var(--dark) 0%, #1a2332 100%);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    padding: 0.75rem 0;
}

.soccer-nav .navbar-brand {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.spin-hover { transition: transform 0.3s; }
.navbar-brand:hover .spin-hover { transform: rotate(360deg); }

.text-gold { color: var(--gold) !important; }
.bg-gold { background-color: var(--gold) !important; }
.bg-pitch { background-color: var(--pitch-green) !important; }
.text-pitch { color: var(--pitch-green) !important; }

.btn-nav-register {
    border: 2px solid var(--gold) !important;
    color: var(--gold) !important;
    border-radius: 25px;
    padding: 0.35rem 1.2rem !important;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-nav-register:hover { background: var(--gold); color: var(--dark) !important; }

/* === HERO === */
.hero-section {
    background: linear-gradient(135deg, var(--pitch-green) 0%, #0d3311 60%, var(--dark) 100%);
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute; inset: 0;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 49px, rgba(255,255,255,0.03) 49px, rgba(255,255,255,0.03) 50px),
        repeating-linear-gradient(90deg, transparent, transparent 49px, rgba(255,255,255,0.03) 49px, rgba(255,255,255,0.03) 50px);
    pointer-events: none;
}

.min-vh-75 { min-height: 75vh; }
.fw-900 { font-weight: 900; }
.z-1 { z-index: 1; }

.hero-ball {
    font-size: 10rem;
    color: rgba(255,255,255,0.08);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(15deg); }
}

/* === BUTTONS === */
.btn-pitch {
    background: linear-gradient(135deg, var(--pitch-green), var(--pitch-light));
    color: white; border: none; font-weight: 600;
    transition: all 0.3s;
}
.btn-pitch:hover { background: linear-gradient(135deg, var(--pitch-light), var(--pitch-lighter)); color: white; transform: translateY(-1px); box-shadow: 0 4px 15px rgba(27,94,32,0.4); }

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--dark); border: none; font-weight: 700;
    transition: all 0.3s;
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(255,215,0,0.4); color: var(--dark); }

.btn-outline-pitch {
    border: 2px solid var(--pitch-green); color: var(--pitch-green); font-weight: 600;
    transition: all 0.3s;
}
.btn-outline-pitch:hover { background: var(--pitch-green); color: white; }

/* === PAGE HEADER === */
.page-header {
    background: linear-gradient(135deg, var(--pitch-green), var(--dark));
    padding: 2rem 0;
    margin-bottom: 0;
}

.match-header-section {
    background: linear-gradient(135deg, var(--pitch-green) 0%, #0d3311 50%, var(--dark) 100%);
}

/* === CARDS === */
.soccer-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}
.soccer-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }

.feature-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s;
    height: 100%;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0,0,0,0.12); }

.feature-icon {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, var(--pitch-green), var(--pitch-lighter));
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: white; font-size: 1.6rem;
}

/* === AUTH === */
.auth-page {
    background: linear-gradient(135deg, var(--pitch-green) 0%, var(--dark) 100%);
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth-icon {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--pitch-green), var(--pitch-lighter));
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: white; font-size: 2rem;
    margin: 0 auto;
}

/* === TEAM BADGES === */
.team-badge {
    width: 60px; height: 60px;
    border-radius: 50%;
    border: 3px solid;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.9rem;
    flex-shrink: 0;
}

.team-badge-sm {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2px solid;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.55rem;
    flex-shrink: 0;
}

.team-badge-preview {
    width: 100px; height: 100px;
    border-radius: 50%;
    border: 4px solid;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 1.4rem;
    transition: all 0.3s;
}

/* === TABLES === */
.soccer-table thead th {
    background: var(--dark);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    padding: 0.75rem;
}

.soccer-table tbody td {
    vertical-align: middle;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
}

.league-table .table-highlight {
    background-color: rgba(27,94,32,0.08) !important;
}
.league-table .table-leader td:first-child {
    border-left: 4px solid var(--gold);
}

/* === POSITION BADGES === */
.position-badge {
    font-weight: 700; font-size: 0.7rem;
    padding: 0.2rem 0.5rem; border-radius: 4px;
}
.position-gk { background: #FF8F00; color: white; }
.position-def { background: #1565C0; color: white; }
.position-mid { background: #2E7D32; color: white; }
.position-fwd { background: #C62828; color: white; }

/* === MATCH CARDS === */
.match-card { border-left: 4px solid var(--pitch-green); cursor: pointer; }
.match-card:hover { border-left-color: var(--gold); }
.match-upcoming { border-left-color: #ccc; opacity: 0.8; }

.match-score {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
}

.match-big-score {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.match-mini {
    background: var(--body-bg);
    border-left: 3px solid var(--pitch-lighter);
}

/* === TIMELINE === */
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
    content: ''; position: absolute; left: 18px; top: 0; bottom: 0;
    width: 2px; background: #e0e0e0;
}

.timeline-event {
    position: relative;
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.event-minute {
    position: absolute; left: -40px;
    font-weight: 700; font-size: 0.8rem;
    color: var(--pitch-green);
    width: 30px; text-align: right;
}

.event-icon {
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    z-index: 1;
}

/* ═══ Lineup display ═══ */
.lineup-team-header {
    padding: 10px 16px;
    border-radius: 8px 8px 0 0;
    text-align: center;
    font-size: 0.95rem;
    margin-bottom: 0;
}
.lineup-team-header + table { border-top: none; }
.lineup-team-header + table thead th { border-top: none; }

.event-team-badge {
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
    padding: 2px 8px; border-radius: 10px; white-space: nowrap;
    min-width: 36px; text-align: center;
    line-height: 1.4;
    border: 1px solid rgba(0,0,0,0.15);
    flex-shrink: 0;
}
.event-desc { font-size: 0.9rem; }

.card-icon {
    width: 16px; height: 22px;
    border-radius: 2px;
}
.card-yellow { background: #FFD700; }
.card-red { background: #F44336; }

/* === SQUAD === */
.squad-list { max-height: 500px; overflow-y: auto; }
.squad-item { background: var(--body-bg); transition: background 0.2s; }
.squad-item:hover { background: #e8f5e9; }

/* === FORMATION BUTTONS === */
.formation-btn.active, .btn-check:checked + .formation-btn {
    background: var(--pitch-green) !important;
    color: white !important;
    border-color: var(--pitch-green) !important;
    box-shadow: 0 4px 12px rgba(27,94,32,0.3);
}

/* === FOOTER === */
.soccer-footer {
    background: var(--dark);
    margin-top: auto;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .hero-section .display-3 { font-size: 2.2rem; }
    .match-big-score { font-size: 2.5rem; }
    .team-badge { width: 45px; height: 45px; font-size: 0.7rem; }
    .page-header { padding: 1.25rem 0; }
    .page-header h1 { font-size: 1.5rem; }
    .squad-list { max-height: 300px; }
    .sticky-top { position: relative !important; top: 0 !important; }
}

@media (max-width: 576px) {
    .hero-section .display-3 { font-size: 1.8rem; }
    .feature-card { padding: 1.5rem !important; }
    .auth-card { border-radius: 12px; }
    .soccer-table { font-size: 0.8rem; }
    .soccer-table thead th { padding: 0.5rem; font-size: 0.7rem; }
}

/* === PROMOTION/RELEGATION ZONES === */
.promotion-zone { border-left: 4px solid #27ae60 !important; }
.relegation-zone { border-left: 4px solid #e74c3c !important; }

/* === DIVISION TABS === */
.division-tabs .nav-link { color: var(--pitch-green); border-radius: 8px; font-weight: 600; padding: 0.5rem 1rem; }
.division-tabs .nav-link:hover { background: rgba(26,143,60,0.1); }
.division-tabs .nav-link.active { background: var(--pitch-green) !important; color: white !important; }

/* === SEASON BANNER === */
.season-banner {
    background: linear-gradient(135deg, #1a8f3c 0%, #156b2d 50%, #0d4d1a 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
}

/* === UTILITIES === */
.z-1 { z-index: 1; }
.opacity-90 { opacity: 0.9; }

/* ═══════ CARDS & INJURIES ═══════ */
.event-icon .fa-briefcase-medical { font-size: 1.1rem; }
.table-warning { background-color: rgba(255,193,7,0.08) !important; }
