/* ---------------------------------------------------------------------------
   MoodFlow - AI Music Therapy Playlist Generator
   Aesthetic: Warm, organic, therapeutic - gradient-rich with soft textures
   --------------------------------------------------------------------------- */

:root {
    /*  Palette: Warm dusk tones  */
    --bg-deep: #0a0b12;
    --bg-surface: #12131f;
    --bg-card: #1a1c2e;
    --bg-card-hover: #222440;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-active: rgba(255, 255, 255, 0.12);

    --text-primary: #f0ece4;
    --text-secondary: #9b95a6;
    --text-muted: #6b6578;

    --accent-warm: #e8a87c;
    --accent-rose: #d4728c;
    --accent-lavender: #9b8ec4;
    --accent-teal: #7ec8c8;
    --accent-gold: #d4a656;

    --gradient-primary: linear-gradient(135deg, var(--accent-warm), var(--accent-rose));
    --gradient-soft: linear-gradient(135deg, var(--accent-lavender), var(--accent-teal));
    --gradient-bg: radial-gradient(ellipse at 20% 50%, rgba(156, 142, 196, 0.08) 0%, transparent 50%),
                    radial-gradient(ellipse at 80% 20%, rgba(232, 168, 124, 0.06) 0%, transparent 50%),
                    radial-gradient(ellipse at 50% 80%, rgba(126, 200, 200, 0.05) 0%, transparent 50%);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(232, 168, 124, 0.15);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'Outfit', sans-serif;

    --transition-fast: 0.15s ease;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text-primary);
    background: var(--bg-deep);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/*  Ambient Background  */
.bg-gradient {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: var(--gradient-bg);
    transition: background 2s ease;
}

.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/*  Header  */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    backdrop-filter: blur(20px);
    background: rgba(10, 11, 18, 0.7);
    border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: -0.02em;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-greeting {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 300;
}

/*  Buttons  */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-xl);
    border: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 40px rgba(232, 168, 124, 0.25);
}
.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-active);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.btn-large {
    padding: 0.9rem 2.2rem;
    font-size: 1rem;
}

.btn-loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/*  Hero Section  */
.hero {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
    max-width: 560px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.hero-title .accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 480px;
}

.hero-note {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 1rem;
}

/* Hero orb animation */
.hero-visual {
    flex-shrink: 0;
    position: relative;
    width: 300px;
    height: 300px;
}

.hero-orb {
    position: absolute;
    inset: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--accent-warm), var(--accent-rose), var(--accent-lavender));
    filter: blur(1px);
    animation: orbFloat 6s ease-in-out infinite;
}

.pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(232, 168, 124, 0.15);
    animation: pulseOut 4s ease-out infinite;
}
.pulse-2 { animation-delay: 1.3s; }
.pulse-3 { animation-delay: 2.6s; }

@keyframes orbFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.03); }
}

@keyframes pulseOut {
    0% { transform: scale(0.6); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}

/*  Mood Flow Section  */
.mood-flow {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
    padding: 7rem 2rem 4rem;
}

.flow-step {
    display: none;
    animation: fadeSlideIn 0.5s ease-out;
}
.flow-step.active {
    display: block;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-header {
    margin-bottom: 2rem;
}

.step-number {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--accent-warm);
    display: block;
    margin-bottom: 0.4rem;
    letter-spacing: 0.05em;
}

.step-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.step-desc {
    color: var(--text-secondary);
    font-weight: 300;
    font-size: 0.95rem;
}

/*  Mood Input  */
.mood-input-wrap {
    margin-bottom: 2rem;
}

.mood-textarea {
    width: 100%;
    padding: 1.2rem 1.4rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.6;
    resize: none;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
    outline: none;
}

.mood-textarea:focus {
    border-color: var(--accent-warm);
    box-shadow: 0 0 0 3px rgba(232, 168, 124, 0.1);
}

.mood-textarea::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.btn-analyse {
    margin-top: 1rem;
    width: 100%;
}

/*  Mood Result Card  */
.mood-result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    animation: fadeSlideIn 0.4s ease-out;
}

