/* Основные стили приложения */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Добавьте эти стили в style.css */

/* Аватары в круглой рамке */
.header-avatar, 
.profile-avatar, 
.member-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Аватар в хедере */
.header-avatar {
    width: 40px;
    height: 40px;
}

/* Аватар в профиле */
.profile-avatar {
    width: 100px;
    height: 100px;
    border: 4px solid var(--primary);
}

/* Аватар в модалке аватара */
#currentAvatarPreview {
    width: 120px;
    height: 120px;
    border: 4px solid var(--primary);
}

/* Круглая рамка для предпросмотра аватара */
.circle-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    pointer-events: none;
    box-shadow: inset 0 0 0 3px white;
}

/* Контейнер для изображения аватара */
.image-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 20px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary);
    background: #f5f5f5;
}

#imagePreview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center center;
}

:root {
    /* Темная тема (по умолчанию) */
    --bg-color: rgba(0, 0, 0, 0.7);
    --text-color: #fff;
    --menu-bg: rgba(40, 40, 40, 0.85);
    --menu-hover-bg: rgba(60, 60, 60, 0.9);
    --card-bg: rgba(30, 30, 30, 0.95);
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-color: rgb(214, 184, 98);
    --accent-gold-dark: #b89850;
    --accent-gold-shine: #e0c870;
    --accent-gold-highlight: #e8d080;
    --footer-color: #aaa;
    --logo-main-color: rgb(214, 184, 98);
    --logo-text-color: #fff;
    --btn-icon-1: #b89850;
    --btn-icon-2: #4CAF50;
    --btn-icon-3: #2196F3;
    --btn-icon-4: #FF9800;
    --btn-icon-5: #9C27B0;
    --btn-icon-6: #00BCD4;
    --modal-bg: rgba(30, 30, 30, 0.95);
    --modal-border: rgba(214, 184, 98, 0.45);
    --settings-bg: rgba(255, 255, 255, 0.15);
    --settings-hover-bg: rgba(255, 255, 255, 0.25);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-light: rgba(0, 0, 0, 0.5);
    --menu-title-color: #e0e0e0;
    --settings-option-bg: rgba(255, 255, 255, 0.05);
    --selected-theme-bg: rgba(214, 184, 98, 0.18);
}

.light-theme {
    /* Светлая тема */
    --bg-color: rgba(255, 255, 255, 0.9);
    --text-color: #333;
    --menu-bg: rgba(255, 255, 255, 0.9);
    --menu-hover-bg: rgba(240, 240, 240, 0.95);
    --card-bg: rgba(255, 255, 255, 0.95);
    --border-color: rgba(0, 0, 0, 0.1);
    --accent-color: rgb(214, 184, 98);
    --accent-gold-dark: #b89850;
    --accent-gold-shine: #e0c870;
    --accent-gold-highlight: #e8d080;
    --footer-color: #666;
    --logo-main-color: rgb(214, 184, 98);
    --logo-text-color: #333;
    --btn-icon-1: #b89850;
    --btn-icon-2: #388E3C;
    --btn-icon-3: #1976D2;
    --btn-icon-4: #F57C00;
    --btn-icon-5: #7B1FA2;
    --btn-icon-6: #0097A7;
    --modal-bg: rgba(255, 255, 255, 0.98);
    --modal-border: rgba(154, 123, 10, 0.45);
    --settings-bg: rgba(0, 0, 0, 0.1);
    --settings-hover-bg: rgba(0, 0, 0, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-light: rgba(0, 0, 0, 0.2);
    --menu-title-color: #555;
    --settings-option-bg: rgba(0, 0, 0, 0.05);
}

body {
    background: linear-gradient(var(--bg-color), var(--bg-color)), url('Фоновое изображе.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    padding: 20px;
    transition: background 0.5s ease, color 0.5s ease;
}
/* Плавные переходы между разделами — меньше лагов */
.menu-container,
.profile-container,
.game-rooms-section {
    transition: opacity 0.2s ease;
}

/* ЗАФИКСИРОВАННАЯ ШАПКА С ОТСТУПОМ ДЛЯ ТЕЛЕГРАМА */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 180px; /* Увеличено в 3 раза */
    background: var(--bg-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 60px 30px 30px 30px; /* ВЕРХНИЙ ОТСТУП 60px для телеграма */
    box-shadow: 0 4px 20px var(--shadow-color);
    border-bottom: 2px solid var(--border-color);
}

/* Кнопка аватара в шапке — рамка с градиентом rgb(204,170,98) → rgb(169,131,58) */
.avatar-header-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid transparent;
    background: linear-gradient(var(--menu-bg), var(--menu-bg)) padding-box,
                linear-gradient(90deg, rgb(204, 170, 98), rgb(169, 131, 58)) border-box;
    box-shadow: 0 6px 12px var(--shadow-color);
}

.avatar-header-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px var(--shadow-color);
}

.header-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: var(--settings-option-bg);
}

/* Контейнер для логотипа */
.logo-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

/* Стили для изображения логотипа - УВЕЛИЧЕНО В 2 РАЗА (было 105px, стало 210px) */
.logo-image {
    height: 210px; /* Увеличено в 2 раза с 105px */
    width: auto;
    object-fit: contain;
    max-width: 1080px; /* Увеличено в 2 раза с 540px */
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px var(--shadow-light));
}

.logo-image:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 4px 8px var(--shadow-light));
}

/* Темная тема для логотипа */
.dark-theme .logo-image {
    content: url('мафия-темная.png');
}

/* Светлая тема для логотипа */
.light-theme .logo-image {
    content: url('мафия-светлая.png');
}

/* Кнопка настроек - увеличенная в 3 раза */
.settings-btn {
    background: var(--settings-bg);
    border: none;
    width: 120px; /* Увеличено в 3 раза */
    height: 120px; /* Увеличено в 3 раза */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 12px var(--shadow-color);
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.settings-btn:hover {
    background: var(--settings-hover-bg);
    transform: rotate(30deg) scale(1.05);
    border-color: var(--accent-color);
    box-shadow: 0 8px 16px var(--shadow-color);
}

.settings-btn i {
    font-size: 60px; /* Увеличено в 3 раза */
    color: var(--text-color);
    transition: color 0.3s ease;
}

.settings-btn:hover i {
    color: var(--accent-color);
}

/* ОТСТУП ДЛЯ ОСНОВНОГО КОНТЕНТА ИЗ-ЗА ФИКСИРОВАННОЙ ШАПКИ */
body {
    padding-top: 240px; /* 180px (шапка) + 60px (отступ для телеграма) */
    min-height: calc(100vh - 240px);
}

/* Экран авторизации должен быть на весь экран */
.auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding-top: 0;
    margin-top: 0;
}

.auth-center {
    margin-top: -50px; /* Компенсация для центрирования */
}

/* Другие контейнеры тоже должны учитывать отступ */
.menu-container,
.profile-container {
    margin-top: 20px;
    padding-bottom: 90px;
}

