/* ========== ГЛАВНОЕ МЕНЮ ========== */
.main-menu {
    height: 100vh;
    height: 100svh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
    box-sizing: border-box;
}

.menu-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 16px;
    max-width: 1000px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    height: calc(100vh - 16px);
    height: calc(100svh - 16px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

/* ========== HEADER: заголовок + кнопки ========== */
.menu-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.menu-title {
    font-size: clamp(1.2em, 4vw, 2.5em);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex: 1;
    text-align: center;
    line-height: 1.1;
}

.menu-header-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.sound-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 10px;
    transition: all 0.2s;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.sound-btn:hover {
    transform: scale(1.1);
}

.menu-sound-btn {
    position: static;
}

/* ========== НАВИГАЦИЯ ========== */
.menu-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    justify-content: center;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.menu-nav-btn {
    padding: 6px 10px;
    border: none;
    background: #f0f0f0;
    border-radius: 8px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    white-space: nowrap;
}

.menu-nav-btn:hover {
    background: #e0e0e0;
}

.menu-nav-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* ========== КОНТЕНТ МЕНЮ ========== */
.menu-content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.menu-tab {
    display: none;
}

.menu-tab.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

/* Чат занимает всю высоту */
#tab-chat.active {
    overflow: hidden;
}

#tab-chat .chat-container {
    flex: 1;
    min-height: 0;
}

.menu-tab h2 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
    flex-shrink: 0;
}

/* ========== СТАТИСТИКА ИГРОКА ========== */
.player-stats-bar {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #eee;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-label {
    color: #666;
    font-size: 0.7em;
}

.stat-value {
    font-size: 1em;
    font-weight: bold;
    color: #667eea;
}

.stat-icon {
    font-size: 1.5em;
    line-height: 1;
}

/* ========== ПРОФИЛЬ В HEADER ========== */
.profile-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.2s;
}

.profile-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.profile-frame {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-image: url('/images/photo.png');
    background-size: cover;
    background-position: center;
    border: 2px solid #fff;
}

.profile-name {
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-frame.frame-default { border-color: #666; }
.profile-frame.frame-bronze { border-color: #CD7F32; }
.profile-frame.frame-silver { border-color: #C0C0C0; }
.profile-frame.frame-gold { border-color: #FFD700; }
.profile-frame.frame-platinum { border-color: #E5E4E2; }
.profile-frame.frame-diamond { border-color: #B9F2FF; box-shadow: 0 0 10px #B9F2FF; }

/* ========== DESKTOP ========== */
@media (min-width: 900px) {
    .menu-container {
        padding: 24px;
        height: auto;
        max-height: calc(100svh - 20px);
    }
    
    .menu-nav-btn {
        padding: 10px 18px;
        font-size: 1em;
    }
    
    .stat-label {
        font-size: 0.85em;
    }
    
    .stat-value {
        font-size: 1.3em;
    }
    
    .player-stats-bar {
        gap: 30px;
    }
}

/* ========== БОЛЬШИЕ ЭКРАНЫ ========== */
@media (min-width: 1050px) {
    .menu-container {
        max-width: 1200px;
        padding: 32px 40px;
    }
    
    .menu-title {
        font-size: 3em;
    }
    
    .menu-nav-btn {
        padding: 12px 24px;
        font-size: 1.1em;
    }
    
    .player-stats-bar {
        gap: 40px;
        padding-top: 16px;
        margin-top: 16px;
    }
    
    .stat-label {
        font-size: 0.9em;
    }
    
    .stat-value {
        font-size: 1.5em;
    }
}

@media (min-width: 1400px) {
    .menu-container {
        max-width: 1400px;
        padding: 40px 50px;
    }
}
