/* ==========================================
   Maniesta Play — Global Styles
   ========================================== */

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

/* ---------- Design Tokens (CSS Variables) ---------- */
:root {
    /* Colors */
    --bg-primary: #0a0a0a;
    --bg-surface: #121212;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --bg-elevated: #1e1e1e;
    --border-subtle: #2a2a2a;
    --border-medium: #333333;

    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --text-muted: #737373;
    --text-inverse: #0a0a0a;

    --accent-green: #1ed760;
    --accent-green-hover: #3be477;
    --accent-green-dim: rgba(30, 215, 96, 0.12);
    --accent-green-border: rgba(30, 215, 96, 0.3);

    --focus-ring: #3be477;

    /* Spacing */
    --space-2xs: 0.25rem;
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 5rem;
    --space-5xl: 6rem;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Poppins', 'Inter', sans-serif;

    --fs-2xs: 0.75rem;
    --fs-xs: 0.875rem;
    --fs-sm: 1rem;
    --fs-md: 1.125rem;
    --fs-lg: 1.5rem;
    --fs-xl: 2rem;
    --fs-2xl: 2.5rem;
    --fs-3xl: 3rem;
    --fs-4xl: 3.5rem;
    --fs-5xl: 4.5rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;

    /* Container */
    --container-width: 1140px;
    --container-padding: clamp(1.5rem, 4vw, 3rem);

    /* Shadows */
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(30, 215, 96, 0.25);
}

/* ---------- Base ---------- */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: var(--fs-sm);
    line-height: 1.7;
    color: var(--text-secondary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse at 15% 20%, rgba(30, 215, 96, 0.04) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 75%, rgba(30, 215, 96, 0.03) 0%, transparent 50%);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--accent-green);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-green-hover);
}

img,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* ---------- Reusable Container ---------- */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: var(--fs-xs);
    line-height: 1;
    padding: 0.875rem 1.75rem;
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background-color var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

.btn--primary {
    background-color: var(--accent-green);
    color: var(--text-inverse);
    border-color: var(--accent-green);
}

.btn--primary:hover {
    background-color: var(--accent-green-hover);
    border-color: var(--accent-green-hover);
    color: var(--text-inverse);
    box-shadow: var(--shadow-glow);
}

.btn--ghost {
    background-color: transparent;
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.btn--ghost:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.btn--large {
    font-size: var(--fs-sm);
    padding: 1.1rem 2.25rem;
}

.btn--full {
    width: 100%;
}

.btn--small {
    font-size: 0.7rem;
    padding: 0.5rem 1rem;
}

/* ---------- Section ---------- */
section {
    padding-block: var(--space-4xl);
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--space-3xl);
}

.section-header__eyebrow {
    display: inline-block;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: var(--fs-2xs);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-green);
    background-color: var(--accent-green-dim);
    padding: 0.375rem 1rem;
    border-radius: var(--radius-pill);
    margin-bottom: var(--space-md);
}

.section-header__title {
    font-size: clamp(var(--fs-xl), 3.5vw, var(--fs-3xl));
    font-weight: 800;
    margin-bottom: var(--space-md);
}

.section-header__subtitle {
    font-size: var(--fs-md);
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* ---------- Header / Navigation ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(10, 10, 10, 0.88);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    padding-block: var(--space-md);
    min-height: 68px;
    position: relative;
}

.navbar__brand {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-lg);
    letter-spacing: -0.02em;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.navbar__brand:hover {
    color: var(--text-primary);
    opacity: 0.85;
}

.navbar__logo {
    color: var(--accent-green);
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.navbar__brand-text {
    font-size: var(--fs-lg);
}

.navbar__links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.navbar__link {
    color: var(--text-secondary);
    font-size: var(--fs-xs);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition-fast);
    position: relative;
}

.navbar__link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-green);
    border-radius: var(--radius-sm);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.navbar__link:hover {
    color: var(--text-primary);
}

.navbar__link:hover::after,
.navbar__link--active::after {
    transform: scaleX(1);
}

.navbar__link--active {
    color: var(--text-primary);
}

.navbar__actions {
    display: flex;
    gap: var(--space-sm);
}

.navbar__icon-link {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.navbar__icon-link:hover {
    color: var(--text-primary);
}

.navbar__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.navbar__toggle-bar {
    width: 22px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
    padding-block: var(--space-5xl) var(--space-4xl);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -180px;
    right: -180px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(30, 215, 96, 0.08) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--space-3xl);
    position: relative;
    z-index: 1;
}