/* Нижняя закреплённая панель навигации (только иконки, цветные как в меню) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    background: var(--card-bg);
    border-top: 2px solid var(--border-color);
    box-shadow: 0 -4px 20px var(--shadow-color);
    padding-bottom: env(safe-area-inset-bottom, 0);
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
}
.bottom-nav-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    min-width: 0;
}
.bottom-nav-item i {
    font-size: 24px;
}
.bottom-nav-item--quick i { color: #6bcf70; }
.bottom-nav-item--quick:hover i { color: #8ee892; }
.bottom-nav-item--quick.active i { color: #8ee892; filter: drop-shadow(0 0 6px rgba(107, 207, 112, 0.6)); }
.bottom-nav-item--profile i { color: #5db0ff; }
.bottom-nav-item--profile:hover i { color: #7fc4ff; }
.bottom-nav-item--profile.active i { color: #7fc4ff; filter: drop-shadow(0 0 6px rgba(93, 176, 255, 0.6)); }
.bottom-nav-item--menu i { color: var(--accent-color); }
.bottom-nav-item--menu:hover i { color: var(--accent-gold-shine); }
.bottom-nav-item--menu.active i { color: var(--accent-gold-shine); filter: drop-shadow(0 0 6px rgba(214, 184, 98, 0.6)); }
.bottom-nav-item--events i { color: #e0c870; }
.bottom-nav-item--events:hover i { color: var(--accent-gold-shine); }
.bottom-nav-item--events.active i { color: var(--accent-gold-shine); filter: drop-shadow(0 0 6px rgba(214, 184, 98, 0.5)); }
.bottom-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}
.bottom-nav-item:active {
    transform: scale(0.95);
}
@media (max-width: 480px) {
    .bottom-nav-item i { font-size: 22px; }
}

/* Увеличиваем отступы для заголовков, чтобы не перекрывались шапкой */
.menu-title {
    padding-top: 40px !important;
    margin-bottom: 30px;
}

.profile-title {
    padding-top: 40px !important;
}

/* Адаптивность для мобильных */
@media (max-width: 1200px) {
    .header {
        height: 150px;
        padding: 50px 20px 25px 20px;
    }
    
    .avatar-header-btn,
    .settings-btn {
        width: 100px;
        height: 100px;
    }
    
    .logo-image {
        height: 180px; /* Увеличено в 2 раза с 90px */
        max-width: 900px; /* Увеличено в 2 раза с 450px */
    }
    
    .settings-btn i {
        font-size: 50px;
    }
    
    body {
        padding-top: 200px;
        min-height: calc(100vh - 200px);
    }
    
    .menu-title,
    .profile-title {
        padding-top: 30px !important;
    }
}

@media (max-width: 992px) {
    .header {
        height: 120px;
        padding: 40px 20px 20px 20px;
    }
    
    .avatar-header-btn,
    .settings-btn {
        width: 80px;
        height: 80px;
    }
    
    .logo-image {
        height: 140px; /* Увеличено в 2 раза с 70px */
        max-width: 700px; /* Увеличено в 2 раза с 350px */
    }
    
    .settings-btn i {
        font-size: 40px;
    }
    
    body {
        padding-top: 160px;
        min-height: calc(100vh - 160px);
    }
    
    .menu-title,
    .profile-title {
        padding-top: 25px !important;
    }
}

@media (max-width: 768px) {
    .header {
        height: 100px;
        padding: 35px 15px 15px 15px;
    }
    
    .avatar-header-btn,
    .settings-btn {
        width: 60px;
        height: 60px;
    }
    
    .logo-image {
        height: 100px; /* Увеличено в 2 раза с 50px */
        max-width: 500px; /* Увеличено в 2 раза с 250px */
    }
    
    .settings-btn i {
        font-size: 30px;
    }
    
    body {
        padding-top: 135px;
        min-height: calc(100vh - 135px);
    }
    
    .menu-container,
    .profile-container {
        margin-top: 40px; /* Увеличено для мобильных */
    }
    
    .menu-title,
    .profile-title {
        padding-top: 20px !important;
        margin-bottom: 25px;
    }
}

@media (max-width: 576px) {
    .header {
        height: 90px;
        padding: 30px 10px 15px 10px;
    }
    
    .avatar-header-btn,
    .settings-btn {
        width: 50px;
        height: 50px;
    }
    
    .logo-image {
        height: 80px; /* Увеличено в 2 раза с 40px */
        max-width: 400px; /* Увеличено в 2 раза с 200px */
    }
    
    .settings-btn i {
        font-size: 24px;
    }
    
    body {
        padding-top: 120px;
        min-height: calc(100vh - 120px);
    }
    
    .menu-container,
    .profile-container {
        margin-top: 50px; /* Увеличено для маленьких экранов */
    }
    
    .menu-title,
    .profile-title {
        padding-top: 15px !important;
        margin-bottom: 20px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 400px) {
    .header {
        height: 80px;
        padding: 25px 10px 10px 10px;
    }
    
    .avatar-header-btn,
    .settings-btn {
        width: 45px;
        height: 45px;
    }
    
    .logo-image {
        height: 70px; /* Увеличено в 2 раза с 35px */
        max-width: 360px; /* Увеличено в 2 раза с 180px */
    }
    
    .settings-btn i {
        font-size: 20px;
    }
    
    body {
        padding-top: 105px;
        min-height: calc(100vh - 105px);
    }
    
    .menu-container,
    .profile-container {
        margin-top: 60px; /* Увеличено для очень маленьких экранов */
    }
    
    .menu-title,
    .profile-title {
        padding-top: 10px !important;
        margin-bottom: 15px;
    }
}

/* Плавное появление шапки */
@keyframes headerSlideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    animation: headerSlideDown 0.5s ease-out;
}

/* Убираем старые стили логотипа (если есть) */
.logo {
    display: none;
}

.logo-text {
    display: none;
}

/* Улучшенная тень для глубины */
.header {
    box-shadow: 
        0 4px 20px var(--shadow-color),
        0 1px 0 rgba(255, 255, 255, 0.1) inset,
        0 -1px 0 rgba(0, 0, 0, 0.1) inset;
}

/* Эффект стекла для шапки */
.header {
    background: var(--bg-color);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background-color: rgba(30, 30, 30, 0.95);
}

.light-theme .header {
    background-color: rgba(255, 255, 255, 0.95);
}

/* Градиентная рамка для кнопок в шапке */
.avatar-header-btn::after,
.settings-btn::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-color), transparent);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.avatar-header-btn:hover::after,
.settings-btn:hover::after {
    opacity: 0.3;
}

/* Убираем outline при фокусе для лучшего вида */
.avatar-header-btn:focus,
.settings-btn:focus {
    outline: none;
}

/* Подсветка активной кнопки */
.avatar-header-btn.active {
    box-shadow: 
        0 0 0 3px rgb(204, 170, 98),
        0 8px 16px var(--shadow-color);
}

/* Скрываем кнопку аватара на экране авторизации */
.auth-screen .avatar-header-btn {
    display: none !important;
}

