/* ════════════════════════════════════════════════════════════
   SYSTEM OF LEVELS & PRIVILEGES - Modern Design
   ════════════════════════════════════════════════════════════ */

/* Level Badges */
.level-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Уровни 1-10: Новичок */
.level-badge.level-1,
.level-badge.level-2,
.level-badge.level-3,
.level-badge.level-4,
.level-badge.level-5,
.level-badge.level-6,
.level-badge.level-7,
.level-badge.level-8,
.level-badge.level-9,
.level-badge.level-10 {
    background: linear-gradient(135deg, #8b7355, #cd7f32);
    color: #fff;
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.4);
}

/* Уровни 11-20: Опытный */
.level-badge.level-11,
.level-badge.level-12,
.level-badge.level-13,
.level-badge.level-14,
.level-badge.level-15,
.level-badge.level-16,
.level-badge.level-17,
.level-badge.level-18,
.level-badge.level-19,
.level-badge.level-20 {
    background: linear-gradient(135deg, #8b8b8b, #c5c5c5);
    color: #fff;
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.4);
}

/* Уровни 21-30: Профи */
.level-badge.level-21,
.level-badge.level-22,
.level-badge.level-23,
.level-badge.level-24,
.level-badge.level-25,
.level-badge.level-26,
.level-badge.level-27,
.level-badge.level-28,
.level-badge.level-29,
.level-badge.level-30 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #1a1a1a;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    animation: pulse-gold 2s ease-in-out infinite;
}

