/* music-records.css */
@import url('/app/fonts.css');
@import url('/app/tailwind.css');
@import url('/app/global.css');

/* ─── Dynamic Progressbar Background ──────────────────────── */

.release-card:hover .cover--dark .preview-progress,
.cover--dark:hover .preview-progress {
    background: rgba(255,255,255,0.25);
}

.release-card:hover .cover--mid .preview-progress,
.cover--mid:hover .preview-progress {
    background: rgba(255,255,255,0.2);
}

.release-card:hover .cover--bright .preview-progress,
.cover--bright:hover .preview-progress {
    background: rgba(0,0,0,0.25);
}

.release-card:hover .cover--bright .preview-progress-bar {
    background: rgba(0,0,0,0.7);
}

/* ─── Base ───────────────────────────────────────────────── */

html:has(.music-records-page),
body:has(.music-records-page) {
    background: #000;
    min-height: 100%;
}

body:has(.music-records-page)::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('/app/assets/img/FyESuhRaUAYJ_Az.jpeg') no-repeat center center / cover;
    filter: brightness(0.4) blur(6px);
    z-index: 0;
    pointer-events: none;
}

.music-records-page {
    position: relative;
    z-index: 1; /* above the ::before */
}

.bg-music-records {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
}

.music-records-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

/* ─── Header ─────────────────────────────────────────────── */

.music-records-header,
.releases-section {
    position: relative;
    z-index: 2;

    max-width: 75vw;
    margin: 0 auto;
}

.music-records-header {
    text-align: center;
    padding: 2rem 1rem 3rem;
}

.music-records-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin: 0 0 0.75rem;
    color: white;
}

.music-records-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.45);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ─── Releases section ───────────────────────────────────── */

.releases-section {
    width: 85vw;
    margin: 0 auto;
    padding-bottom: 5rem;
}

.releases-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: white;
    margin: 0 0 0.75rem;
    text-align: left;
    /* margin-left: 2rem; */
}

/* ─── Preview player ─────────────────────────────────────── */

.preview-btn {
    position: absolute;
    bottom: 0.9rem;
    right: 0.6rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
    z-index: 10;
}

.release-card:hover .preview-btn,
.preview-btn.playing {
    opacity: 1;
}

.preview-btn:hover {
    background: rgba(255, 85, 0, 0.85); /* SoundCloud orange */
}

.preview-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    cursor: pointer;
    z-index: 10;
    background: transparent;
    transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1) 0.1s, background 0.2s ease;
}

.preview-progress:hover {
    height: 6px;
    transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.release-card:hover .preview-progress {
    background: rgba(255,255,255,0.2);
}

.preview-progress-bar {
    height: 100%;
    width: 0%;
    background: #ff5500;
    transition: width 0.5s linear;
    pointer-events: none;
}

.preview-progress:hover .preview-progress-bar {
    height: 6px;
}

/* ─── Open in new Tab button ─────────────────────────────── */

.card-link-btn {
    position: absolute;
    bottom: 3.8rem; /* was 3.2rem — pushes it up, adds gap above play btn */
    right: 0.6rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    z-index: 10;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.release-card:hover .card-link-btn {
    opacity: 1;
}

.card-link-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* Cards without preview still fully clickable */
.release-card-full-link {
    position: absolute;
    inset: 0;
    z-index: 5;
}

/* ─── Grid ───────────────────────────────────────────────── */

.releases-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
}

.release-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: default; /* no pointer on the card itself */

    cursor: pointer;
}

.release-card-title-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

a.release-card { 
    text-decoration: none; 
    color: inherit; 
    display: block; 
}

.release-card-cover {
    width: 100%;
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    position: relative;
}

.release-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

.release-card:hover .release-card-overlay {
    background: rgba(0, 0, 0, 0.3);
}

.release-card-info {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    background: rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.release-card-type {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
}

.release-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0.2rem 0 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
}

.release-card-artist {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.release-card-date {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 0.25rem;
    display: block;
}

.no-releases {
    grid-column: 1 / -1;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
}

/* ─── Responsive ─────────────────────────────────────────── */

@media (max-width: 1024px) {
    .releases-section { width: 90vw; }
}

@media (min-width: 601px) and (max-width: 1024px) and (orientation: portrait) {
    .releases-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .releases-section { width: 92vw; }
    .music-records-title { font-size: 2rem !important; }
}

@media (max-width: 950px) and (orientation: landscape) {
    .releases-grid { grid-template-columns: repeat(4, 1fr) !important; }
    .releases-section { width: 95vw; }
}

@media (max-width: 480px) and (orientation: portrait) {
    .releases-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 1rem !important; }
    .releases-section { width: 95vw; }
    .music-records-title { font-size: 1.5rem !important; }
    .music-records-subtitle { font-size: 0.85rem !important; }
}