.hero__heading {
    font-size: clamp(var(--fs-2xl), 5.5vw, var(--fs-5xl));
    font-weight: 800;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero__heading-accent {
    color: var(--accent-green);
    display: block;
}

.hero__subheading {
    font-size: var(--fs-md);
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 520px;
    line-height: 1.7;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md) var(--space-lg);
}

.hero__trust li {
    font-size: var(--fs-2xs);
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-2xs);
}

/* Hero Visual */
.hero__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
}

.hero__visual-dot {
    position: absolute;
    border-radius: 50%;
    background-color: var(--accent-green);
    pointer-events: none;
    opacity: 0.4;
}

.hero__visual-dot--1 { width: 8px; height: 8px; top: 12%; right: 12%; animation: floatUpDown 4s ease-in-out infinite; }
.hero__visual-dot--2 { width: 14px; height: 14px; bottom: 18%; left: 8%; background-color: var(--text-muted); animation: floatUpDown 5.5s ease-in-out infinite reverse; }
.hero__visual-dot--3 { width: 6px; height: 6px; top: 45%; right: 4%; animation: floatUpDown 3.8s ease-in-out infinite 1s; }

.vinyl {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle at center, var(--bg-card-hover) 0%, #0d0d0d 22%, #0f0f0f 35%, #111111 50%, #0d0d0d 70%, #0a0a0a 100%);
    box-shadow:
        inset 0 0 60px rgba(0, 0, 0, 0.7),
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(30, 215, 96, 0.08);
    animation: spin 16s linear infinite;
    flex-shrink: 0;
}

.vinyl::before,
.vinyl::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.vinyl::before { inset: 12%; border: 2px solid rgba(255, 255, 255, 0.06); }
.vinyl::after  { inset: 20%; border: 1px solid rgba(255, 255, 255, 0.04); }

.vinyl__ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.vinyl__ring--outer { inset: 8%;  border: 1px solid rgba(255, 255, 255, 0.08); }
.vinyl__ring--inner { inset: 16%; border: 1px solid rgba(255, 255, 255, 0.05); }

.vinyl__label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: #161616;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-green);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* Now Playing Card (fixed with translate) */
.now-playing {
    position: absolute;
    bottom: 8%;
    left: 50%;
    translate: -50% 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    padding: var(--space-sm) var(--space-md);
    box-shadow: var(--shadow-card);
    animation: floatUpDown 3.2s ease-in-out infinite;
    max-width: 230px;
}

.now-playing__cover {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent-green-dim), rgba(30, 215, 96, 0.25));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-green);
    flex-shrink: 0;
}