/* Для аватара по умолчанию добавляем фон */
.header-avatar[src*="data:image/svg+xml"] {
    background: linear-gradient(135deg, #2481cc, #2a9ee3);
}
/* ========== ОБНОВЛЕННОЕ ГЛАВНОЕ МЕНЮ ========== */
.menu-container {
    max-width: 1200px;
    margin: 0 auto;
}

.promo-banner-carousel {
    margin: 8px auto 16px;
    max-width: 1200px;
}

.promo-banner-card {
    position: relative;
    display: flex;
    align-items: stretch;
    background:
        radial-gradient(circle at 0% 0%, rgba(255,255,255,0.18) 0%, transparent 55%),
        linear-gradient(135deg, rgba(20,20,30,0.98), rgba(40,40,60,0.98));
    border-radius: 22px;
    padding: 14px 16px;
    border: 2px solid rgba(255,255,255,0.12);
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255,255,255,0.03);
    overflow: hidden;
}

.promo-banner-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255,255,255,0.28), transparent 55%);
    mix-blend-mode: screen;
    opacity: 0.7;
    pointer-events: none;
}

.promo-banner-image {
    flex: 0 0 96px;
    height: 96px;
    border-radius: 18px;
    overflow: hidden;
    margin-right: 16px;
    background: #000;
}

.promo-banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.promo-banner-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Надписи на баннере — градиент слева направо на каждой строке */
.promo-banner-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.5em;
    background: linear-gradient(90deg, rgb(204, 170, 98), rgb(169, 131, 58));
    background-size: 100% 1.5em;
    background-repeat: repeat;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.promo-banner-text {
    font-size: 13px;
    line-height: 1.5em;
    background: linear-gradient(90deg, rgb(204, 170, 98), rgb(169, 131, 58));
    background-size: 100% 1.5em;
    background-repeat: repeat;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.promo-banner-controls {
    position: absolute;
    top: 50%;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
}

.promo-banner-arrow {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.4);
    background: rgba(0,0,0,0.35);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    pointer-events: auto;
}

.promo-banner-dots {
    display: flex;
    justify-content: center;
    margin-top: 6px;
    gap: 4px;
}

.promo-banner-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
}

.promo-banner-dot.active {
    background: var(--accent-gold-shine);
    box-shadow: 0 0 6px rgba(184,134,11,0.7);
}

/* Заголовок «Главное меню» — градиент по горизонтали */
.menu-title {
    text-align: center;
    margin-bottom: 8px;
    font-size: 22px;
    background: linear-gradient(90deg, rgb(204, 170, 98), rgb(169, 131, 58));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Название клуба — градиент слева направо на каждой строке */

.menu-club-name {
    text-align: center;
    margin-bottom: 24px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5em;
    background: linear-gradient(90deg, rgb(204, 170, 98), rgb(169, 131, 58));
    background-size: 100% 1.5em;
    background-repeat: repeat;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-height: 1.4em;
}

.menu-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.menu-card {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    border: 2px solid var(--border-color);
    box-shadow: 0 6px 15px var(--shadow-color);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    animation: slideInRight 0.4s ease forwards;
    opacity: 0;
}

.menu-card[data-i="0"] { animation-delay: 0.1s; }
.menu-card[data-i="1"] { animation-delay: 0.2s; }
.menu-card[data-i="2"] { animation-delay: 0.3s; }
.menu-card[data-i="3"] { animation-delay: 0.4s; }
.menu-card[data-i="4"] { animation-delay: 0.5s; }
.menu-card[data-i="5"] { animation-delay: 0.6s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.menu-card:hover {
    transform: translateX(10px) translateY(-3px);
    border-color: var(--accent-color);
    box-shadow: 0 12px 25px var(--shadow-color);
}

.menu-card:hover::before {
    left: 100%;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card-content {
    flex-grow: 1;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.menu-card:hover .card-title {
    color: var(--accent-gold-shine);
    text-shadow: 0 0 12px rgba(214, 184, 98, 0.35);
}

.card-description {
    font-size: 14px;
    color: var(--footer-color);
    margin: 0;
}

.card-arrow {
    color: var(--accent-gold-shine);
    font-size: 18px;
    text-shadow: 0 0 10px rgba(214, 184, 98, 0.3);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.menu-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Дополнительные карточки */
.featured-section {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.section-title {
    color: var(--menu-title-color);
    font-size: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--accent-gold-shine);
    text-shadow: 0 0 14px rgba(214, 184, 98, 0.4);
}

.featured-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.featured-card {
    background: var(--settings-option-bg);
    border-radius: 15px;
    padding: 20px 15px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.featured-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.featured-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-gold-dark) 0%, var(--accent-color) 40%, var(--accent-gold-shine) 85%, var(--accent-gold-highlight) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 22px;
}

.featured-card h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--text-color);
}

.featured-card p {
    font-size: 12px;
    color: var(--footer-color);
    margin: 0;
}

.my-recent-games {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.my-recent-games-title {
    font-size: 16px;
    color: var(--menu-title-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.my-recent-games-title i {
    color: var(--accent-gold-shine);
    text-shadow: 0 0 10px rgba(214, 184, 98, 0.35);
}
.my-recent-games-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.my-recent-games-loading,
.my-recent-games-empty {
    font-size: 14px;
    color: var(--footer-color);
    margin: 0;
}
.my-recent-game-item {
    background: var(--settings-option-bg);
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-color);
}
.my-recent-game-item .game-room-name { font-weight: 600; color: var(--accent-color); }
.my-recent-game-item .game-meta { color: var(--footer-color); font-size: 12px; margin-top: 4px; }

/* БЛОК ПРОФИЛЯ (без заголовка, без серого фона — как в Telegram) */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 6px;
    animation: fadeIn 0.5s ease;
    overflow-x: hidden;
}

.profile-card {
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    overflow: hidden;
}

/* Баннер фото: строго по ширине контейнера, чтобы надписи не выходили за изображение */
.profile-photos-wrap {
    position: relative;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    background: var(--bg-color);
    min-height: 42vh;
    overflow: hidden;
    cursor: pointer;
}
.profile-photos-wrap--single {
    cursor: default;
}
.profile-photos-wrap--single .profile-photos--single {
    width: 100%;
    height: 42vh;
    min-height: 260px;
    overflow: visible;
    cursor: default;
}
.profile-photos-wrap--single .profile-photo-slot {
    flex: 0 0 100%;
    width: 100%;
}
.profile-photos {
    display: flex;
    width: 300%;
    height: 42vh;
    min-height: 260px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    user-select: none;
    cursor: grab;
}
.profile-photos:active {
    cursor: grabbing;
}

.profile-photos::-webkit-scrollbar {
    display: none;
}

.profile-photo-slot {
    flex: 0 0 33.333%;
    width: 33.333%;
    height: 100%;
    min-height: 260px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    background: var(--bg-color);
    border: none;
    outline: none;
    overflow: hidden;
    cursor: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-x;
    flex-shrink: 0;
}

.profile-photo-slot:focus,
.profile-photo-slot:focus-visible {
    outline: none;
    box-shadow: none;
}

.profile-photo-slot .profile-photo-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: none;
    pointer-events: none;
    outline: none;
    border: none;
}

.profile-photo-slot .profile-photo-img:focus,
.profile-photo-slot .profile-photo-img:focus-visible {
    outline: none;
}

.profile-photo-slot.has-photo .profile-photo-img {
    display: block;
}

/* Имя и ник в Telegram прямо на изображении (внизу), строго в границах фото */
.profile-photo-overlay {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 20px 24px 18px;
    background: linear-gradient(to top, rgba(0,0,0,0.82), rgba(0,0,0,0.4) 40%, transparent);
    pointer-events: none;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    min-width: 0;
}

.profile-photo-overlay .profile-overlay-top {
    pointer-events: none;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.profile-overlay-name,
.profile-header h3 {
    font-size: 20px;
    margin: 0 0 2px 0;
    padding: 0 2px 0 0;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.profile-overlay-username,
.profile-username {
    color: rgba(255,255,255,0.95);
    font-size: 14px;
    margin: 0;
    padding: 0 2px 0 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.profile-username-link,
.profile-overlay-username .profile-username-link {
    color: inherit;
    text-decoration: none;
}
.profile-username-link:hover,
.profile-overlay-username .profile-username-link:hover {
    text-decoration: underline;
}

/* О себе — на аватарке, видно 3 строки, остальное скролл внутри */
.profile-about-me-wrap {
    pointer-events: auto;
    margin-top: 4px;
    min-height: 0;
    min-width: 0;
    max-width: 100%;
    flex: 0 1 auto;
    max-height: 4.2em;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
}

.profile-about-me {
    font-size: 13px;
    line-height: 1.4;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    margin: 0;
    padding: 0 2px 0 0;
    background: none;
    border: none;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 4.2em;
    min-height: 1.2em;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    white-space: pre-wrap;
    word-break: break-word;
    -webkit-overflow-scrolling: touch;
}

.profile-about-me::-webkit-scrollbar {
    width: 4px;
}

.profile-about-me::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.4);
    border-radius: 2px;
}

.profile-about-me.empty {
    color: rgba(255,255,255,0.75);
    font-style: italic;
}

.profile-about-me-edit {
    width: 100%;
    max-height: 18vh;
    font-size: 13px;
    line-height: 1.4;
    color: #fff;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    padding: 8px 10px;
    resize: none;
    margin: 0;
    box-sizing: border-box;
}

.profile-about-me-edit::placeholder {
    color: rgba(255,255,255,0.6);
}

.profile-about-me-save {
    align-self: flex-start;
    font-size: 12px;
    padding: 6px 14px;
    background: rgba(214, 184, 98, 0.9);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* Полноэкранный просмотр фото: по клику на аватар, свайп между фото */
.profile-photo-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.95);
    touch-action: pan-y pinch-zoom;
}
.profile-photo-fullscreen-bg {
    position: absolute;
    inset: 0;
    cursor: pointer;
}
.profile-photo-fullscreen-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: pan-x;
}
.profile-photo-fullscreen-slide {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-photo-fullscreen-slide img {
    max-width: 100%;
    max-height: 100vh;
    width: auto;
    height: auto;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}
.profile-photo-fs-btn {
    position: absolute;
    z-index: 10;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 18px;
    transition: background 0.2s, transform 0.2s;
}
.profile-photo-fs-btn:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.08);
}
.profile-photo-fs-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}
.profile-photo-fs-close {
    top: 16px;
    left: 16px;
}
.profile-photo-fs-main {
    top: 16px;
    right: 16px;
    width: auto;
    border-radius: 24px;
    padding: 0 14px;
    gap: 6px;
    font-size: 14px;
}
.profile-photo-fs-main i { font-size: 14px; }
.profile-photo-fs-add {
    bottom: 24px;
    left: 24px;
}
.profile-photo-fs-del {
    bottom: 24px;
    right: 24px;
    color: #ffcdd2;
}
.profile-photo-fs-del:hover { color: #ef5350; }

/* Стили для информации о клубе в профиле */
.profile-club-info {
    background: var(--settings-option-bg);
    border-radius: 15px;
    padding: 20px;
    margin: 0 6px 25px;
    border: 1px solid var(--border-color);
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--footer-color);
    font-weight: 500;
}

