/**
 * Vibe / Play My Vibe page.
 *
 * Uses the same custom properties the rest of the app reads, so a theme change
 * reaches this page without edits here. Falls back to literals only where a
 * property may not exist yet.
 */

.vibe-page {
    padding: 24px 16px 120px;
    max-width: 900px;
    margin: 0 auto;
}

.vibe-header h1 {
    font-size: 1.75rem;
    margin: 0 0 4px;
}

.vibe-sub {
    color: var(--text-secondary, #b3b3b3);
    margin: 0 0 24px;
    font-size: 0.95rem;
}

/* ── mood grid ───────────────────────────────────────────────────────────── */

.vibe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.vibe-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 18px 16px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    background: var(--bg-elevated, rgba(255, 255, 255, 0.04));
    color: inherit;
    cursor: pointer;
    text-align: left;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.vibe-card:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.08));
    transform: translateY(-2px);
}

.vibe-card:focus-visible {
    outline: 2px solid var(--accent-color, #1db954);
    outline-offset: 2px;
}

.vibe-card.selected,
.vibe-card.suggested {
    border-color: var(--accent-color, #1db954);
}

.vibe-card.selected {
    background: color-mix(in srgb, var(--accent-color, #1db954) 14%, transparent);
}

.vibe-emoji { font-size: 1.5rem; line-height: 1; }
.vibe-label { font-weight: 600; font-size: 1rem; }

.vibe-blurb {
    font-size: 0.8rem;
    color: var(--text-secondary, #b3b3b3);
    line-height: 1.3;
}

.vibe-hint {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent-color, #1db954);
}

/* ── call to action ──────────────────────────────────────────────────────── */

.vibe-cta {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 500px;
    background: var(--accent-color, #1db954);
    color: #000;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.vibe-cta:hover:not(:disabled) { filter: brightness(1.08); }
.vibe-cta:disabled { opacity: 0.6; cursor: default; }

/* ── mix list ────────────────────────────────────────────────────────────── */

.vibe-mix { margin-top: 32px; }

.vibe-mix-head h2 { margin: 0 0 4px; font-size: 1.3rem; }

.vibe-mix-sub {
    margin: 0 0 16px;
    color: var(--text-secondary, #b3b3b3);
    font-size: 0.85rem;
}

.vibe-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.vibe-row {
    display: grid;
    grid-template-columns: 28px 44px 1fr;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
}

.vibe-row:hover { background: var(--bg-hover, rgba(255, 255, 255, 0.06)); }

.vibe-row:focus-visible {
    outline: 2px solid var(--accent-color, #1db954);
    outline-offset: -2px;
}

.vibe-num {
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary, #b3b3b3);
    font-size: 0.85rem;
}

.vibe-art {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    object-fit: cover;
    background: var(--bg-elevated, rgba(255, 255, 255, 0.06));
}

.vibe-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.vibe-title,
.vibe-artist,
.vibe-reason {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vibe-title { font-size: 0.95rem; font-weight: 500; }

.vibe-artist {
    font-size: 0.8rem;
    color: var(--text-secondary, #b3b3b3);
}

/* The "why this song" line. Deliberately quiet — it is an explanation, not a
   selling point, and it should not compete with the track title. */
.vibe-reason {
    font-size: 0.72rem;
    color: var(--accent-color, #1db954);
    opacity: 0.85;
    margin-top: 2px;
}

@media (max-width: 600px) {
    .vibe-page { padding: 16px 12px 140px; }
    .vibe-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .vibe-card { padding: 14px 12px; }
    .vibe-blurb { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .vibe-card { transition: none; }
    .vibe-card:hover { transform: none; }
}

/* ---- mood shelf on the home page ----
 *
 * Scoped to #mood-title rather than .section-title: the shared rule underlines
 * the whole heading on hover, which would drag the mood name along with the
 * link sitting inside it.
 */
#mood-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-md, 16px);
    cursor: default;
}

#mood-title:hover { text-decoration: none; }

#mood-heading {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.section-link {
    flex: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-secondary, #b3b3b3);
    text-decoration: none;
}

.section-link:hover,
.section-link:focus-visible {
    color: var(--text-primary, #fff);
    text-decoration: underline;
}
