/* Основной контейнер */
.privileges-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Шапка с балансом */
.privileges-header {
    text-align: center;
    margin-bottom: 30px;
}

.privileges-header h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.balance-display {
    display: inline-block;
    background: linear-gradient(135deg, #2a2a3a 0%, #1a1a2a 100%);
    border-radius: 25px;
    padding: 12px 30px;
    border: 2px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.balance-label {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-weight: 600;
    margin-right: 10px;
}

.balance-amount {
    color: #4CAF50;
    font-size: 24px;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* Информация о текущей привилегии */
.current-privilege-info {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(76, 175, 80, 0.05) 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border: 2px solid rgba(76, 175, 80, 0.3);
    text-align: center;
}

.privilege-active-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.privilege-active-badge i {
    color: #FFD700;
    font-size: 24px;
}

.privilege-name {
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.privilege-name strong {
    color: #FFD700;
}

.privilege-expires {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    background: rgba(0,0,0,0.2);
    padding: 5px 15px;
    border-radius: 20px;
}

.privilege-hint {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    font-style: italic;
}

/* Основной контейнер с боковой панелью и карточками */
.main-content {
    display: flex;
    gap: 30px;
}

/* Боковая панель с категориями */
.categories-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #2b0047;
    border-radius: 20px;
    padding: 12px;
    height: fit-content;
    position: sticky;
    top: 10px;
}

.categories-sidebar h3 {
    color: white;
    font-size: 17px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border-bottom: 2px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.category-btn {
    background: #620098;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 15px 20px;
    color: rgba(255,255,255,0.9);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-btn.active {
    background: #7800b9;
    
}

.category-btn i {
    font-size: 18px;
}

/* Контейнер карточек - 3 в ряд */
.cards-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    justify-content: center;
}

.models-cards {
    display: none; /* Скрыто по умолчанию */
}

.cards-grid.active {
    display: grid;
}

/* Карточка привилегии */
.privilege-card,
.model-card {
    width: 100%;
    height: 580px;
    
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}



.privilege-card.user-has-privilege,
.model-card.user-has-model {
    border: 2px solid;
    box-shadow: 0 0 20px rgba(255,255,255,0.1);
}

/* Изображение карточки */
.card-image {
    width: 100%;
    height: 150px;
    position: relative;
    overflow: hidden;
}

.image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
}

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

.privilege-card:hover .card-image img,
.model-card:hover .card-image img {
    transform: scale(1.05);
}

.user-has-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.2);
}

.user-has-badge i {
    font-size: 10px;
}

/* Заголовок карточки */
.card-title {
    padding: 12px 15px;
    text-align: center;

    position: relative;
    top: -5px;
}

.card-title h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Особенности привилегии */
.card-features {
    flex: 1;
    min-height: 120px;
    max-height: 180px; /* Максимальная высота перед появлением скроллбара */
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto; /* Включаем вертикальный скролл */
    overflow-x: hidden;
    margin: 0 15px;
    
    border-radius: 8px;
   
}
/* Увеличиваем максимальную высоту для привилегий с большим количеством возможностей */
.privilege-card .card-features {
    max-height: 200px; /* Больше места для LEGEND */
}

/* Стилизация скроллбара для WebKit браузеров (Chrome, Safari, Edge) */
.card-features::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}

.card-features::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
    margin: 4px 0;
}

.card-features::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.card-features::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Стилизация скроллбара для Firefox */
.card-features {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) rgba(255, 255, 255, 0.03);
}
/* Адаптивные стили для скроллбара */
@media (max-width: 768px) {
    .card-features {
        max-height: 150px;
        padding: 10px 12px;
        gap: 5px;
    }
    
    .privilege-card .card-features {
        max-height: 180px;
    }
}

/* Улучшаем отображение элементов в скроллящемся списке */
.feature-item {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    font-weight: 500;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 5px;
   
    transition: all 0.2s ease;
    line-height: 1.3;
    word-break: break-word;
}


/* Убираем полосу прокрутки у выпадающих списков длительности */
.duration-dropdown {
    scrollbar-width: none; /* Для Firefox */
}

.duration-dropdown::-webkit-scrollbar {
    display: none; /* Для WebKit браузеров */
}

/* Выбор длительности */
.duration-selector {
    margin: 0 15px 12px;
    position: relative;
    z-index: 10;
}

.duration-current {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
}

.duration-current:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

.duration-current .arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.duration-selector.active .duration-current .arrow {
    transform: rotate(180deg);
}

.duration-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a2a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    margin-top: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    max-height: 200px;
    overflow-y: auto;
}

.duration-selector.active .duration-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.duration-option {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 13px;
}

.duration-option:last-child {
    border-bottom: none;
}

.duration-option:hover {
    background: rgba(255,255,255,0.1);
}

.duration-option.active {
    background: rgba(255,255,255,0.15);
    font-weight: 600;
}

.duration-option .price {
    color: #4CAF50;
    font-weight: 700;
    font-size: 13px;
}

/* Отображение цены */
.price-display {
    margin: 0 15px 15px;
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    border: 2px solid;
}

