/* ============================================================
   fantasyleague.run — Global Styles
   Palette inspired by Diamond League (gold/navy), World Athletics
   (royal blue/white) and European Athletics (deep navy/gold).
   ============================================================ */

:root {
    /* Core brand */
    --gold:          #c9a435;   /* Diamond League trophy gold */
    --gold-light:    #e8c05a;   /* highlight gold */
    --gold-dim:      #7a5f1a;   /* muted gold for borders */
    --blue:          #1569c7;   /* World Athletics royal blue */
    --blue-light:    #4a9ede;   /* sky blue accent */
    --blue-bright:   #2e8cf7;   /* interactive blue */

    /* Backgrounds — rich athletics navy (lighter, stadium-lit feel) */
    --bg-dark:       #121e2e;
    --bg-mid:        #1a2d44;
    --bg-card:       #1e3350;
    --bg-card-alt:   #223858;

    /* Text */
    --text-primary:  #eef2f7;
    --text-muted:    #7fa4bf;
    --text-dim:      #4d6e87;

    /* Borders */
    --border:        rgba(255,255,255,0.07);
    --border-gold:   rgba(201,164,53,0.3);
    --border-blue:   rgba(21,105,199,0.3);

    /* Utility */
    --radius:        12px;
    --radius-sm:     8px;
    --shadow:        0 4px 28px rgba(0,0,0,0.5);
    --transition:    0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
    letter-spacing: 0.2px;
}

/* Gold primary — premium feel like DL/EA trophy */
.btn-primary {
    background: var(--gold);
    color: #05101c;
    border-color: var(--gold);
}
.btn-primary:hover {
    background: var(--gold-light);
    border-color: var(--gold-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(201,164,53,0.35);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.25);
}
.btn-outline:hover {
    border-color: var(--blue-light);
    color: var(--blue-light);
    transform: translateY(-1px);
}

.btn-blue {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}
.btn-blue:hover {
    background: var(--blue-bright);
    border-color: var(--blue-bright);
    transform: translateY(-1px);
}

.btn-sm { padding: 8px 18px; font-size: 0.875rem; }

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    height: 68px;
    background: rgba(5, 16, 28, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

/* Thin gold line under navbar — nod to DL branding stripe */
.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--blue-light), transparent);
    opacity: 0.5;
}

.nav-logo {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}
.nav-logo span { color: var(--gold); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}
.nav-links a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color var(--transition);
}
.nav-links a:hover { color: var(--text-primary); }

.nav-user { font-size: 0.9rem; color: var(--text-muted); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 92vh;
    padding: 80px 5% 60px;
    overflow: hidden;
}

/* Layered radial glows: gold centre, blue flanks — like a stadium floodlit at night */
.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 50% 35%, rgba(201,164,53,0.14) 0%, transparent 65%),
        radial-gradient(ellipse 50% 40% at 15% 70%, rgba(21,105,199,0.22) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 85% 70%, rgba(21,105,199,0.16) 0%, transparent 60%),
        linear-gradient(180deg, #121e2e 0%, #162438 100%);
}

/* Athletic track lane markings */
.hero-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: repeating-linear-gradient(
        90deg,
        var(--gold) 0px,
        var(--gold) 50px,
        transparent 50px,
        transparent 70px
    );
    opacity: 0.35;
}

.hero-content {
    position: relative;
    max-width: 780px;
}

.hero-badge {
    display: inline-block;
    background: rgba(201,164,53,0.1);
    border: 1px solid var(--border-gold);
    color: var(--gold-light);
    padding: 6px 18px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 28px;
}

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    font-weight: 900;
    line-height: 1.08;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
}

/* Gold gradient on the emphasis — like a championship medal */
.hero h1 em {
    font-style: normal;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, #a87c20 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-muted);
    max-width: 540px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.hero-stat span {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold-light), var(--blue-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat small {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* ============================================================
   SECTIONS
   ============================================================ */
section {
    padding: 88px 5%;
}

.section-title {
    text-align: center;
    margin-bottom: 56px;
}

.section-title h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

/* Thin gold underline accent on section headings */
.section-title h2::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--blue-light));
    border-radius: 2px;
    margin: 12px auto 0;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 16px auto 0;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-section { background: var(--bg-mid); }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    max-width: 980px;
    margin: 0 auto;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 24px 28px;
    text-align: center;
    position: relative;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.step-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-gold);
    box-shadow: 0 8px 32px rgba(201,164,53,0.1);
}

