/* =============================================
   FC Динамо-Барнаул — Modern Sports Theme
   Ultra-wide optimized | Glassmorphism
   ============================================= */

/* ---------- Design Tokens ---------- */
:root {
    --blue-900: #0f172a;
    --blue-800: #1a2744;
    --blue-700: #253661;
    --blue-600: #314980;
    --blue-500: #4f6cb1;
    --blue-400: #6b84c3;
    --blue-300: #8898c9;
    --blue-200: #a8b6d8;
    --blue-100: #c8d0e6;
    --blue-50: #e8ecf5;

    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    --green: #10b981;
    --green-dark: #059669;
    --red: #ef4444;
    --red-dark: #dc2626;
    --amber: #f59e0b;
    --yellow: #eab308;

    --gk-color: #10b981;
    --df-color: #3b82f6;
    --mf-color: #eab308;
    --fw-color: #ef4444;

    --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Cascadia Code', Consolas, monospace;

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    --max-width: 1600px;
    --header-height: 68px;
    --border-radius: 8px;
    --border-radius-lg: 14px;
    --border-radius-xl: 20px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px -1px rgba(0,0,0,0.08), 0 2px 6px -2px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 28px -4px rgba(0,0,0,0.12), 0 4px 8px -2px rgba(0,0,0,0.06);
    --shadow-xl: 0 24px 48px -8px rgba(0,0,0,0.16), 0 8px 16px -4px rgba(0,0,0,0.08);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.03);
    --shadow-card-hover: 0 12px 32px -4px rgba(79,108,177,0.18), 0 4px 12px -2px rgba(0,0,0,0.06);

    --glass-bg: rgba(255,255,255,0.08);
    --glass-border: rgba(255,255,255,0.12);
    --glass-bg-dark: rgba(255,255,255,0.05);

    --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a { color: var(--blue-500); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-400); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--gray-100); border-radius: 5px; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--blue-400), var(--blue-500)); border-radius: 5px; border: 2px solid var(--gray-100); }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--blue-300), var(--blue-400)); }
* { scrollbar-width: thin; scrollbar-color: var(--blue-400) var(--gray-100); }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.03);
    height: var(--header-height);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-xl);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
}

.logo-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.footer-brand {
	text-align: center;
}

.logo-img { width: 44px; height: 44px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }

.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-title {
    font-size: 19px;
    font-weight: 900;
    color: var(--blue-500);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--blue-500), var(--blue-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo-subtitle {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-400);
    letter-spacing: 3.5px;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav-link {
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    transition: all var(--transition);
    white-space: nowrap;
    position: relative;
}
.nav-link:hover {
    color: var(--blue-500);
    background: var(--blue-50);
}
.nav-link.active {
    color: var(--blue-500);
    background: var(--blue-50);
    font-weight: 600;
}

/* ---------- Выпадающие подменю (широкая версия) ---------- */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-item.has-children > .nav-link { display: inline-flex; align-items: center; }
.nav-item.has-children > .nav-link.active,
.nav-item.parent-active > .nav-link {
    color: var(--blue-500);
    background: var(--blue-50);
    font-weight: 600;
}
.nav-caret {
    width: 0; height: 0; margin-left: 7px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.55;
    transition: transform var(--transition);
}
.nav-item.has-children:hover > .nav-link .nav-caret,
.nav-item.has-children:focus-within > .nav-link .nav-caret { transform: rotate(180deg); }

.nav-dropdown {
    position: absolute;
    top: calc(100% + 16px);
    left: 0;
    min-width: 220px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #fff;
    border: 1px solid var(--gray-100);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
    z-index: 120;
}
/* Невидимый мостик до подменю, чтобы оно не закрывалось при переводе курсора */
.nav-item.has-children::after {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 100%; height: 16px;
}
.nav-item.has-children:hover > .nav-dropdown,
.nav-item.has-children.open > .nav-dropdown,
.nav-item.has-children:focus-within > .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown-link {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--transition);
}
.nav-dropdown-link:hover {
    color: var(--blue-500);
    background: var(--blue-50);
}
.nav-dropdown-link.active {
    color: var(--blue-500);
    background: var(--blue-50);
    font-weight: 600;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius);
    transition: background var(--transition);
}
.mobile-menu-btn:hover { background: var(--gray-100); }
.mobile-menu-btn span {
    width: 24px;
    height: 2.5px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all var(--transition);
}

/* ---------- Main ---------- */
.site-main {
    min-height: calc(100vh - var(--header-height) - 200px);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.section {
    padding: var(--space-xl) 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2xl);
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--gray-900);
    position: relative;
    padding-left: var(--space-lg);
    letter-spacing: -0.5px;
}
.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 5px;
    background: linear-gradient(180deg, var(--blue-500), var(--blue-400));
    border-radius: 3px;
}
.sp-det {
	transform: scale(1.5); 
}

.section-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--blue-500);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all var(--transition);
}
.section-link:hover {
    background: var(--blue-50);
    color: var(--blue-600);
}
.section-link::after { content: '→'; transition: transform var(--transition); }
.section-link:hover::after { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(145deg, var(--blue-900) 0%, #162038 35%, var(--blue-700) 100%);
    color: var(--white);
    padding: var(--space-xl) 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -5%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(79,108,177,0.3) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(15,23,42,0.85) 0%, rgba(22,32,56,0.75) 35%, rgba(37,54,97,0.7) 100%);
    z-index: 1;
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-xl);
    display: grid;
    /* minmax(0, …): иначе минимальная ширина колонки равна min-content
       карточки матча (в ней названия команд nowrap), трек вылезает за
       контейнер вправо, и на телефоне карточка упирается в край экрана */
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: var(--space-3xl);
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: clamp(34px, 5vw, 60px);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: var(--space-md);
    letter-spacing: -1.5px;
}

.hero-content p {
    font-size: 18px;
    opacity: 0.75;
    margin-bottom: var(--space-xl);
    max-width: 500px;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    gap: var(--space-2xl);
    margin-top: var(--space-xl);
}

.hero-stat {
    text-align: center;
    position: relative;
}
.hero-stat::after {
    content: '';
    position: absolute;
    right: calc(-1 * var(--space-xl));
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.15);
}
.hero-stat:last-child::after { display: none; }

.hero-stat-value {
    font-size: 40px;
    font-weight: 900;
    display: block;
    line-height: 1;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff, #a8b6d8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-stat-label {
    font-size: 12px;
    opacity: 0.55;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.hero-match {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(3px) saturate(140%);
    -webkit-backdrop-filter: blur(3px) saturate(140%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--border-radius-xl);
    padding: var(--space-2xl);
    min-width: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.08);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255,255,255,0.95);
}
.hero-match:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.15);
    border-color: rgba(255,255,255,0.15);
    color: #ffffff;
}
.hero-match:hover .hero-match-team-name { color: #ffffff; }
.hero-match:hover .hero-match-vs { opacity: 0.6; }
.hero-match:hover .hero-match-info { opacity: 0.85; }
.hero-match:hover .hero-match-label { opacity: 0.8; }
.hero-match:hover .hero-match-link { color: #ffffff; }
.hero-match:hover .hero-match-link .hero-match-info { opacity: 0.85; }
.hero-match:hover .hero-match-link .hero-match-label { opacity: 0.8; }

.hero-match-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-match-link:hover {
    color: #ffffff;
}
.hero-match-link:hover .hero-match-info { opacity: 0.85; }
.hero-match-info {transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);}
.hero-match-link:hover .hero-match-label { opacity: 0.8; }
.hero-match-label {transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);}

.hero-match-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    opacity: 0.5;
    margin-bottom: var(--space-lg);
    font-weight: 600;
    text-align: center;
}

/* Межсезонье: карточка «До встречи в новом сезоне» */
.hero-match--season {
    cursor: default;
    padding: 26px 28px;
    background:
        radial-gradient(circle at 50% 0%, rgba(79, 108, 177, 0.3), transparent 62%),
        rgba(255, 255, 255, 0.05);
}
.hero-match--season:hover {
    transform: none;
    background:
        radial-gradient(circle at 50% 0%, rgba(79, 108, 177, 0.34), transparent 62%),
        rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.13);
}
.hero-season {
    position: relative;
    min-height: 238px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}
.hero-season::before {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 16px;
    pointer-events: none;
}
.hero-season::after {
    content: '';
    position: absolute;
    right: -80px;
    bottom: -100px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 108, 177, 0.28), transparent 68%);
    pointer-events: none;
}
.hero-season > * { position: relative; z-index: 1; }
.hero-season-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2.8px;
    font-weight: 700;
    color: #f3d38c;
    opacity: 0.92;
    margin-bottom: 10px;
}
.hero-season-art {
    position: relative;
    width: 82px;
    height: 82px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.hero-season-art::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.24), rgba(79, 108, 177, 0.11) 58%, rgba(15, 23, 42, 0.4));
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 34px rgba(79, 108, 177, 0.42), 0 14px 34px rgba(0, 0, 0, 0.3);
}
.hero-season-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    animation: heroSeasonSpin 30s linear infinite;
}
.hero-season-logo {
    position: relative;
    width: 46px;
    height: 46px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}