.mood-label-small {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.3rem;
}

.detected-mood {
    font-family: var(--font-display);
    font-size: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.3rem;
}

.detected-desc {
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.confidence-bar {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.confidence-text {
    position: absolute;
    right: 0;
    top: -22px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mood-result-actions {
    display: flex;
    gap: 0.8rem;
}

.manual-override {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.override-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.mood-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mood-chip {
    padding: 0.4rem 1rem;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mood-chip:hover {
    background: rgba(232, 168, 124, 0.1);
    border-color: var(--accent-warm);
    color: var(--text-primary);
}

/*  Target Mood Grid  */
.target-input-wrap {
    margin-bottom: 1.5rem;
}

.target-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.target-divider span {
    background: var(--bg-deep);
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.target-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-subtle);
}

.target-result {
    margin-bottom: 1.5rem;
}

.nuance-feedback {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.nuance-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
}

.nuance-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.nuance-tag {
    padding: 0.3rem 0.8rem;
    background: rgba(126, 200, 200, 0.1);
    border: 1px solid rgba(126, 200, 200, 0.15);
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    color: var(--accent-teal);
}

.target-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.target-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
}

.target-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-active);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.target-card.selected {
    border-color: var(--accent-warm);
    background: rgba(232, 168, 124, 0.08);
    box-shadow: 0 0 20px rgba(232, 168, 124, 0.1);
}

.target-icon {
    font-size: 2rem;
    margin-bottom: 0.6rem;
    display: block;
}

.target-label {
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    display: block;
}

.target-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 300;
    display: block;
}

/*  Tuning Controls  */
.tuning-controls {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.control-label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

.slider-wrap {
    position: relative;
}

.intensity-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.intensity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gradient-primary);
    box-shadow: 0 0 10px rgba(232, 168, 124, 0.3);
    cursor: pointer;
}

.intensity-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-warm);
    border: none;
    cursor: pointer;
}

.target-intensity-slider::-webkit-slider-thumb {
    background: var(--gradient-soft);
}

.target-intensity-slider::-moz-range-thumb {
    background: var(--accent-lavender);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.intensity-value {
    font-family: var(--font-display);
    font-size: 1.6rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/*  Toggle switches  */
.filter-toggles {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.toggle-wrap {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
}

.toggle-wrap input {
    display: none;
}

.toggle-slider {
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    position: relative;
    flex-shrink: 0;
    transition: background var(--transition-base);
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-secondary);
    transition: all var(--transition-base);
}

.toggle-wrap input:checked + .toggle-slider {
    background: var(--accent-warm);
}

.toggle-wrap input:checked + .toggle-slider::after {
    transform: translateX(20px);
    background: #fff;
}

.toggle-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/*  Crisis Response  */
.crisis-card {
    background: var(--bg-card);
    border: 1px solid rgba(126, 200, 200, 0.2);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.crisis-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.crisis-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    line-height: 1.5;
    margin-bottom: 2rem;
    font-weight: normal;
}

.crisis-resources {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.crisis-resource {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    background: rgba(126, 200, 200, 0.06);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(126, 200, 200, 0.1);
}

.crisis-resource-name {
    font-weight: 500;
    color: var(--accent-teal);
}

.crisis-resource-contact {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.crisis-resource a {
    color: var(--accent-teal);
    text-decoration: none;
}

.crisis-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

/*  Song Source Options  */
.source-controls {
    margin-top: 0.5rem;
}

.source-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.source-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.source-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.source-option:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-active);
}

.source-option input {
    display: none;
}

.source-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    flex-shrink: 0;
    position: relative;
    transition: all var(--transition-base);
}

.source-option input:checked ~ .source-radio {
    border-color: var(--accent-warm);
}

.source-option input:checked ~ .source-radio::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-warm);
}

