/* Extracted from style.css: shared modal styles */
.music-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    visibility: hidden;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 1;
    transition: none;
    pointer-events: none;
}

.music-modal.active {
    display: flex;
    visibility: visible;
    pointer-events: auto;
}



.music-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.42s ease;
}

.music-modal.active .music-modal-overlay {
    opacity: 1;
}

.music-modal-content {
    position: relative;
    width: 100%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 1.5rem 2.5rem 2.5rem; /* Restored proper padding */
    will-change: transform;
    transform: translateY(22px) scale(0.97) translateZ(0);
    opacity: 0;
    transition: transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.28s ease;
    -webkit-font-smoothing: subpixel-antialiased;
    backface-visibility: hidden;
    /* Solid dark background instead of glass transparency to prevent lightening */
    background: rgba(15, 15, 15, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.music-modal.active .music-modal-content {
    transform: translateY(0) scale(1) translateZ(0);
    opacity: 1;
}


@keyframes modalSlideIn {
    from {
        transform: translateY(30px) scale(0.95) translateZ(0);
    }
    to {
        transform: translateY(0) scale(1) translateZ(0);
    }
}

.music-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 1.75rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.music-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.music-modal-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    text-align: center;
    background: linear-gradient(135deg, #e0e0e0 0%, #888888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.music-modal-search {
    margin-bottom: 1.5rem;
}

.track-search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-primary);
    outline: none;
    transition: all 0.3s ease;
}

.track-search-input::placeholder {
    color: var(--text-secondary);
}

.track-search-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.music-modal-tracks {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem; /* Standard padding */
    width: 100%;
    
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
}

/* Custom scrollbar for modal */
.music-modal-tracks::-webkit-scrollbar {
    width: 8px;
    display: block;
}

.music-modal-tracks::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.music-modal-tracks::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.music-modal-tracks::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .track-card {
        gap: 1rem;
        padding: 1rem;
    }
    
    .track-cover {
        width: 60px;
        height: 60px;
    }
    
    .track-title {
        font-size: 1.1rem;
    }
    
    .track-artist {
        font-size: 0.85rem;
    }
    
    .track-listen-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.85rem;
    }
    
    .music-modal {
        padding: 1rem;
    }
    
    .music-modal-content {
        padding: 2rem 1.5rem;
        max-height: 90vh;
    }
    
    .music-modal-title {
        font-size: 1.5rem;
    }
    
    .music-modal-close {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .track-card {
        flex-direction: row; /* Возвращаем горизонтальное расположение */
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .track-cover {
        width: 50px;
        height: 50px;
        border-radius: 8px;
    }
    
    .track-info {
        width: auto;
        flex: 1; /* Занимает все свободное место */
    }
    
    .track-title {
        font-size: 1rem;
        margin-bottom: 0.1rem;
    }
    
    .track-artist {
        font-size: 0.8rem;
    }
    
    .track-listen-btn {
        width: auto; /* Возвращаем нормальную ширину */
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        height: 36px; /* Фиксированная высота для аккуратности */
    }

    .show-all-btn {
        padding: 0.75rem 2rem;
        font-size: 0.9rem;
    }

    /* Biography font size fix */
    .bio-content, .bio-content p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    /* Gallery 2 columns on mobile - FORCE */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    /* Reduce spacing between sections on mobile */
    #biography, #music, #gallery {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* Ensure 2 columns for slightly larger phones too if needed */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}


/* ============================================
   SECRET MODAL & MODE
   ============================================ */
.secret-modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

@media (max-width: 768px) {
    .secret-modal-body {
        padding: 1rem;
        min-height: 150px;
    }
    
    .secret-modal-body .section-title {
        font-size: 1.5rem;
    }
}

/* ============================================
   SECRET MODAL OVERRIDES
   ============================================ */
#secret-modal .music-modal-overlay {
    background: rgba(6, 8, 12, 0.72);
}

#secret-modal .music-modal-content {
    width: min(92vw, 800px);
    max-width: 800px;
    min-height: 280px;
    max-height: 85vh;
    padding: 2.5rem 2.5rem 2.1rem 2.5rem;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.55);
    background: rgba(16, 18, 24, 0.96) !important;
    animation: none !important;
}

#secret-modal .music-modal-close {
    top: 1rem;
    right: 1rem;
}

#secret-modal .secret-modal-body {
    text-align: center;
    padding: 2.2rem 1rem 1.2rem;
    min-height: 170px;
}

#secret-modal .secret-modal-body .section-title {
    margin-bottom: 0;
}



/* ============================================
   UPCOMING RELEASE MODAL
   ============================================ */

.upcoming-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s ease 0.28s;
}

.upcoming-modal.is-open {
    visibility: visible;
    pointer-events: auto;
    transition: visibility 0s ease 0s;
}

.upcoming-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.upcoming-modal.is-open .upcoming-modal-backdrop {
    opacity: 1;
}

.upcoming-modal-panel {
    position: relative;
    width: min(100%, 420px);
    border-radius: 24px;
    padding: 1.25rem;
    background: rgba(11, 11, 11, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.28s ease, transform 0.28s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.upcoming-modal.is-open .upcoming-modal-panel {
    opacity: 1;
    transform: scale(1);
}

.upcoming-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.upcoming-modal-title {
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1;
}

.upcoming-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.upcoming-modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
}

.upcoming-modal-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.upcoming-modal-artwork {
    flex-shrink: 0;
    width: 110px;
    height: 110px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.upcoming-modal-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.upcoming-modal-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.upcoming-modal-track-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 5vw, 1.6rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.05;
    word-break: break-word;
}

.upcoming-modal-date {
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.04em;
}

.upcoming-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.upcoming-modal-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.82rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    text-align: center;
}

.upcoming-modal-btn--tiktok {
    background: linear-gradient(135deg, rgba(255, 0, 80, 0.14), rgba(0, 242, 234, 0.08));
    border-color: rgba(255, 255, 255, 0.14);
}

.upcoming-modal-btn--tiktok:hover {
    background: linear-gradient(135deg, rgba(255, 0, 80, 0.28), rgba(0, 242, 234, 0.18));
    border-color: rgba(255, 255, 255, 0.24);
}

.upcoming-modal-btn--waiting {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.14), rgba(239, 68, 68, 0.08));
    background-size: 200% 200%;
    animation: gradient-shift-waiting 3s ease infinite;
    border: 2px solid rgba(220, 38, 38, 0.2);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.15);
    transition: all 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.upcoming-modal-btn--waiting:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.28), rgba(239, 68, 68, 0.18));
    box-shadow: 0 6px 28px rgba(220, 38, 38, 0.25);
    transform: translateY(-2px);
    border-color: rgba(220, 38, 38, 0.3);
}

.upcoming-modal-btn--waiting:active {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(220, 38, 38, 0.15);
}

.upcoming-modal-btn--waiting.is-waiting {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(74, 222, 128, 0.08));
    border-color: rgba(34, 197, 94, 0.2);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.15);
}

.upcoming-modal-btn--waiting.is-waiting:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.28), rgba(74, 222, 128, 0.18));
    box-shadow: 0 6px 28px rgba(34, 197, 94, 0.25);
}

@keyframes gradient-shift-waiting {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

#upcoming-modal-waiting-count {
    font-weight: 700;
    opacity: 0.9;
}


/* ============================================
   QUIZ SECTION — ИЗ КАКОГО ТРЕКА СТРОЧКА?
   ============================================ */