.hero-season-ball {
    position: absolute;
    right: -2px;
    bottom: -2px;
    font-size: 17px;
    line-height: 1;
    transform: rotate(-8deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}
.hero-season-title {
    font-size: clamp(24px, 2.4vw, 32px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.7px;
    background: linear-gradient(135deg, #ffffff 22%, #bcd0ff 62%, #f3d38c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-season-text {
    max-width: 300px;
    margin: 10px auto 14px;
    font-size: 12.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.62);
}
.hero-season-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(135deg, rgba(79, 108, 177, 0.95), rgba(61, 90, 153, 0.95));
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-season-link:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #5b79c4, #4a67aa);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}
.hero-season-link span { transition: transform 0.3s ease; }
.hero-season-link:hover span { transform: translateX(4px); }
@keyframes heroSeasonSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .hero-season { min-height: 210px; padding: 0; }
    .hero-season-art { width: 70px; height: 70px; margin-bottom: 10px; }
    .hero-season-logo { width: 40px; height: 40px; }
    .hero-season-ball { font-size: 15px; }
    .hero-season-label { margin-bottom: 8px; }
    .hero-season-title { font-size: 23px; }
    .hero-season-text { max-width: 260px; margin: 8px auto 12px; font-size: 12px; }
    .hero-season-link { padding: 8px 16px; font-size: 12px; }
}

.hero-match-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.hero-match-team {
    text-align: center;
    flex: 1;
    min-width: 0;
}
.hero-match-team-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-sm);
    /*background: rgba(255,255,255,0.1);*/
    /*border-radius: 50%;*/
    display: flex;
    align-items: center;
    justify-content: center;
    /*border: 2px solid rgba(255,255,255,0.12);*/
    /*box-shadow: 0 4px 16px rgba(0,0,0,0.15);*/
    overflow: hidden;
}
.hero-match-team-logo img { width: 120px; height: 120px; object-fit: contain; }
.hero-match-team-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    /* одна строка на любой ширине: иначе на смартфоне длинное название
       переносится на вторую строку и высота карточки прыгает при ротации */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-match-vs {
    font-size: 28px;
    font-weight: 900;
    opacity: 0.35;
    letter-spacing: 2px;
    flex-shrink: 0;
}

.hero-match-info {
    text-align: center;
    font-size: 13px;
    opacity: 0.6;
    font-weight: 500;
}

.hero-countdown {
    margin: var(--space-md) 0;
    text-align: center;
    /* одинаковая высота во всех состояниях (таймер / «матч идёт») */
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-countdown-cols {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
}
.hero-countdown-col {
    display: flex;
    align-items: baseline;
    gap: 2px;
    transition: opacity 0.3s ease;
}
.hero-match:hover .hero-countdown-col { opacity: 0.75; }
.hero-countdown-num {
    font-size: 19px;
    font-weight: 800;
    line-height: 1;
    color: rgba(255,255,255,0.9);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.3px;
}
.hero-countdown-cap {
    font-size: 10px;
    text-transform: lowercase;
    letter-spacing: 0;
    opacity: 0.45;
    margin-top: 0;
    font-weight: 600;
}
.hero-countdown-live {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    gap: 8px;
}
.hero-live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    animation: hero-live-pulse 1.2s infinite;
}
@keyframes hero-live-pulse {
    0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* ---------- Match Card ---------- */
.match-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: var(--space-md) var(--space-lg);
    transition: all var(--transition-slow);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}
.match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue-500), var(--blue-400));
    opacity: 0;
    transition: opacity var(--transition);
}
.match-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px);
    border-color: var(--blue-200);
}
.match-card:hover::before { opacity: 1; }

.match-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    font-size: 12px;
    color: var(--gray-500);
}

.match-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.match-status.scheduled { background: var(--blue-50); color: var(--blue-500); }
.match-status.live { background: #fef3c7; color: #b45309; animation: pulse 2s infinite; }
.match-status.finished { background: #d1fae5; color: #065f46; }
.match-status.postponed { background: var(--gray-100); color: var(--gray-600); }
.match-status.cancelled { background: #fee2e2; color: #b91c1c; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.match-card-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.match-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
    text-align: center;
}

.match-team-logo {
    width: 48px;
    height: 48px;
    background: var(--gray-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--gray-100);
    flex-shrink: 0;
}
.match-card:hover .match-team-logo { border-color: var(--blue-200); }
.match-team-logo img { width: 32px; height: 32px; object-fit: contain; }

.match-team-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-score {
    font-size: 28px;
    font-weight: 900;
    color: var(--gray-900);
    min-width: 80px;
    text-align: center;
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* ---------- Ресайз видео на странице матча ---------- */
/* Wrapper центрируется и может быть шире контейнера (left:50% + translate);
   высота плеера следует за шириной через padding-bottom:56.25% у ребёнка. */
.video-resize-wrap {
    position: relative;
    width: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.video-resize-handle {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 22px;
    height: 22px;
    z-index: 6;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background-color: rgba(15, 23, 42, 0.55);
    background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255, 255, 255, 0.85) 4px 6px);
    cursor: nwse-resize;
    opacity: 0.55;
    transition: opacity 0.15s ease;
    touch-action: none;
    user-select: none;
}

.video-resize-wrap:hover .video-resize-handle,
.video-resize-handle:active {
    opacity: 1;
}

/* Цвет счёта по результату нашей команды: победа / ничья / поражение */
.match-score.result-win { color: #16a34a; }
.match-score.result-draw { color: #d97706; }
.match-score.result-loss { color: #dc2626; }

.match-card-footer {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--gray-500);
}

/* ---------- Grid Layouts ---------- */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: var(--space-lg);
}

/* Новости на главной (кроме самой свежей). Точное число колонок
   рассчитывает app.js по data-full-rows — здесь только запасной вариант. */
.news-grid--side {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Карточки в сетках главной не должны распирать колонку и тянуть
   за собой горизонтальную прокрулку страницы */
.matches-grid > *,
.news-grid--side > * { min-width: 0; }

.squad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: var(--space-lg);
}

/* Ultra-wide: up to 5 columns */
@media (min-width: 2000px) {
    .matches-grid { grid-template-columns: repeat(5, 1fr); }
    .news-grid { grid-template-columns: repeat(5, 1fr); }
    .squad-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ---------- News Card ---------- */
.news-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all var(--transition-slow);
    box-shadow: var(--shadow-card);
}
.news-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
    border-color: var(--blue-200);
}

.news-card-image {
    height: 200px;
    background: linear-gradient(135deg, var(--blue-100), var(--blue-50));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.news-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.45), transparent);
    opacity: 0;
    transition: opacity var(--transition-slow);
    pointer-events: none;
}
.news-card:hover .news-card-image::after { opacity: 1; }
.news-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.news-card:hover .news-card-image img { transform: scale(1.05); }
.news-card-image .placeholder-icon {
    font-size: 52px;
    color: var(--blue-300);
}

.news-card-body { padding: var(--space-lg); }

.news-card-category {
    display: inline-block;
    padding: 3px 12px;
    background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
    color: var(--blue-600);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-sm);
}

.news-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition);
}
.news-card:hover .news-card-title { color: var(--blue-500); }

.news-card-excerpt {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--space-md);
}

.news-card-meta {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 500;
}

/* ---------- News Feature (главная новость на главной) ---------- */
.news-feature-wrap {
    display: grid;
    gap: var(--space-lg);
}
.news-feature {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-slow);
}
.news-feature:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
    border-color: var(--blue-200);
}
.news-feature-image {
    position: relative;
    min-height: 330px;
    background: linear-gradient(135deg, var(--blue-100), var(--blue-50));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
@media (min-width: 1024px) {
    .news-feature-image { min-height: 380px; }
}
@media (min-width: 1300px) {
    .news-feature-image { min-height: 460px; }
}
@media (min-width: 1800px) {
    .news-feature-image { min-height: 540px; }
}
.news-feature-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 55%, rgba(0,0,0,0.22));
    pointer-events: none;
    z-index: 1;
}
.news-feature-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.news-feature:hover .news-feature-image img { transform: scale(1.05); }
.news-feature-image .placeholder-icon { font-size: 84px; color: var(--blue-300); }
.news-feature-body {
    display: flex;
    flex-direction: column;
    padding: var(--space-2xl);
}
.news-feature-category {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 14px;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    color: var(--white);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-md);
}
.news-feature-title {
    font-size: clamp(22px, 2.4vw, 32px);
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.25;
    margin-bottom: var(--space-md);
    transition: color var(--transition);
}
.news-feature:hover .news-feature-title { color: var(--blue-500); }
.news-feature-excerpt {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-feature-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    font-size: 13px;
    color: var(--gray-400);
    font-weight: 500;
}
.news-feature-more {
    color: var(--blue-600);
    font-weight: 600;
    white-space: nowrap;
}
.news-feature:hover .news-feature-more { text-decoration: underline; }

/* ---------- News Content ---------- */
.news-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--gray-700);
}
.news-content h2 { font-size: 24px; font-weight: 700; margin: 32px 0 16px; color: var(--gray-900); }
.news-content h3 { font-size: 20px; font-weight: 700; margin: 24px 0 12px; color: var(--gray-900); }
.news-content p { margin-bottom: 16px; text-indent:1.25cm;}
.news-content img { max-width: 100%; border-radius: var(--border-radius); margin: 16px 0; display: block; }
.news-content .ql-align-center img { margin-left: auto; margin-right: auto; display: block; }
.news-content .ql-align-right img { margin-left: auto; margin-right: 0; display: block; }
.news-content iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    border-radius: var(--border-radius);
    margin: 16px 0;
    display: block;
}
.news-content video {
    width: 100%;
    border-radius: var(--border-radius);
    margin: 16px 0;
    display: block;
}