.source-option input:checked ~ .source-option-content .source-option-label {
    color: var(--text-primary);
}

.source-option-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.source-option-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color var(--transition-base);
}

.source-option-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 300;
}

/*  Persistent Support Banner  */
.support-banner {
    background: rgba(126, 200, 200, 0.08);
    border: 1px solid rgba(126, 200, 200, 0.2);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.5rem;
}

.support-banner-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.support-banner-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.support-banner-text {
    flex: 1;
}

.support-banner-message {
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 300;
    line-height: 1.65;
    margin-bottom: 0.7rem;
}

.support-banner-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.6rem;
}

.support-link {
    color: var(--accent-teal);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 400;
    transition: opacity var(--transition-fast);
}

.support-link:hover {
    opacity: 0.8;
}

.recovery-banner {
    background: rgba(100, 180, 100, 0.08);
    border-color: rgba(100, 180, 100, 0.2);
}

/*  Rationale Card  */
.rationale-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.rationale-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.rationale-header h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
}

.rationale-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.rationale-params {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.param-tag {
    padding: 0.3rem 0.7rem;
    background: rgba(155, 142, 196, 0.1);
    border: 1px solid rgba(155, 142, 196, 0.15);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--accent-lavender);
}

/*  Player  */
.player-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.5rem;
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.now-playing-art {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: rgba(255,255,255,0.05);
}

.now-playing-info {
    flex: 1;
    min-width: 0;
}

.now-playing-track {
    display: block;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.now-playing-artist {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 300;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.player-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.player-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
}

.player-btn-main {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    color: #fff;
}
.player-btn-main:hover {
    transform: scale(1.05);
    color: #fff;
    background: var(--gradient-primary);
}

.progress-bar-wrap {
    margin-top: 0.8rem;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s linear;
}

/*  Track List  */
.track-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 2rem;
}

.track-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.track-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.track-item.playing {
    background: rgba(232, 168, 124, 0.08);
}

.track-number {
    width: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.track-item.playing .track-number {
    color: var(--accent-warm);
}

.track-art {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.track-info {
    flex: 1;
    min-width: 0;
}

.track-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-item.playing .track-name {
    color: var(--accent-warm);
}

.track-artist {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 300;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-duration {
    color: var(--text-muted);
    font-size: 0.8rem;
    flex-shrink: 0;
}

/*  Playlist Actions  */
.playlist-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

/*  Footer  */
.site-footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border-subtle);
    max-width: 640px;
    margin: 0 auto;
}

.site-footer p {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.site-footer a {
    color: var(--accent-teal);
    text-decoration: none;
}

.footer-credit {
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

/*  Responsive  */
/*  Session Report Card  */
.session-report {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.5rem;
}

.report-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.report-icon {
    font-size: 1.2rem;
}

.report-title {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text-primary);
    flex: 1;
}

.report-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.2rem;
}

.report-summary {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 300;
    line-height: 1.5;
    margin-bottom: 0.8rem;
}

.report-insights {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.8rem;
    padding: 0.6rem 0.8rem;
    background: rgba(126, 200, 200, 0.04);
    border-radius: var(--radius-sm);
}

.insight-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.insight-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.report-question {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 300;
    line-height: 1.5;
    margin-bottom: 0.8rem;
}

.report-question strong {
    color: var(--text-primary);
    font-weight: 500;
}

.report-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
}

/*  Track Rating Buttons  */
.track-actions {
    display: flex;
    gap: 0.3rem;
    margin-left: auto;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.rate-btn {
    background: none;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    opacity: 0.4;
}

.rate-btn:hover { opacity: 1; border-color: var(--accent-warm); }
.rate-btn.active { opacity: 1; border-color: var(--accent-warm); background: rgba(232, 168, 124, 0.15); }

/*  Playlist Overall Rating  */
.playlist-rating {
    text-align: center;
    padding: 1.5rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.rating-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 0.7rem;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}

.star-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color var(--transition-fast);
    padding: 0.2rem;
}

