/* ============================================================
   Maillots.top — Base Styles (CSS Variables + Reset)
   Color: ink #1a1a2e | accent #2563eb | accent2 #dc2626
   Page width: 1060px
   ============================================================ */

:root {
    --ink: #1a1a2e;
    --ink-light: #2d2d4a;
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --accent2: #dc2626;
    --accent2-dark: #b91c1c;
    --gray-50: #f8f7f4;
    --gray-100: #f1f0ed;
    --gray-200: #e5e4e0;
    --gray-300: #d1d0cc;
    --gray-400: #9e9d99;
    --gray-500: #6b6a66;
    --gray-600: #4a4946;
    --muted: #6b7280;
    --white: #ffffff;
    --black: #000000;
    --page-w: 1060px;
    --page-w-padded: 1060px;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    --transition: 0.2s ease;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--gray-50);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--accent-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink);
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p {
    margin-bottom: 0.75rem;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* Container */
.sg-container {
    max-width: var(--page-w);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Utility */
.sg-text-accent { color: var(--accent); }
.sg-text-accent2 { color: var(--accent2); }
.sg-text-muted { color: var(--gray-500); }
.sg-text-sm { font-size: 0.875rem; }
.sg-text-xs { font-size: 0.75rem; }
.sg-font-bold { font-weight: 700; }

.sg-flex { display: flex; }
.sg-flex-col { flex-direction: column; }
.sg-items-center { align-items: center; }
.sg-justify-between { justify-content: space-between; }
.sg-gap-1 { gap: 4px; }
.sg-gap-2 { gap: 8px; }
.sg-gap-3 { gap: 12px; }
.sg-gap-4 { gap: 16px; }

.sg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition);
    text-decoration: none;
    gap: 8px;
}
.sg-btn-primary {
    background: var(--accent);
    color: var(--white);
}
.sg-btn-primary:hover {
    background: var(--accent-dark);
    color: var(--white);
}
.sg-btn-accent2 {
    background: var(--accent2);
    color: var(--white);
}
.sg-btn-accent2:hover {
    background: var(--accent2-dark);
    color: var(--white);
}
.sg-btn-outline {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
}
.sg-btn-outline:hover {
    background: var(--accent);
    color: var(--white);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* Selection */
::selection { background: var(--accent); color: var(--white); }

/* Responsive */
@media (max-width: 768px) {
    :root {
        --page-w: 100%;
    }
    html { font-size: 14px; }
    .sg-container { padding: 0 12px; }
    h1 { font-size: 1.4rem; }
    h2 { font-size: 1.2rem; }
}

/* ============================================================
   Sub-navigation Tabs (Wireframe Section 3)
   ============================================================ */
.sg-subnav-tabs {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}
.subnav-tab {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    border-radius: 4px;
    background: var(--gray-100);
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--gray-200);
    transition: all 0.15s ease;
    white-space: nowrap;
}
.subnav-tab:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.subnav-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 600;
}

/* ============================================================
   Year Filter Tags
   ============================================================ */
.year-tags {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}
.year-tag {
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
}

/* ============================================================
   League Sidebar Sections (Collapsible)
   ============================================================ */
.league-section {
    margin-bottom: 0.25rem;
}
.league-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0.4rem;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    border-bottom: 1px solid var(--gray-200);
    user-select: none;
}
.league-header:hover {
    background: var(--gray-100);
}
.league-toggle {
    transition: transform 0.2s;
    font-size: 0.6rem;
}
.league-toggle.open {
    transform: rotate(180deg);
}
.league-clubs {
    padding-left: 0.4rem;
}
.league-clubs.collapsed {
    display: none;
}
.league-club-item {
    padding: 0.15rem 0;
    font-size: 0.7rem;
}
.league-club-item a {
    color: var(--gray-600);
    text-decoration: none;
}
.league-club-item a:hover {
    color: var(--accent);
}

/* ============================================================
   Team Header (Wireframe Section 4)
   ============================================================ */
.sg-team-header {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 0.8rem;
}
.team-header-icon {
    flex-shrink: 0;
}
.team-emoji {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 8px;
}
.team-header-info {
    flex: 1;
}
.team-header-meta {
    font-size: 0.78rem;
    color: var(--gray-500);
    margin-top: 0.15rem;
}
.meta-sep {
    margin: 0 0.3rem;
}

/* ============================================================
   Style Filter Tabs (Wireframe Section 4)
   ============================================================ */
.sg-style-tabs {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}
.style-tab {
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    background: var(--gray-100);
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    flex: 1;
    text-align: center;
    transition: all 0.15s ease;
}
.style-tab:hover {
    border-color: var(--accent);
    background: var(--gray-100);
}
.style-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 600;
}