/* Видео в новости (отдельное поле, плеер Video.js) */
.news-video-card {
    margin: 0 0 var(--space-xl);
    padding: 14px;
    border-radius: calc(var(--border-radius-lg) + 4px);
    background:
        radial-gradient(circle at 15% 0%, rgba(79, 108, 177, 0.28), transparent 55%),
        linear-gradient(145deg, #0f172a, #162038 58%, #1b2a4a);
    border: 1px solid rgba(15, 23, 42, 0.18);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.2);
}
.news-video-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 2px 12px;
}
.news-video-list {
    display: grid;
    gap: 14px;
}
.news-video-list--multi {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}
.news-video-list--multi .news-video-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}
.news-video-item {
    min-width: 0;
    border-radius: 12px;
    overflow: hidden;
}
@media (max-width: 520px) {
    .news-video-list--multi { grid-template-columns: 1fr; }
}
.news-video-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 2.2px;
    font-weight: 700;
    color: #93c5fd;
}
.news-video-kicker::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}
.news-video-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.news-video-fallback:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}
.news-content blockquote { border-left: 4px solid var(--blue-500); padding: 12px 20px; margin: 16px 0; background: var(--blue-50); border-radius: 0 var(--border-radius) var(--border-radius) 0; color: var(--gray-600); font-style: italic; }
.news-content ul, .news-content ol { padding-left: 24px; margin-bottom: 16px; }
.news-content li { margin-bottom: 8px; }
.news-content a { color: var(--blue-500); text-decoration: underline; }
.news-content a:hover { color: var(--blue-600); }
.news-content pre { background: var(--gray-900); color: var(--gray-100); padding: 16px; border-radius: var(--border-radius); overflow-x: auto; font-family: var(--font-mono); font-size: 14px; margin: 16px 0; }
.news-content code { background: var(--gray-100); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 14px; }
.news-content pre code { background: none; padding: 0; }

/* Quill editor output styles (synced with quill.snow.css) */
.news-content p,
.news-content ol,
.news-content ul,
.news-content pre,
.news-content blockquote,
.news-content h1,
.news-content h2,
.news-content h3,
.news-content h4,
.news-content h5,
.news-content h6 { margin: 0; padding: 0; counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9; }
.news-content ol,
.news-content ul { padding-left: 1.5em; }
.news-content ol > li,
.news-content ul > li { list-style-type: none; }
.news-content ul > li::before { content: '\2022'; }
.news-content ol > li { counter-increment: list-1; }
.news-content ol > li::before { content: counter(list-1) '.'; }
.news-content li { margin-bottom: 0.5em; }
.news-content .ql-size-small { font-size: 0.75em; }
.news-content .ql-size-large { font-size: 1.5em; }
.news-content .ql-size-huge { font-size: 2.5em; }
.news-content .ql-header-1 { font-size: 2em; font-weight: 700; }
.news-content .ql-header-2 { font-size: 1.5em; font-weight: 700; }
.news-content .ql-header-3 { font-size: 1.17em; font-weight: 700; }
.news-content .ql-align-center { text-align: center; }
.news-content .ql-align-right { text-align: right; }
.news-content .ql-align-justify { text-align: justify; }
.news-content .ql-indent-1 { padding-left: 3em; }
.news-content .ql-indent-2 { padding-left: 6em; }
.news-content .ql-indent-3 { padding-left: 9em; }
.news-content .ql-indent-4 { padding-left: 12em; }
.news-content .ql-syntax { background: var(--gray-900); color: var(--gray-100); padding: 16px; border-radius: var(--border-radius); overflow-x: auto; font-family: var(--font-mono); font-size: 14px; }
.news-content .ql-video { aspect-ratio: 16/9; width: 100%; border: none; border-radius: var(--border-radius); }

/* ---------- Player Card ---------- */
.player-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all var(--transition-slow);
    position: relative;
    box-shadow: var(--shadow-card);
}
.player-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}

.player-card-number {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    color: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 900;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(79,108,177,0.3);
    letter-spacing: -0.5px;
}

.player-card-photo {
    height: 220px;
    background: linear-gradient(135deg, var(--blue-100), var(--blue-50));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.player-card-photo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0,0,0,0.15), transparent);
}
.player-card-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.player-card-photo .placeholder-icon {
    font-size: 72px;
    color: var(--blue-200);
}

.player-card-body { padding: var(--space-lg); text-align: center; }

.player-card-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.player-card-position {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 12px;
    border-radius: 20px;
    display: inline-block;
}

