/* =========================================
   МАСИКИ — VERSION 0.8
   ========================================= */


/* =========================================
   01. ОСНОВНЫЕ ПЕРЕМЕННЫЕ
   ========================================= */

:root {
    --background: #071525;
    --surface: #0e2238;
    --surface-secondary: #162e49;

    --text-primary: #f5f7fa;
    --text-secondary: #94a8bf;

    --border: #29415b;

    --accent: #60a5fa;
    --accent-hover: #80baff;

    --success: #34c759;
    --danger: #ff3b30;

    --radius-small: 12px;
    --radius-medium: 20px;
    --radius-large: 28px;

    --shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    --shadow-menu: 0 12px 40px rgba(0, 0, 0, 0.12);

    --container-width: 1536px;
}


/* =========================================
   02. БАЗОВЫЕ СТИЛИ
   ========================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family: 'Inter', sans-serif;

    color: var(--text-primary);
    background: var(--background);

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

button:disabled {
    cursor: default;
    opacity: 0.5;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

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

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

h1,
h2,
h3,
p {
    margin: 0;
}

[hidden] {
    display: none !important;
}


/* =========================================
   03. ЭКРАН ЗАГРУЗКИ
   ========================================= */

.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--background);
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.loading-logo {
    font-size: 40px;
    font-weight: 900;
    letter-spacing: -2px;
}

.loading-spinner {
    width: 26px;
    height: 26px;

    border: 3px solid #dddddf;
    border-top-color: var(--text-primary);
    border-radius: 50%;

    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================
   04. ЭКРАН АВТОРИЗАЦИИ
   ========================================= */

.auth-screen {
    min-height: 100vh;
    min-height: 100dvh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 48px 24px;
}

.auth-container {
    width: 100%;
    max-width: 720px;

    text-align: center;
}

.auth-brand {
    margin-bottom: 48px;
}

.auth-brand .eyebrow {
    margin-bottom: 12px;
}

.auth-brand h1 {
    font-size: clamp(48px, 9vw, 76px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.065em;
}

.auth-brand > p:last-child {
    margin-top: 14px;

    font-size: 15px;
    color: var(--text-secondary);
}

.auth-heading {
    margin-bottom: 32px;
}

.auth-heading h2 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -1px;
}

.auth-heading p {
    margin-top: 8px;

    font-size: 15px;
    color: var(--text-secondary);
}

.auth-footer {
    margin-top: 48px;

    font-size: 12px;
    color: var(--text-secondary);
}


/* =========================================
   05. ВЫБОР УЧАСТНИКА
   ========================================= */

.player-selection {
    animation: fade-in 0.3s ease;
}

.auth-players-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.auth-player {
    width: calc((100% - 48px) / 5);
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;

    padding: 18px 6px;

    border: 1px solid transparent;
    border-radius: var(--radius-medium);

    background: transparent;
    color: var(--text-primary);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        border-color 0.2s ease;
}

@media (hover: hover) {
    .auth-player:hover {
        background: var(--surface);
        border-color: var(--border);
        transform: translateY(-3px);
    }
}

.auth-player:active {
    transform: scale(0.95);
}

.auth-player-avatar {
    width: 76px;
    height: 76px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-radius: 50%;
    background: #243f60;

    font-size: 24px;
    font-weight: 600;
    letter-spacing: -1px;
    color: #b4c5d8;
}

.auth-player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-player-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    overflow-wrap: anywhere;
}


/* =========================================
   06. ЭКРАН ВВОДА PIN-КОДА
   ========================================= */

.pin-screen {
    position: relative;

    width: 100%;
    max-width: 360px;

    margin: 0 auto;

    animation: fade-in 0.3s ease;
}

.auth-back-button {
    display: block;

    margin: 0 auto 24px 0;
    padding: 8px 0;

    border: none;
    background: transparent;

    font-size: 15px;
    font-weight: 500;
    color: var(--accent);
}

.selected-player {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.selected-player-avatar {
    width: 88px;
    height: 88px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 18px;
    overflow: hidden;

    border-radius: 50%;
    background: #243f60;

    font-size: 30px;
    font-weight: 600;
    color: #b4c5d8;
}

.selected-player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selected-player h2 {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.6px;
}

.selected-player p {
    margin-top: 8px;

    font-size: 14px;
    color: var(--text-secondary);
}


/* =========================================
   07. ИНДИКАТОРЫ PIN-КОДА
   ========================================= */

.pin-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;

    min-height: 20px;
    margin: 28px 0 36px;
}

.pin-dot {
    width: 13px;
    height: 13px;

    border: 1.5px solid var(--text-primary);
    border-radius: 50%;

    background: transparent;

    transition:
        background 0.12s ease,
        transform 0.12s ease;
}

.pin-dot.filled {
    background: var(--text-primary);
    transform: scale(1.05);
}

.pin-dots.error .pin-dot {
    border-color: var(--danger);
}

.pin-dots.error .pin-dot.filled {
    background: var(--danger);
}