.now-playing__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.now-playing__title {
    font-size: var(--fs-2xs);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.now-playing__artist {
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.now-playing__equalizer {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 24px;
    margin-left: var(--space-2xs);
    flex-shrink: 0;
}

.now-playing__bar {
    display: block;
    width: 3px;
    height: 40%;
    background-color: var(--accent-green);
    border-radius: 1px;
    animation: equalizer 1.1s ease-in-out infinite;
}

.now-playing__bar:nth-child(1) { animation-delay: 0s; }
.now-playing__bar:nth-child(2) { animation-delay: 0.2s; }
.now-playing__bar:nth-child(3) { animation-delay: 0.4s; }
.now-playing__bar:nth-child(4) { animation-delay: 0.6s; }
.now-playing__bar:nth-child(5) { animation-delay: 0.8s; }

/* Ensure SVG icons display correctly inside buttons */
.player__btn svg,
.track-card__play svg,
.track-card__download svg,
.track-card__favorite svg,
.queue-item__remove svg,
.track-card__add-to-playlist svg,
.track-card__remove-local svg {
    display: block;
    margin: 0 auto;
}

/* Spinner animation */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Consistent button sizing */
.player__btn {
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player__btn--play {
    width: 40px;
    height: 40px;
}

/* -------- Track Card Overlay Buttons -------- */
.track-card__remove-local {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.track-card__add-to-playlist {
    position: absolute;
    top: 40px;               /* below source badge */
    left: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;               /* ensure it's above image */
}

.source-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #333;
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 2;
}

/* ---------- Stats ---------- */
.stats {
    background-color: var(--bg-surface);
    border-block: 1px solid var(--border-subtle);
    padding-block: var(--space-2xl);
}

.stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    text-align: center;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
}

.stat__number {
    font-family: var(--font-display);
    font-size: clamp(var(--fs-lg), 3vw, var(--fs-2xl));
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stat__label {
    font-size: var(--fs-2xs);
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ---------- Cards & Grids (for tracks, artists, albums, genres) ---------- */
.track-grid,
.artist-grid,
.album-grid,
.genre-grid {
    display: grid;
    gap: var(--space-lg);
}

.track-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.artist-grid,
.album-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.genre-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.track-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: background-color var(--transition-base), transform var(--transition-base);
    cursor: pointer;
    position: relative;
}

.track-card:hover {
    background-color: var(--bg-card-hover);
    transform: translateY(-4px);
}

.track-card__image {
    position: relative;
    aspect-ratio: 1;
}

.track-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-card__play {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent-green);
    color: var(--text-inverse);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.track-card:hover .track-card__play {
    opacity: 1;
    transform: translateY(0);
}

.track-card__info {
    padding: var(--space-sm);
}

.track-card__title {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-card__artist {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0;
}

.track-card__duration {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.track-card__favorite {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.artist-card,
.album-card {
    text-align: center;
    padding: var(--space-md);
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    transition: background-color var(--transition-base), transform var(--transition-base);
}

.artist-card:hover,
.album-card:hover {
    background-color: var(--bg-card-hover);
    transform: translateY(-4px);
}

.artist-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto var(--space-sm);
}

.album-card img {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    object-fit: cover;
    margin: 0 auto var(--space-sm);
}

.artist-card h3,
.album-card h3 {
    font-size: var(--fs-xs);
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.artist-card p,
.album-card p {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.genre-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.genre-card:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--accent-green-border);
    color: var(--text-primary);
}

/* ---------- States (Empty, Error, Loading) ---------- */
.empty-state,
.error-state {
    text-align: center;
    padding: var(--space-3xl);
    color: var(--text-muted);
}

.empty-state h2,
.error-state h2 {
    font-size: var(--fs-lg);
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.empty-state p,
.error-state p {
    margin-bottom: var(--space-lg);
}

.loading-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-lg);
}

.skeleton-card {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-lg);
    aspect-ratio: 1;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---------- Download & Offline Styles ---------- */
.track-card__download {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offline-indicator {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: #b8860b;
    color: #fff;
    text-align: center;
    padding: 8px;
    z-index: 150;
    font-size: 0.85rem;
}

.offline-storage {
    margin-top: var(--space-3xl);
    padding: var(--space-xl);
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.offline-storage h2 {
    font-size: var(--fs-md);
    margin-bottom: var(--space-sm);
}

.offline-storage p {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

/* Filter buttons */
.source-filter {
    display: flex;
    gap: var(--space-xs);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-xs);
    margin-bottom: var(--space-md);
}

.source-filter-btn {
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.source-filter-btn:hover,
.source-filter-btn.active {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: var(--text-inverse);
}

/* ---------- Playlist Modal ---------- */
.playlist-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}

.playlist-modal {
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    width: 90%;
    max-width: 400px;
    position: relative;
}

.playlist-modal h3 {
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.playlist-modal__list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: var(--space-md);
}

.playlist-modal__item {
    display: block;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: var(--space-sm);
    margin-bottom: var(--space-xs);
    cursor: pointer;
    border-radius: var(--radius-sm);
    text-align: left;
}

.playlist-modal__item:hover {
    background: var(--bg-card-hover);
}

.playlist-modal__close {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

/* ---------- Footer ---------- */
.footer {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-subtle);
    padding-block: var(--space-3xl) var(--space-xl);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.3fr 2fr 1fr;
    gap: var(--space-3xl);
    margin-bottom: var(--space-3xl);
}

.footer__brand-link {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-lg);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
}

.footer__brand-description {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 280px;
    margin-bottom: 0;
}

.footer__columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.footer__column-title {
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.footer__list li {
    margin-bottom: var(--space-2xs);
}

.footer__link {
    color: var(--text-muted);
    font-size: var(--fs-xs);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer__link:hover {
    color: var(--text-primary);
}

.footer__social-title {
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.footer__social-icons {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.footer__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.footer__social-link:hover {
    background-color: var(--accent-green);
    border-color: var(--accent-green);
    color: var(--text-inverse);
    transform: translateY(-2px);
}

.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
}

.footer__copyright {
    font-size: var(--fs-2xs);
    color: var(--text-muted);
    margin-bottom: 0;
}

.footer__legal {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.footer__legal-link {
    font-size: var(--fs-2xs);
    color: var(--text-muted);
    text-decoration: none;
}

.footer__legal-link:hover {
    color: var(--text-primary);
}

.footer__legal-divider {
    color: var(--text-muted);
    font-size: var(--fs-2xs);
}

/* ---------- Keyframes ---------- */
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes floatUpDown {
    0%, 100% { translate: 0 0; }
    50%       { translate: 0 -12px; }
}

@keyframes equalizer {
    0%, 100% { height: 30%; }
    50%       { height: 100%; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
    .navbar__links {
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        background-color: var(--bg-primary);
        flex-direction: column;
        padding: var(--space-lg);
        gap: var(--space-md);
        transform: translateY(-150%);
        transition: transform var(--transition-base);
        z-index: 99;
        border-bottom: 1px solid var(--border-subtle);
    }

    .navbar__links.navbar__links--open {
        transform: translateY(0);
    }

    .navbar__toggle {
        display: flex;
    }

    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__subheading {
        margin-inline: auto;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__trust {
        justify-content: center;
    }

    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .navbar {
        gap: var(--space-sm);
        min-height: 60px;
        padding-block: var(--space-sm);
    }

    .navbar__brand-text {
        font-size: var(--fs-md);
    }

    .navbar__logo {
        width: 24px;
        height: 24px;
    }

    .navbar__links {
        top: 60px;
        padding: var(--space-md);
        gap: var(--space-sm);
    }

    .navbar__link {
        font-size: 0.8rem;
    }

    .navbar__actions {
        gap: var(--space-xs);
    }

    .hero__visual {
        min-height: 280px;
    }

    .vinyl {
        width: 180px;
        height: 180px;
    }

    .vinyl__label {
        width: 48px;
        height: 48px;
    }

    .vinyl__label svg {
        width: 14px;
        height: 14px;
    }

    .now-playing {
        bottom: 4%;
        max-width: 180px;
        padding: var(--space-xs) var(--space-sm);
        gap: var(--space-xs);
    }

    .now-playing__cover {
        width: 28px;
        height: 28px;
    }

    .now-playing__title {
        font-size: 0.65rem;
    }

    .now-playing__artist {
        font-size: 0.55rem;
    }

    .now-playing__equalizer {
        height: 18px;
        gap: 2px;
    }

    .now-playing__bar {
        width: 2px;
    }

    .track-grid,
    .artist-grid,
    .album-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: var(--space-md);
    }

    .genre-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer__columns {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
}

@media (max-width: 575px) {
    .search-bar {
        flex-direction: column;
    }

    .search-bar input[type="search"] {
        width: 100%;
    }

    .search-bar .btn {
        width: 100%;
    }

    .track-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-sm);
    }
}

@media (max-width: 430px) {
    .navbar {
        padding-inline: var(--space-sm);
    }

    .navbar__brand-text {
        font-size: 1.125rem;
    }

    .navbar__logo {
        width: 24px;
        height: 24px;
    }

    .navbar__toggle-bar {
        width: 20px;
    }
}

@media (max-width: 360px) {
    .navbar__brand-text {
        font-size: 1rem;
    }

    .navbar__logo {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 320px) {
    .navbar {
        padding-inline: var(--space-xs);
    }

    .navbar__brand-text {
        font-size: 0.9375rem;
    }
}

@media (max-width: 375px) {
    .navbar__brand-text {
        font-size: var(--fs-sm);
    }

    .navbar__logo {
        width: 20px;
        height: 20px;
    }

    .navbar__toggle {
        padding: 2px;
    }

    .navbar__toggle-bar {
        width: 18px;
    }

    .vinyl {
        width: 150px;
        height: 150px;
    }

    .now-playing {
        max-width: 150px;
    }

    .track-grid,
    .artist-grid,
    .album-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .vinyl,
    .hero__visual-dot,
    .now-playing {
        animation: none;
    }

    .now-playing__bar {
        animation: none;
        height: 50%;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}