/* Position color coding */
.player-card[data-position="GK"] .player-card-position { background: #d1fae5; color: #065f46; }
.player-card[data-position="DF"] .player-card-position { background: #dbeafe; color: #1e40af; }
.player-card[data-position="MF"] .player-card-position { background: #fef3c7; color: #92400e; }
.player-card[data-position="FW"] .player-card-position { background: #fee2e2; color: #991b1b; }

.player-card[data-position="GK"] .player-card-number { background: linear-gradient(135deg, var(--gk-color), var(--green-dark)); box-shadow: 0 4px 12px rgba(16,185,129,0.3); }
.player-card[data-position="DF"] .player-card-number { background: linear-gradient(135deg, var(--df-color), #2563eb); box-shadow: 0 4px 12px rgba(59,130,246,0.3); }
.player-card[data-position="MF"] .player-card-number { background: linear-gradient(135deg, var(--mf-color), #ca8a04); box-shadow: 0 4px 12px rgba(234,179,8,0.3); }
.player-card[data-position="FW"] .player-card-number { background: linear-gradient(135deg, var(--fw-color), var(--red-dark)); box-shadow: 0 4px 12px rgba(239,68,68,0.3); }

/* Fallback for browsers that don't support attribute selectors well */
.player-card-position { background: var(--blue-50); color: var(--blue-600); }
.player-card-number { background: linear-gradient(135deg, var(--blue-500), var(--blue-600)); box-shadow: 0 4px 12px rgba(79,108,177,0.3); }

.player-card-meta {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
}

.captain-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    margin-top: var(--space-sm);
}

/* ---------- Standings Table ---------- */
.standings-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-card);
}

.standings-table {
    width: 100%;
    min-width: 580px;
    border-collapse: collapse;
    background: var(--white);
}

.standings-table th {
    padding: 12px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.standings-table td {
    padding: 12px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--gray-100);
    transition: background var(--transition);
    white-space: nowrap;
}

.standings-table tr:hover td {
    background: var(--blue-50);
}

.standings-table .position {
    font-weight: 800;
    color: var(--blue-500);
    width: 40px;
    font-size: 15px;
}

.standings-table .team-name {
    font-weight: 600;
    color: var(--gray-900);
}

.standings-table .points {
    font-weight: 900;
    color: var(--blue-500);
    font-size: 17px;
    font-variant-numeric: tabular-nums;
    text-align: center;
    min-width: 44px;
}

/* Узкие экраны: плотнее таблица — реже горизонтальная прокрутка,
   больше столбцов помещается без неё */
@media (max-width: 768px) {
    .standings-table { min-width: 440px; }
    .standings-table th {
        padding: 9px 8px;
        font-size: 10px;
        letter-spacing: 0.4px;
    }
    .standings-table td { padding: 9px 8px; font-size: 12px; }
    .standings-table .position { width: 30px; font-size: 14px; }
    .standings-table .points { font-size: 15px; }
    .standings-logo { height: 20px; width: 20px; }
    .standings-table .logo-cell { min-width: 26px; width: 26px; }
    .standings-table-head { gap: var(--space-sm); }
    .standings-table-head .standings-subtitle {
        font-size: 14px;
        margin-bottom: var(--space-sm);
    }
    .standings-head-right { gap: var(--space-sm); }
    .standings-range { font-size: 11px; }
    .standings-full-link { font-size: 12px; }
    .standings-table-wrap { margin-bottom: var(--space-lg); }
}
@media (max-width: 480px) {
    .standings-table { min-width: 0; }
    .standings-table th { padding: 8px 4px; font-size: 9.5px; }
    .standings-table td { padding: 8px 4px; font-size: 11.5px; }
    .standings-table .position { width: 22px; font-size: 13px; }
    .standings-table .points { font-size: 14px; }
    .standings-logo { height: 18px; width: 18px; }
    .standings-table .logo-cell { min-width: 22px; width: 22px; }
}

.form-indicator {
    display: flex;
    gap: 4px;
}
.form-dot {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}
.form-dot.w { background: var(--green); }
.form-dot.d { background: var(--gray-400); }
.form-dot.l { background: var(--red); }

/* =============================================
   Leaders Block
   ============================================= */
.leader-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    text-decoration: none;
    color: inherit;
}
.leader-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gray-100);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.leader-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
	object-position: center top;
}
.leader-info {
    flex: 1;
    min-width: 0;
}
.leader-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.leader-bar {
    height: 5px;
    background: var(--gray-100);
    border-radius: 3px;
    margin-top: 6px;
    overflow: hidden;
}
.leader-bar-fill {
    height: 100%;
    background: var(--blue-500);
    border-radius: 3px;
}
.leader-value {
    font-size: 20px;
    font-weight: 900;
    color: var(--blue-600);
    min-width: 40px;
    text-align: right;
}

@media (max-width: 768px) {
    .leader-avatar { width: 40px; height: 40px; }
    .leader-value { font-size: 18px; }
    .leader-name { font-size: 13px; }
}

/* =============================================
   Player Page
   ============================================= */
.pp-hero {
    position: relative;
    background: var(--blue-900);
    color: var(--white);
    padding: 0 0 48px;
    overflow: hidden;
}
.pp-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 50%, var(--blue-800) 100%);
}
.pp-hero-bg::before {
    content: '';
    position: absolute;
    right: -200px;
    top: -200px;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(79,108,177,0.3) 0%, transparent 70%);
    border-radius: 50%;
}
.pp-back {
    position: relative;
    display: inline-block;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 32px;
    margin-top: 24px;
    z-index: 1;
}
.pp-back:hover { color: var(--white); }
.pp-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 48px;
    align-items: end;
}
.pp-photo {
    width: 300px;
    height: 380px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
}
.pp-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.pp-photo-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 80px; opacity: 0.3; }
.pp-info { padding-bottom: 8px; }
.pp-info-top { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 28px; }
.pp-number-wrap { flex-shrink: 0; }
.pp-number {
    display: flex; align-items: center; justify-content: center;
    width: 72px; height: 72px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: 2px solid rgba(255,255,255,0.2);
    font-size: 30px; font-weight: 900;
}
.pp-name { font-size: 40px; font-weight: 900; margin: 0; line-height: 1.05; letter-spacing: -0.5px; }
.pp-name span { font-weight: 400; opacity: 0.7; }
.pp-position { font-size: 15px; font-weight: 600; color: var(--pc, rgba(255,255,255,0.6)); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }
.pp-captain {
    padding: 4px 14px; background: rgba(245,158,11,0.2); color: #fbbf24;
    border-radius: 20px; font-size: 12px; font-weight: 700;
    white-space: nowrap; margin-left: auto; align-self: center;
}
.pp-bio-grid { display: flex; gap: 32px; flex-wrap: wrap; }
.pp-bio-item dt { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.4; margin-bottom: 2px; }
.pp-bio-item dd { font-size: 15px; font-weight: 600; margin: 0; }
.pp-age { opacity: 0.5; font-weight: 400; }
.pp-numbers {
    background: var(--white); border-bottom: 1px solid var(--gray-200);
    margin-top: -24px; position: relative; z-index: 2;
}
.pp-numbers-grid {
    display: flex; gap: 0;
    background: var(--white); border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.03);
    overflow: hidden;
}
.pp-num-card { flex: 1; text-align: center; padding: 28px 16px; border-right: 1px solid var(--gray-100); }
.pp-num-card:last-child { border-right: none; }
.pp-num-card.highlight { background: linear-gradient(135deg, var(--blue-50), var(--blue-100)); }
.pp-num-val { font-size: 40px; font-weight: 900; color: var(--blue-600); line-height: 1; letter-spacing: -1px; }
.pp-num-card.highlight .pp-num-val { color: var(--blue-500); }
.pp-num-unit { font-size: 20px; font-weight: 600; }
.pp-num-label { font-size: 12px; color: var(--gray-500); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
/* Context caption above the big numbers: tells the reader these are career totals */
.pp-ctx {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding-top: 20px; margin-bottom: 14px;
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: var(--gray-600);
}
.pp-ctx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-500); flex-shrink: 0; }
.pp-ctx-hint { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--gray-400); }
.pp-stats-section { padding: 48px 0; }
.pp-section-title { font-size: 20px; font-weight: 700; color: var(--gray-900); margin-bottom: 24px; }
.pp-bars { display: flex; flex-direction: column; gap: 12px; }
.pp-bar-row { display: grid; grid-template-columns: 140px 1fr 48px; gap: 12px; align-items: center; }
.pp-bar-label { font-size: 14px; color: var(--gray-600); font-weight: 500; text-align: right; }
.pp-bar-track { height: 10px; background: var(--gray-100); border-radius: 5px; overflow: hidden; }
.pp-bar-fill { height: 100%; border-radius: 5px; transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.pp-bar-val { font-size: 16px; font-weight: 700; color: var(--gray-800); text-align: right; }
.pp-detail-section { padding: 0 0 48px; }
.pp-detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pp-detail-item { padding: 20px; background: var(--gray-50); border-radius: 12px; text-align: center; }
.pp-detail-val { font-size: 28px; font-weight: 800; color: var(--gray-900); line-height: 1; }
.pp-detail-label { font-size: 12px; color: var(--gray-500); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.pp-empty { text-align: center; padding: 48px; color: var(--gray-400); font-size: 15px; }
.pp-table-section { padding: 0 0 64px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pp-table {
    width: 100%; min-width: 600px; border-collapse: collapse;
    background: var(--white); border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.pp-table th {
    padding: 12px 16px; font-size: 11px; font-weight: 700;
    color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px;
    background: var(--gray-50); border-bottom: 2px solid var(--gray-200); text-align: left;
}
.pp-table td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--gray-100); }
.pp-table:not(.pp-table-sub) tr:not(.pp-tour-detail):hover td { background: var(--blue-50); }
.pp-td-bold { font-weight: 700; }
.pp-table-tours .pp-tour-head { cursor: pointer; }
.pp-table-tours .pp-tour-head:hover td { background: var(--blue-50); }
.pp-table-tours .pp-tour-head.open td { background: var(--blue-50); }
.pp-tour-caret { font-size: 11px; color: var(--gray-400); text-align: center; }
.pp-tour-friendly {
    display: inline-block; min-width: 16px; height: 16px; line-height: 16px; text-align: center;
    border-radius: 4px; font-size: 10px; font-weight: 700; margin-left: 6px;
    background: #fef3c7; color: #92400e; cursor: help;
}
.pp-tour-detail > td { padding: 0; background: #f8fafc; }
.pp-tour-detail .pp-table { min-width: 100%; box-shadow: none; border-radius: 0; border-top: 2px solid var(--gray-200); }
.pp-tour-detail .pp-table th { background: #f1f5f9; }
.pp-tour-detail .pp-table td { padding: 10px 16px; font-size: 13px; }
.pp-tour-opp { color: var(--gray-800); text-decoration: none; font-weight: 500; }
.pp-tour-opp:hover { color: var(--blue-600); text-decoration: underline; }
.pp-tour-score { font-weight: 700; white-space: nowrap; }
.pp-tour-pens { font-weight: 400; font-size: 12px; color: var(--gray-400); white-space: nowrap; }
.pp-tour-muted { color: var(--gray-400); font-weight: 400; }
.pp-tour-win td { background: #ecfdf5; }
.pp-tour-draw td { background: #f1f5f9; }
.pp-tour-loss td { background: #fef2f2; }
.pp-tour-result { display: inline-block; min-width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 5px; font-size: 11px; font-weight: 700; margin-right: 6px; }
.pp-tour-result.pp-tour-win { background: #d1fae5; color: #065f46; }
.pp-tour-result.pp-tour-draw { background: #e2e8f0; color: #475569; }
.pp-tour-result.pp-tour-loss { background: #fee2e2; color: #b91c1c; }
.pp-tour-goal { font-weight: 600; color: var(--blue-600); }
.pp-hint { font-size: 12px; color: var(--gray-400); margin-top: 12px; }
/* Scope badge in section titles: bars + detail grid belong to one tournament */
.pp-tour-chip {
    display: inline-block; max-width: calc(100% - 10px); vertical-align: middle;
    margin: 0 0 0 10px; padding: 5px 12px; border-radius: 20px;
    background: var(--blue-50); border: 1px solid var(--blue-100);
    color: var(--blue-600); font-size: 12px; font-weight: 600;
    letter-spacing: 0; text-transform: none; line-height: 1.45;
    overflow-wrap: break-word;
}
/* «Итого» — sums up the table and matches the career numbers block */
.pp-table-tours tfoot .pp-tour-total td {
    background: var(--gray-50); border-top: 2px solid var(--gray-200);
    border-bottom: none; font-weight: 700; color: var(--gray-900);
}
.pp-table-tours tfoot .pp-tour-total:hover td { background: var(--gray-50); }
.pp-tour-total-note { font-size: 12px; font-weight: 500; color: var(--gray-400); }
.pp-tour-loading { text-align: center; color: var(--gray-400); padding: 20px; font-size: 14px; }
@media (max-width: 1024px) {
    .pp-hero-grid { grid-template-columns: 220px 1fr; gap: 32px; }
    .pp-photo { width: 220px; height: 280px; }
    .pp-name { font-size: 32px; }
    .pp-numbers-grid { flex-wrap: wrap; }
    .pp-num-card { min-width: 50%; }
    .pp-num-card:nth-child(2) { border-right: none; }
    .pp-detail-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .pp-hero-grid { grid-template-columns: 1fr; text-align: center; }
    .pp-photo { width: 200px; height: 250px; margin: 0 auto; }
    .pp-info-top { justify-content: center; flex-wrap: wrap; }
    .pp-bio-grid { justify-content: center; }
    .pp-captain { margin-left: 0; }
    .pp-num-card { min-width: 50%; }
    .pp-bar-row { grid-template-columns: 100px 1fr 40px; }
    .pp-detail-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Tabs ---------- */
.tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-xl);
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.tab-btn {
    padding: 10px 22px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    white-space: nowrap;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}
.tab-btn:hover { color: var(--blue-500); background: var(--gray-50); }
.tab-btn.active {
    color: var(--blue-500);
    border-bottom-color: var(--blue-500);
    font-weight: 600;
}

/* ---------- Loading ---------- */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl);
    color: var(--gray-400);
    font-size: 14px;
}

.loading::before {
    content: '';
    width: 28px;
    height: 28px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--blue-500);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: var(--space-md);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: var(--space-3xl);
    color: var(--gray-400);
}
.empty-state-icon { font-size: 52px; margin-bottom: var(--space-md); }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--blue-900);
    color: var(--white);
    padding: var(--space-2xl) 0 0;
    position: relative;
    overflow: hidden;
}
.site-footer::before {
    content: '';
    position: absolute;
    top: -200px;
    left: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79,108,177,0.12) 0%, transparent 60%);
    pointer-events: none;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-xl);
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
    position: relative;
}

.footer-logo { width: 40px; height: 40px; margin: auto; margin-bottom: var(--space-sm); opacity: 0.85; filter: brightness(1.2); }
.footer-tagline { font-size: 13px; opacity: 0.55; line-height: 1.5;  }

.footer-links h4,
.footer-contacts h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.4;
    margin-bottom: var(--space-sm);
    font-weight: 700;
}

.footer-links a {
    display: block;
    color: var(--white);
    opacity: 0.65;
    font-size: 13px;
    padding: 3px 0;
    transition: all var(--transition);
}
.footer-links a:hover { opacity: 1; transform: translateX(4px); }

.footer-contacts p {
    font-size: 13px;
    opacity: 0.65;
    margin-bottom: var(--space-xs);
    line-height: 1.5;
}

.footer-bottom {
    margin-top: var(--space-xl);
    padding: var(--space-md) var(--space-xl);
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    position: relative;
}
.footer-bottom p { font-size: 12px; opacity: 0.35; }

/* ---------- Filter Bar ---------- */
.filter-bar {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.filter-bar select,
.filter-bar input {
    padding: 10px 18px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    font-size: 14px;
    color: var(--gray-700);
    background: var(--white);
    min-width: 160px;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.filter-bar select:focus,
.filter-bar input:focus {
    outline: none;
    border-color: var(--blue-400);
    box-shadow: 0 0 0 3px rgba(79, 108, 177, 0.12);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    padding: var(--space-md) 0;
    font-size: 13px;
    color: var(--gray-500);
}
.breadcrumb a { color: var(--blue-500); }
.breadcrumb span { margin: 0 8px; opacity: 0.5; }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

.pagination-btn {
    padding: 9px 18px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    background: var(--white);
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}
.pagination-btn:hover { border-color: var(--blue-400); color: var(--blue-500); box-shadow: var(--shadow-md); }
.pagination-btn.active {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    color: var(--white);
    border-color: var(--blue-500);
    box-shadow: 0 4px 12px rgba(79,108,177,0.3);
}
.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

/* ---------- Page Title ---------- */
.page-title-section {
    background: linear-gradient(145deg, var(--blue-900) 0%, var(--blue-700) 100%);
    color: var(--white);
    padding: var(--space-2xl) 0;
    position: relative;
    overflow: hidden;
}
.page-title-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
    pointer-events: none;
}

.page-title-section h1 {
    font-size: clamp(26px, 4vw, 44px);
    font-weight: 900;
    letter-spacing: -0.5px;
}

.page-title-section p {
    font-size: 16px;
    opacity: 0.6;
    margin-top: var(--space-sm);
}

/* ---------- About Page ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
}

.about-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: var(--space-2xl);
    transition: all var(--transition-slow);
    box-shadow: var(--shadow-card);
}
.about-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.about-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--blue-500);
}

.about-card p {
    color: var(--gray-600);
    line-height: 1.8;
}

/* ---------- Audio / Songs ---------- */
.songs-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    max-width: 1000px;
    margin: 0 auto;
}
.song-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-slow);
}
.song-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}
.song-cover {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 190px;
    background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
    color: rgba(255,255,255,0.92);
}
.song-card:nth-child(3n+2) .song-cover { background: linear-gradient(135deg, #6d5bd0, #3b2f86); }
.song-card:nth-child(3n+3) .song-cover { background: linear-gradient(135deg, #2f7d8c, #164e5a); }
.song-cover-note {
    font-size: 64px;
    line-height: 1;
    text-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.song-cover-num {
    position: absolute;
    top: 12px;
    left: 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    opacity: 0.65;
}
.song-body { padding: var(--space-lg) var(--space-xl); min-width: 0; }
.song-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--gray-900);
    overflow-wrap: anywhere;
}
.song-artist {
    margin-top: 4px;
    color: var(--blue-500);
    font-size: 15px;
    font-weight: 600;
}
.song-desc {
    margin-top: var(--space-sm);
    color: var(--gray-600);
    font-size: 14.5px;
    line-height: 1.6;
    white-space: pre-line;
}
.song-player {
    display: block;
    width: 100%;
    height: 42px;
    margin: var(--space-md) 0 var(--space-xs);
    accent-color: var(--blue-500);
}
.song-lyrics {
    margin-top: var(--space-sm);
    border-top: 1px solid var(--gray-100);
    padding-top: var(--space-sm);
}
.song-lyrics summary {
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    color: var(--blue-500);
    font-size: 14px;
    font-weight: 600;
    user-select: none;
}
.song-lyrics summary::-webkit-details-marker { display: none; }
.song-lyrics summary::before {
    content: '▸';
    font-size: 12px;
    transition: transform var(--transition);
}
.song-lyrics[open] summary::before { transform: rotate(90deg); }
.song-lyrics-text {
    max-height: 460px;
    overflow-y: auto;
    padding: var(--space-sm) var(--space-md) var(--space-sm) 0;
    color: var(--gray-700);
    font-size: 15px;
    line-height: 1.85;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.song-lyrics-text::-webkit-scrollbar { width: 8px; }

/* ---------- Responsive ---------- */
@media (min-width: 1024px) and (max-width: 1600px) {
    .container { max-width: var(--max-width); }
}

@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: minmax(0, 1fr); }
    .hero-stats { justify-content: center; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
    .about-grid { grid-template-columns: 1fr; }
    /* Боковые поля на узких экранах: 32px занимают слишком много места */
    .container { padding: 0 var(--space-lg); }
    /* Поле вокруг карточки матча делаем таким же, как у .container,
       иначе герой выглядит уже, чем контент под ним */
    .hero-inner { padding: 0 var(--space-lg); }
}

@media (max-width: 768px) {
    :root { --header-height: 56px; }

    .main-nav {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: var(--space-md);
        border-bottom: 1px solid var(--gray-200);
        box-shadow: var(--shadow-xl);
        z-index: 99;
    }
    .main-nav.open { display: flex; }

    /* Подменю на мобильных — аккордеон, а не всплывающий блок */
    .main-nav { max-height: calc(100vh - var(--header-height)); overflow-y: auto; gap: 2px; }
    .nav-item { display: block; width: 100%; }
    .nav-item.has-children > .nav-link { display: flex; justify-content: space-between; width: 100%; }
    .nav-item.has-children > .nav-link .nav-caret { transition: transform var(--transition); }
    .nav-item.has-children.open > .nav-link .nav-caret { transform: rotate(180deg); }
    .nav-dropdown {
        position: static;
        display: none;
        min-width: 0;
        margin: 2px 0 4px 16px;
        padding: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }
    .nav-dropdown::before { display: none; }
    .nav-item.has-children::after { display: none; }
    .nav-item.has-children.open > .nav-dropdown { display: flex; }
    .nav-dropdown-link { padding: 9px 12px; }

    .mobile-menu-btn { display: flex; }

    .hero { padding: 18px 0; }
    .hero-inner { gap: var(--space-md); align-items: stretch; }
    .hero-content h1 { font-size: 26px; margin-bottom: var(--space-xs); }
    .hero-content p { font-size: 14px; margin-bottom: var(--space-sm); }
    .hero-stats { display: none; }
    .hero-match { padding: var(--space-md); }
    /* На смартфонах backdrop-filter считается в уменьшенном буфере, поэтому
       тот же радиус выглядит сильнее, чем на ПК, и ещё и тормозит.
       Сводим размытие к минимуму и слегка уплотняем подложку. */
    .hero-match {
        backdrop-filter: blur(3px) saturate(140%);
        -webkit-backdrop-filter: blur(3px) saturate(140%);
        background: rgba(20, 30, 60, 0.28);
    }
    .hero-match:hover { background: rgba(20, 30, 60, 0.34); }
    .hero-match-label { margin-bottom: var(--space-sm); }
    .hero-match-team-logo,
    .hero-match-team-logo img { width: 56px; height: 56px; }
    .hero-match-teams { gap: var(--space-sm); margin-bottom: var(--space-sm); }
    .hero-match-info { font-size: 12px; line-height: 1.5; }
    .hero-countdown { margin: var(--space-sm) 0; }
    .hero-countdown .hero-countdown-cols { gap: 6px; }
    .hero-countdown .hero-countdown-num { font-size: 17px; }

    .footer-inner { grid-template-columns: 1fr; gap: var(--space-lg); }

    .matches-grid,
    .news-grid,
    .squad-grid {
        grid-template-columns: 1fr;
    }

    .news-feature { grid-template-columns: 1fr; }
    .news-feature-image { min-height: 230px; }
    .news-feature-body { padding: var(--space-lg); }

    /* Аудио: обложка сверху, текст под ней */
    .song-card { grid-template-columns: 1fr; }
    .song-cover { min-height: 120px; }
    .song-cover-note { font-size: 44px; }
    .song-body { padding: 18px; }
    .song-title { font-size: 19px; }
    .song-lyrics-text { max-height: 340px; }

    .section-title { font-size: 24px; }
    .section { padding: var(--space-2xl) 0; }
}

/* ---------- Match Ticker ---------- */
.site-header { position: sticky; top: 0; z-index: 100; }
.match-ticker {
    background: var(--blue-900);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
    white-space: nowrap;
    position: sticky;
    top: var(--header-height, 60px);
    z-index: 99;
}
.match-ticker-inner {
    display: flex;
    align-items: center;
    will-change: transform;
}
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
    border-right: 1px solid rgba(255,255,255,0.08);
}
.ticker-item:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.05);
}
.ticker-date {
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    font-weight: 500;
    min-width: 42px;
}
.ticker-teams {
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}
.ticker-score {
    font-weight: 700;
    color: var(--blue-300);
    font-size: 14px;
    min-width: 36px;
    text-align: center;
}
.ticker-status {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}
.ticker-status.live {
    background: rgba(239,68,68,0.2);
    color: #fca5a5;
    animation: ticker-pulse 1.5s ease-in-out infinite;
}
.ticker-status.scheduled {
    background: rgba(79,108,177,0.2);
    color: var(--blue-300);
}
.ticker-separator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    flex-shrink: 0;
}
@keyframes ticker-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@media (max-width: 480px) {
    .hero-match-teams { flex-direction: row; gap: 8px; }
    .hero-match-vs { font-size: 18px; }
    .hero-match-team-name { font-size: 14px; }
    .hero-inner { padding: 0 var(--space-md); }
    .hero-content p { display: none; }
    /* Команды в карточке матча остаются в строку, как на широких экранах,
       но элементы внутри ужимаются, чтобы влезать в ширину телефона */
    .match-card-teams { flex-direction: row; gap: 6px; }
    .match-score {
        font-size: 22px;
        min-width: 54px;
        letter-spacing: 1px;
    }
    .match-team-logo { width: 40px; height: 40px; }
    .match-team-logo img { width: 26px; height: 26px; }
    .match-team-name { font-size: 11px; }
    .hero-stat-value { font-size: 32px; }
    .container { padding: 0 var(--space-md); }
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Ratings ---------- */
.rating-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    border-radius: 12px;
    cursor: pointer;
}
.rating-row:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    background: var(--gray-50);
    z-index: 1;
}
.rating-row:active {
    transform: scale(1.01);
}

