﻿:root {
    --bg: #eef2f5;
    --card: #fff;
    --ink: #132238;
    --sub: #667588;
    --border: #dde5ed;
    --navy: #0b1f33;
    --shadow: 0 14px 34px rgba(15,35,58,.09);
    --radius: 4px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 8%, rgba(35,209,204,.10), transparent 23%),
        radial-gradient(circle at 88% 6%, rgba(139,92,246,.10), transparent 25%),
        linear-gradient(180deg, #f8fafc, var(--bg) 360px);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.catalog-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid rgba(221,229,237,.92);
    backdrop-filter: blur(16px);
}

.catalog-header-inner {
    width: min(760px, 100%);
    min-height: 62px;
    margin: 0 auto;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.catalog-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.catalog-brand img { width: 40px; height: 40px; border-radius: 50%; }
.catalog-brand strong, .catalog-brand small { display: block; }
.catalog-brand strong { font-size: 16px; font-weight: 950; }
.catalog-brand small { margin-top: 2px; color: var(--sub); font-size: 11px; }
.header-link {
    padding: 8px 12px;
    border: 1px solid #dbe3ec;
    border-radius: 999px;
    background: #fff;
    color: #33465c;
    font-size: 12px;
    font-weight: 850;
}

.catalog-wrap { width: min(760px, 100%); margin: 0 auto; padding: 16px 14px 24px; }

.catalog-hero {
    position: relative;
    overflow: hidden;
    padding: 28px 24px;
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(125deg, #08182d 0%, #172e50 52%, #0d7f7a 100%);
    box-shadow: var(--shadow);
}

.catalog-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, transparent 0 64%, rgba(255,255,255,.08) 64% 65%, transparent 65%),
        repeating-linear-gradient(0deg, transparent 0 31px, rgba(255,255,255,.05) 32px);
    pointer-events: none;
}

.catalog-eyebrow {
    position: relative;
    margin-bottom: 7px;
    color: #83f0e7;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .18em;
}

.catalog-hero h1 {
    position: relative;
    margin: 0;
    font-size: clamp(14px, 3vw, 22px);
    line-height: 1.08;
    font-weight: 950;
}

.catalog-hero p {
    position: relative;
    max-width: 670px;
    margin: 12px 0 0;
    color: rgba(255,255,255,.76);
    font-size: 14px;
    line-height: 1.7;
}

.catalog-note {
    margin: 13px 0 0;
    padding: 11px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(255,255,255,.84);
    color: #526175;
    font-size: 12px;
    line-height: 1.6;
}

.season-section { margin-top: 22px; }
.season-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.season-title { margin: 0; font-size: 24px; line-height: 1.1; font-weight: 950; }
.season-range { margin-top: 5px; color: var(--sub); font-size: 12px; }
.season-total {
    color: #40516a;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.league-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.league-card {
    --accent: #dfc27d;
    --accent2: #7fe8e0;
    --card-border: rgba(223,194,125,.38);
    --card-background: linear-gradient(125deg, #111d31, #233d61);
    position: relative;
    isolation: isolate;
    min-width: 0;
    min-height: 184px;
    overflow: hidden;
    padding: 22px 24px;
    display: grid;
    grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
    grid-template-areas:
        "label stats"
        "name stats"
        "full stats"
        "enter stats";
    column-gap: 28px;
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    color: #fff;
    background: var(--card-background);
    box-shadow: 0 12px 28px rgba(9,18,34,.16), inset 0 1px 0 rgba(255,255,255,.10);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.league-card > * { position: relative; z-index: 1; }
.league-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--accent) 68%, transparent);
    box-shadow: 0 20px 42px rgba(9,18,34,.24), inset 0 1px 0 rgba(255,255,255,.14);
}
.league-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    z-index: 2;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent2), transparent);
}
.league-card::after {
    content: "";
    position: absolute;
    right: -72px;
    bottom: -128px;
    width: 190px;
    height: 190px;
    z-index: 0;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 50%;
    box-shadow: 0 0 0 34px rgba(255,255,255,.035), 0 0 0 68px rgba(255,255,255,.02);
    pointer-events: none;
}

