/**
 * Стили каталога релизов
 * В стиле личного кабинета
 */

/* ========================================
   Общий layout каталога
======================================== */

.catalog-page {
    min-height: 100vh;
    background: #000;
    padding: 100px 20px 40px;
}

.catalog-header {
    margin-bottom: 40px;
    text-align: center;
}

.catalog-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 12px;
}

.catalog-subtitle {
    font-size: 1.1rem;
    color: #94a3b8;
}

/* ========================================
   Фильтры
======================================== */

.catalog-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.filter-input::placeholder {
    color: #64748b;
}

.filter-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%238B5CF6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
}

.filter-select option {
    background: #1a1a2e;
    color: #fff;
}

/* ========================================
   Таблица релизов
======================================== */

.catalog-table-container {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    margin-bottom: 30px;
}

.catalog-table {
    width: 100%;
    border-collapse: collapse;
}

.catalog-table thead {
    background: rgba(139, 92, 246, 0.1);
}

.catalog-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #8B5CF6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.catalog-table tbody tr {
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.catalog-table tbody tr:hover {
    background: rgba(139, 92, 246, 0.1);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.catalog-table tbody tr:last-child {
    border-bottom: none;
}

.catalog-table td {
    padding: 16px 20px;
    color: #cbd5e1;
    font-size: 0.95rem;
    vertical-align: middle;
}

/* Колонки */
.col-title {
    width: 35%;
    font-weight: 600;
    color: #fff;
}

.col-artist {
    width: 20%;
}

.col-type {
    width: 12%;
}

.col-genre {
    width: 15%;
}

.col-date {
    width: 12%;
}

.col-ai {
    width: 6%;
    text-align: center;
}

/* Название релиза */
.release-title-link {
    color: #fff;
    font-weight: 600;
    transition: all 0.3s ease;
}

.catalog-row:hover .release-title-link {
    background: linear-gradient(135deg, #A78BFA, #EC4899);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Бейджи типа релиза */
.type-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid;
}

.type-badge.single {
    background: rgba(139, 92, 246, 0.2);
    color: #8B5CF6;
    border-color: rgba(139, 92, 246, 0.3);
}

.type-badge.ep {
    background: rgba(236, 72, 153, 0.2);
    color: #EC4899;
    border-color: rgba(236, 72, 153, 0.3);
}

.type-badge.album {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.3);
}

.type-badge.compilation {
    background: rgba(251, 146, 60, 0.2);
    color: #fb923c;
    border-color: rgba(251, 146, 60, 0.3);
}

/* AI бейдж */
.ai-badge {
    font-size: 20px;
}

/* ========================================
   Пагинация
======================================== */

.catalog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
}

.page-btn {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #cbd5e1;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    color: #fff;
    transform: translateY(-2px);
}

.page-btn.active {
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.page-dots {
    color: #64748b;
    padding: 0 8px;
    font-weight: 600;
}

/* ========================================
   Состояния загрузки
======================================== */

.loading-state,
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(139, 92, 246, 0.2);
    border-top-color: #8B5CF6;
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p,
.empty-state p {
    color: #94a3b8;
    font-size: 1.1rem;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

/* ========================================
   Модальное окно (из cabinet.css)
======================================== */

.release-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.release-modal-overlay.active {
    display: flex;
}

.release-modal {
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideUp 0.3s ease;
}

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

/* Кастомный скроллбар */
.release-modal::-webkit-scrollbar {
    width: 12px;
}

.release-modal::-webkit-scrollbar-track {
    background: rgba(15, 15, 30, 0.5);
    border-radius: 0 24px 24px 0;
}

.release-modal::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    border-radius: 6px;
    border: 2px solid rgba(26, 26, 46, 0.95);
}

.release-modal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #9F7AEA, #F472B6);
}

.release-modal {
    scrollbar-width: thin;
    scrollbar-color: #8B5CF6 rgba(15, 15, 30, 0.5);
}

.release-modal-header {
    position: sticky;
    top: 0;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(10px);
    padding: 24px 30px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.release-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ef4444;
    flex-shrink: 0;
}

.release-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.release-modal-body {
    padding: 30px;
}

/* Информация о релизе (без обложки в каталоге) */
.release-modal-info-full {
    margin-bottom: 30px;
}

.release-type-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    border: 1px solid;
}

.release-type-badge.single {
    background: rgba(139, 92, 246, 0.2);
    color: #8B5CF6;
    border-color: rgba(139, 92, 246, 0.3);
}

.release-type-badge.ep {
    background: rgba(236, 72, 153, 0.2);
    color: #EC4899;
    border-color: rgba(236, 72, 153, 0.3);
}

.release-type-badge.album {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.3);
}

.release-type-badge.compilation {
    background: rgba(251, 146, 60, 0.2);
    color: #fb923c;
    border-color: rgba(251, 146, 60, 0.3);
}