/* ---------- Match Lineup ---------- */
.lineup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto 1fr auto;
    gap: 0 32px;
}

.lineup-col {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 4;
}

.lineup-main {
    display: grid;
    grid-auto-rows: 1fr;
    gap: 0;
}

.lineup-main > .mp-player {
    align-self: center;
}

.lineup-subs {
    display: flex;
    flex-direction: column;
}

.lineup-team-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.lineup-trainer {
    font-size: 12px;
    color: var(--gray-400);
    min-height: 36px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.mp-player {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
}

.mp-player:last-child {
    border-bottom: none;
}

.mp-player-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--blue-50);
    color: var(--blue-600);
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.mp-player-name {
    flex: 1;
    color: var(--gray-800);
    font-weight: 500;
}

.mp-player-pos {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mp-event {
    font-size: 11px;
    color: var(--gray-400);
    margin-left: 4px;
    white-space: nowrap;
}

.mp-subs-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 16px;
    margin-bottom: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

.mp-sub {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
}

.mp-sub-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-600);
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
}

.mp-sub-name {
    color: var(--gray-600);
}

.mp-sub-pos {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: auto;
}

/* =============================================
   Extracted inline styles
   ============================================= */

/* Hero match info rows */
.hero-match-info { line-height: 1.5; }
/* Каждая строка (турнир, дата, место) всегда занимает одну строку,
   иначе при смене матча высота блока скачет */