.step-number {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #05101c;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon {
    font-size: 2.6rem;
    margin-bottom: 14px;
    display: block;
}

.step-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.step-card p  { font-size: 0.875rem; color: var(--text-muted); line-height: 1.65; }

/* ============================================================
   CALENDAR
   ============================================================ */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    max-width: 1140px;
    margin: 0 auto;
}

.meet-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--blue);
    border-radius: var(--radius);
    padding: 20px;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.meet-card:hover {
    transform: translateY(-3px);
    border-left-color: var(--gold);
    box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}

/* Championship cards get gold left border */
.meet-card.special {
    border-left-color: var(--gold);
    background: var(--bg-card-alt);
}
.meet-card.special .meet-badge {
    background: rgba(201,164,53,0.12);
    color: var(--gold-light);
    border-color: var(--border-gold);
}

.meet-badge {
    display: inline-block;
    background: rgba(21,105,199,0.12);
    border: 1px solid var(--border-blue);
    color: var(--blue-light);
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.meet-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.meet-card .meet-date { font-size: 0.85rem; color: var(--text-muted); }
.meet-card .meet-city { font-size: 0.8rem; color: var(--gold-light); margin-top: 6px; opacity: 0.85; }
.meet-card .meet-deadline { font-size: 0.75rem; color: var(--text-dim); margin-top: 5px; }

.meet-mult {
    display: inline-block;
    font-size: 0.7rem; font-weight: 800;
    padding: 1px 6px; border-radius: 4px;
    background: rgba(201,164,53,0.18); color: var(--gold-light);
    margin-left: 4px; vertical-align: middle;
}
.meet-wild {
    font-size: 0.85rem; margin-left: 2px; vertical-align: middle;
}

/* ============================================================
   LEADERBOARD PREVIEW
   ============================================================ */
.leaderboard-section { background: var(--bg-mid); }

.leaderboard-table-wrap {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.lb-table {
    width: 100%;
    border-collapse: collapse;
}

.lb-table th {
    background: rgba(255,255,255,0.03);
    padding: 14px 20px;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-dim);
    text-align: left;
}

.lb-table td {
    padding: 14px 20px;
    font-size: 0.95rem;
    border-top: 1px solid var(--border);
}

.lb-rank { font-weight: 800; color: var(--text-muted); width: 40px; }
.lb-rank.gold   { color: #d4af37; }
.lb-rank.silver { color: #a8a9ad; }
.lb-rank.bronze { color: #cd7f32; }
.lb-name { font-weight: 600; }
.lb-pts  { text-align: right; font-weight: 800; color: var(--gold-light); }

.lb-cta {
    text-align: center;
    padding: 22px;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-muted);
}
.lb-cta a { color: var(--blue-light); font-weight: 700; }
.lb-cta a:hover { text-decoration: underline; }

/* ============================================================
   FEATURES / FREEMIUM
   ============================================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    max-width: 1020px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: border-color var(--transition), transform var(--transition);
}
.feature-card:hover {
    border-color: var(--border-blue);
    transform: translateY(-3px);
}

.feature-card .feat-icon { font-size: 2rem; margin-bottom: 14px; display: block; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p  { font-size: 0.875rem; color: var(--text-muted); line-height: 1.65; }

.feature-card .feat-tag {
    display: inline-block;
    margin-top: 14px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.feat-tag.free    { background: rgba(21,105,199,0.12); color: var(--blue-light); border: 1px solid var(--border-blue); }
.feat-tag.premium { background: rgba(201,164,53,0.12); color: var(--gold-light); border: 1px solid var(--border-gold); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background: #0e1b2a;
    border-top: 1px solid var(--border);
    padding: 44px 5%;
    text-align: center;
}

/* Gold/blue gradient top border on footer — like a podium stripe */
footer::before {
    content: '';
    display: block;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--blue), var(--gold), var(--blue-light), transparent);
    opacity: 0.5;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: 900;
    margin-bottom: 12px;
}
.footer-logo span { color: var(--gold); }

footer p { font-size: 0.85rem; color: var(--text-muted); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-backdrop.open { opacity: 1; visibility: visible; }

.modal {
    background: var(--bg-mid);
    border: 1px solid var(--border);
    border-top: 2px solid var(--gold);
    border-radius: var(--radius);
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.25s ease;
}
.modal-backdrop.open .modal { transform: translateY(0); }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 0;
}
.modal-header h2 { font-size: 1.25rem; font-weight: 900; }
.modal-header h2 span { color: var(--gold); }

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color var(--transition);
}
.modal-close:hover { color: var(--text-primary); }