.info-label i {
    margin-right: 8px;
    color: var(--accent-color);
}

.info-value {
    font-weight: 600;
    color: var(--text-color);
}
.profile-club-info .info-value,
#profileClub {
    color: var(--accent-color);
}

.btn-change-club {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    margin-top: 15px;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-change-club:hover {
    background: var(--selected-theme-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(214, 184, 98, 0.25);
}

.profile-stats {
    margin: 0 6px 30px;
    background: var(--settings-option-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.profile-stats-table {
    display: flex;
    flex-direction: column;
}

.profile-stats-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(3.5rem, auto) minmax(3.5rem, auto) minmax(7rem, auto) minmax(3.5rem, auto);
    gap: 0 18px;
    align-items: center;
    padding: 10px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
}

.profile-stats-row.profile-stats-row-last {
    border-bottom: none;
}

.profile-stats-label {
    font-weight: 600;
    color: var(--text-color);
    min-width: 0;
    word-break: break-word;
    white-space: normal;
    padding-right: 4px;
}

.profile-stats-col {
    text-align: center;
    color: var(--accent-color);
    font-weight: 600;
    min-width: 0;
    word-break: break-word;
    white-space: normal;
}

.profile-stats-row.profile-stats-header {
    font-weight: 700;
    color: var(--footer-color);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.profile-stats-row.profile-stats-header .profile-stats-label {
    font-weight: 700;
    color: var(--footer-color);
}

.profile-stats-row.profile-stats-header .profile-stats-col {
    color: var(--footer-color);
    font-weight: 700;
    white-space: normal;
    word-break: break-word;
}

.profile-stats-clubs .profile-stats-row .profile-stats-label {
    font-size: 12px;
}

/* Оставляем старые классы для совместимости (если используются в других местах) */
.stat-item {
    background: var(--settings-option-bg);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: var(--footer-color);
}

.profile-actions {
    margin: 0 6px 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-logout {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-logout:hover {
    background: var(--selected-theme-bg);
    transform: translateY(-2px);
}

.btn-back {
    background: linear-gradient(135deg, var(--accent-gold-dark) 0%, var(--accent-color) 40%, var(--accent-gold-shine) 85%, var(--accent-gold-highlight) 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin: 0 6px 25px;
    justify-content: center;
    gap: 10px;
    max-width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(214, 184, 98, 0.4);
}

/* Футер */
.footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    font-size: 14px;
    color: var(--footer-color);
    border-top: 1px solid var(--border-color);
    transition: color 0.3s ease;
}

/* ========== СТИЛИ ДЛЯ ЗАГРУЗКИ АВАТАРА ========== */

/* Контейнер загрузки аватара */
.avatar-upload-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 4px 20px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.upload-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.upload-header h2 {
    color: var(--text-color);
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.upload-header p {
    color: var(--footer-color);
    font-size: 14px;
    margin: 0;
}

.current-avatar-section {
    text-align: center;
    margin-bottom: 30px;
}

.avatar-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    margin-bottom: 15px;
}

.avatar-upload-trigger {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 35px;
    height: 35px;
    background: var(--accent-gold-shine);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    border: 3px solid var(--card-bg);
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: all 0.3s ease;
    z-index: 2;
}

.avatar-wrapper:hover .avatar-upload-trigger {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(214, 184, 98, 0.3);
}

.avatar-wrapper:hover .profile-avatar {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(214, 184, 98, 0.3);
}

.current-avatar-section p {
    color: var(--footer-color);
    font-size: 14px;
    margin: 5px 0 0 0;
}

.upload-section {
    margin-bottom: 30px;
}

.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--settings-option-bg);
    position: relative;
    overflow: hidden;
}

.file-upload-area:hover {
    border-color: var(--accent-color);
    background: var(--selected-theme-bg);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.file-upload-area i {
    font-size: 48px;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.file-upload-area p {
    color: var(--text-color);
    font-weight: 600;
    margin: 10px 0;
}

.upload-hint {
    color: var(--footer-color) !important;
    font-size: 14px !important;
    font-weight: normal !important;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.crop-container {
    margin: 20px 0;
    display: none;
}

.crop-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 25px;
}

@media (min-width: 768px) {
    .crop-preview {
        flex-direction: row;
        justify-content: center;
    }
}

.crop-frame {
    position: relative;
    width: 300px;
    height: 300px;
    overflow: hidden;
    border-radius: 10px;
    background: var(--settings-option-bg);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.crop-frame img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: move;
    transition: transform 0.1s ease;
    position: relative;
    z-index: 2;
}

.crop-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px dashed var(--accent-color);
    pointer-events: none;
    z-index: 3;
    box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.3);
}

.preview-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    overflow: hidden;
    background: var(--settings-option-bg);
}

.preview-circle div {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.simple-preview-container {
    padding: 20px 0;
    text-align: center;
    display: none;
}

.image-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 20px;
    overflow: hidden;
    border-radius: 10px;
    background: var(--settings-option-bg);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.circle-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px dashed var(--accent-color);
    pointer-events: none;
    box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.3);
}

.crop-controls,
.simple-controls {
    background: var(--settings-option-bg);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
}

.simple-controls {
    padding: 15px;
    margin-bottom: 20px;
}

.zoom-control {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.zoom-control label {
    color: var(--text-color);
    font-weight: 600;
    min-width: 80px;
}

.zoom-control input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
}

.zoom-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-gold-shine);
    border-radius: 50%;
    cursor: pointer;
}