.hero-match-info > div { min-height: 1.5em; }
/* строки информации тоже всегда в одну строку — на узком экране
   длинное название турнира иначе даёт перенос и скачок высоты */
.hero-match-info > div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hero-match-info > div + div { margin-top: 4px; }
.hero-match-info .hero-match-venue { opacity: 0.7; }

/* Section variants */
.section--white { background: var(--white); }

/* Standings */
.standings-subtitle {
    font-size: 16px;
    margin-bottom: var(--space-md);
    color: var(--gray-600);
}
.standings-table-wrap { margin-bottom: var(--space-xl); }
.standings-logo { height: 24px; width: 24px; object-fit: contain; vertical-align: middle; }
.standings-logo-fallback { display:inline-flex; align-items:center; justify-content:center; height:24px; width:24px; border-radius:4px; background:var(--gray-100); color:var(--gray-500); font-size:12px; font-weight:700; }
.standings-table .logo-cell { width: 32px; min-width: 32px; text-align: center; padding-left: 4px; padding-right: 4px; }
.standings-table-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
}
.standings-table-head .standings-subtitle { margin-bottom: var(--space-md); }
.standings-head-right {
    display: flex;
    align-items: baseline;
    gap: var(--space-md);
    flex-wrap: wrap;
}
.standings-range {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-400);
    white-space: nowrap;
}
.standings-full-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--blue-500);
    text-decoration: none;
    white-space: nowrap;
}
.standings-full-link:hover { text-decoration: underline; }

/* Несколько турниров на главной: таблицы в один ряд на широком экране */
.standings-groups { display: grid; gap: var(--space-lg); }
/* min-width: 0 обязателен — иначе колонка грида растягивается под
   min-width таблицы (580px), таблица вылезает за экран и скроллится вся страница.
   Горизонтальная прокрутка остаётся внутри .standings-table-wrap. */
.standings-group { min-width: 0; }
@media (min-width: 1100px) {
    .standings-groups {
        grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
        align-items: start;
    }
    .standings-groups .standings-table { min-width: 0; }
    .standings-groups .standings-table-wrap { margin-bottom: 0; }
    .standings-groups .standings-table td,
    .standings-groups .standings-table th { padding: 9px 10px; }
}

/* Строка нашей команды */
.standings-table .dynamo-row td {
    background: var(--blue-50);
    border-bottom-color: var(--blue-100);
}
.standings-table .dynamo-row td:first-child {
    box-shadow: inset 3px 0 0 var(--blue-500);
}
.standings-table .dynamo-row .team-name { font-weight: 800; }
.standings-table .dynamo-row:hover td { background: var(--blue-100); }

/* Leaders grid */
.leaders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: var(--space-lg);
}
.leader-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: var(--space-lg);
    min-width: 240px;
}
.leader-category-link {
    text-decoration: none;
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-md);
}
.leader-row:not(:last-child) { border-bottom: 1px solid var(--gray-100); }

/* Match card as link */
.match-card[href] {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Footer social links */
.footer-social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}
.footer-social-link:hover { color: #e2e8f0; }

/* Cookie banner */
.cookie-banner {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgb(30, 41, 59);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 24px;
    z-index: 200;
    box-shadow: rgba(0, 0, 0, 0.3) 0 -4px 20px;
}
.cookie-banner-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.cookie-banner-text {
    flex: 1;
    min-width: 200px;
}
.cookie-banner-text p {
    color: #e2e8f0;
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}
.cookie-banner-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #4f6cb1, #3d5a99);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-in {
    animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.animate-in:nth-child(1) { animation-delay: 0ms; }
.animate-in:nth-child(2) { animation-delay: 60ms; }
.animate-in:nth-child(3) { animation-delay: 120ms; }
.animate-in:nth-child(4) { animation-delay: 180ms; }
.animate-in:nth-child(5) { animation-delay: 240ms; }
.animate-in:nth-child(6) { animation-delay: 300ms; }
.animate-in:nth-child(7) { animation-delay: 360ms; }
.animate-in:nth-child(8) { animation-delay: 420ms; }
.animate-in:nth-child(9) { animation-delay: 480ms; }

/* =============================================
   Gallery
   ============================================= */
.gallery-search-bar {
    margin-bottom: var(--space-xl);
}
.gallery-search-input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    font-size: 16px;
    background: var(--white);
    color: var(--gray-800);
    outline: none;
    transition: border-color var(--transition);
}
.gallery-search-input:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.gallery-albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

/* Альбом к матчу обычно один. auto-fill держит пустые колонки и карточка
   остаётся узкой полосой, поэтому на узких экранах включаем auto-fit:
   пустые колонки схлопываются и карточка занимает всю ширину.
   Селектор с двумя классами — чтобы не зависеть от порядка правил. */
@media (max-width: 1024px) {
    .gallery-albums-grid.gallery-albums-grid--match {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

.album-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}
.album-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}
.album-card-cover {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: var(--gray-100);
}
.album-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.album-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--gray-300);
}
.album-card-body {
    padding: var(--space-md) var(--space-lg);
}
.album-card-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--gray-800);
}
.album-card-meta {
    font-size: 13px;
    color: var(--gray-500);
}
.album-card-match {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--blue-600);
}
.album-match-link {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--blue-600);
    background: rgba(49, 73, 128, .08);
    border-radius: 20px;
    text-decoration: none;
}
.album-match-link:hover {
    background: rgba(49, 73, 128, .15);
}

.gallery-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 4px;
}

.gallery-photo-thumb {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    background: var(--gray-100);
}
.gallery-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}
.gallery-photo-thumb:hover img {
    transform: scale(1.05);
}
.gallery-photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 24px 10px 8px;
    color: #fff;
}
.gallery-photo-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gallery-photo-date,
.gallery-photo-meta {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 2px;
}
.gallery-loader {
    padding: var(--space-xl) 0;
    text-align: center;
}

/* ---------- Заглушки на время загрузки фото ----------
   Пока картинка не отрисовалась, под ней видно бегущую полосу.
   Слой с z-index: -1 лежит под содержимым, поэтому загруженное фото
   просто перекрывает его, а подпись поверх снимка не перекрывается. */