.price-amount {
    font-size: 26px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Кнопка покупки */
.privilege-form {
    margin: 0 15px 15px;
}

.buy-button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.buy-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    filter: brightness(1.1);
}

.buy-button:active:not(:disabled) {
    transform: translateY(-1px);
}

.buy-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

/* Сообщение о недостатке средств */
.insufficient-funds {
    color: #f44336;
    font-size: 12px;
    text-align: center;
    margin-top: 8px;
    font-weight: 600;
    opacity: 0.8;
}

/* Сообщения об успехе/ошибке */
.lk-balance-success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(76, 175, 80, 0.1) 100%);
    color: #4CAF50;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 2px solid rgba(76, 175, 80, 0.3);
    font-weight: 600;
    text-align: center;
    font-size: 15px;
    position: relative;
    overflow: hidden;
}

.lk-balance-success:before {
    content: "✓";
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: bold;
}

.lk-balance-error {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.2) 0%, rgba(244, 67, 54, 0.1) 100%);
    color: #f44336;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 2px solid rgba(244, 67, 54, 0.3);
    font-weight: 600;
    text-align: center;
    font-size: 15px;
    position: relative;
    overflow: hidden;
}

.lk-balance-error:before {
    content: "✗";
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: bold;
}

/* Анимация загрузки */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading:after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Адаптивность */
@media (max-width: 1200px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .categories-sidebar {
        position: static;
    }
}

@media (max-width: 992px) {
    .main-content {
        flex-direction: column;
    }
    
    .categories-sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .privileges-container {
        padding: 15px;
    }
    
    .privileges-header h1 {
        font-size: 28px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .privilege-card,
    .model-card {
        max-width: 100%;
        height: auto;
        min-height: 540px;
    }
    
    .card-image {
        height: 130px;
    }
    
    .price-amount {
        font-size: 24px;
    }
    
    .buy-button {
        padding: 12px;
        font-size: 15px;
    }
    
    .privilege-active-badge {
        flex-direction: column;
        gap: 10px;
    }
    
    .lk-balance-success:before,
    .lk-balance-error:before {
        position: relative;
        left: 0;
        top: 0;
        transform: none;
        margin-right: 10px;
    }
}

@media (max-width: 480px) {
    .privileges-header h1 {
        font-size: 24px;
    }
    
    .balance-amount {
        font-size: 20px;
    }
    
    .card-title h3 {
        font-size: 20px;
    }
    
    .price-amount {
        font-size: 22px;
    }
    
    .feature-item {
        font-size: 12px;
        padding: 5px 8px;
    }
}

/* Контейнер для контента */
.content-container {
    flex: 1;
}

/* Секции контента */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Длительность для моделей */
.duration-info {
    margin: 0 15px 12px;
    padding: 10px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

/* Карточка разбана */
.unban-card {
    width: 100%;
    height: 580px;
   
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.unban-card.user-has-unban {
    border: 2px solid #4CAF50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.1);
}

.unban-card.user-has-unban .card-image:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(76, 175, 80, 0.1);
}

.unban-card .buy-button:disabled {
    background: #666 !important;
}

/* Стили для статуса гостя */
.privilege-card .price-display[style*="background: rgba(255,255,255,0.05)"],
.model-card .price-display[style*="background: rgba(255,255,255,0.05)"],
.unban-card .price-display[style*="background: rgba(255,255,255,0.05)"] {
    margin: 15px;
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    font-weight: 600;
    font-size: 14px;
}

/* Стили для информации о регистрации */
.balance-display[style*="background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%)"] {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Стили для сообщений о необходимости авторизации */
.lk-balance-error[style*="text-align: center;"] {
    text-align: center !important;
    padding: 20px !important;
    font-size: 16px !important;
    margin-bottom: 30px !important;
    border-radius: 15px !important;
}

.lk-balance-error[style*="text-align: center;"] i {
    margin-right: 10px;
    font-size: 20px;
}

/* Стили для информационных сообщений */
.lk-balance-error[style*="background: linear-gradient(135deg, #3498db 0%, #2980b9 100%)"] {
    border: 2px solid rgba(52, 152, 219, 0.3) !important;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

/* Отключаем взаимодействие для гостей */
.privilege-card .duration-selector:not(.active),
.model-card .duration-selector:not(.active),
.unban-card .duration-selector:not(.active) {
    opacity: 0.6;
}

/* Стили для неактивных карточек привилегий у гостей */
.privilege-card .card-image img,
.model-card .card-image img,
.unban-card .card-image img {
    transition: all 0.3s ease;
}

.privilege-card:hover .card-image img,
.model-card:hover .card-image img,
.unban-card:hover .card-image img {
    transform: scale(1.02);
}

/* Адаптивные стили для информационных блоков */
@media (max-width: 768px) {
    .balance-display[style*="background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%)"] {
        font-size: 12px;
        padding: 8px 15px;
    }
    
    .privilege-card .price-display[style*="background: rgba(255,255,255,0.05)"],
    .model-card .price-display[style*="background: rgba(255,255,255,0.05)"],
    .unban-card .price-display[style*="background: rgba(255,255,255,0.05)"] {
        margin: 10px;
        padding: 10px;
        font-size: 12px;
    }
}