/* dotascore/static/css/Style.css - ОБЩИЕ СТИЛИ САЙТА */

:root {
    --font-body: 'Onest', system-ui, sans-serif;
    --font-display: 'Unbounded', 'Onest', system-ui, sans-serif;
    --ink: #eef2f7;
    --muted: #8b95a7;
    --hair: rgba(255, 255, 255, 0.08);
    --hair-strong: rgba(255, 255, 255, 0.16);
    --glass: rgba(12, 15, 22, 0.72);
    --core: #0a0d13;
    --cyan: #00d2ff;
    --emerald: #34d399;
    --ease: cubic-bezier(0.32, 0.72, 0, 1);
    --inner-light: inset 0 1px 1px rgba(255, 255, 255, 0.12);
    --shadow-soft: 0 30px 60px -30px rgba(0, 0, 0, 0.65);
}

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

body {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    background-color: #050505;
    background-image:
        radial-gradient(60vw 50vh at 10% 0%, rgba(0, 210, 255, 0.22), transparent 60%),
        radial-gradient(55vw 50vh at 100% 100%, rgba(52, 211, 153, 0.17), transparent 60%),
        linear-gradient(rgba(5, 5, 5, 0.5), rgba(5, 5, 5, 0.72)),
        url("../media/antimage.89154081c861.jpg");
    background-size: auto, auto, auto, cover;
    background-position: 0 0, 0 0, 0 0, center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
    pointer-events: none;
}

.header-nav-wrapper {
    display: flex;
    justify-content: center;
}

/* ИКОНКА ПРОФИЛЯ / КНОПКА ВХОДА */
.profile-icon-wrapper {
    position: absolute;
    top: 6px;
    pointer-events: auto;
    right: 40px;
    display: flex;
    align-items: center;
    transition: transform 0.8s var(--ease);
}

.profile-icon-link {
    text-decoration: none;
}

.profile-icon {
    width: 48px;
    height: 48px;
    padding: 3px;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--hair-strong);
    box-shadow: var(--inner-light);
    cursor: pointer;
    transition: transform 0.6s var(--ease), border-color 0.6s var(--ease), box-shadow 0.6s var(--ease);
}

.profile-icon:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 210, 255, 0.6);
    box-shadow: var(--inner-light), 0 0 28px -4px rgba(0, 210, 255, 0.5);
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-avatar-default {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
    font-weight: 700;
}

.login-button {
    padding: 11px 26px;
    background: linear-gradient(to bottom, #2fdcff, #00b8e6);
    color: #03121a;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 12px 28px -12px rgba(0, 210, 255, 0.7);
    transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 16px 34px -12px rgba(0, 210, 255, 0.9);
}

.login-button:active {
    transform: scale(0.98);
}

/* БАЗОВЫЙ nav (для страниц, где он используется без классов) */
nav {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
    padding: 5px;
    background: var(--glass);
    border: 1px solid var(--hair);
    border-radius: 22px;
    box-shadow: var(--inner-light), var(--shadow-soft);
}

/* КНОПКИ МЕНЮ */
.nav-button {
    flex: 1 1 0;
    max-width: 190px;
    white-space: nowrap;
    position: relative;
    padding: 12px 18px;
    background: transparent;
    color: var(--muted);
    border: none;
    border-radius: 999px;
    font: inherit;
    font-size: 0.78em;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background 0.6s var(--ease), color 0.6s var(--ease), box-shadow 0.6s var(--ease), transform 0.6s var(--ease);
}

.nav-button:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
}

.nav-button:active {
    transform: scale(0.98);
}

.nav-button.active {
    color: #ffffff;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
    box-shadow: var(--inner-light), 0 0 0 1px rgba(0, 210, 255, 0.28), 0 0 22px -6px rgba(0, 210, 255, 0.45);
}

.mobile-nav {
    display: none;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 20px 72px;
}

.leaderboard {
    width: 100%;
    max-width: 800px;
    padding: 36px;
    background: rgba(8, 10, 15, 0.78);
    border: 1px solid var(--hair);
    border-radius: 28px;
    box-shadow: var(--inner-light), var(--shadow-soft);
    overflow: hidden;
}

.update-date {
    white-space: nowrap;
    position: relative;
    width: 90%;
    margin: -20px auto 30px auto;
    color: #ff6b61;
    font-size: 0.8em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: marquee 15s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* СООБЩЕНИЯ */
.messages-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100001;
    max-width: 400px;
}

.message {
    padding: 14px 20px;
    margin-bottom: 10px;
    border-radius: 18px;
    color: #ffffff;
    background: rgba(12, 15, 22, 0.8);
    border: 1px solid var(--hair-strong);
    box-shadow: var(--inner-light), var(--shadow-soft);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    animation: slideIn 0.5s var(--ease), fadeOut 0.3s var(--ease) 4.7s forwards;
}

.message.success {
    background: rgba(52, 211, 153, 0.18);
    border-color: rgba(52, 211, 153, 0.5);
}

.message.error {
    background: rgba(248, 113, 113, 0.18);
    border-color: rgba(248, 113, 113, 0.5);
}