.gallery-photo-thumb,
.album-card-cover { background: var(--gray-200); }
.gallery-photo-thumb::after,
.album-card-cover::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -50%;
    width: 50%;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65), transparent);
    animation: ph-shimmer 1.4s ease-in-out infinite;
}
@keyframes ph-shimmer {
    from { transform: translateX(0); }
    to   { transform: translateX(300%); }
}
/* Фото загрузилось — мерцание больше не нужно, останавливаем анимацию */
.gallery-photo-thumb.is-loaded::after,
.album-card-cover.is-loaded::after { animation: none; }
@media (prefers-reduced-motion: reduce) {
    .gallery-photo-thumb::after,
    .album-card-cover::after { animation: none; background: none; }
}
/* Крутилка рядом с текстом «Загрузка...» */
.gallery-loader .loading { gap: 10px; }
.gallery-loader .loading::before {
    content: '';
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border: 2px solid var(--gray-200);
    border-top-color: var(--blue-500);
    border-radius: 50%;
    animation: ph-spin 0.7s linear infinite;
}
@keyframes ph-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .gallery-loader .loading::before { animation: none; }
}

/* Lightbox */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.lightbox-overlay.active {
    display: flex;
}
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
}
.lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Пока грузится полноразмерное фото — крутилка по центру */
.lightbox-content.is-loading::after {
    content: '';
    position: absolute;
    width: 34px;
    height: 34px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ph-spin 0.7s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
    .lightbox-content.is-loading::after { animation: none; }
}
.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
    -webkit-user-drag: none;
    transition: opacity 0.15s ease;
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition);
    line-height: 1;
    padding: 8px;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition), background var(--transition);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; background: rgba(255,255,255,0.2); }
