/* === МОДАЛКА ЛИДЕРБОРДА === */
.leaderboard-content {
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.leaderboard-tabs {
    display: flex;
    gap: 6px;
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}
.leaderboard-tab {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    color: #666;
}
.leaderboard-tab:hover { background: #eee; }
.leaderboard-tab.active {
    background: #ff9de2;
    color: white;
    border-color: #ff9de2;
}
.leaderboard-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px 20px 20px;
}
.leaderboard-entry {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 10px;
    margin-bottom: 4px;
    transition: background 0.2s;
    gap: 10px;
}
.leaderboard-entry:hover { background: #f5f5f5; }
.leaderboard-entry.is-me {
    background: #fff0f9;
    border: 1px solid #ff9de2;
}
.leaderboard-rank {
    width: 28px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    color: #999;
    flex-shrink: 0;
}
.leaderboard-rank.gold { color: #ffc107; font-size: 18px; }
.leaderboard-rank.silver { color: #b0b0b0; font-size: 16px; }
.leaderboard-rank.bronze { color: #cd7f32; font-size: 15px; }
.leaderboard-name {
    flex-grow: 1;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.leaderboard-value {
    font-weight: bold;
    font-size: 14px;
    color: #ff7eb3;
    flex-shrink: 0;
}
.leaderboard-level {
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
    min-width: 50px;
    text-align: right;
}

/* === МОДАЛКА ДОСТИЖЕНИЙ === */
.achievements-content {
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.achievements-content .modal-header {
    padding: 15px 20px;
}

.achievements-content .achievements-categories {
    padding: 10px 20px;
}

.achievements-stats {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

/* === ЕЖЕДНЕВНАЯ НАГРАДА В МОДАЛКЕ === */
.daily-streak-bar {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.daily-title {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #e67e22;
    margin-bottom: 10px;
}

.daily-days {
    display: flex;
    gap: 4px;
    justify-content: center;
    overflow-x: auto;
}

.daily-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    border-radius: 10px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    min-width: 60px;
    transition: all 0.2s ease;
}

.daily-day.reached {
    background: #e8f5e9;
    border-color: #66bb6a;
    opacity: 0.7;
}

.daily-day.current {
    background: #fff8e1;
    border-color: #ffd54f;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    opacity: 1;
}

.daily-day .day-emoji {
    font-size: 20px;
}

.daily-day .day-label {
    font-size: 10px;
    font-weight: 600;
    color: #666;
}

.daily-day .day-reward {
    font-size: 9px;
    color: #888;
    text-align: center;
    white-space: nowrap;
}

.daily-streak-text {
    text-align: center;
    font-size: 13px;
    color: #e67e22;
    font-weight: 600;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .daily-day {
        min-width: 44px;
        padding: 4px 5px;
    }
    .daily-day .day-emoji { font-size: 16px; }
    .daily-day .day-label { font-size: 8px; }
    .daily-day .day-reward { font-size: 7px; }
    .daily-days { gap: 2px; }
}

.achievements-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px 0;
    overflow-y: auto;
    flex: 1;
}

.achievement-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 12px;
    background: #f8f8f8;
    border: 2px solid #eee;
    transition: all 0.2s ease;
}

.achievement-card.unlocked {
    background: linear-gradient(135deg, #f0fff0, #e8f8e8);
    border-color: #8bc34a;
}

.achievement-card.locked {
    opacity: 0.7;
}

.achievement-card .ach-icon {
    font-size: 32px;
    width: 50px;
    text-align: center;
    flex-shrink: 0;
}

.achievement-card .ach-info {
    flex: 1;
    min-width: 0;
}

.achievement-card .ach-name {
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

.achievement-card .ach-desc {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

.achievement-card .ach-reward {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.achievement-card .ach-status {
    font-size: 20px;
    flex-shrink: 0;
}

.achievement-card .ach-progress {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.achievement-card .ach-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8bc34a, #4caf50);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.achievements-categories {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 10px 0 0;
    border-top: 1px solid #eee;
}

.ach-cat {
    padding: 6px 16px;
    border-radius: 20px;
    border: 2px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    color: #666;
}

.ach-cat.active {
    background: #8bc34a;
    border-color: #8bc34a;
    color: #fff;
}

.ach-cat:hover {
    border-color: #8bc34a;
}

/* === УВЕДОМЛЕНИЕ О ДОСТИЖЕНИИ === */
.achievement-popup {
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 25px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #ffd700;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 30px rgba(255, 215, 0, 0.2);
    transition: top 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 450px;
    pointer-events: none;
}

.achievement-popup.show {
    top: 30px;
}

.ach-popup-icon {
    font-size: 48px;
    flex-shrink: 0;
}

.ach-popup-content {
    color: #fff;
}

.ach-popup-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffd700;
    font-weight: 700;
    margin-bottom: 4px;
}

.ach-popup-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
}

.ach-popup-desc {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 4px;
}

.ach-popup-title-tag, .ach-popup-bits {
    font-size: 12px;
    color: #ffd700;
    font-weight: 600;
}

/* === ПРОФИЛЬ ИГРОКА === */
.profile-content {
    max-width: 400px !important;
    max-height: 70vh !important;
}

.profile-body {
    padding: 15px 0;
}

.profile-main {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.profile-titles {
    margin-top: 8px;
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 14px;
    color: #8bc34a;
    font-weight: 600;
}

.profile-stats {
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-stat {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #555;
    padding: 4px 10px;
    background: #f8f8f8;
    border-radius: 8px;
}

.profile-stat span:last-child {
    font-weight: 600;
    color: #333;
}

.profile-achievements {
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.profile-ach-title {
    font-size: 15px;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
}

.profile-ach-icons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.profile-ach-icon {
    font-size: 24px;
    cursor: default;
    transition: transform 0.2s ease;
}

.profile-ach-icon:hover {
    transform: scale(1.3);
}

/* === КНОПКА ПРОФИЛЯ В СПИСКЕ ИГРОКОВ === */
.player-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px !important;
    gap: 8px;
}

.player-list-info {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.player-list-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.track-btn, .profile-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.track-btn:hover, .profile-btn:hover {
    background: #f0f0f0;
    border-color: #aaa;
}

.profile-btn {
    font-size: 15px;
}

/* === XP BAR === */
#xp-bar-container {
    position: fixed;
    bottom: 75px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 18px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    overflow: hidden;
    z-index: 450;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #a855f7, #6366f1, #3b82f6);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.xp-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    #xp-bar-container {
        bottom: 65px;
        width: 150px;
        height: 16px;
    }
    .xp-bar-text {
        font-size: 9px;
    }
}