.star-btn:hover,
.star-btn.active {
    color: var(--accent-warm);
}

.rating-thanks {
    color: var(--accent-teal);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-weight: 300;
}

/*  Teach the System Prompt  */
.teach-prompt {
    margin-top: 1rem;
    padding: 1rem 1.2rem;
    background: rgba(126, 200, 200, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.teach-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 300;
    margin-bottom: 0.6rem;
}

.teach-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.teach-btn {
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.teach-btn:hover {
    border-color: var(--accent-warm);
    color: var(--text-primary);
}

.teach-btn.current {
    border-color: var(--accent-teal);
    opacity: 0.6;
}

.teach-btn.active {
    background: var(--accent-warm);
    color: var(--bg-primary);
    border-color: var(--accent-warm);
}

.teach-thanks {
    color: var(--accent-teal);
    font-size: 0.8rem;
    font-weight: 300;
    margin-top: 0.5rem;
}

/*  Responsive: Tablet  */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
        gap: 2rem;
    }
    .hero-subtitle { margin-left: auto; margin-right: auto; }
    .hero-visual { width: 200px; height: 200px; }
    .site-header { padding: 0.8rem 1rem; }
    .mood-flow { padding: 6rem 1rem 3rem; }
    .target-grid { grid-template-columns: repeat(2, 1fr); }
    .now-playing { flex-wrap: wrap; }
    .player-controls { width: 100%; justify-content: center; margin-top: 0.5rem; }
    .mood-result-actions { flex-direction: column; }
    .track-actions { margin-left: 0; }
    .source-options { gap: 0.4rem; }
    .teach-options { gap: 0.3rem; }
    .star-btn { font-size: 1.5rem; }
    .support-banner-content { flex-direction: column; gap: 0.6rem; }
    .intensity-control { margin-bottom: 0.5rem; }
    .slider-wrap { padding: 0 0.2rem; }
    .report-actions { flex-direction: column; }
    .session-report { padding: 1rem; }
}

/*  Responsive: Mobile  */
@media (max-width: 480px) {
    .target-grid { grid-template-columns: 1fr; }
    .crisis-actions { flex-direction: column; }
    .track-item { flex-wrap: wrap; gap: 0.3rem; }
    .track-actions { width: 100%; justify-content: flex-end; margin-top: 0.3rem; }
    .source-option { padding: 0.7rem 0.9rem; }
    .source-option-content { gap: 0.1rem; }
    .tuning-controls { gap: 0.8rem; }
    .teach-btn { padding: 0.35rem 0.65rem; font-size: 0.75rem; }
    .support-banner { padding: 0.9rem 1rem; }
    .support-banner-message { font-size: 0.82rem; }
}

/*  Utility: Smooth background transitions by mood  */
body.mood-anxious .bg-gradient {
    background: radial-gradient(ellipse at 30% 40%, rgba(126, 200, 200, 0.1) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 60%, rgba(155, 142, 196, 0.08) 0%, transparent 50%);
}
body.mood-low_energy .bg-gradient {
    background: radial-gradient(ellipse at 40% 50%, rgba(155, 142, 196, 0.1) 0%, transparent 60%),
                radial-gradient(ellipse at 60% 30%, rgba(126, 200, 200, 0.06) 0%, transparent 50%);
}
body.mood-introspective .bg-gradient {
    background: radial-gradient(ellipse at 50% 50%, rgba(212, 114, 140, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 30% 70%, rgba(155, 142, 196, 0.08) 0%, transparent 50%);
}
body.mood-happy .bg-gradient {
    background: radial-gradient(ellipse at 40% 40%, rgba(232, 168, 124, 0.1) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 60%, rgba(212, 166, 86, 0.08) 0%, transparent 50%);
}
body.mood-content .bg-gradient {
    background: radial-gradient(ellipse at 50% 40%, rgba(126, 200, 200, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 50% 70%, rgba(232, 168, 124, 0.06) 0%, transparent 50%);
}