.lightbox-caption {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: var(--space-md);
    align-items: center;
    background: rgba(0,0,0,0.6);
    padding: 8px 20px;
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
}
.lightbox-title {
    font-weight: 600;
}
.lightbox-counter {
    opacity: 0.6;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
    .gallery-albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: var(--space-md);
    }
    .album-card-cover { height: 140px; }
    .gallery-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 3px;
    }
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Match embed — карточка матча в новостях (шорткод [match]) */
.match-embed {
    margin: var(--space-xl, 32px) 0;
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: var(--border-radius-lg, 12px);
    background: var(--white, #fff);
    overflow: hidden;
    font-size: 15px;
    line-height: 1.6;
    color: var(--gray-700, #334155);
}
.match-embed__head {
    padding: 14px 18px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: #fff;
    text-align: center;
}
.match-embed__tour { font-weight: 700; font-size: 14px; }
.match-embed__info { font-size: 12px; opacity: 0.75; margin-top: 2px; }
.match-embed__score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 18px 18px 6px;
}
.match-embed__team { flex: 1; font-weight: 700; font-size: 15px; }
.match-embed__team--home { text-align: right; }
.match-embed__team--away { text-align: left; }
.match-embed__scoreline {
    flex-shrink: 0;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #1e293b;
    white-space: nowrap;
}
.match-embed__pens { text-align: center; font-size: 12px; color: var(--gray-500, #64748b); }
.match-embed__status { text-align: center; font-size: 12px; color: var(--gray-400, #94a3b8); padding-bottom: 6px; }
.match-embed__block { padding: 12px 18px; border-top: 1px solid var(--gray-100, #f1f5f9); }
.match-embed__block-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-400, #94a3b8);
    margin-bottom: 6px;
}
.match-embed__row { padding: 2px 0; }
.match-embed__min {
    display: inline-block;
    min-width: 34px;
    color: var(--gray-400, #94a3b8);
    font-variant-numeric: tabular-nums;
}
.match-embed__side { color: var(--gray-400, #94a3b8); font-size: 13px; }
.match-embed__arrow { color: #16a34a; font-weight: 700; }
.match-embed__lineup { margin-bottom: 10px; }
.match-embed__lineup:last-child { margin-bottom: 0; }
.match-embed__lineup-team { font-weight: 700; color: #1e293b; }
.match-embed__lineup-trainer { font-size: 12px; color: var(--gray-400, #94a3b8); }
.match-embed__lineup-row { font-size: 14px; }
.match-embed__lineup-sub { font-size: 13px; color: var(--gray-500, #64748b); margin-top: 2px; }
.match-embed__lineup-sub span { color: var(--gray-400, #94a3b8); }
.match-embed__link {
    display: block;
    padding: 12px 18px;
    border-top: 1px solid var(--gray-100, #f1f5f9);
    text-align: center;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}
.match-embed__link:hover { background: var(--blue-50, #eff6ff); }

/* =============================================
   Admin Inline Editor (admin-editor.js)
   Виден только администраторам; стили нейтральны,
   чтобы не ломать светлую тему.
   ============================================= */
.fcdb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    background: var(--white);
    color: var(--gray-700);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.fcdb-btn:hover { border-color: var(--blue-300); color: var(--blue-600); background: var(--gray-50); }
.fcdb-btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.fcdb-btn--sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.fcdb-btn--primary {
    background: linear-gradient(145deg, var(--blue-600), var(--blue-700));
    border-color: transparent;
    color: var(--white);
}
.fcdb-btn--primary:hover { background: linear-gradient(145deg, var(--blue-500), var(--blue-600)); color: var(--white); }
.fcdb-btn--danger {
    background: var(--white);
    border-color: var(--red, #ef4444);
    color: var(--red-dark, #dc2626);
}
.fcdb-btn--danger:hover { background: var(--red, #ef4444); border-color: var(--red, #ef4444); color: var(--white); }

/* Toolbar (страница списка/детали) */
.fcdb-admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: var(--space-md);
}
.fcdb-admin-toolbar--right { justify-content: flex-end; }

/* На странице матча (.pp-hero) фон-подложка .pp-hero-bg абсолютный и перекрывает
   статичные элементы — панель обязана быть над ним (иначе не видна и не кликается) */
.pp-hero .fcdb-admin-toolbar,
.pp-hero-container .fcdb-admin-toolbar {
    position: relative;
    z-index: 10;
}

/* Обёртка карточек — сохраняет равную высоту в grid-контейнере */
.fcdb-admin-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.fcdb-admin-wrap > .news-card,
.fcdb-admin-wrap > .match-card { flex: 1 1 auto; }

.fcdb-admin-card-tools {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: var(--space-sm);
    opacity: 0;
    transition: opacity var(--transition);
}
.fcdb-admin-toolbar:hover ~ * .fcdb-admin-card-tools,
.fcdb-admin-card-tools:hover { opacity: 1; }
.fcdb-admin-wrap:hover .fcdb-admin-card-tools { opacity: 1; }
.fcdb-admin-wrap:focus-within .fcdb-admin-card-tools { opacity: 1; }
@media (hover: none) {
    .fcdb-admin-card-tools { opacity: 1; }
}

/* ---------- Modal ---------- */
.fcdb-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.fcdb-modal-overlay.open { display: flex; }
.fcdb-modal {
    width: 100%;
    max-width: 720px;
    max-height: calc(100vh - 32px);
    background: var(--white);
    border-radius: var(--border-radius-xl);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.fcdb-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 24px;
    background: linear-gradient(145deg, var(--blue-900) 0%, var(--blue-700) 100%);
    color: var(--white);
    flex-shrink: 0;
}
.fcdb-modal-head h3 {
    font-size: 17px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.2px;
}
.fcdb-modal-close {
    border: 0;
    background: rgba(255,255,255,0.12);
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition);
}
.fcdb-modal-close:hover { background: rgba(255,255,255,0.25); }
.fcdb-modal-body {
    padding: 24px;
    overflow-y: auto;
    color: var(--gray-800);
    flex: 1 1 auto;
    min-height: 0;
    overscroll-behavior: contain;
}
.fcdb-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 24px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* Toast */
.fcdb-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 3000;
    display: none;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    background: var(--blue-900);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.3);
}

/* ---------- Формы редактора ---------- */
.fcdb-field { margin-bottom: 16px; }
.fcdb-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gray-500);
    margin-bottom: 6px;
}
.fcdb-field input[type="text"],
.fcdb-field input[type="url"],
.fcdb-field input[type="date"],
.fcdb-field input[type="time"],
.fcdb-field input[type="number"],
.fcdb-field input[type="datetime-local"],
.fcdb-field select,
.fcdb-field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--gray-800);
    background: var(--white);
}
.fcdb-field input:focus,
.fcdb-field select:focus,
.fcdb-field textarea:focus {
    outline: none;
    border-color: var(--blue-400);
    box-shadow: 0 0 0 3px rgba(79, 108, 177, 0.15);
}
.fcdb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0 16px;
}
.fcdb-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600 !important;
    color: var(--gray-700) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    margin-right: 18px;
    cursor: pointer;
}
.fcdb-upload-hint { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.fcdb-upload-hint code { font-family: var(--font-mono); background: var(--gray-100); padding: 1px 5px; border-radius: 4px; }
.fcdb-img-preview { margin-top: 8px; }
.fcdb-img-preview img { max-width: 100%; max-height: 180px; border-radius: var(--border-radius); border: 1px solid var(--gray-200); }

/* Quill в модалке */
.fcdb-modal-body #fcdb-quill-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--white);
    box-shadow: 0 4px 10px -6px rgba(15, 23, 42, 0.25);
}
.fcdb-modal-body .ql-toolbar.ql-snow { border-color: var(--gray-200); border-radius: var(--border-radius) var(--border-radius) 0 0; }
.fcdb-modal-body .ql-container.ql-snow { border-color: var(--gray-200); border-radius: 0 0 var(--border-radius) var(--border-radius); min-height: 280px; }
.fcdb-modal-body .ql-editor { min-height: 280px; }

/* Судьи */
.fcdb-judge-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr auto;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}
.fcdb-judge-row input {
    padding: 7px 10px;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 13px;
    color: var(--gray-800);
    background: var(--white);
}
.fcdb-judge-row input:focus { outline: none; border-color: var(--blue-400); }
@media (max-width: 560px) {
    .fcdb-judge-row { grid-template-columns: 1fr 1fr; }
    .fcdb-btn--sm { padding: 4px 8px; }
}

/* =============================================
   Live broadcast popup
   ============================================= */
#fcdbLivePopup {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 400px;
    max-width: calc(100vw - 32px);
    z-index: 10000;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
    overflow: hidden;
    transform: translateY(24px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
#fcdbLivePopup.fcdb-live-show {
    transform: translateY(0);
    opacity: 1;
}
.fcdb-live-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-size: 13px;
}
.fcdb-live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    flex: none;
    animation: fcdbLivePulse 1.2s infinite;
}
@keyframes fcdbLivePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}
.fcdb-live-title {
    font-weight: 700;
    color: var(--gray-800);
    white-space: nowrap;
}
.fcdb-live-score {
    flex: 1;
    min-width: 0;
    text-align: right;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fcdb-live-close {
    flex: none;
    border: none;
    background: transparent;
    color: var(--gray-500);
    font-size: 15px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    margin-left: 2px;
}
.fcdb-live-close:hover { color: var(--gray-800); }
.fcdb-live-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
    background: #000;
}
.fcdb-live-link {
    display: block;
    padding: 20px 16px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    color: var(--blue-600);
    text-decoration: none;
    background: var(--blue-50);
}
.fcdb-live-more {
    display: block;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    background: var(--blue-600);
    text-align: center;
    text-decoration: none;
}
.fcdb-live-more:hover { background: var(--blue-700); }
.fcdb-live-resize {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
    z-index: 3;
    opacity: 0.45;
    border-bottom-right-radius: var(--border-radius);
    background: linear-gradient(135deg, transparent 0 50%, rgba(71,85,105,0.75) 50% 60%, transparent 60% 70%, rgba(71,85,105,0.75) 70% 80%, transparent 80%);
}
body.fcdb-resizing { cursor: nwse-resize; user-select: none; }
body.fcdb-resizing iframe { pointer-events: none; }
.fcdb-live-resize:hover { opacity: 1; }

/* =============================================
   Video.js (бренд «Динамо-Барнаул»)
   Только для своих видео, не трогаем hero/iframe
   ============================================= */
.vjs-dynamo-theme {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px -6px rgba(15, 23, 42, 0.25);
    background: #000;
}

.vjs-dynamo-theme .video-js {
    background: #000;
}

.vjs-dynamo-theme .vjs-control-bar {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    height: 3.25em;
    padding: 0 4px;
}

.vjs-dynamo-theme .vjs-play-progress,
.vjs-dynamo-theme .vjs-volume-level {
    background: var(--blue-500);
}

.vjs-dynamo-theme .vjs-big-play-button {
    border: none;
    background: var(--blue-500);
    border-radius: 999px;
    width: 70px;
    height: 70px;
    line-height: 70px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 10px 40px -12px rgba(79, 108, 177, 0.9);
    transition: all var(--transition);
}

.vjs-dynamo-theme .vjs-big-play-button:hover,
.vjs-dynamo-theme .vjs-big-play-button:focus {
    background: var(--blue-600);
    box-shadow: 0 12px 48px -10px rgba(79, 108, 177, 0.95);
}

.vjs-dynamo-theme .vjs-big-play-button .vjs-icon-placeholder::before {
    font-size: 40px;
    line-height: 70px;
}

.vjs-dynamo-theme .vjs-button:hover,
.vjs-dynamo-theme .vjs-button:focus {
    color: #fff;
}

.vjs-dynamo-theme .vjs-progress-control:hover .vjs-progress-holder {
    font-size: 1.15em;
}

.vjs-dynamo-theme .vjs-menu-button-popup .vjs-menu .vjs-menu-content {
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: calc(var(--border-radius) / 1.5);
}

.vjs-dynamo-theme .vjs-menu li.vjs-menu-item:focus,
.vjs-dynamo-theme .vjs-menu li.vjs-menu-item:hover {
    background: rgba(79, 108, 177, 0.5);
}

.vjs-dynamo-theme .vjs-menu li.vjs-selected,
.vjs-dynamo-theme .vjs-menu li.vjs-selected:focus,
.vjs-dynamo-theme .vjs-menu li.vjs-selected:hover {
    background: var(--blue-500);
    color: #fff;
}

@media (max-width: 640px) {
    #fcdbLivePopup {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
    }
    .fcdb-live-resize { display: none; }
}

/* ---------- Статистика клуба (адаптив) ---------- */
/* Широкие таблицы: на узком экране не сжимаем колонки в ноль, а даём
   таблице минимальную ширину и горизонтальную прокрутку внутри карточки.
   Раньше таблица «Дома vs В гостях» шла вообще без обёртки и её
   min-content растягивал всю страницу по горизонтали. */
.ts-wide {
    width: 100%;
    min-width: 460px;
    border-collapse: collapse;
}
.ts-wide th { white-space: nowrap; }
.ts-wide-md { min-width: 700px; }

/* История выступлений по турнирам */
.ts-hist {
    width: 100%;
    border-collapse: collapse;
}
.ts-hist th {
    padding: 8px;
    font-size: 12px;
    color: var(--gray-500);
    text-align: left;
}
.ts-hist th.ts-h-th-c { text-align: center; }
.ts-hist thead tr { border-bottom: 2px solid var(--gray-200); }
.ts-hist td { padding: 8px; }
.ts-hist .ts-h-row { border-bottom: 1px solid var(--gray-100); }
.ts-h-season { white-space: nowrap; color: var(--gray-600); }
.ts-h-tour { font-weight: 600; }
.ts-h-team { color: var(--gray-600); white-space: nowrap; }
.ts-h-num { text-align: center; }
.ts-h-won { color: #10b981; }
.ts-h-drawn { color: #eab308; }
.ts-h-lost { color: #ef4444; }
.ts-h-res { text-align: center; white-space: nowrap; }
.ts-h-fr { font-size: 10px; font-weight: 400; color: var(--gray-400); }

/* Самые крупные победы / поражения */
.ts-top {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
}
.ts-top:last-child { border-bottom: none; }
.ts-top-team { font-size: 11px; color: var(--gray-400); }
.ts-top-opp { font-weight: 600; }
.ts-top-venue { font-size: 12px; color: var(--gray-500); }
.ts-top-date { font-size: 12px; color: var(--gray-500); margin-left: auto; }
.ts-top-score { font-weight: 800; font-size: 16px; }

@media (max-width: 768px) {
    /* «История выступлений»: одна строка таблицы превращается в несколько
       строк текста — так на телефоне видно и турнир, и все цифры.
       Шапку прячем, подписи значений берём из data-label. */
    .ts-hist thead { display: none; }
    .ts-hist,
    .ts-hist tbody,
    .ts-hist td { display: block; }
    .ts-hist .ts-h-row {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        column-gap: 10px;
        padding: 10px 0;
    }
    .ts-hist td {
        padding: 0;
        font-size: 13px;
        line-height: 1.5;
    }
    /* Строка 1: сезон + турнир */
    .ts-hist .ts-h-season { order: 1; }
    .ts-hist .ts-h-tour { order: 2; flex: 1 1 60%; min-width: 0; }
    /* Строка 2: команда (только если в таблице их несколько) */
    .ts-hist .ts-h-team { order: 3; flex: 1 1 100%; white-space: normal; font-size: 12px; }
    /* Строка 3: матчи, В/Н/П и голы одной компактной строкой */
    .ts-hist .ts-h-num {
        order: 10;
        display: flex;
        align-items: baseline;
        gap: 3px;
    }
    .ts-hist .ts-h-num::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 400;
        color: var(--gray-400);
    }
    /* Строка 4: место / стадия */
    .ts-hist .ts-h-res { order: 20; flex: 1 1 100%; text-align: left; }

    /* Победы и поражения: две строки вместо одной тесной —
       первая соперник и счёт, вторая команда, площадка и дата */
    .ts-top { row-gap: 2px; }
    .ts-top-opp { order: 1; flex: 1 1 auto; min-width: 0; }
    .ts-top-score { order: 2; }
    .ts-top::before { content: ''; order: 3; flex-basis: 100%; height: 0; }
    .ts-top-team { order: 4; }
    .ts-top-venue { order: 5; }
    .ts-top-date { order: 6; }
}

/* Team stats collapsible sections */
.ts-details { border:1px solid var(--gray-200); border-radius:12px; padding:12px 16px; margin-bottom:16px; background:#fff; }
.ts-details-summary { cursor:pointer; font-weight:700; color:var(--gray-700); list-style:none; }
.ts-details-summary::-webkit-details-marker { display:none; }
.ts-details-summary::before { content:'⁜ '; color:var(--gray-400); }
.ts-details[open] .ts-details-summary::before { content:'※ '; }
.ts-details-body { }
