/**
 * play.css — Playlist page styles
 * ================================
 * Full-bleed black grid of SoundCloud playlist thumbnails.
 * Mobile-first: 2 columns base → 6 columns at desktop.
 */

/* ===== RESET ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== PAGE ===== */
html,
body {
    background: #000000;
    min-height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
}

/* ===== LAYOUT WRAPPER ===== */
.play-grid-wrap {
    margin-inline: auto;
    max-width: 1240px;
    min-width: 320px;
    padding: 60px 20px 40px;
}

/* ===== GRID ===== */
/* Mobile: 2 columns */
.play-grid {
    display: grid;
    gap: 0.33rem;
    grid-template-columns: repeat(2, 1fr);
}

/* Desktop: 6 columns */
@media (min-width: 768px) {
    .play-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ===== PLAYLIST CARD ===== */
.playlist-card {
    color: rgb(153, 153, 153);
    display: block;
    position: relative;
    text-decoration: none;
}

/* Square aspect ratio — matches the 1:1 artwork */
.playlist-card-inner {
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
}

/* Gradient scrim so title is always legible on light artwork */
.playlist-card-inner::before {
    background: linear-gradient(to bottom, rgb(0 0 0 / 0.55) 0%, transparent 55%);
    content: '';
    inset: 0;
    position: absolute;
    z-index: 1;
}

/* ===== THUMBNAIL ===== */
.playlist-card-img {
    display: block;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
    width: 100%;
}

/* ===== TITLE OVERLAY ===== */
.playlist-card-title {
    color: rgb(153, 153, 153);
    font-size: 0.7em;
    font-weight: normal;
    left: 10px;
    line-height: 1.3;
    position: absolute;
    right: 10px;
    top: 10px;
    transition: color 0.15s ease;
    z-index: 2;
}

/* ===== STATES ===== */
.playlist-card:hover .playlist-card-title,
.playlist-card:focus .playlist-card-title,
.playlist-card:active .playlist-card-title {
    color: #ffffff;
}

.playlist-card:hover .playlist-card-img,
.playlist-card:focus .playlist-card-img {
    opacity: 0.85;
    transform: scale(1.03);
}

.playlist-card:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .playlist-card-img {
        transition: none;
    }

    .playlist-card-title {
        transition: none;
    }
}
