/* 
    #070707
    #1e1e1e
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
    --primary-black: #070707;
    --secondary-black: #1e1e1e;
    --text-gray: rgba(255, 255, 255, 0.500);
}

body {
    margin: 0;
    padding: 0;
    background: url('/image/pattern.png') repeat 0 0 / 16px 16px;
    min-height: 100vh;
    position: relative;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}

.app {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.08),
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.15)
    );
}

/* Базовые адаптивные контейнеры */
.screen-container {
    width: 100%;
    max-width: 1280px;
    height: auto;
    padding: 0 20px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

/* Хедер */
.header {
    width: 100%;
    height: 80px;
    position: fixed;
    z-index: 1000;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Логотип */
.logo-button {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.title-logo {
    height: 40px;
    width: auto;
    transition: height 0.3s ease;
}

.logo-button:hover {
    transform: scale(1.05);
}

.logo-button:active {
    transform: scale(0.95);
}

/* Навигация для десктопа */
.nav-desktop {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
    margin: 0 20px;
}

/* Кнопки навигации */
.header-button {
    font-family: "Inter", sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 16px;
    width: 130px;
    height: 48px;
    background: #000000;
    color: var(--text-gray);
    border-left: solid var(--text-gray) 1px;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.header-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: white;
    transition: left 0.3s ease;
    z-index: 0;
}

.header-button:hover::before {
    left: 0;
}

.header-button span {
    position: relative;
    z-index: 1;
    transition: color 0.2s ease 0.1s;
}

.header-button:hover span {
    color: #000000;
}

.header-button.active::before {
    left: 0;
}

.header-button.active span {
    color: #000000;
}

/* Профиль и авторизация */
.profile {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.auth-button {
    font-family: "Inter", sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 14px;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.auth-button:hover {
    background: #f0f0f0;
    border-color: #ddd;
}

.auth-button:active {
    background: #e0e0e0;
    transform: translateY(1px);
}

.auth-button-icon {
    width: 28px;
    height: 28px;
}

.auth-button-text {
    color: black;
    margin: 0;
    white-space: nowrap;
}

.user-container {
    display: flex;
    align-items: center;
    position: relative;
}

/* Основная информация пользователя (видимая всегда) */
.user-container {
    display: flex;
    align-items: center;
    position: relative;
}

/* Основная информация пользователя (видимая всегда) */
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: 1px solid transparent;
}

.user-avatar {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-nickname {
    font-family: "Inter", sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: white;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Выпадающее меню */
.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px;
    min-width: 180px; /* Уменьшили ширину, так как только кнопка */
    z-index: 1002;    
    margin-top: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.user-dropdown.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Информация в дропдауне */
.dropdown-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Класс mobile-only - скрываем на десктопе */
.dropdown-user-info.mobile-only {
    display: none;
}

.dropdown-avatar {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2); /* Убрали border-radius */
}

.dropdown-user-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dropdown-nickname {
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: white;
}

.dropdown-steam-id {
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: var(--text-gray);
}

/* Кнопка выхода */
.logout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: white;
    color: black;
    border: none;
    font-family: "Inter", sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-button:hover {
    background: #f0f0f0;
}

.logout-button:active {
    transform: translateY(1px);
}

.logout-icon {
    width: 18px;
    height: 18px;
}

/* Стрелка для дропдауна */
.user-info::after {
    content: "▼";
    font-size: 10px;
    color: white;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.user-dropdown.active + .user-info::after {
    transform: rotate(180deg);
}

/* Субхедер */
.subheader {
    padding-top: 80px;
    width: 100%;
    height: 100px;
    background: #000000;
    color: white;
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    position: relative;
    overflow: hidden;
}

.title-page {
    font-family: "Inter", sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 72px;
    margin: 0;
    line-height: 1;
    width: 100%;
    max-width: 1280px;
    padding: 0 0 20px 0; /* padding-bottom: 20px - это опускает текст вниз внутри контейнера */
    box-sizing: border-box;
    opacity: 1;
}

.title-page.entering {
    animation: slideInFromLeft 0.25s ease forwards;
    transform: translateX(-100%);
}

.title-page.leaving {
    animation: slideOutToRight 0.25s ease forwards; 
}

/* Ключевые кадры для анимаций - ОДИН НАБОР, НЕ ДУБЛИРУЕМ */
@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutToRight {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Мобильное меню (бургер) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 10px;
    margin-right: 15px;
    min-width: 44px;
    min-height: 44px;
}

/* Навигация для мобильных - ИСПРАВЛЕННЫЙ БЛОК */
.nav-mobile {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: #000000;
    z-index: 1001;    
    flex-direction: column;
    align-items: stretch;
    padding: 0; 
    gap: 0; 
}

.nav-mobile.active {
    display: flex;
}

.nav-mobile .header-button {
    width: 100%; 
    max-width: none; 
    border-left: none;
    justify-content: center;
    padding: 0; 
    margin: 0; 
    height: 60px; 
}

/* Адаптивные стили */
@media (max-width: 1024px) {
    .header-button {
        width: 110px;
        font-size: 14px;
    }
    
    .title-page {
        font-size: 60px;
    }
}

@media (max-width: 768px) {
    body {
        background-size: 12px 12px; 
    }

    .header {
        height: 70px;
    }
    
    .subheader {
        padding-top: 70px;
        height: 100px;
    }
    
    .title-logo {
        height: 35px;
    }
    
    .title-page {
        font-size: 48px;
    }
    
    .title-page.entering {
        animation: slideInFromLeft 0.2s ease forwards;
    }
    
    .title-page.leaving {
        animation: slideOutToRight 0.2s ease forwards;
    }
    
    /* Показываем бургер меню */
    .menu-toggle {
        display: block;
    }
    
    /* Скрываем десктопную навигацию */
    .nav-desktop {
        display: none;
    }
    
    /* Показываем мобильную навигацию при активации */
    .nav-mobile.active {
        display: flex;
    }
    
    /* Убираем отступы по бокам на мобилках */
    .screen-container {
        padding: 0 15px;
    }
    
    .auth-button {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .auth-button-icon {
        width: 24px;
        height: 24px;
    }

    .user-nickname {
        display: none;
    }
    
    .user-info {
        padding: 0;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
    }
    
    /* На мобильных увеличиваем dropdown */
    .user-dropdown {
        min-width: 280px;
        padding: 20px;
    }
    
    /* Показываем инфо пользователя только на мобильных */
    .dropdown-user-info.mobile-only {
        display: flex;
    }
    
    /* Кнопка выхода на мобильных больше */
    .logout-button {
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .header {
        height: 60px;
    }
    
    .subheader {
        padding-top: 60px;
        height: 80px;
    }
    
    .title-logo {
        height: 30px;
    }
    
    .title-page {
        font-size: 36px;
        padding-left: 10px;
    }
    
    .title-page.entering {
        animation: slideInFromLeft 0.15s ease forwards;
    }
    
    .title-page.leaving {
        animation: slideOutToRight 0.15s ease forwards;
    }
    
    .auth-button-text {
        display: none; 
    }
    
    .auth-button {
        padding: 5px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .menu-toggle {
        font-size: 24px;
        padding: 8px;
    }
    
    .screen-container {
        padding: 0 10px;
    }
    
    /* Увеличиваем зону клика для мобильных */
    .header-button {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Для мобильных кнопок в nav-mobile */
    .nav-mobile .header-button {
        height: 55px;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
    }
    
    .user-dropdown {
        min-width: 250px;
        padding: 15px;
    }
    
    .dropdown-avatar {
        width: 50px;
        height: 50px;
    }
    
    .dropdown-nickname {
        font-size: 14px;
    }
    
    .logout-button {
        padding: 10px 15px;
        font-size: 13px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
    .title-page {
        font-size: 28px;
    }
    
    .title-logo {
        height: 25px;
    }
    
    .header-button span {
        font-size: 12px;
    }

    .user-dropdown {
        min-width: 220px;
        right: -10px; /* Сдвигаем влево, чтобы влезало */
    }
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 998; /* УМЕНЬШИЛИ ДО 998 (было 999) */
    pointer-events: none; /* Позволяет кликать сквозь него */
}

.overlay.active {
    display: block;
    pointer-events: auto; /* Включаем pointer-events только когда активно */
    background: rgba(0, 0, 0, 0.1); /* Легкая затемняющая подложка */
}