.modal-tabs {
    display: flex;
    gap: 4px;
    padding: 20px 28px 0;
    border-bottom: 1px solid var(--border);
}

.modal-tab {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all var(--transition);
}
.modal-tab.active { color: var(--gold-light); border-bottom-color: var(--gold); }

.modal-body { padding: 28px; }

.modal-panel { display: none; }
.modal-panel.active { display: block; }

/* Form */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 7px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.form-group input:focus,
.form-group select:focus {
    border-color: var(--gold-dim);
    box-shadow: 0 0 0 3px rgba(201,164,53,0.1);
}

.form-group input::placeholder { color: var(--text-dim); }

.team-mode-radio {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.radio-option {
    flex: 1;
    min-width: 120px;
}
.radio-option input[type="radio"] { display: none; }

.radio-option label {
    display: block;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all var(--transition);
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
}

.radio-option input[type="radio"]:checked + label {
    border-color: var(--gold-dim);
    color: var(--gold-light);
    background: rgba(201,164,53,0.07);
}

#team-name-group { display: none; }

.form-error {
    background: rgba(180,40,40,0.1);
    border: 1px solid rgba(180,40,40,0.3);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #f08080;
    margin-bottom: 14px;
}
.form-error ul { padding-left: 18px; }

.form-submit { width: 100%; margin-top: 6px; justify-content: center; }

.form-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.form-footer a { color: var(--blue-light); cursor: pointer; font-weight: 700; }
.form-footer a:hover { text-decoration: underline; }

/* ============================================================
   DASHBOARD PAGE
   ============================================================ */
.dashboard-page { min-height: 100vh; }

.dashboard-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 5%;
}

.dashboard-hero {
    text-align: center;
    margin-bottom: 52px;
}
.dashboard-hero h1 { font-size: 2.2rem; font-weight: 900; margin-bottom: 8px; }
.dashboard-hero p  { color: var(--text-muted); font-size: 1.05rem; }

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    overflow: hidden;
}
.dash-card-icon { font-size: 2.4rem; margin-bottom: 14px; display: block; }
.dash-card h3   { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.dash-card p    { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; }
.dash-card .btn { width: 100%; box-sizing: border-box; white-space: normal; word-break: break-word; }

/* ============================================================
   EVENT TYPE FILTER TABS
   ============================================================ */
.event-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 36px;
}

.event-filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 7px 18px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.3px;
}
.event-filter-btn:hover,
.event-filter-btn.active {
    background: rgba(201,164,53,0.1);
    border-color: var(--border-gold);
    color: var(--gold-light);
}

.meet-card[data-type] { transition: opacity 0.2s ease, transform 0.2s ease; }
.meet-card.hidden { display: none; }

