:root {
    --bg:        #38003c;
    --bg-deep:   #240028;
    --surface:   #4a1255;
    --surface2:  #5c1a6b;
    --accent:    #00ff87;
    --accent2:   #03c96b;
    --text:      #ffffff;
    --text-muted:#c9a8d4;
    --border:    rgba(255,255,255,0.08);
    --font-head: 'Bebas Neue', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

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

body {
    background: linear-gradient(160deg, var(--bg) 0%, var(--bg-deep) 100%);
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--text);
}

/* NAV */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2.5rem;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo {
    font-family: var(--font-head);
    font-size: 1.6rem;
    letter-spacing: 2px;
    color: var(--text);
    text-decoration: none;
}

.nav-logo span { color: var(--accent); }

.nav-links { display: flex; gap: 0.25rem; }

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--accent); background: rgba(0,255,135,0.1); }

/* MAIN */
.main-content { padding: 2.5rem; max-width: 1200px; margin: 0 auto; }

/* PAGE HEADER */
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-family: var(--font-head); font-size: 3rem; letter-spacing: 2px; line-height: 1; }
.page-header p { color: var(--text-muted); margin-top: 0.5rem; font-size: 0.95rem; }

/* CARDS */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
}

/* TABLE */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); }

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

thead th {
    background: var(--surface2);
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    white-space: nowrap;
}

tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
tbody tr:hover { background: rgba(255,255,255,0.04); }
tbody tr:last-child { border-bottom: none; }
tbody td { padding: 0.8rem 1rem; }

.rank-cell { color: var(--text-muted); font-size: 0.8rem; }
.pts-cell { color: var(--accent); font-weight: 600; }
.pos-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--surface2);
}
.pos-badge.GK { color: #f5c518; }
.pos-badge.DEF { color: #4fc3f7; }
.pos-badge.MID { color: var(--accent); }
.pos-badge.FWD { color: #ff6b6b; }

/* FORM */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 1px; }

select, input {
    width: 100%;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    padding: 0.65rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

select:focus, input:focus { border-color: var(--accent); }
select option { background: var(--bg-deep); }

/* BUTTON */
.btn {
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.btn:hover { background: var(--accent2); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* GRID */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

/* STAT BOX */
.stat-box { background: var(--surface2); border-radius: 12px; padding: 1rem 1.25rem; }
.stat-box .label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.stat-box .value { font-family: var(--font-head); font-size: 2rem; color: var(--accent); margin-top: 0.2rem; }
.stat-box .sub { font-size: 0.8rem; color: var(--text-muted); }

/* CAPTAIN RESULT */
.captain-result {
    background: linear-gradient(135deg, rgba(0,255,135,0.15), rgba(0,255,135,0.05));
    border: 1px solid rgba(0,255,135,0.3);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
}
.captain-result .player-name { font-family: var(--font-head); font-size: 3rem; color: var(--accent); }
.captain-result .player-pos { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }
.captain-result .score { font-size: 1rem; margin-top: 1rem; color: var(--text-muted); }
.captain-result .score span { color: var(--text); font-weight: 600; }

/* PITCH */
.pitch {
    background: linear-gradient(180deg, #1a6b1a 0%, #145214 100%);
    border-radius: 16px;
    padding: 2rem 1rem;
    border: 2px solid rgba(255,255,255,0.1);
}
.pitch-row { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.player-chip {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    text-align: center;
    min-width: 80px;
    backdrop-filter: blur(4px);
}
.player-chip .chip-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
.player-chip .chip-pos { color: var(--accent); font-size: 0.65rem; margin-top: 0.15rem; }

/* COMPARE TABLE */
.compare-stat { display: flex; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.compare-stat:last-child { border-bottom: none; }
.compare-stat .stat-label { flex: 1; color: var(--text-muted); font-size: 0.85rem; }
.compare-stat .val { width: 80px; text-align: center; font-weight: 600; }
.compare-stat .val.winner { color: var(--accent); }

/* HERO (home page) */
.hero { padding: 4rem 0 3rem; }
.hero h1 { font-family: var(--font-head); font-size: 5rem; letter-spacing: 3px; line-height: 0.95; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--text-muted); margin-top: 1.25rem; font-size: 1.05rem; max-width: 480px; line-height: 1.6; }
.hero-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 3rem; }

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    display: block;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--surface2); }
.feature-card .icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.feature-card h3 { font-family: var(--font-head); font-size: 1.4rem; letter-spacing: 1px; }
.feature-card p { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.35rem; line-height: 1.5; }

/* LOADING */
.loading { text-align: center; padding: 4rem; color: var(--text-muted); }

/* UTIL */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.text-muted { color: var(--text-muted); font-size: 0.85rem; }