/* Discovery UI — hero cards, 3D filters, carousels (mobile app kit) */

.disc-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1rem;
}

.disc-hero-card {
    position: relative;
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: .85rem;
    padding: .85rem;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
    transition: transform .25s ease, box-shadow .25s ease;
}
.disc-hero-card:hover { transform: translateY(-3px); box-shadow: 0 16px 48px rgba(108,60,225,.2); }

.disc-hero-card__cover {
    position: relative;
    display: block;
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
    transform: perspective(600px) rotateY(-6deg);
    box-shadow: 4px 8px 20px rgba(0,0,0,.35);
}
.disc-hero-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.disc-hero-card__fallback {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    background: linear-gradient(135deg,#667eea,#764ba2);
    color: #fff;
}
.disc-hero-card__shine {
    position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,.15) 50%, transparent 60%);
    pointer-events: none;
}

.disc-hero-card__body { min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.disc-hero-card__body h3 { margin: 0; font-size: .95rem; line-height: 1.35; }
.disc-hero-card__body h3 a { color: inherit; text-decoration: none; }
.disc-hero-card__body p { margin: 0; font-size: .8rem; opacity: .75; }

.disc-stat-row { display: flex; flex-wrap: wrap; gap: .45rem; margin: .25rem 0; }
.disc-stat {
    display: inline-flex; align-items: center; gap: .25rem;
    font-size: .72rem; font-weight: 700;
    padding: .2rem .45rem; border-radius: 999px;
    background: rgba(255,255,255,.06);
}
.disc-stat svg { width: 12px; height: 12px; }
.disc-stat--play { color: #7ee787; }
.disc-stat--like { color: #ff7eb6; }
.disc-stat--dl { color: #79c0ff; }

.disc-hero-card__play {
    margin-top: auto; align-self: flex-start;
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .4rem .75rem; border: 0; border-radius: 999px;
    background: linear-gradient(135deg,#6C3CE1,#9b59ff);
    color: #fff; font: inherit; font-size: .78rem; font-weight: 700;
    cursor: pointer;
}
.disc-hero-card__play svg { width: 14px; height: 14px; }

/* 3D filter chips */
.disc-filter-bar {
    display: flex; gap: .5rem; overflow-x: auto;
    padding: .25rem .15rem 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.disc-filter-bar::-webkit-scrollbar { height: 4px; }
.disc-filter-chip {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: .55rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.12);
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
    color: inherit;
    font: inherit; font-size: .82rem; font-weight: 700;
    cursor: pointer;
    transform: perspective(400px) rotateX(8deg);
    box-shadow: 0 4px 0 rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.12);
    transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.disc-filter-chip:active,
.disc-filter-chip.is-active {
    transform: perspective(400px) rotateX(2deg) translateY(2px);
    box-shadow: 0 1px 0 rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.08);
    background: linear-gradient(180deg, rgba(108,60,225,.45), rgba(108,60,225,.2));
    border-color: rgba(155,89,255,.5);
}

/* Playlist hero cards */
.disc-playlist-carousel {
    display: flex; gap: 1rem; overflow-x: auto;
    padding-bottom: .75rem;
    scroll-snap-type: x mandatory;
}
.disc-playlist-hero {
    flex: 0 0 min(78vw, 300px);
    scroll-snap-align: start;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
}
.disc-playlist-hero__visual {
    display: block; position: relative;
    aspect-ratio: 16/10; overflow: hidden;
}
.disc-playlist-hero__visual img { width: 100%; height: 100%; object-fit: cover; }
.disc-playlist-hero__fallback {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    background: linear-gradient(135deg,#11998e,#38ef7d);
}
.disc-playlist-hero__badge {
    position: absolute; top: .65rem; right: .65rem;
    padding: .25rem .55rem; border-radius: 999px;
    font-size: .68rem; font-weight: 800;
    background: rgba(0,0,0,.55); color: #fff;
}
.disc-playlist-hero__body { padding: .85rem 1rem 1rem; }
.disc-playlist-hero__body h3 { margin: 0 0 .35rem; font-size: .95rem; }
.disc-playlist-hero__body h3 a { color: inherit; text-decoration: none; }
.disc-playlist-hero__body p { margin: 0 0 .5rem; font-size: .78rem; opacity: .75; line-height: 1.5; }
.disc-playlist-hero__meta { display: flex; gap: .5rem; font-size: .72rem; opacity: .7; }

.disc-track-table .disc-stat-row { margin: 0; }
.disc-track-table .track-row { align-items: center; }

.disc-load-more {
    display: flex; justify-content: center; margin-top: 1rem;
}
.disc-load-more button {
    padding: .65rem 1.25rem; border-radius: 999px;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.05);
    color: inherit; font: inherit; font-weight: 700;
    cursor: pointer;
}
.disc-load-more button:disabled { opacity: .5; cursor: wait; }

.disc-carousel-nav { display: flex; gap: .35rem; }
.disc-carousel-nav button {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.06);
    color: inherit; cursor: pointer;
}

@media (min-width: 768px) {
    .disc-hero-card { grid-template-columns: 110px 1fr; padding: 1rem; }
    .disc-playlist-hero { flex-basis: 320px; }
    .disc-filter-bar { flex-wrap: wrap; overflow: visible; }
}

html[data-theme="light"] .disc-hero-card,
html[data-theme="light"] .disc-playlist-hero {
    background: rgba(255,255,255,.85);
    border-color: rgba(0,0,0,.08);
    box-shadow: 0 8px 30px rgba(0,0,0,.08);
}
html[data-theme="light"] .disc-filter-chip {
    background: linear-gradient(180deg, #fff, #f3f4f8);
    border-color: rgba(0,0,0,.1);
    box-shadow: 0 3px 0 rgba(0,0,0,.08);
}