.zoom-control input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--accent-gold-shine);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.zoom-control span {
    color: var(--accent-color);
    font-weight: 600;
    min-width: 40px;
}

.instruction {
    background: rgba(214, 184, 98, 0.1);
    border-radius: 8px;
    padding: 12px;
    border-left: 3px solid var(--accent-color);
    margin-bottom: 20px;
}

.instruction p {
    color: var(--text-color);
    font-size: 14px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instruction i {
    color: var(--accent-color);
}

.simple-hint {
    color: var(--footer-color);
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
}

.crop-actions,
.simple-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
}

.simple-actions {
    gap: 15px;
}

.btn-cancel {
    background: var(--settings-option-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px;
}

.btn-cancel:hover {
    border-color: var(--accent-color);
    background: var(--selected-theme-bg);
}

.btn-save {
    background: linear-gradient(135deg, var(--accent-gold-dark) 0%, var(--accent-color) 40%, var(--accent-gold-shine) 85%, var(--accent-gold-highlight) 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(214, 184, 98, 0.4);
}

.btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: rgba(214, 184, 98, 0.1);
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    padding: 12px 20px;
    margin: 15px 0;
    color: var(--accent-color);
    font-size: 14px;
    display: none;
}

.success-message {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4CAF50;
    border-radius: 8px;
    padding: 12px 20px;
    margin: 15px 0;
    color: #4CAF50;
    font-size: 14px;
    display: none;
}

/* Модальные окна и формы */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

.modal-content {
    background: var(--modal-bg);
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    border: 1px solid var(--modal-border);
    box-shadow: 0 15px 30px var(--shadow-color);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 24px;
    color: var(--accent-color);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.close-btn:hover {
    background: rgba(214, 184, 98, 0.1);
    color: var(--accent-color);
    transform: rotate(90deg);
}

.registration-form {
    padding: 20px 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    background: var(--menu-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(214, 184, 98, 0.1);
}

.form-group select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.birthday-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.birthday-inputs select {
    padding: 12px 15px;
}

.form-buttons {
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold-dark) 0%, var(--accent-color) 40%, var(--accent-gold-shine) 85%, var(--accent-gold-highlight) 100%);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(214, 184, 98, 0.4);
}

.theme-options {
    margin-bottom: 25px;
}

.theme-option {
    background: var(--settings-option-bg);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.theme-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
    border-color: var(--accent-color);
}

.theme-option.active {
    background: var(--selected-theme-bg);
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.theme-option-content {
    display: flex;
    align-items: center;
    padding: 18px;
}

.theme-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--menu-bg);
    border-radius: 10px;
    margin-right: 15px;
    color: var(--accent-color);
}

.theme-info {
    flex-grow: 1;
}

.theme-info h3 {
    margin-bottom: 5px;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
}

.theme-info p {
    color: var(--footer-color);
    font-size: 14px;
    margin: 0;
}