/* Уровни 31-40: Мастер */
.level-badge.level-31,
.level-badge.level-32,
.level-badge.level-33,
.level-badge.level-34,
.level-badge.level-35,
.level-badge.level-36,
.level-badge.level-37,
.level-badge.level-38,
.level-badge.level-39,
.level-badge.level-40 {
    background: linear-gradient(90deg, #b8b6b4 0%, #e5e4e2 25%, #ffffff 50%, #e5e4e2 75%, #b8b6b4 100%);
    background-size: 200% auto;
    color: #1a1a1a;
    box-shadow: 0 0 25px rgba(229, 228, 226, 0.5);
    animation: platinum-shine 3s ease-in-out infinite;
}

/* Уровни 41-50: Диамант */
.level-badge.level-41,
.level-badge.level-42,
.level-badge.level-43,
.level-badge.level-44,
.level-badge.level-45,
.level-badge.level-46,
.level-badge.level-47,
.level-badge.level-48,
.level-badge.level-49,
.level-badge.level-50 {
    background: linear-gradient(90deg, #00bcd4 0%, #4dd0e1 25%, #b9f2ff 50%, #4dd0e1 75%, #00bcd4 100%);
    background-size: 200% auto;
    color: #fff;
    box-shadow: 0 0 30px rgba(0, 188, 212, 0.6);
    animation: diamond-shine 2.5s ease-in-out infinite;
}

/* Уровни 51+: Легенда */
.level-badge[class*="level-"]:not([class*="level-1"]):not([class*="level-2"]):not([class*="level-3"]):not([class*="level-4"]):not([class*="level-5"]):not([class*="level-6"]):not([class*="level-7"]):not([class*="level-8"]):not([class*="level-9"]):not([class*="level-10"]):not([class*="level-11"]):not([class*="level-12"]):not([class*="level-13"]):not([class*="level-14"]):not([class*="level-15"]):not([class*="level-16"]):not([class*="level-17"]):not([class*="level-18"]):not([class*="level-19"]):not([class*="level-20"]):not([class*="level-21"]):not([class*="level-22"]):not([class*="level-23"]):not([class*="level-24"]):not([class*="level-25"]):not([class*="level-26"]):not([class*="level-27"]):not([class*="level-28"]):not([class*="level-29"]):not([class*="level-30"]):not([class*="level-31"]):not([class*="level-32"]):not([class*="level-33"]):not([class*="level-34"]):not([class*="level-35"]):not([class*="level-36"]):not([class*="level-37"]):not([class*="level-38"]):not([class*="level-39"]):not([class*="level-40"]):not([class*="level-41"]):not([class*="level-42"]):not([class*="level-43"]):not([class*="level-44"]):not([class*="level-45"]):not([class*="level-46"]):not([class*="level-47"]):not([class*="level-48"]):not([class*="level-49"]):not([class*="level-50"]) {
    background: linear-gradient(90deg, #ff0080 0%, #ff8c00 25%, #ffd700 50%, #40e0d0 75%, #ff0080 100%);
    background-size: 200% auto;
    color: #fff;
    box-shadow: 0 0 35px rgba(255, 0, 128, 0.7);
    animation: legend-rainbow 3s linear infinite;
}

/* Анимации */
@keyframes pulse-gold {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
    50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(255, 215, 0, 0.8); }
}

@keyframes platinum-shine {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

@keyframes diamond-shine {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

@keyframes legend-rainbow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Level XP Display */
.level-xp {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 8px;
    font-weight: 500;
}

/* Privileges System */
.privileges-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.privilege-card {
    padding: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.privilege-card:hover {
    transform: translateY(-5px);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.privilege-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.privilege-card:hover::before {
    transform: scaleX(1);
}

.privilege-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.privilege-icon {
    width: 48px;
    height: 48px;
    padding: 10px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.privilege-icon svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.privilege-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.privilege-level {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.privilege-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 12px;
}

/* Level Requirements */
.level-requirements {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.level-requirements-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.requirement-item svg {
    width: 16px;
    height: 16px;
    color: var(--success);
    flex-shrink: 0;
}

/* Privileges Info Section */
.privileges-info-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 20px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

/* Компактное отображение привилегий */
.privileges-compact-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.privilege-group-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.privilege-group-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.privilege-group-card.unlocked::before {
    opacity: 0.3;
}

.privilege-group-card.current::before {
    opacity: 1;
    background: var(--success);
}

.privilege-group-card.unlocked {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(102, 126, 234, 0.03));
}

.privilege-group-card.locked {
    opacity: 0.7;
    filter: grayscale(0.2);
}

.privilege-group-card.current {
    border-color: rgba(16, 185, 129, 0.6);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(102, 126, 234, 0.05));
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
}

.privilege-group-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.privilege-group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 16px;
    flex-wrap: wrap;
}

.privilege-group-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.privilege-group-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.privilege-group-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.privilege-group-icon svg {
    width: 100%;
    height: 100%;
}

.privilege-group-card.unlocked .privilege-group-icon {
    color: var(--success);
}

.privilege-group-card.current .privilege-group-icon {
    color: var(--success);
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.4));
}

.privilege-group-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.privilege-group-levels {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.privilege-group-current-badge {
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--success);
    white-space: nowrap;
}

.privilege-group-unlocked-badge {
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--success);
    white-space: nowrap;
}

.privilege-group-locked-badge {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.privilege-group-locked-badge svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.privilege-group-privileges {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.privilege-item-compact {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.privilege-item-compact:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateX(4px);
}

.privilege-item-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
    margin-top: 2px;
}

.privilege-item-icon svg {
    width: 100%;
    height: 100%;
}

.privilege-group-card.unlocked .privilege-item-icon {
    color: var(--success);
}

.privilege-group-card.current .privilege-item-icon {
    color: var(--success);
}

.privilege-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.privilege-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.privilege-item-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.privilege-group-card.locked .privilege-item-compact {
    opacity: 0.6;
}

.privilege-group-card.current .privilege-item-compact {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.15);
}

.privileges-info-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.privileges-info-title svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.privileges-info-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 30px;
}

.privileges-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.privileges-section {
    margin-bottom: 40px;
}

.privileges-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.privileges-section-title svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.privileges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.privilege-card {
    position: relative;
    padding: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.privilege-card.unlocked {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(102, 126, 234, 0.05));
}

.privilege-card.locked {
    opacity: 0.7;
    filter: grayscale(0.3);
}

.privilege-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.privilege-card.unlocked:hover {
    border-color: rgba(16, 185, 129, 0.5);
}

.privilege-card.locked:hover {
    border-color: rgba(102, 126, 234, 0.3);
}

.privilege-lock-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

.privilege-lock-overlay svg {
    width: 14px;
    height: 14px;
}

.privilege-icon {
    width: 56px;
    height: 56px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.privilege-card.unlocked .privilege-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(102, 126, 234, 0.2));
}

.privilege-icon svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.privilege-card.unlocked .privilege-icon svg {
    color: var(--success);
}

.privilege-content {
    flex: 1;
}

.privilege-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.privilege-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.privilege-level-badge {
    padding: 4px 10px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

.privilege-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.privilege-why {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border-left: 3px solid var(--primary);
}

.privilege-card.unlocked .privilege-why {
    background: rgba(16, 185, 129, 0.05);
    border-left-color: var(--success);
}

.privilege-why svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.privilege-card.unlocked .privilege-why svg {
    color: var(--success);
}

.privilege-why strong {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.privilege-why p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.no-privileges {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .privileges-container,
    .privileges-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .privilege-card {
        padding: 20px;
    }
    
    .privileges-info-section {
        padding: 20px;
        margin-top: 30px;
    }
    
    .privileges-info-title {
        font-size: 20px;
    }
    
    .privileges-section-title {
        font-size: 18px;
    }
    
    .level-badge {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .privilege-group-card {
        padding: 16px;
    }
    
    .privilege-group-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .privilege-group-current-badge,
    .privilege-group-unlocked-badge,
    .privilege-group-locked-badge {
        align-self: flex-start;
    }
    
    .privilege-group-privileges {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .privilege-group-name {
        font-size: 18px;
    }
}