.league-card.premier-league {
    --accent: #e5c77d;
    --accent2: #55ede5;
    --card-border: rgba(229,199,125,.42);
    --card-background: radial-gradient(circle at 88% 8%, rgba(40,216,210,.25), transparent 28%), linear-gradient(125deg, #160522 0%, #3b1268 56%, #103b42 100%);
}
.league-card.la-liga {
    --accent: #f0cf7a;
    --accent2: #ed7b83;
    --card-border: rgba(240,207,122,.43);
    --card-background: radial-gradient(circle at 88% 8%, rgba(240,189,76,.22), transparent 29%), linear-gradient(125deg, #32070e 0%, #81182d 58%, #51320c 100%);
}
.league-card.bundesliga {
    --accent: #e6c17b;
    --accent2: #f1666f;
    --card-border: rgba(230,193,123,.40);
    --card-background: radial-gradient(circle at 88% 8%, rgba(226,29,43,.24), transparent 29%), linear-gradient(125deg, #090909 0%, #340609 52%, #721019 100%);
}
.league-card.serie-a {
    --accent: #ddc88e;
    --accent2: #7bdcff;
    --card-border: rgba(221,200,142,.42);
    --card-background: radial-gradient(circle at 88% 8%, rgba(102,201,239,.25), transparent 30%), linear-gradient(125deg, #06142d 0%, #0b4386 57%, #10384e 100%);
}
.league-card.ligue-1 {
    --accent: #ddca83;
    --accent2: #c8ff22;
    --card-border: rgba(221,202,131,.40);
    --card-background: radial-gradient(circle at 88% 8%, rgba(200,255,34,.18), transparent 29%), linear-gradient(125deg, #070e21 0%, #132956 56%, #183d36 100%);
}

.league-label {
    grid-area: label;
    align-self: end;
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .16em;
    text-shadow: 0 1px 8px rgba(0,0,0,.28);
}
.league-name {
    grid-area: name;
    margin-top: 7px;
    font-size: 25px;
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: .02em;
}
.league-full {
    grid-area: full;
    margin-top: 6px;
    color: rgba(255,255,255,.66);
    font-size: 11px;
    line-height: 1.5;
}

.league-stats {
    grid-area: stats;
    align-self: center;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    opacity: .78;
    transition: opacity .18s ease;
}
.league-card:hover .league-stats { opacity: .9; }
.league-stat {
    min-width: 0;
    padding: 4px 10px;
    text-align: center;
}
.league-stat + .league-stat { border-left: 1px solid rgba(255,255,255,.13); }
.league-stat span { display: block; color: rgba(255,255,255,.52); font-size: 10px; line-height: 1.25; white-space: nowrap; }
.league-stat strong { display: block; margin-top: 3px; color: rgba(255,255,255,.82); font-size: 15px; line-height: 1.2; font-weight: 750; }

.card-enter {
    grid-area: enter;
    align-self: end;
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
}
.card-enter svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .18s ease; }
.league-card:hover .card-enter svg { transform: translateX(3px); }

.catalog-empty {
    margin-top: 18px;
    padding: 30px 18px;
    text-align: center;
    border: 1px dashed #cbd5df;
    border-radius: var(--radius);
    background: rgba(255,255,255,.76);
    color: var(--sub);
}

.catalog-footer {
    margin-top: 30px;
    padding: 20px 4px;
    color: #758296;
    text-align: center;
    font-size: 12px;
    line-height: 1.7;
}

.catalog-loading {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: grid;
    place-items: center;
    background: rgba(241,245,249,.70);
    backdrop-filter: blur(3px);
}
.catalog-loading[hidden] { display: none; }
.loading-dot {
    width: 42px;
    height: 42px;
    border: 4px solid #dbe5ec;
    border-top-color: #0d7f7a;
    border-radius: 50%;
    animation: catalog-spin .75s linear infinite;
}
@keyframes catalog-spin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
    .catalog-wrap { padding: 12px 10px 20px; }
    .catalog-hero { padding: 23px 18px; border-radius: var(--radius); }
    .league-grid { grid-template-columns: minmax(0, 1fr); }
    .league-card {
        min-height: 0;
        padding: 18px;
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "label" "name" "full" "stats" "enter";
    }
    .league-stats { margin-top: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .league-stat { padding: 4px 3px; }
    .league-stat span { min-height: 25px; white-space: normal; }
    .season-heading { align-items: flex-start; flex-direction: column; }
}