.theme-check {
    color: var(--accent-color);
    font-size: 18px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.theme-option.active .theme-check {
    opacity: 1;
    transform: scale(1);
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.slide-up {
    animation: slideUp 0.4s ease-out;
}

.active {
    display: block !important;
}

.hidden {
    display: none !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .menu-cards {
        gap: 12px;
    }
    
    .menu-card {
        padding: 15px;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin-right: 15px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .card-description {
        font-size: 13px;
    }
    
    .featured-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .featured-card {
        padding: 15px 10px;
    }
    
    .featured-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .featured-card h4 {
        font-size: 14px;
    }
    
    .featured-card p {
        font-size: 11px;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .auth-center-btn {
        padding: 14px 28px;
        font-size: 16px;
    }
    
    .profile-stats-row {
        padding: 8px 10px;
        font-size: 12px;
        grid-template-columns: minmax(0, 1fr) minmax(2.5rem, auto) minmax(2.5rem, auto) minmax(5.5rem, auto) minmax(2.5rem, auto);
        gap: 0 10px;
    }
    
    .profile-stats-row.profile-stats-header {
        font-size: 10px;
    }
    
    .profile-stats-clubs .profile-stats-row .profile-stats-label {
        font-size: 11px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .profile-club-info {
        padding: 15px;
    }
    
    .auth-center {
        padding: 30px 20px;
        margin: 0 15px;
    }
    
    .avatar-upload-container {
        padding: 15px;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
    
    .crop-frame,
    .image-container {
        width: 250px;
        height: 250px;
    }
    
    .crop-circle,
    .circle-overlay {
        width: 150px;
        height: 150px;
    }
    
    .crop-preview {
        gap: 20px;
    }
    
    .crop-actions,
    .simple-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-cancel,
    .btn-save {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .menu-card {
        padding: 12px;
    }
    
    .card-icon {
        width: 45px;
        height: 45px;
        margin-right: 12px;
    }
    
    .featured-cards {
        grid-template-columns: 1fr;
    }
    
    .logo {
        font-size: 22px;
    }
    
    body {
        padding: 15px;
    }
    
    .profile-stats-row {
        font-size: 11px;
        grid-template-columns: minmax(0, 1fr) minmax(2.25rem, auto) minmax(2.25rem, auto) minmax(5rem, auto) minmax(2.25rem, auto);
        gap: 0 8px;
        padding: 6px 8px;
    }
    
    .profile-stats-row.profile-stats-header {
        font-size: 9px;
    }
    
    .profile-club-info {
        padding: 12px;
    }
    
    .auth-center h2 {
        font-size: 20px;
    }
    
    .auth-icon {
        font-size: 60px;
    }
    
    .profile-avatar {
        width: 90px;
        height: 90px;
    }
    
    .crop-frame,
    .image-container {
        width: 200px;
        height: 200px;
    }
    
    .crop-circle,
    .circle-overlay {
        width: 120px;
        height: 120px;
    }
    
    .file-upload-area {
        padding: 40px 15px;
    }
    
    .file-upload-area i {
        font-size: 36px;
    }
    
    .upload-header h2 {
        font-size: 20px;
    }
    
    .modal-content {
        padding: 20px;
        margin: 10px;
    }
    
    .birthday-inputs {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Исправления для модального окна аватара */

/* Делаем контейнер аватара скроллируемым */
.avatar-upload-container {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 5px;
}

/* Стили для скроллбара (опционально) */
.avatar-upload-container::-webkit-scrollbar {
    width: 6px;
}

.avatar-upload-container::-webkit-scrollbar-track {
    background: var(--settings-option-bg);
    border-radius: 3px;
}

.avatar-upload-container::-webkit-scrollbar-thumb {
    background: var(--accent-gold-shine);
    border-radius: 3px;
}

/* Убираем отступы у контейнера предпросмотра */
.simple-preview-container {
    margin-bottom: 10px;
}

/* Фиксируем кнопки действий внизу */
.simple-actions {
    position: sticky;
    bottom: 0;
    background: var(--card-bg);
    padding: 15px 0;
    margin-top: 0;
    border-top: 1px solid var(--border-color);
    z-index: 10;
}

/* Уменьшаем высоту контейнера изображения на мобильных */
@media (max-height: 700px) {
    .image-container {
        height: 200px;
    }
    
    .circle-overlay {
        width: 120px;
        height: 120px;
    }
}

/* Уменьшаем высоту контейнера изображения на очень маленьких экранах */
@media (max-height: 600px) {
    .image-container {
        height: 180px;
    }
    
    .circle-overlay {
        width: 100px;
        height: 100px;
    }
    
    .avatar-upload-container {
        max-height: 65vh;
    }
}

/* Убираем лишние отступы в контролах зума */
.zoom-control {
    margin-bottom: 10px;
}

/* Делаем ползунок масштаба более компактным */
.zoom-control input[type="range"] {
    margin: 0 10px;
}

/* Убираем метку процентов */
.zoom-control span {
    display: none;
}

/* Улучшаем внешний вид кнопок в модальном окне */
.btn-save, .btn-cancel {
    padding: 10px 20px;
    font-size: 15px;
    min-width: 100px;
}

/* На очень маленьких экранах делаем кнопки меньше */
@media (max-width: 480px) {
    .simple-actions {
        padding: 10px 0;
    }
    
    .btn-save, .btn-cancel {
        padding: 8px 15px;
        font-size: 14px;
        min-width: 90px;
    }
}

/* УБИРАЕМ ЗЕЛЕНУЮ ОБВОДКУ */
.form-group input:valid,
.form-group select:valid {
    border-color: var(--border-color) !important;
}

.form-group input:invalid,
.form-group select:invalid {
    border-color: var(--border-color) !important;
}

/* Фокус на полях */
.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 2px rgba(214, 184, 98, 0.2) !important;
}

/* Стили для заголовка "День рождения" в профиле */
.profile-club-info .info-label i.fa-birthday-cake {
    color: var(--accent-color);
}

/* Стиль для placeholder */
::placeholder {
    color: var(--footer-color);
    opacity: 0.6;
}

/* Стили для сообщений об ошибках/успехе в загрузке аватара */
.error-message, .success-message {
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    text-align: center;
}

.error-message {
    background: rgba(214, 184, 98, 0.1);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.success-message {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4CAF50;
    color: #4CAF50;
}

/* Плавные переходы для всех интерактивных элементов */
a, button, input, select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Стили для кастомного календаря */
.calendar-container {
    margin: 20px 0;
}

#customCalendar {
    min-height: 500px;
}
/* ========== СТИЛИ АВТОРИЗАЦИИ ========== */
.auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.5s ease;
}

.auth-center {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease;
}

.auth-icon {
    font-size: 80px;
    color: var(--primary-color, #2481CC);
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.auth-center h2 {
    color: var(--dark-color, #1a1a2e);
    margin-bottom: 10px;
    font-size: 24px;
}

.auth-center p {
    color: var(--gray-color, #666);
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.5;
}

.auth-center-btn {
    background: linear-gradient(135deg, #2481CC 0%, #1a5f9c 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(36, 129, 204, 0.3);
}

.auth-center-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(36, 129, 204, 0.4);
}

.auth-center-btn:active {
    transform: translateY(-1px);
}

.auth-center-btn i {
    font-size: 20px;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
/* СТИЛИ ДЛЯ УЧАСТНИКОВ */

.members-container {
    padding: 20px;
}

.club-info {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(30, 35, 50, 0.98));
    color: var(--accent-color);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}
#currentMembersClubName {
    color: var(--accent-color);
}

.members-count {
    background: rgba(214, 184, 98, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--accent-color);
}

/* Тулбар */
.members-toolbar {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.filter-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: #e9ecef;
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Список участников */
.members-list {
    display: grid;
    gap: 15px;
}

/* Карточка участника */
.member-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
}

.member-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: var(--primary);
}

/* Аватар участника в круге */
.member-avatar {
    flex-shrink: 0;
    position: relative;
}

.member-avatar img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Индикатор онлайн (если нужно) */
.online-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    background: #2ecc71;
    border: 2px solid white;
    border-radius: 50%;
}

/* Информация об участнике */
.member-info {
    flex: 1;
    min-width: 0;
}

.member-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-username {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.member-city {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #777;
    font-size: 14px;
}

.member-city i {
    color: var(--primary);
}

/* Уровень игрока */
.member-level {
    display: inline-block;
    background: linear-gradient(135deg, #ffcc00, #ff9900);
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 5px;
}

/* Статистика */
.member-stats {
    display: flex;
    gap: 25px;
    flex-shrink: 0;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Статус активности */
.member-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.member-status.active {
    background: #d4edda;
    color: #155724;
}

.member-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Пагинация */
.members-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.pagination-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    color: #666;
    font-size: 14px;
}

/* Загрузка и пустой список */
.loading-members, .empty-members {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-members i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

/* Адаптивность */
@media (max-width: 768px) {
    .member-item {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .member-stats {
        margin-top: 15px;
        width: 100%;
        justify-content: space-around;
    }
    
    .members-pagination {
        flex-direction: column;
        gap: 10px;
    }
}

/* ========== ИГРОВЫЕ КОМНАТЫ ========== */
.game-rooms-section {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}
.game-rooms-section .section-title {
    margin-bottom: 8px;
}
.game-rooms-section .section-desc {
    color: var(--text-secondary, #666);
    margin-bottom: 20px;
    font-size: 14px;
}
.game-rooms-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.game-room-item {
    background: var(--card-bg, rgba(255,255,255,0.06));
    border: 1px solid var(--border-color, rgba(255,255,255,0.12));
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}
.game-room-item-top {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.game-room-item-name {
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.3;
}
.game-room-item-meta {
    font-size: 13px;
    color: var(--text-color, rgba(255,255,255,0.7));
    display: flex;
    align-items: center;
    gap: 6px;
}
.game-room-item-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    font-weight: 600;
    font-size: 12px;
}
.game-room-join-btn {
    background: transparent;
    color: var(--accent-color, rgb(214, 184, 98));
    border: 2px solid var(--accent-color, rgb(214, 184, 98));
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}
.game-room-join-btn:hover {
    background: rgba(214, 184, 98, 0.2);
}

/* ========== МАГАЗИН ========== */
.shop-container {
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 90px;
    animation: fadeIn 0.5s ease;
}
.shop-title {
    color: var(--menu-title-color);
    font-size: 22px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.shop-title i {
    color: var(--accent-gold-shine);
    text-shadow: 0 0 14px rgba(214, 184, 98, 0.4);
}
.shop-subtitle {
    color: var(--text-secondary, rgba(255,255,255,0.6));
    font-size: 14px;
    margin-bottom: 24px;
}
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.shop-card {
    background: var(--card-bg, rgba(255,255,255,0.06));
    border: 1px solid var(--border-color, rgba(255,255,255,0.12));
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.shop-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.shop-card-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 8px;
    background: rgba(0,0,0,0.2);
}
.shop-card-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color, #fff);
    margin-bottom: 6px;
}
.shop-card-price {
    font-size: 13px;
    color: var(--accent-gold-shine);
    margin-bottom: 10px;
}
.shop-card-price i {
    margin-left: 2px;
}
.shop-card-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-color));
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.shop-card-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(214, 184, 98, 0.35);
}

.game-role-hint-waiting-next {
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
    color: rgba(255,255,255,0.95) !important;
    margin-top: 20px;
    margin-bottom: 10px;
}
.game-role-card-wrap.game-role-waiting-next .game-role-hint-waiting-next {
    display: block;
}

/* ЭКРАН ИГРЫ */
.game-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: #1a1a2e;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}
.game-screen-inner {
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    padding: 16px;
    padding-bottom: 80px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
    z-index: 2;
}
.game-room-name {
    font-weight: 600;
    color: #fff;
    font-size: 18px;
}
.game-header-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.game-btn-back,
.game-btn-exit,
.game-btn-info {
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.6);
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
}
.game-btn-back { background: rgba(0,0,0,0.35); }
.game-phase-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.game-phase-night,
.game-phase-day {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.game-phase-night {
    background-image: url('/images/стол-ночь.webp');
    background-color: #1a1a2e;
}
.game-phase-day {
    background-image: url('/images/стол-день.webp');
    background-color: #1a2530;
}
.game-content {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding-bottom: calc(5vh + 220px);
}
.game-players-board {
    flex: 1;
    min-height: 0;
    max-height: 52vh;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 6px 0;
    box-sizing: border-box;
}
.game-players-board.game-players-board--large {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(0, 1fr));
}
.game-hints-under-players {
    flex-shrink: 0;
    width: 100%;
    margin-top: 8px;
    padding: 0 4px;
    font-size: 14px;
    line-height: 1.4;
}
.game-hints-under-players .game-vote-block,
.game-hints-under-players .game-mafia-list,
.game-hints-under-players .game-sheriff-revealed,
.game-hints-under-players .game-day-votes {
    margin-bottom: 10px;
}
.game-hints-under-players .game-vote-block:last-child,
.game-hints-under-players .game-mafia-list:last-child,
.game-hints-under-players .game-sheriff-revealed:last-child,
.game-hints-under-players .game-day-votes:last-child {
    margin-bottom: 0;
}
.game-role-card-wrap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -50px;
    text-align: center;
    z-index: 2;
    perspective: 1000px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}
/* Эффект появления карты с дымом в новой игре */
.game-role-card-wrap.game-role-card-smoke .game-role-card {
    animation: game-card-appear 0.6s ease-out;
}
.game-role-card-wrap.game-role-card-smoke::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 200%;
    height: 200%;
    margin-left: -100%;
    margin-top: -100%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.35) 0%, rgba(200,200,220,0.2) 25%, transparent 55%);
    filter: blur(35px);
    pointer-events: none;
    animation: game-smoke-appear 2s ease-out forwards;
    z-index: -1;
}
@keyframes game-smoke-appear {
    0% { opacity: 0; transform: scale(0.3); }
    25% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.4); }
}
@keyframes game-card-appear {
    0% { opacity: 0; transform: scale(0.85); }
    60% { opacity: 1; transform: scale(1.02); }
    100% { opacity: 1; transform: scale(1); }
}
.game-role-hint {
    display: none;
    position: relative;
    z-index: 3; /* Подсказка всегда поверх номера и карты */
}
.game-role-card {
    position: relative;
    z-index: 2;
    display: inline-block;
    width: 150px;
    height: 210px;
    cursor: pointer;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 30px rgba(0,0,0,0.45);
    transform-origin: center bottom;
    transform-style: preserve-3d;
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.35s ease;
    /* По умолчанию карта лежит на столе */
    transform: rotateX(68deg) translateY(45px) scale(1.05);
}
.game-role-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 20%, rgba(255,255,255,0.35) 0%, transparent 55%),
                linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.75) 80%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.game-role-card.card-standing {
    transform: rotateX(0deg) translateY(0) scale(1);
    box-shadow: 0 26px 45px rgba(0,0,0,0.7);
}
.game-role-card.card-standing::before {
    opacity: 0.5; /* Имитация блика и лёгкого изгиба, когда карта стоит на ребре */
}

.game-player-card {
    position: relative;
    min-height: 0;
    overflow: hidden;
    background: rgba(10, 10, 20, 0.8);
    border-radius: 10px;
    padding: 4px 2px 6px;
    text-align: center;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 3px 10px rgba(0,0,0,0.4);
    font-size: 10px;
    cursor: default;
    opacity: 0.9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.game-player-card--me {
    box-shadow: 0 0 0 2px rgba(214, 184, 98, 0.9), 0 6px 16px rgba(0,0,0,0.6);
    border-color: rgba(214, 184, 98, 0.9);
}
.game-player-card--dead {
    opacity: 0.35;
    filter: grayscale(0.9);
}
.game-player-seat {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-gold-shine);
    margin-bottom: 2px;
    position: relative;
    top: 4px;
    left: -2px;
    z-index: 0;
}
.game-player-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin: 0 auto 3px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.9);
    background: radial-gradient(circle at 30% 20%, #555, #111);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
}
.game-player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.game-player-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.game-player-status {
    margin-top: 1px;
    font-size: 9px;
}
.game-player-status--alive {
    color: #2ecc71;
}
.game-player-status--dead {
    color: #e74c3c;
    text-decoration: line-through;
}
.game-player-vote-count {
    position: absolute;
    top: 2px;
    left: 2px;
    background: #f39c12;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    z-index: 2;
}
.game-player-role-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, #b71c1c, #e53935);
    color: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.6);
    z-index: 1;
}
.game-player-role-badge--don {
    background: linear-gradient(135deg, #4a148c, #8e24aa);
}
.game-player-card--clickable {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.game-player-card--clickable:hover {
    transform: translateY(-2px);
    background: rgba(20, 20, 35, 0.95);
    border-color: var(--accent-gold-shine);
    box-shadow: 0 6px 18px rgba(0,0,0,0.7);
}
.game-player-card--selected {
    background: rgba(46, 204, 113, 0.16);
    border-color: #2ecc71;
    box-shadow: 0 0 0 1px rgba(46, 204, 113, 0.8), 0 0 18px rgba(46, 204, 113, 0.4);
}
.game-players-board-hint {
    grid-column: 1 / -1;
    font-size: 11px;
    color: rgba(255,255,255,0.85);
    text-align: center;
    margin-bottom: 2px;
}
.game-role-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.15s ease;
    pointer-events: none; /* нажатия обрабатывает карта, не картинка — на Android не предлагает «открыть изображение» */
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}
.game-my-seat-number {
    margin-top: 0;
    margin-right: auto;
    position: relative;
    top: calc(-230px - 2vh);
    left: -47px;
    z-index: 0; /* Всегда под подсказками */
    font-size: 30px;
    font-weight: 600;
    color: var(--accent-gold-shine);
    text-shadow: 0 0 10px rgba(214, 184, 98, 0.35);
    display: none;
}
.game-vote-block,
.game-mafia-list,
.game-sheriff-revealed,
.game-day-votes {
    position: relative;
    z-index: 5; /* Подсказки поверх номера места */
    background: rgba(255,255,255,0.95);
    color: #1a1a2e;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.game-vote-confirm {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
}
.game-vote-block p,
.game-mafia-list p,
.game-sheriff-revealed p {
    margin-bottom: 10px;
    font-weight: 600;
}
.game-day-votes > p {
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--accent-color);
    font-family: Georgia, 'Times New Roman', serif;
    letter-spacing: 0.02em;
    text-shadow: 0 0 12px rgba(214, 184, 98, 0.35);
}
.game-vote-players {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.game-vote-btn {
    background: #1a1a2e;
    color: var(--accent-color);
    border: 2px solid rgba(214, 184, 98, 0.5);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.game-vote-btn:hover {
    background: #252540;
    border-color: var(--accent-color);
    color: var(--accent-gold-highlight);
}
.game-side-panel-unit {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    z-index: 250;
    transform: translateX(280px);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}
.game-side-panel-unit.open {
    transform: translateX(0);
}
.game-side-panel {
    width: 280px;
    min-width: 280px;
    flex-shrink: 0;
    background: rgba(20, 25, 35, 0.98);
    border-left: 1px solid rgba(255,255,255,0.15);
    overflow-y: auto;
}
.game-side-panel-tab {
    width: 20px;
    min-width: 20px;
    height: 40px;
    min-height: 40px;
    flex-shrink: 0;
    align-self: center;
    background: rgba(74, 74, 74, 0.95);
    border: 1px solid rgba(255,255,255,0.12);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: var(--accent-color);
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s, color 0.2s;
    box-shadow: -2px 0 8px rgba(0,0,0,0.4);
}
.game-side-panel-tab:hover {
    background: rgba(90, 90, 90, 0.98);
    color: var(--accent-gold-highlight);
}
.game-side-panel-unit.open .game-side-panel-tab {
    transform: scaleX(-1);
}
.game-side-panel-inner {
    padding: 20px 16px;
}
.game-side-panel-header {
    margin-bottom: 20px;
}
.game-side-panel-header .game-room-name {
    display: block;
    font-weight: 600;
    color: #fff;
    font-size: 16px;
    margin-bottom: 12px;
    word-break: break-word;
}
.game-side-panel-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.game-side-panel-btns .game-btn-back--panel,
.game-side-panel-btns .game-btn-exit--panel {
    width: 100%;
    justify-content: center;
}
.game-side-panel-title {
    margin: 0 0 16px;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.95);
}
.game-side-panel-section {
    margin-bottom: 20px;
}
.game-side-panel-last-game {
    padding: 12px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    font-size: 13px;
}
.game-side-panel-last-game.empty { display: none; }
.game-history-item { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.15); }
.game-history-item:last-child { border-bottom: none; }
.game-history-result { margin: 0 0 6px; font-size: 13px; }
.game-history-players { margin: 0; padding-left: 18px; font-size: 12px; }
.game-side-panel-last-game h4 {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--primary, #2481CC);
}
.game-side-panel-players-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.game-side-panel-player {
    padding: 10px 12px;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
}
.game-side-panel-player-name {
    font-weight: 600;
    color: rgba(255,255,255,0.95);
    margin-bottom: 6px;
}
.game-side-panel-player-name .game-player-num {
    color: var(--accent-gold-shine);
    margin-right: 6px;
    font-weight: 700;
}
.game-side-panel-player-note {
    margin-top: 6px;
}
.game-note-trigger {
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: block;
}
.game-note-trigger:active {
    background: rgba(255,255,255,0.12);
}
.game-note-placeholder {
    color: rgba(255,255,255,0.5);
}
.game-note-edit-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: calc(10px + env(safe-area-inset-top, 0)) 12px 10px;
    background: rgba(20, 25, 35, 0.98);
    border-bottom: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.game-note-edit-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 16px;
}
.game-note-edit-input::placeholder {
    color: rgba(255,255,255,0.5);
}
.game-note-edit-save {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: none;
    background: var(--accent-gold-shine);
    color: #1a1a2e;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.game-note-edit-save:hover,
.game-note-edit-save:active {
    background: var(--accent-gold-shine);
}
.game-result-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.game-result-overlay-inner {
    position: relative;
    text-align: center;
    padding: 24px;
}
.game-result-overlay-text {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.game-result-overlay.game-result-winner .game-result-overlay-text { color: var(--accent-gold-highlight); text-shadow: 0 0 20px rgba(214, 184, 98, 0.5); }
.game-result-overlay.game-result-loser .game-result-overlay-text { color: #fff; }
.game-result-overlay-hint {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-top: 16px;
}
.game-result-overlay-emojis {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.game-result-salute {
    position: absolute;
    font-size: 38px;
    animation: game-salute 2.5s ease-out forwards;
    opacity: 0;
}
@keyframes game-salute {
    0% { transform: scale(0.3); opacity: 1; }
    30% { opacity: 1; }
    100% { transform: translateX(calc((var(--rx, 0) * 80px))) translateY(-180px) scale(1.2); opacity: 0; }
}
.game-result-sad {
    position: absolute;
    top: -40px;
    font-size: 30px;
    animation: game-sad-fall 5s linear forwards;
    opacity: 0;
}
@keyframes game-sad-fall {
    0% { opacity: 0.9; transform: translateY(0) rotate(0deg); }
    100% { opacity: 0.6; transform: translateY(110vh) rotate(720deg); }
}
.game-mafia-list ul,
.game-sheriff-revealed ul,
.game-day-votes ul {
    margin: 0;
    padding-left: 20px;
}
.game-mafia-list li,
.game-sheriff-revealed li {
    margin: 4px 0;
}
.game-day-votes ul {
    list-style: none;
    padding-left: 0;
}
.game-day-votes li {
    margin: 8px 0;
    padding: 8px 12px;
    background: rgba(26, 26, 46, 0.6);
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--accent-gold-shine);
    text-shadow: 0 0 10px rgba(214, 184, 98, 0.3);
}