.pin-dots.shake {
    animation: shake 0.4s ease;
}

.pin-error {
    margin: -20px 0 20px;

    font-size: 13px;
    font-weight: 500;
    color: var(--danger);
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    20%, 60% {
        transform: translateX(-9px);
    }

    40%, 80% {
        transform: translateX(9px);
    }
}


/* =========================================
   08. ЦИФРОВАЯ КЛАВИАТУРА
   ========================================= */

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 22px;

    width: 100%;
    max-width: 290px;

    margin: 0 auto;
}

.pin-key,
.pin-delete,
.pin-key-empty {
    width: 100%;
    aspect-ratio: 1;
}

.pin-key {
    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background: #243f60;
    color: var(--text-primary);

    font-size: 32px;
    font-weight: 400;

    user-select: none;
    touch-action: manipulation;

    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

@media (hover: hover) {
    .pin-key:hover {
        background: #304e70;
    }
}

.pin-key:active {
    background: #94a8bf;
    transform: scale(0.93);
}

.pin-delete {
    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background: transparent;
    color: var(--text-primary);

    touch-action: manipulation;

    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.pin-delete:active {
    background: #243f60;
    transform: scale(0.93);
}

.auth-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;

    margin-top: 24px;

    font-size: 13px;
    color: var(--text-secondary);
}


/* =========================================
   09. ШАПКА САЙТА
   ========================================= */

.header {
    position: sticky;
    top: 0;
    z-index: 100;

    border-bottom: 1px solid rgba(0, 0, 0, 0.06);

    background: rgba(7, 21, 37, 0.94);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-inner {
    position: relative;

    width: 100%;
    max-width: var(--container-width);

    height: 72px;
    margin: 0 auto;
    padding: 0 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-size: 23px;
    font-weight: 900;
    letter-spacing: -1.2px;
}

.icon-button {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background: transparent;
    color: var(--text-primary);

    transition: background 0.2s ease;
}

.icon-button:hover {
    background: var(--surface-secondary);
}

.burger {
    position: relative;

    width: 21px;
    height: 2px;

    border-radius: 2px;
    background: var(--text-primary);
}

.burger::before,
.burger::after {
    content: '';

    position: absolute;
    left: 0;

    width: 21px;
    height: 2px;

    border-radius: 2px;
    background: var(--text-primary);
}

.burger::before {
    top: -6px;
}

.burger::after {
    top: 6px;
}

.profile-icon {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-radius: 50%;
    background: #243f60;

    font-size: 12px;
    font-weight: 600;
    color: #b4c5d8;
}

.profile-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* =========================================
   10. НАВИГАЦИЯ
   ========================================= */

.navigation {
    position: absolute;
    top: 64px;
    left: 24px;

    display: flex;
    flex-direction: column;
    gap: 4px;

    width: 240px;
    padding: 8px;

    border: 1px solid var(--border);
    border-radius: 18px;

    background: var(--surface);
    box-shadow: var(--shadow-menu);

    animation: menu-in 0.2s ease;
}

.navigation button {
    width: 100%;
    padding: 14px 16px;

    border: none;
    border-radius: 10px;

    background: transparent;
    color: var(--text-primary);

    font-size: 14px;
    font-weight: 500;
    text-align: left;
}

.navigation button:hover,
.navigation button.active {
    background: var(--surface-secondary);
}


/* =========================================
   11. МЕНЮ АККАУНТА
   ========================================= */

.account-menu {
    position: absolute;
    top: 64px;
    right: 24px;

    width: 280px;
    padding: 16px;

    border: 1px solid var(--border);
    border-radius: var(--radius-medium);

    background: var(--surface);
    box-shadow: var(--shadow-menu);

    animation: menu-in 0.2s ease;
}

.account-info {
    display: flex;
    align-items: center;
    gap: 12px;

    padding-bottom: 16px;
    margin-bottom: 8px;

    border-bottom: 1px solid var(--border);
}

.account-avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-radius: 50%;
    background: #243f60;

    font-size: 15px;
    font-weight: 600;
    color: #b4c5d8;
}

.account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-info strong {
    font-size: 14px;
    font-weight: 600;
}

.account-info p {
    margin-top: 5px;

    font-size: 12px;
    color: var(--text-secondary);
}

.logout-button {
    width: 100%;
    padding: 12px;

    border: none;
    border-radius: 10px;

    background: transparent;
    color: var(--danger);

    font-size: 14px;
    font-weight: 500;
    text-align: left;
}

.logout-button:hover {
    background: #fff0ef;
}


/* =========================================
   12. ОСНОВНОЙ КОНТЕЙНЕР
   ========================================= */

#appScreen {
    min-height: 100vh;

    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: var(--container-width);

    flex: 1;

    margin: 0 auto;
    padding: 0 24px 64px;
}

.hero {
    padding: 64px 0 48px;
    text-align: center;
}

.eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.hero h1 {
    margin-top: 12px;

    font-size: clamp(48px, 8vw, 80px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.065em;
}

.subtitle {
    margin-top: 16px;

    font-size: 16px;
    color: var(--text-secondary);
}


/* =========================================
   13. СЕКЦИИ
   ========================================= */

.section {
    margin-bottom: 48px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-bottom: 20px;
}

.section-heading h2 {
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -0.8px;
}

.section-heading h3 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.small-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}


/* =========================================
   14. ПЕРЕКЛЮЧЕНИЕ НЕДЕЛЬ
   ========================================= */

.week-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.week-selector button {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border);
    border-radius: 50%;

    background: var(--surface);
    color: var(--text-primary);

    font-size: 22px;
}

.week-selector button:hover:not(:disabled) {
    background: var(--surface-secondary);
}

#weekLabel {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}


/* =========================================
   15. КАРТОЧКИ МАТЧЕЙ
   ========================================= */

.matches-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.match-card {
    position: relative;

    min-width: 0;
    min-height: 160px;

    padding: 16px 12px;

    border: 1px solid transparent;
    border-radius: var(--radius-medium);

    background: var(--surface);
    color: var(--text-primary);

    box-shadow: var(--shadow);

    cursor: pointer;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.match-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.match-card.active,
.match-card.selected {
    border-color: var(--accent);
}

.match-date,
.match-day,
.match-time {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

.match-teams {
    display: flex;
    flex-direction: column;
    gap: 10px;

    margin: 14px 0;
}

.match-team,
.team-row {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 12px;
    font-weight: 600;
}

.team-logo {
    width: 28px;
    height: 28px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    object-fit: contain;

    font-size: 11px;
    font-weight: 700;
}

.team-name {
    min-width: 0;
    flex: 1;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-score,
.team-score {
    margin-left: auto;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.match-status {
    font-size: 11px;
    color: var(--text-secondary);
}

.prediction-button,
.predict-button {
    width: 100%;
    padding: 9px 6px;
    margin-top: 10px;

    border: none;
    border-radius: 9px;

    background: var(--surface-secondary);
    color: var(--accent);

    font-size: 11px;
    font-weight: 600;
}

.prediction-button:hover,
.predict-button:hover {
    background: #203e60;
}


/* =========================================
   16. MATCHDAY
   ========================================= */

.matchday-banner {
    position: relative;

    display: flex;
    align-items: stretch;

    min-height: 280px;

    overflow: hidden;

    border-radius: var(--radius-large);
    background: var(--surface);

    box-shadow: var(--shadow);
}

.matchday-team,
.matchday-side {
    position: relative;

    flex: 1;
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;

    padding: 36px 24px;

    color: #ffffff;
    text-align: center;
}

.matchday-team img,
.matchday-side img,
.matchday-logo {
    width: 110px;
    height: 110px;

    object-fit: contain;
}

.matchday-team h3,
.matchday-side h3 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.8px;
}

.matchday-team p,
.matchday-side p {
    font-size: 13px;
    opacity: 0.8;
}

.matchday-center {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 16px 24px;

    border-radius: 18px;

    background: rgba(0, 0, 0, 0.25);
    color: #ffffff;

    backdrop-filter: blur(12px);
}

.matchday-score {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: -2px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.matchday-status {
    margin-top: 6px;

    font-size: 11px;
    font-weight: 500;
}


/* =========================================
   17. ПРОГНОЗЫ УЧАСТНИКОВ
   ========================================= */

.predictions-section {
    margin-top: 32px;
}

.predictions-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.prediction-card,
.player-card {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    min-width: 0;
    padding: 18px 12px;

    overflow: hidden;

    border: 1px solid transparent;
    border-radius: var(--radius-medium);

    background: var(--surface);
    box-shadow: var(--shadow);

    text-align: center;
}

.player-name,
.prediction-name {
    font-size: 12px;
    font-weight: 600;
}

.player-avatar,
.prediction-avatar,
.avatar {
    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-radius: 50%;
    background: #243f60;

    font-size: 18px;
    font-weight: 600;
    color: #b4c5d8;
}

.player-avatar img,
.prediction-avatar img,
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prediction-score {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
}

.prediction-points,
.points-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 5px 10px;

    border-radius: 20px;

    background: var(--surface-secondary);

    font-size: 11px;
    font-weight: 600;
}

.prediction-card.exact,
.player-card.exact {
    border-color: var(--success);
}

.prediction-points.correct,
.points-badge.correct {
    background: #e7f7eb;
    color: #248a3d;
}

.prediction-card.locked {
    color: var(--text-secondary);
}

.prediction-team-logo,
.angled-logo {
    position: absolute;
    top: 8px;
    right: 8px;

    width: 32px;
    height: 32px;

    object-fit: contain;
}


/* =========================================
   18. ДОПОЛНИТЕЛЬНЫЕ СТРАНИЦЫ
   ========================================= */

.page-title {
    margin: 48px 0 28px;

    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1.5px;
}

.empty-state {
    padding: 64px 24px;

    border-radius: var(--radius-large);

    background: var(--surface);
    color: var(--text-secondary);

    font-size: 15px;
    text-align: center;
}


/* =========================================
   19. МОДАЛЬНЫЕ ОКНА
   ========================================= */

.modal {
    position: fixed;

    width: calc(100% - 40px);
    max-width: 420px;

    padding: 32px;

    border: none;
    border-radius: 24px;

    background: var(--surface);
    color: var(--text-primary);

    box-shadow: var(--shadow-menu);
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.35);

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal h2 {
    padding-right: 20px;

    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.6px;
}

.modal p {
    margin: 16px 0 24px;

    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;

    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background: var(--surface-secondary);
    color: var(--text-secondary);

    font-size: 23px;
}

.primary-button {
    width: 100%;
    padding: 13px 20px;

    border: none;
    border-radius: 12px;

    background: var(--accent);
    color: #ffffff;

    font-size: 14px;
    font-weight: 600;
}

.primary-button:hover {
    background: var(--accent-hover);
}


/* =========================================
   20. ПОДВАЛ САЙТА
   ========================================= */

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    width: 100%;
    max-width: var(--container-width);

    margin: 0 auto;
    padding: 24px;

    border-top: 1px solid var(--border);

    font-size: 12px;
    color: var(--text-secondary);
}


/* =========================================
   21. АНИМАЦИИ
   ========================================= */

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes menu-in {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================================
   22. АДАПТАЦИЯ — ПЛАНШЕТЫ
   ========================================= */

@media (max-width: 1100px) {

    .matches-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .predictions-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

}

@media (max-width: 768px) {

    .container {
        padding-right: 20px;
        padding-left: 20px;
    }

    .header-inner {
        height: 64px;
        padding: 0 20px;
    }

    .hero {
        padding: 48px 0 36px;
    }

    .matches-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .predictions-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .matchday-banner {
        min-height: 240px;
    }

    .matchday-team,
    .matchday-side {
        padding: 24px 16px;
    }

    .matchday-team img,
    .matchday-side img,
    .matchday-logo {
        width: 85px;
        height: 85px;
    }

    .matchday-team h3,
    .matchday-side h3 {
        font-size: 18px;
    }

    .navigation {
        left: 20px;
        top: 58px;
    }

    .account-menu {
        right: 20px;
        top: 58px;
    }

}


/* =========================================
   23. АДАПТАЦИЯ — СМАРТФОНЫ
   ========================================= */

@media (max-width: 480px) {

    .auth-screen {
        padding: 32px 16px;
    }

    .auth-brand {
        margin-bottom: 32px;
    }

    .auth-brand h1 {
        font-size: 52px;
    }

    .auth-brand > p:last-child {
        font-size: 13px;
    }

    .auth-heading {
        margin-bottom: 20px;
    }

    .auth-heading h2 {
        font-size: 24px;
    }

    .auth-heading p {
        font-size: 13px;
    }

    .auth-players-grid {
        gap: 4px;
    }

    .auth-player {
        width: calc((100% - 12px) / 4);
        padding: 12px 4px;
        gap: 8px;
    }

    .auth-player-avatar {
        width: 58px;
        height: 58px;
        font-size: 19px;
    }

    .auth-player-name {
        font-size: 11px;
    }

    .auth-footer {
        margin-top: 28px;
    }

    .selected-player-avatar {
        width: 72px;
        height: 72px;
        font-size: 24px;
    }

    .pin-keypad {
        max-width: 250px;
        gap: 12px 18px;
    }

    .pin-key {
        font-size: 29px;
    }

    .pin-dots {
        gap: 13px;
        margin: 24px 0 28px;
    }

    .pin-dot {
        width: 12px;
        height: 12px;
    }

    .container {
        padding-right: 16px;
        padding-left: 16px;
        padding-bottom: 40px;
    }

    .header-inner {
        height: 60px;
        padding: 0 16px;
    }

    .brand {
        font-size: 21px;
    }

    .hero {
        padding: 36px 0 32px;
    }

    .hero h1 {
        font-size: 52px;
    }

    .subtitle {
        font-size: 13px;
    }

    .section {
        margin-bottom: 32px;
    }

    .section-heading {
        flex-wrap: wrap;
        margin-bottom: 16px;
    }

    .section-heading h2 {
        font-size: 21px;
    }

    .section-heading h3 {
        font-size: 18px;
    }

    .matches-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .match-card {
        min-height: 145px;
        padding: 14px 10px;
        border-radius: 16px;
    }

    .predictions-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .prediction-card,
    .player-card {
        padding: 14px 6px;
        border-radius: 16px;
    }

    .player-avatar,
    .prediction-avatar,
    .avatar {
        width: 46px;
        height: 46px;
        font-size: 15px;
    }

    .prediction-score {
        font-size: 21px;
    }

    .player-name,
    .prediction-name {
        font-size: 11px;
    }

    .matchday-banner {
        min-height: 200px;
        border-radius: 20px;
    }

    .matchday-team,
    .matchday-side {
        padding: 20px 10px;
    }

    .matchday-team img,
    .matchday-side img,
    .matchday-logo {
        width: 65px;
        height: 65px;
    }

    .matchday-team h3,
    .matchday-side h3 {
        font-size: 14px;
    }

    .matchday-center {
        padding: 10px 14px;
        border-radius: 12px;
    }

    .matchday-score {
        font-size: 26px;
    }

    .navigation {
        top: 54px;
        left: 16px;
    }

    .account-menu {
        top: 54px;
        right: 16px;
        width: min(280px, calc(100vw - 32px));
    }

    .page-title {
        margin-top: 32px;
        font-size: 28px;
    }

    .footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

}


/* =========================================
   24. ДОСТУПНОСТЬ
   ========================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

}

/* =========================================
   MATCHDAY — КОНТРАСТНОСТЬ
   ========================================= */

.matchday-center {
    background: #172333;
    color: #ffffff;
}

.matchday-team p {
    opacity: 1;
}

/* =========================================
   20. МОДАЛЬНОЕ ОКНО ПРОГНОЗИРОВАНИЯ
   ========================================= */

.prediction-modal {

    position: fixed;

    width: calc(100% - 32px);
    max-width: 420px;

    max-height: calc(100dvh - 32px);
    overflow-y: auto;

    padding: 36px 28px;

    border: none;
    border-radius: 28px;

    background: #0e2238;
    color: #f5f7fa;

    text-align: center;

    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);

}

.prediction-modal::backdrop {

    background: rgba(0, 0, 0, 0.4);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

}

.prediction-modal[open] {

    animation: prediction-appear 0.2s ease;

}

@keyframes prediction-appear {

    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}

.prediction-modal h2 {

    font-size: 26px;
    font-weight: 800;
    letter-spacing: -1px;

}

.prediction-close {

    position: absolute;

    top: 14px;
    right: 14px;

    width: 32px;
    height: 32px;

    border: none;
    border-radius: 50%;

    background: #162e49;
    color: #94a8bf;

    font-size: 24px;
    line-height: 1;

}

.prediction-close:hover {

    background: #29415b;

}

.prediction-date {

    margin-top: 10px;

    font-size: 13px;
    color: #94a8bf;

}

.prediction-matchup {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 24px;

    margin-top: 30px;

}

.prediction-club {

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 12px;

    min-width: 0;

}

.prediction-club-logo {

    width: 88px;
    height: 88px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 22px;

    font-size: 26px;
    font-weight: 800;

}

.prediction-club span {

    font-size: 15px;
    font-weight: 600;

    overflow-wrap: anywhere;

}

.prediction-score-inputs {

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 18px;

    margin-top: 24px;

}

.prediction-score-inputs input {

    width: 100px;
    min-width: 0;

    height: 84px;

    padding: 8px;

    border: 2px solid transparent;
    border-radius: 18px;

    background: #071525;
    color: #f5f7fa;

    font-family: inherit;
    font-size: 42px;
    font-weight: 800;

    text-align: center;

    outline: none;

    transition:
        border-color 0.2s ease,
        background 0.2s ease;

}

.prediction-score-inputs input:focus {

    border-color: #60a5fa;
    background: #0e2238;

}

.prediction-score-inputs input::placeholder {

    color: #94a8bf;

}

.prediction-colon {

    font-size: 32px;
    font-weight: 700;

    color: #94a8bf;

}

.prediction-message {

    min-height: 38px;

    margin-top: 18px;

    font-size: 13px;
    line-height: 1.5;

    color: #94a8bf;

}

.prediction-message.error {

    color: #ff3b30;

}

.prediction-save {

    width: 100%;

    min-height: 50px;

    border-radius: 14px;

    font-size: 15px;
    font-weight: 600;

}

.prediction-save:disabled {

    opacity: 0.4;
    cursor: default;

}

.prediction-hint {

    margin-top: 14px;

    font-size: 11px;
    line-height: 1.5;

    color: #94a8bf;

}

@media (max-width: 380px) {

    .prediction-modal {

        padding: 32px 18px;

    }

    .prediction-score-inputs input {

        width: 85px;
        height: 74px;

        font-size: 36px;

    }

    .prediction-club-logo {

        width: 76px;
        height: 76px;

    }

}
/* 24. ОЧКИ ЗА ЗАВЕРШЁННЫЙ МАТЧ */
.prediction-points.points-4 { background: #d9f5df; color: #187b35; }
.prediction-points.points-1 { background: #e0ecff; color: #1762c4; }
.prediction-points.points-0 { background: var(--surface-secondary); color: #b4c5d8; }
.prediction-points.points-4,
.prediction-points.points-1,
.prediction-points.points-0 { min-width: 44px; font-size: 13px; font-weight: 700; }

/* v0.7 — клубные акценты и таблицы */
.auth-brand { background: #003B71; color:white; padding:32px 16px; border-radius:var(--radius-large); }
.auth-brand .eyebrow,.auth-brand > p:last-child {color: #d5e0ee;}
.auth-brand h1::after {content:'';display:block;width:42px;height:4px;background: #E30613;border-radius:4px;margin:16px auto 0;}
.auth-player-avatar,.selected-player-avatar,.standing-avatar {background: #243f60;color: #003B71;}
.navigation button.active {color: #003B71;box-shadow:inset 3px 0 #E30613;}
.standings-selector {display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 20px;font-size:14px;}
.standings-selector select {font:inherit;padding:10px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text-primary);max-width:100%;}
.standings-wrap {overflow-x:auto;background:var(--surface);border-radius:var(--radius-medium);box-shadow:var(--shadow);}
.league-table {width:100%;border-collapse:collapse;font-size:14px;font-variant-numeric:tabular-nums;white-space:nowrap;}
.league-table th,.league-table td {padding:12px 10px;text-align:center;border-bottom:1px solid var(--border);}
.league-table th {color:var(--text-secondary);font-size:12px;}
.league-table th:nth-child(2),.league-table td:nth-child(2) {text-align:left;}
.league-table tr:last-child td {border-bottom:0;}
.standing-person {display:flex;align-items:center;gap:10px;}
.standing-avatar {width:32px;height:32px;border-radius:50%;display:grid;place-items:center;overflow:hidden;flex-shrink:0;font-size:11px;font-weight:600;}
.standing-avatar img {width:100%;height:100%;object-fit:cover;}
.own-standing {background: #162e49;}
.standing-total {font-weight:800;color: #003B71;}
.playoff-rank {color: #187b35;font-weight:700;}
.standing-points {display:inline-grid;place-items:center;min-width:28px;height:28px;border-radius:8px;font-weight:600;}
.standing-points.points-4 {background: #d9f5df;color: #187b35;}
.standing-points.points-1 {background: #e0ecff;color: #1762c4;}
.standing-points.points-0 {background: #162e49;color: #b4c5d8;}
.standing-points.points-pending {color: #94a8bf;}
.standings-note {padding:12px;color:var(--text-secondary);font-size:13px;}
@media(max-width:600px){.league-table th,.league-table td{padding:10px 7px;font-size:12px;}.standing-avatar{width:26px;height:26px;}.auth-brand{padding:24px 12px;}}

:root {color-scheme:dark;--shadow:none;--shadow-menu:0 12px 40px #0005;}
.navigation button.active,.standing-total {color:#90bfff;}
.auth-player-avatar,.selected-player-avatar,.standing-avatar {color:#d5e0ee;}
.playoff-rank {color:#34c759;}
.prediction-points.points-4,.standing-points.points-4 {background:#143d30;color:#75e39b;}
.prediction-points.points-1,.standing-points.points-1 {background:#193b61;color:#90bfff;}
.admin-card {background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:20px;margin:16px 0;display:grid;gap:12px;}
.admin-card h2 {margin:0;font-size:19px;}
.admin-fields {display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:12px;}
.admin-card label {display:grid;gap:6px;font-size:13px;color:var(--text-secondary);min-width:0;}
.admin-card input,.admin-card select,.admin-card button {font:inherit;min-width:0;padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--surface-secondary);color:var(--text-primary);}
.admin-card button {cursor:pointer;}
.admin-card button:hover {border-color:var(--accent);}
.admin-card pre {white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;}
.admin-row {display:grid;grid-template-columns:minmax(100px,1fr) 65px 65px auto;gap:8px;align-items:center;}
.admin-row input {width:100%;} .admin-message {white-space:pre-wrap;color:#90bfff;}
@media(max-width:480px){.admin-card{padding:12px}.admin-row{grid-template-columns:minmax(80px,1fr) 48px 48px auto;gap:4px}.admin-row input{padding:5px}}
/* v0.8.1 */
.prediction-button {height:48px;background:#173E68;color:#D5E5F7;}
.prediction-button.saved-prediction {display:flex;align-items:center;justify-content:space-between;gap:4px;background:#163B34;color:#E8FFF0;padding:6px 8px;opacity:1;}
.saved-label {font-size:11px;line-height:1.15;color:#A0D6B9;max-width:42px;text-align:left;white-space:normal;}
.saved-score {font-size:clamp(18px,2vw,26px);font-weight:600;letter-spacing:-1px;overflow-wrap:anywhere;}
.admin-card[hidden]{display:none!important}.admin-card{margin:10px 0;padding:16px;gap:12px}.admin-tabs,.admin-days{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.admin-days{grid-template-columns:repeat(7,minmax(0,1fr))}.admin-tabs button,.admin-days button{border:1px solid var(--border);background:var(--surface);color:var(--text-primary);border-radius:10px;padding:10px 4px;font:inherit;font-size:12px;cursor:pointer;min-width:0}.admin-tabs .active,.admin-days .active{background:#003B71;box-shadow:inset 0 -3px #E30613}.admin-days button{display:grid;gap:5px}.admin-days small{color:#B4C5D8}.admin-clubs,.admin-match-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-clubs label{padding:12px;border-radius:12px;color:white;text-shadow:0 1px 3px #000}.admin-club-logo{font-size:30px;font-weight:800;text-align:center;color:white;padding:10px 0}.admin-score{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:4px;align-items:center}.admin-score input{width:100%;text-align:center;padding:7px 2px;font-size:18px;font-weight:600}.admin-card>button{background:#E30613;color:white;font-weight:700;min-height:44px}.admin-player-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.admin-player-tile{background:var(--surface-secondary);border-radius:12px;padding:10px 6px;display:grid;justify-items:center;gap:8px;min-width:0}.admin-player-tile .standing-avatar{width:44px;height:44px}.admin-player-tile .player-name{font-size:12px;text-align:center}.admin-player-tile .admin-delete{color:#FCA5A5;font-size:11px;width:100%;padding:6px 2px}.admin-delete:disabled{opacity:.3;cursor:default}.admin-message{position:sticky;top:0;z-index:2;background:var(--surface);margin:0}.admin-message:empty{display:none}.admin-card input:disabled{opacity:.45}
@media(max-width:900px){.admin-player-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:600px){.admin-player-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-days{grid-template-columns:repeat(4,minmax(0,1fr))}.admin-card{padding:10px}.admin-fields{gap:8px}.admin-tabs button{font-size:11px}.weekly-table{table-layout:fixed;min-width:310px}.weekly-table th,.weekly-table td{padding:7px 1px;font-size:10px}.weekly-table th:first-child{width:18px}.weekly-table th:nth-child(2){width:83px}.weekly-table th:last-child{width:32px}.weekly-table .standing-avatar{display:none}.weekly-table .standing-points{min-width:0;width:20px;height:22px;border-radius:5px}.weekly-table .standing-person{gap:0}.season-table th,.season-table td{padding:8px 3px;font-size:11px}.season-table .standing-person{gap:4px}.season-table .standing-avatar{width:23px;height:23px}.season-table{min-width:300px}.saved-score{font-size:23px}}
/* v0.8.2 */
.mini-points {min-height:14px;text-align:center;margin-top:5px;line-height:14px;}
.prediction-button.saved-prediction.prediction-pending {background:#293747;color:#E2E8F0;}
.prediction-pending .saved-label {color:#A0AEBE;}
.prediction-button.saved-prediction.prediction-wrong {background:#49232D;color:#FFE4E6;}
.prediction-wrong .saved-label {color:#F2A0A7;}
.prediction-button.saved-prediction.prediction-exact {outline:1.5px solid #D4AF37;outline-offset:-1.5px;box-shadow:0 0 8px #d4af3733;}
.admin-card>button {background:#294B72;color:#F5F7FA;}
.admin-context .admin-fields {grid-template-columns:minmax(65px,1fr) minmax(0,2fr) 38px 38px;align-items:end;gap:6px;}
.admin-context select {width:100%;text-overflow:ellipsis;}
.admin-week-icon {height:38px;padding:0!important;font-size:20px!important;}
.admin-week-dialog {position:fixed;margin:auto;width:min(420px,calc(100% - 24px));max-height:90vh;overflow:auto;color:var(--text-primary);}
.admin-week-dialog:not([open]) {display:none;}
.admin-week-dialog::backdrop {background:#0009;}
.admin-dialog-error {color:#F2A0A7;font-size:13px;}
.standings-wrap {border-radius:4px;}
.standing-points,.weekly-table .standing-points {border-radius:2px;}
@media(max-width:600px){.weekly-table th,.weekly-table td{padding-inline:1px}.season-table th,.season-table td{padding-inline:2px}.admin-context .admin-fields{grid-template-columns:minmax(60px,1fr) minmax(0,2fr) 32px 32px;gap:4px}.admin-context select{padding:8px 3px;font-size:11px}.admin-week-icon{height:34px}.admin-context label{font-size:11px}}

/* v0.8.3 */
.admin-context .admin-fields {grid-template-columns:minmax(90px,1fr) minmax(0,2fr) auto auto;gap:8px;}
.admin-context .admin-week-add {background:#294B72;color:#F5F7FA;}
.admin-card .admin-week-delete {background:#49232D;color:#F2A0A7;}
.admin-week-add,.admin-week-delete {min-height:38px;white-space:nowrap;font-size:13px!important;}
.admin-week-delete:disabled {opacity:.4;cursor:default;}
.standings-wrap {border-radius:12px;padding-inline:10px;}
.standing-points,.weekly-table .standing-points {border-radius:6px;}
.league-table th,.league-table td {padding-inline:4px;}
@media(max-width:600px){
 .admin-context .admin-fields {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
 .admin-context .admin-week-add,.admin-context .admin-week-delete {white-space:normal;}
 .weekly-table {min-width:300px;}
 .weekly-table th,.weekly-table td {padding-inline:1px;}
 .weekly-table th:nth-child(2) {width:76px;}
 .weekly-table th:last-child {width:25px;}
 .weekly-table .standing-points {width:18px;height:22px;}
 .season-table th,.season-table td {padding-inline:2px;}
 .season-table {min-width:300px;}
}

/* v0.9 — artwork and regular-season zones */
#profileButton {display:grid;place-items:center;padding:0;}
#headerAvatar {width:36px;height:36px;min-width:36px;min-height:36px;aspect-ratio:1;flex:none;border-radius:50%;overflow:hidden;}
#headerAvatar img {width:100%;height:100%;object-fit:cover;display:block;}
.team-logo img,.matchday-logo img,.prediction-club-logo img,.admin-club-logo img,.admin-day-logo img,.admin-prediction-logo img,.prediction-team-logo img {width:100%;height:100%;object-fit:contain;display:block;}
.admin-club-logo {height:96px;width:96px;margin:auto;padding:0;display:grid;place-items:center;}
.admin-day-logos {display:flex;justify-content:center;gap:4px;align-items:center;}
.admin-day-logo {width:26px;height:26px;display:grid;place-items:center;font-size:10px;}
.admin-player-tile {position:relative;}
.admin-prediction-logo {position:absolute;top:30px;right:5px;width:26px;height:26px;font-size:10px;}
.prediction-team-logo {top:34px;right:5px;width:30px;height:30px;font-size:10px;pointer-events:none;}
.season-table .zone-top {background:#142F4D;}
.season-table .zone-bottom {background:#30232F;}
.season-table .zone-tied {background:#26354A;}
.season-table .zone-top td:first-child {color:#91B9E2;}
.season-table .zone-bottom td:first-child {color:#C08C95;}
.season-table tr:not(.zone-bottom)+.zone-bottom td {border-top:2px solid #92505A;}
.season-table .own-standing td {box-shadow:inset 0 1px #729AC4,inset 0 -1px #729AC4;}
.season-table .own-standing td:first-child {border-left:2px solid #729AC4;}
@media(max-width:600px){.admin-day-logo{width:20px;height:20px;}.prediction-team-logo{width:24px;height:24px;right:3px;}.admin-prediction-logo{width:22px;height:22px;right:3px;}}

/* v1.0 — larger club artwork, constrained by available space */
.team-logo {width:48px;height:48px;}
.matchday-logo {width:180px;height:auto;aspect-ratio:1;max-width:100%;flex-shrink:0;}
.matchday-team img,.matchday-side img {width:100%;height:100%;object-fit:contain;}
.prediction-card .player-avatar {width:86px;height:86px;max-width:100%;}
.prediction-team-logo {width:64px;height:64px;top:30px;right:2px;max-width:48%;}
.admin-club-logo {width:112px;height:112px;max-width:100%;}
.admin-day-logo {width:48px;height:48px;max-width:46%;}
.admin-player-tile .standing-avatar {width:74px;height:74px;max-width:100%;}
.admin-prediction-logo {width:56px;height:56px;top:26px;right:2px;max-width:46%;pointer-events:none;}
@media(max-width:600px){
 .team-logo {width:40px;height:40px;}
 .matchday-logo {width:112px;height:auto;max-width:100%;}
 .prediction-card .player-avatar {width:64px;height:64px;}
 .prediction-team-logo {width:48px;height:48px;top:26px;right:1px;}
 .admin-club-logo {width:80px;height:80px;}
 .admin-day-logo {width:40px;height:40px;}
 .admin-player-tile .standing-avatar {width:60px;height:60px;}
 .admin-prediction-logo {width:44px;height:44px;}
}

/* v1.0.2 — MATCHDAY: large artwork with reserved central score space */
.matchday-banner {min-height: 0;}
.matchday-banner > .matchday-team {padding: 16px 12px; gap: 8px;}
.matchday-banner > .matchday-team:first-child {padding-right: clamp(48px, 8vw, 100px);}
.matchday-banner > .matchday-team:nth-child(2) {padding-left: clamp(48px, 8vw, 100px);}
.matchday-banner .matchday-logo {width: min(432px, 32vw); max-width: 100%; height: auto; aspect-ratio: 1; flex: none;}
.matchday-banner .matchday-logo > img {width: 100%; height: 100%; object-fit: contain; display: block;}
.matchday-banner .matchday-team h3 {overflow-wrap: anywhere;}
@media (max-width: 600px) {
 .matchday-banner > .matchday-team {padding: 10px 6px 64px; gap: 5px;}
 .matchday-banner > .matchday-team:first-child {padding-right: 6px;}
 .matchday-banner > .matchday-team:nth-child(2) {padding-left: 6px;}
 .matchday-banner .matchday-logo {width: min(269px, 36vw); max-width: 100%;}
 .matchday-banner .matchday-center {top: auto; bottom: 8px; transform: translateX(-50%);}
 .matchday-banner .matchday-team h3 {font-size: 14px;}
}