/* Event type accent colors on left border */
.meet-card[data-type="track"]       { border-left-color: var(--blue); }
.meet-card[data-type="marathon"]    { border-left-color: #2ecc71; }
.meet-card[data-type="half"]        { border-left-color: #1abc9c; }
.meet-card[data-type="road"]        { border-left-color: #27ae60; }
.meet-card[data-type="champs"]      { border-left-color: var(--gold); }

/* ============================================================
   DEMO RESULTS — 2025 SEASON
   ============================================================ */
.demo-section { background: var(--bg-dark); }

.demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 1060px;
    margin: 0 auto;
}

@media (max-width: 760px) {
    .demo-grid { grid-template-columns: 1fr; }
}

.demo-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.demo-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
}

.demo-card-header .demo-icon { font-size: 1.2rem; }
.demo-card-header h3 { font-size: 0.9rem; font-weight: 700; }
.demo-card-header .demo-season {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
    background: rgba(201,164,53,0.12);
    color: var(--gold-light);
    border: 1px solid var(--border-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.demo-table { width: 100%; border-collapse: collapse; }
.demo-table td {
    padding: 11px 20px;
    font-size: 0.88rem;
    border-top: 1px solid var(--border);
}
.demo-table tr:first-child td { border-top: none; }

.demo-rank { font-weight: 800; color: var(--text-muted); width: 32px; }
.demo-rank.gold   { color: #d4af37; }
.demo-rank.silver { color: #a8a9ad; }
.demo-rank.bronze { color: #cd7f32; }
.demo-name { font-weight: 600; }
.demo-sub  { font-size: 0.78rem; color: var(--text-muted); display: block; margin-top: 1px; }
.demo-pts  { text-align: right; font-weight: 800; color: var(--gold-light); white-space: nowrap; }
.demo-pts small { display: block; font-size: 0.72rem; font-weight: 400; color: var(--text-muted); }

.demo-highlight {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
}
.demo-highlight:first-child { border-top: none; }
.demo-highlight-icon { font-size: 1.6rem; flex-shrink: 0; }
.demo-highlight h4 { font-size: 0.88rem; font-weight: 700; margin-bottom: 2px; }
.demo-highlight p  { font-size: 0.8rem; color: var(--text-muted); }

.demo-cta {
    text-align: center;
    margin-top: 36px;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.demo-cta strong { color: var(--text-primary); }

/* ============================================================
   SQUAD PICKER
   ============================================================ */
.squad-page { background: var(--bg-dark); min-height: 100vh; }

.squad-wrap {
    display: flex;
    gap: 16px;
    padding: 16px;
    height: calc(100vh - 64px);
    max-width: 1200px;
    margin: 0 auto;
}

/* Right-side column: heading + arena + factbox */
.squad-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

.arena-heading {
    flex-shrink: 0;
}
.arena-heading-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
    line-height: 1.1;
}
.arena-heading-date {
    font-size: .85rem;
    color: var(--text-muted, #aaa);
    margin-top: 2px;
}

.squad-sidebar {
    width: 210px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}

.squad-budget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}
.squad-budget .sb-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.squad-budget .sb-credits { font-size: 1.6rem; font-weight: 700; color: var(--gold-light); line-height: 1.1; }
.squad-budget .sb-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.squad-event-info {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.78rem;
}
.squad-event-info .sei-name { font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.squad-event-info .sei-date { color: var(--text-muted); }
.squad-event-info .sei-deadline { color: var(--gold); margin-top: 4px; font-size: 0.72rem; }

.squad-filters {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.squad-filter-btn {
    padding: 3px 10px;
    font-size: 0.7rem;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}
.squad-filter-btn.active, .squad-filter-btn:hover {
    border-color: var(--gold-dim);
    color: var(--gold-light);
    background: rgba(201,164,53,.1);
}

.squad-ath-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.squad-ath-list::-webkit-scrollbar { width: 4px; }
.squad-ath-list::-webkit-scrollbar-track { background: transparent; }
.squad-ath-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.ath-row {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.ath-row:hover { border-color: rgba(255,255,255,.15); background: var(--bg-card-alt); }
.ath-row.sel { border-color: var(--gold-dim); background: rgba(201,164,53,.07); }
.ath-row.disabled { opacity: .4; cursor: not-allowed; }

.ath-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ath-avatar svg { width: 18px; height: 18px; }
.ath-avatar.male  { background: rgba(30,100,220,.35); }
.ath-avatar.female { background: rgba(180,60,140,.35); }

.ath-info { flex: 1; min-width: 0; }
.ath-name { font-size: 0.72rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ath-nat  { font-size: 0.65rem; color: var(--text-muted); }
.ath-cost { font-size: 0.75rem; font-weight: 700; color: var(--text-primary); flex-shrink: 0; }

/* Squad factbox + programme */
.squad-factbox {
    background: rgba(255,255,255,.05);
    border-radius: 8px;
    padding: .75rem 1rem;
    font-size: .82rem;
    line-height: 1.55;
    color: var(--text-secondary, #bbb);
    flex-shrink: 0;
}
.squad-factbox-title {
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-secondary, #888);
    margin-bottom: .3rem;
    font-weight: 600;
}
.squad-programme { margin-bottom: .6rem; }
.squad-programme-title {
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-secondary, #888);
    margin-bottom: .5rem;
    font-weight: 600;
}
.squad-prog-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 4px;
}
.squad-prog-col-title {
    font-size: .6rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-secondary, #888);
    margin-bottom: 4px;
    font-weight: 600;
}
.squad-prog-col-title.men   { color: #5ba4ef; }
.squad-prog-col-title.women { color: #d97fd4; }
.squad-prog-col-title.road  { color: #7ec899; }
.squad-prog-tag {
    display: block;
    font-size: .68rem;
    padding: 3px 8px;
    border-radius: 99px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.14);
    cursor: pointer;
    margin-bottom: 3px;
    transition: background .12s, border-color .12s;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.squad-prog-tag:hover { background: rgba(255,255,255,.13); }
.squad-prog-tag.active         { background: #1a3a6a; border-color: #3a80d2; color: #fff; }
.squad-prog-tag.female.active  { background: #4a1a5a; border-color: #a04abc; color: #fff; }
.squad-prog-tag.road.active    { background: #1a4a2a; border-color: #3a9a5a; color: #fff; }
.squad-prog-road { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 3px; }

/* Athlete info button */
.ath-info-btn {
    background: none;
    border: 1px solid var(--accent, #3498db);
    color: var(--accent, #3498db);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: .65rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
    margin-left: 4px;
    opacity: .65;
    transition: opacity .15s;
}
.ath-info-btn:hover { opacity: 1; }

/* Athlete info modal */
.ath-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.ath-modal {
    background: var(--card-bg, #1e1e2e);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 420px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    color: var(--text-primary, #eee);
}
.ath-modal-close {
    position: absolute;
    top: .75rem;
    right: .75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary, #eee);
    line-height: 1;
    padding: 0;
    opacity: .7;
}
.ath-modal-close:hover { opacity: 1; }
.ath-modal-nat { font-size: .8rem; color: var(--text-secondary, #aaa); font-weight: 400; }
.ath-modal-section {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-secondary, #aaa);
    margin: .8rem 0 .3rem;
}
.ath-modal-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.ath-modal-table td { padding: .2rem .4rem; }
.ath-modal-table td:first-child { color: var(--text-secondary, #aaa); }
.ath-modal-venue { font-size: .7rem; color: var(--text-secondary, #aaa); }

/* Arena */
.squad-arena {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    background: #1a1a1a;
    aspect-ratio: 580 / 380;
    width: 100%;
}

.squad-arena svg { display: block; width: 100%; height: 100%; }

/* Runner slots */
.squad-slot {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}
.squad-slot-circle {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    border: 2px dashed rgba(255,255,255,.3);
    background: rgba(0,0,0,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, background .15s;
    position: relative;
}
.squad-slot:hover .squad-slot-circle { border-color: var(--gold); }
.squad-slot.filled .squad-slot-circle {
    border: 2px solid rgba(255,255,255,.5);
    background: transparent;
}
.squad-slot.filled.male .squad-slot-circle   { background: rgba(30,100,220,.6); border-color: rgba(100,160,255,.6); }
.squad-slot.filled.female .squad-slot-circle { background: rgba(180,60,140,.6); border-color: rgba(220,120,200,.6); }
.squad-slot.captain .squad-slot-circle { border: 3px solid var(--gold) !important; box-shadow: 0 0 0 2px rgba(201,164,53,.3); }

.squad-slot-name {
    font-size: 0.76rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.9);
    background: rgba(0,0,0,.55);
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    display: none;
}
.squad-slot.filled .squad-slot-name { display: block; }

.squad-slot-add {
    color: rgba(255,255,255,.3);
    font-size: 1.8rem;
    line-height: 1;
}

.slot-remove {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #c0392b;
    color: white;
    font-size: 0.8rem;
    line-height: 20px;
    text-align: center;
    display: none;
    cursor: pointer;
    font-weight: 700;
}
.squad-slot.filled:hover .slot-remove { display: block; }

.cap-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--gold);
    color: #121e2e;
    font-size: 0.55rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Arena bottom bar */
.arena-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.arena-bar .ab-info { font-size: 0.75rem; color: rgba(255,255,255,.7); }
.arena-bar .ab-msg  { font-size: 0.75rem; color: var(--gold); flex: 1; text-align: center; min-height: 1em; }
.arena-save {
    padding: 7px 20px;
    background: var(--gold);
    color: #121e2e;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}
.arena-save:hover { background: var(--gold-light); }
.arena-save:disabled { opacity: .4; cursor: not-allowed; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .hero-cta { flex-direction: column; align-items: center; }
    .hero-stats { gap: 24px; }
    .nav-links .hide-mobile { display: none; }
    .modal { max-height: 95vh; }
    .squad-wrap { flex-direction: column; height: auto; }
    .squad-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; }
    .squad-ath-list { max-height: 200px; }
}