.message.info {
    background: rgba(0, 210, 255, 0.16);
    border-color: rgba(0, 210, 255, 0.5);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

/* ========================================================= */
/* НАВИГАЦИЯ ДЛЯ ПК: ВО ВСЮ ШИРИНУ, ПРИ ПРОКРУТКЕ СЖИМАЕТСЯ В ПИЛЮЛЮ */
/* ========================================================= */

.desktop-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    max-width: none;
    width: 100%;
}

.nav-row {
    display: flex;
    width: 100%;
    gap: 2px;
}

.nav-row-top {
    justify-content: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 10px 120px;
    pointer-events: auto;
    background: rgba(8, 10, 15, 0.72);
    border: 1px solid;
    border-color: transparent transparent var(--hair);
    border-radius: 0;
    box-shadow: var(--inner-light);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    transition:
        max-width 0.8s var(--ease),
        margin 0.8s var(--ease),
        padding 0.8s var(--ease),
        border-radius 0.8s var(--ease),
        border-color 0.8s var(--ease),
        box-shadow 0.8s var(--ease);
}

.nav-row-bottom {
    justify-content: center;
    gap: 8px;
    max-width: 820px;
    margin: 10px auto 6px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    pointer-events: auto;
    transition: opacity 0.5s var(--ease), transform 0.8s var(--ease), visibility 0s linear 0s;
}

.nav-row-bottom .nav-button {
    max-width: none;
    padding: 9px 16px;
    font-size: 0.72em;
    background: var(--glass);
    border: 1px solid var(--hair);
    box-shadow: var(--inner-light);
}

.nav-row-bottom .nav-button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.nav-row-bottom .nav-button.active {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
    box-shadow: var(--inner-light), 0 0 0 1px rgba(0, 210, 255, 0.28), 0 0 22px -6px rgba(0, 210, 255, 0.45);
}

@media (min-width: 601px) {
    header.is-scrolled .nav-row-top {
        max-width: 820px;
        margin-top: 10px;
        padding: 5px;
        border-color: var(--hair);
        border-radius: 999px;
        box-shadow: var(--inner-light), var(--shadow-soft);
    }

    header.is-scrolled .profile-icon-wrapper {
        transform: translateY(8px);
    }

    header.is-scrolled .nav-row-bottom {
        opacity: 0;
        transform: translateY(-8px);
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.5s var(--ease), transform 0.8s var(--ease), visibility 0s linear 0.5s;
    }
}

@media (min-width: 601px) and (max-width: 1000px) {
    .nav-row-top { padding-left: 80px; padding-right: 80px; }
    .nav-button { padding: 12px 8px; font-size: 0.7em; letter-spacing: 0.04em; }
}