.release-modal-info-full h2 {
    font-size: 2rem;
    margin: 0 0 8px 0;
    color: #fff;
}

.release-modal-artist {
    font-size: 1.25rem;
    color: #8B5CF6;
    margin: 0 0 20px 0;
    font-weight: 600;
}

.release-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 20px;
    background: rgba(15, 15, 30, 0.5);
    border-radius: 12px;
    margin-bottom: 20px;
}

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

.info-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-size: 1rem;
    color: #fff;
    font-weight: 600;
}

/* Описание */
.release-description {
    padding: 20px;
    background: rgba(15, 15, 30, 0.5);
    border-radius: 12px;
    margin-bottom: 20px;
}

.release-description h3 {
    margin: 0 0 12px 0;
    font-size: 1.125rem;
    color: #fff;
}

.release-description p {
    margin: 0;
    color: #94a3b8;
    line-height: 1.6;
}

/* Треклист */
.release-modal-tracklist {
    padding: 20px;
    background: rgba(15, 15, 30, 0.5);
    border-radius: 12px;
    margin-bottom: 20px;
}

.release-modal-tracklist h3 {
    margin: 0 0 16px 0;
    font-size: 1.125rem;
    color: #fff;
}

.modal-track-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: rgba(26, 26, 46, 0.5);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.modal-track-item:hover {
    background: rgba(139, 92, 246, 0.1);
}

.modal-track-item:last-child {
    margin-bottom: 0;
}

.modal-track-info {
    flex: 1;
    min-width: 0;
}

.modal-track-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.explicit-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 4px;
    color: #ef4444;
    font-size: 11px;
    font-weight: 700;
}

.modal-track-isrc {
    font-size: 0.75rem;
    color: #64748b;
    font-family: monospace;
}

.modal-track-duration {
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.modal-track-platforms {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.modal-platform-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: white !important;
    text-decoration: none;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.modal-platform-icon-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.modal-platform-icon-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.modal-track-platforms .no-platforms-hint {
    font-size: 0.7rem;
    color: #999;
    font-style: italic;
}

/* Обратная совместимость */
.modal-track-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Кнопки треков - как в личном кабинете */
.modal-track-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.modal-track-btn-listen {
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    color: #fff;
}

.modal-track-btn-listen:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

.modal-track-btn-download {
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #8B5CF6;
}

.modal-track-btn-download:hover {
    background: rgba(139, 92, 246, 0.3);
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

/* Коды дистрибуции */
.release-codes {
    padding: 20px;
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    margin-bottom: 20px;
}

.release-codes h3 {
    margin: 0 0 16px 0;
    font-size: 1.125rem;
    color: #fff;
}

.code-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: rgba(15, 15, 30, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
}

.code-item:last-child {
    margin-bottom: 0;
}

.code-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
    min-width: 80px;
}

.code-value {
    flex: 1;
    color: #fff;
    font-family: monospace;
    font-size: 0.875rem;
}

/* Действия с релизом */
.release-modal-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.modal-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

.modal-action-btn.primary {
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    color: #fff;
}

.modal-action-btn.secondary {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #8B5CF6;
}

.modal-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* ========================================
   Адаптивность
======================================== */

@media (max-width: 1024px) {
    .col-genre {
        display: none;
    }
}

@media (max-width: 768px) {
    .catalog-page {
        padding: 100px 16px 24px;
    }

    .catalog-title {
        font-size: 1.75rem;
    }

    .catalog-filters {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .catalog-table-container {
        overflow-x: auto;
    }

    .catalog-table {
        min-width: 600px;
    }

    .col-date {
        display: none;
    }

    .release-modal {
        border-radius: 16px;
    }

    .release-modal-body {
        padding: 20px;
    }

    .release-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .modal-action-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .catalog-page {
        padding: 80px 12px 24px;
    }

    .catalog-title {
        font-size: 1.5rem;
    }

    .catalog-subtitle {
        font-size: 1rem;
    }

    .catalog-table th,
    .catalog-table td {
        padding: 12px 10px;
        font-size: 0.875rem;
    }

    .col-type {
        display: none;
    }

    .modal-track-item {
        flex-wrap: wrap;
        gap: 10px;
    }

    .modal-track-duration {
        order: 2;
    }

    .modal-track-actions {
        order: 3;
        width: 100%;
        justify-content: flex-end;
    }

    .modal-track-platforms {
        order: 3;
        width: 100%;
        justify-content: flex-start;
    }

    .release-modal {
        width: 100vw !important;
        max-width: 100vw !important;
        border-radius: 0;
    }

    .release-modal-header {
        padding: 16px 20px;
    }

    .release-modal-header h2 {
        font-size: 1.25rem !important;
    }

    .release-modal-body {
        padding: 16px;
    }

    .code-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