/* ========================================================= */
/* АДАПТИВНОСТЬ: МОБИЛЬНЫЕ (ширина <= 600px) */
/* ========================================================= */
@media (max-width: 600px) {

    body {
        background-image:
            radial-gradient(60vw 50vh at 10% 0%, rgba(0, 210, 255, 0.22), transparent 60%),
            radial-gradient(55vw 50vh at 100% 100%, rgba(52, 211, 153, 0.17), transparent 60%),
            linear-gradient(rgba(5, 5, 5, 0.5), rgba(5, 5, 5, 0.72)),
            url("../media/dota_hero_dark.be04301f5b5a.webp");
    }

    .desktop-nav {
        display: none;
    }

    header {
        padding: 16px 20px 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        position: relative;
        z-index: auto;
        overflow: visible;
        pointer-events: auto;
    }

    .header-nav-wrapper {
        order: 1;
        width: 100%;
    }

    .profile-icon-wrapper {
        position: fixed;
        top: 10px;
        right: 20px;
        z-index: 100000;
    }

    .profile-icon {
        width: 42px;
        height: 42px;
        padding: 2px;
    }

    .profile-avatar-default {
        font-size: 17px;
    }

    .login-button {
        padding: 9px 20px;
        font-size: 12px;
    }

    main {
        padding: 14px 10px 48px;
        position: relative;
    }

    /* МОБИЛЬНАЯ НАВИГАЦИЯ */
    .mobile-nav {
        display: block;
        width: 87%;
        margin: 0 auto;
        position: relative;
        z-index: 99999;
        overflow: visible !important;
        transition: opacity 0.5s var(--ease);
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
    }

    .mobile-nav.hidden {
        opacity: 0;
        pointer-events: none;
    }

    nav {
        overflow: visible !important;
    }

    .mobile-menu-button {
        display: block;
        width: 100%;
        padding: 14px 20px;
        background: var(--glass);
        color: var(--ink);
        border: 1px solid var(--hair-strong);
        border-radius: 999px;
        font: inherit;
        font-size: 0.8em;
        font-weight: 600;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        cursor: pointer;
        box-shadow: var(--inner-light), var(--shadow-soft);
        transition: opacity 0.5s var(--ease), transform 0.6s var(--ease), border-color 0.6s var(--ease);
        position: relative;
        z-index: 101;
    }

    .mobile-menu-button:active {
        transform: scale(0.98);
    }

    .mobile-menu-button.menu-open {
        border-color: rgba(0, 210, 255, 0.4);
    }

    .mobile-menu-button.fade-out {
        opacity: 0;
        pointer-events: none;
    }

    /* ВЫПАДАЮЩЕЕ МЕНЮ */
    .mobile-menu-dropdown {
        position: absolute;
        top: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        width: 100%;
        padding: 6px;
        background: rgba(10, 13, 19, 0.97);
        border: 1px solid var(--hair-strong);
        border-radius: 24px;
        overflow: hidden;
        box-shadow: var(--inner-light), var(--shadow-soft);
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        z-index: 100;
        transition:
            max-height 0.5s var(--ease) 0.25s,
            opacity 0.3s var(--ease) 0.2s,
            transform 0.5s var(--ease) 0.15s,
            visibility 0s linear 0.75s;
    }

    .mobile-menu-dropdown.open {
        max-height: 560px;
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
        transition:
            max-height 0.6s var(--ease) 0s,
            opacity 0.4s var(--ease) 0s,
            transform 0.6s var(--ease) 0s,
            visibility 0s linear 0s;
    }

    .mobile-menu-dropdown .nav-button {
        display: block;
        max-width: none;
        margin: 0;
        padding: 14px 16px;
        background: transparent;
        color: var(--ink);
        border: none;
        border-radius: 18px;
        box-shadow: none;
        text-align: center;
        position: relative;
        z-index: 1002;
        opacity: 0;
        transform: translateY(12px);
        transition: opacity 0.5s var(--ease), transform 0.6s var(--ease), background 0.4s var(--ease);
    }

    .mobile-menu-dropdown .nav-button:nth-child(1) { transition-delay: 0.15s; }
    .mobile-menu-dropdown .nav-button:nth-child(2) { transition-delay: 0.1s; }
    .mobile-menu-dropdown .nav-button:nth-child(3) { transition-delay: 0.05s; }
    .mobile-menu-dropdown .nav-button:nth-child(n+4) { transition-delay: 0s; }

    .mobile-menu-dropdown.open .nav-button {
        opacity: 1;
        transform: translateY(0);
    }

    .mobile-menu-dropdown.open .nav-button:nth-child(1) { transition-delay: 0.05s; }
    .mobile-menu-dropdown.open .nav-button:nth-child(2) { transition-delay: 0.1s; }
    .mobile-menu-dropdown.open .nav-button:nth-child(3) { transition-delay: 0.15s; }
    .mobile-menu-dropdown.open .nav-button:nth-child(4) { transition-delay: 0.2s; }
    .mobile-menu-dropdown.open .nav-button:nth-child(5) { transition-delay: 0.25s; }
    .mobile-menu-dropdown.open .nav-button:nth-child(6) { transition-delay: 0.3s; }
    .mobile-menu-dropdown.open .nav-button:nth-child(7) { transition-delay: 0.35s; }
    .mobile-menu-dropdown.open .nav-button:nth-child(8) { transition-delay: 0.4s; }
    .mobile-menu-dropdown.open .nav-button:nth-child(9) { transition-delay: 0.45s; }

    .mobile-menu-dropdown .nav-button:hover {
        background: rgba(255, 255, 255, 0.06);
    }

    .mobile-menu-dropdown .nav-button.active {
        background: linear-gradient(to bottom, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
        box-shadow: var(--inner-light), 0 0 0 1px rgba(0, 210, 255, 0.28);
    }

    .leaderboard {
        margin-top: 0;
        padding: 20px;
        border-radius: 24px;
    }

    h1 {
        font-size: 2em;
    }

    .messages-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

.scroll-sentinel {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 60px;
    pointer-events: none;
}

/* ========================================================= */
/* ПЛАШКА ПОДТВЕРЖДЕНИЯ EMAIL */
/* ========================================================= */
.email-confirm-banner {
    position: relative;
    width: min(100%, 800px);
    margin: 0 auto 28px;
    padding: 14px 24px;
    background:
        linear-gradient(to bottom, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.03)),
        var(--core);
    border-radius: 20px;
    color: #d8dee9;
    font-size: 0.9em;
    line-height: 1.55;
    text-align: center;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.12),
        0 0 0 1px rgba(251, 191, 36, 0.28);
}

.email-confirm-banner::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 21px;
    box-shadow: 0 0 28px 0 rgba(251, 191, 36, 0.4);
    opacity: 0;
    pointer-events: none;
    animation: bannerGlow 3.2s var(--ease) infinite;
}

.email-confirm-banner strong {
    color: #fcd34d;
    font-weight: 600;
}

.email-confirm-banner .email-confirm-address {
    color: #5ee0ff;
    overflow-wrap: anywhere;
}

main:has(.news-tabs) .email-confirm-banner {
    max-width: 1200px;
}

@keyframes bannerGlow {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

@media (max-width: 600px) {
    .email-confirm-banner {
        width: 87%;
        margin-bottom: 16px;
        padding: 12px 16px;
        border-radius: 18px;
        font-size: 0.85em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .email-confirm-banner::before { animation: none; opacity: 0.5; }
}