:root {
    --void: #0c0a10;
    --curtain: #1a1014;
    --crimson: #a8192e;
    --crimson-bright: #d61f3c;
    --gold: #d4af37;
    --gold-dim: #8a7228;
    --violet: #4b3a6e;
    --cream: #f3ede2;
    --cream-dim: #c9c0ae;
    --line: rgba(243, 237, 226, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(168, 25, 46, 0.25), transparent),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(75, 58, 110, 0.25), transparent),
    var(--void);
    color: var(--cream);
    font-family: 'Manrope', sans-serif;
}

h1, h2, h3, h4 {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.04em;
    font-weight: 400;
}

a {
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
}

header {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 5vw;
    backdrop-filter: blur(14px);
    background: rgba(12, 10, 16, 0.65);
    border-bottom: 1px solid var(--line);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    letter-spacing: 0.08em;
    text-decoration: none;
}

.logo .reel {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: conic-gradient(var(--gold) 0 25%, var(--crimson) 0 50%, var(--gold) 0 75%, var(--crimson) 0 100%);
    position: relative;
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.5);
    animation: spin 8s linear infinite;
}

.logo .reel::after {
    content: '';
    position: absolute;
    inset: 35%;
    background: var(--void);
    border-radius: 50%;
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switch {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 3px;
    gap: 2px;
    background: rgba(255, 255, 255, 0.02);
}

.lang-btn {
    border: none;
    background: transparent;
    color: var(--cream-dim);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 6px 12px;
    border-radius: 16px;
    transition: all .25s ease;
}

.lang-btn:hover {
    color: var(--cream);
}

.lang-btn.active {
    background: var(--gold);
    color: var(--void);
}

.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cream-dim);
    text-decoration: none;
    border: 1px solid var(--line);
    padding: 9px 16px;
    border-radius: 3px;
    transition: border-color .25s, color .25s;
}

.back-link:hover {
    border-color: var(--gold-dim);
    color: var(--cream);
}

main {
    padding: 60px 5vw 90px;
    max-width: 1280px;
    margin: 0 auto;
}

.page-eyebrow {
    color: var(--gold);
    font-size: 13px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.page-eyebrow::before {
    content: '';
    width: 34px;
    height: 1px;
    background: var(--gold);
}

main h1 {
    font-size: clamp(38px, 5vw, 64px);
    line-height: 0.95;
    margin: 0 0 14px;
}

main h1 span {
    color: var(--crimson-bright);
}

main > p.lead {
    color: var(--cream-dim);
    max-width: 640px;
    line-height: 1.7;
    margin-bottom: 48px;
}

/* ---- panels & section headers ---- */
.panel {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 30px 28px;
    margin-bottom: 32px;
}

.section-head {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 24px;
}

.section-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 34px;
    color: var(--gold);
    line-height: 1;
    opacity: 0.85;
    flex-shrink: 0;
}

.panel h2 {
    font-size: 28px;
    margin: 0 0 4px;
}

.panel .sub {
    color: var(--cream-dim);
    font-size: 13px;
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--crimson-bright), var(--crimson));
    color: var(--cream);
    border: none;
    padding: 13px 28px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 3px;
    box-shadow: 0 10px 26px -8px rgba(214, 31, 60, 0.55);
    transition: transform .25s ease, box-shadow .25s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -8px rgba(214, 31, 60, 0.7);
}

.btn-ghost {
    display: inline-block;
    background: rgba(255, 255, 255, 0.03);
    color: var(--cream);
    border: 1px solid var(--line);
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 3px;
    transition: border-color .2s ease, background .2s ease;
}

.btn-ghost:hover {
    border-color: var(--gold-dim);
    background: rgba(212, 175, 55, 0.06);
}

/* ---- reveal animation ---- */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUpVec .55s ease both;
    animation-play-state: paused;
}

.reveal.visible {
    animation-play-state: running;
}

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

/* ---- empty / error states ---- */
.empty-state {
    color: var(--cream-dim);
    font-size: 14px;
    padding: 20px 0;
}

.empty-state-block {
    text-align: center;
    padding: 40px 20px;
    color: var(--cream-dim);
}

.empty-state-block .empty-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    color: var(--cream);
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.empty-state-block .empty-text {
    font-size: 14px;
    margin-bottom: 20px;
}

.empty-mini {
    color: var(--cream-dim);
    font-size: 13px;
}

.error-state {
    text-align: center;
    padding: 40px 20px;
}

.error-state .error-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    color: var(--crimson-bright);
    margin-bottom: 6px;
}

.error-state .error-hint {
    color: var(--cream-dim);
    font-size: 13px;
    margin-bottom: 18px;
}

/* ---- skeleton loaders ---- */
.skeleton-block {
    padding: 4px 0;
}

.sk-line {
    height: 14px;
    border-radius: 4px;
    margin-bottom: 22px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.09) 37%, rgba(255, 255, 255, 0.04) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.6s ease infinite;
}

.sk-w40 {
    width: 40%;
}

.sk-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.sk-card {
    height: 120px;
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.07) 37%, rgba(255, 255, 255, 0.03) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.6s ease infinite;
}

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

/* ================= 01 TASTE ================= */
.self-pick {
    padding: 18px 0;
}

.self-pick-text {
    color: var(--cream-dim);
    font-size: 14px;
    margin-bottom: 16px;
    max-width: 520px;
    line-height: 1.6;
}

.self-pick-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.self-pick-row select {
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--cream);
    font-size: 14px;
    min-width: 220px;
    outline: none;
}

.demo-note {
    margin-top: 16px;
    font-size: 11px;
    color: var(--cream-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.6;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px 16px;
    text-align: center;
    transition: border-color .25s ease;
}

.stat-card:hover {
    border-color: rgba(212, 175, 55, 0.35);
}

.stat-card-wide {
    grid-column: span 1;
}

.stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 30px;
    color: var(--gold);
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.stat-value-sm {
    font-size: 16px;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    color: var(--cream);
}

.stat-label {
    margin-top: 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cream-dim);
}

.genre-bars {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.genre-bar-row {
    display: grid;
    grid-template-columns: 130px 1fr 46px;
    align-items: center;
    gap: 12px;
}

.genre-bar-name {
    font-size: 13px;
    color: var(--cream-dim);
}

.genre-bar-track {
    height: 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    overflow: hidden;
}

.genre-bar-fill {
    height: 100%;
    border-radius: 6px;
    width: 0;
    transition: width 1s cubic-bezier(.22, 1, .36, 1);
}

.reveal.visible .genre-bar-fill {
    width: var(--fill, 0);
}

.genre-bar-pct {
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

/* ================= 02 RESONANCE ================= */
.resonance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px;
    transition: border-color .25s ease, transform .25s ease;
}

.user-card:hover {
    border-color: rgba(212, 175, 55, 0.35);
    transform: translateY(-2px);
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    color: var(--void);
    flex-shrink: 0;
}

.user-card-body {
    flex: 1;
    min-width: 90px;
}

.user-card-name {
    font-weight: 700;
    font-size: 14px;
}

.user-card-genres {
    font-size: 11px;
    color: var(--cream-dim);
    margin-top: 2px;
}

.match-pill {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    color: var(--gold);
    text-align: right;
}

.match-pill span {
    display: block;
    font-family: 'Manrope', sans-serif;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cream-dim);
    font-weight: 700;
}

.compare-btn {
    flex-basis: 100%;
    text-align: center;
}

.show-more-btn {
    display: block;
    margin: 4px auto 30px;
}

/* ---- taste map ---- */
.taste-map-wrap {
    margin-top: 10px;
    border-top: 1px solid var(--line);
    padding-top: 24px;
}

.taste-map-head h3 {
    font-size: 20px;
    margin: 0 0 2px;
}

.taste-map-head .sub {
    color: var(--cream-dim);
    font-size: 12px;
    margin-bottom: 14px;
}

.taste-map-svg {
    width: 100%;
    max-width: 420px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.map-you-label {
    fill: var(--void);
    font-family: 'Manrope', sans-serif;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.map-node {
    cursor: pointer;
}

.map-node-label {
    fill: var(--cream-dim);
    font-family: 'Manrope', sans-serif;
    font-size: 9px;
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}

.map-node:hover .map-node-label,
.map-node:focus .map-node-label {
    opacity: 1;
    fill: var(--cream);
}

.map-node circle {
    transition: r .2s ease;
}

.map-node:hover circle,
.map-node:focus circle {
    r: 12;
}

/* ---- comparison panel ---- */
.compare-panel {
    margin-top: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 22px;
    animation: fadeUpVec .4s ease both;
}

.compare-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.compare-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.compare-title-row h3 {
    font-size: 20px;
    margin: 0;
}

.compare-close {
    background: none;
    border: 1px solid var(--line);
    color: var(--cream-dim);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
}

.compare-close:hover {
    color: var(--cream);
    border-color: var(--gold-dim);
}

.compare-overall {
    text-align: center;
    margin-bottom: 16px;
}

.compare-overall-pct {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 46px;
    color: var(--gold);
    line-height: 1;
}

.compare-overall-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cream-dim);
}

.compare-liked {
    text-align: center;
    font-size: 13px;
    color: var(--cream-dim);
    margin-bottom: 20px;
}

.compare-liked strong {
    color: var(--cream);
    font-size: 16px;
}

.compare-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.compare-col h4 {
    font-size: 15px;
    margin: 0 0 10px;
    color: var(--cream-dim);
    font-weight: 400;
}

.compare-genre-chip {
    display: inline-block;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 20px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.25);
    margin: 0 6px 6px 0;
}

.compare-fav h4 {
    font-size: 15px;
    margin: 0 0 10px;
    color: var(--cream-dim);
    font-weight: 400;
}

.fav-chip {
    display: inline-block;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 20px;
    background: rgba(214, 31, 60, 0.1);
    border: 1px solid rgba(214, 31, 60, 0.3);
    margin: 0 6px 6px 0;
}

/* ================= 03 RECOMMENDATIONS ================= */
.rec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 22px;
    perspective: 1200px;
}

.rec-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s;
}

.rec-card:hover {
    box-shadow: 0 26px 50px -16px rgba(0, 0, 0, 0.7);
    border-color: rgba(212, 175, 55, 0.4);
}

.rec-img {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.rec-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(12, 10, 16, 0.95), transparent 60%);
}

.rec-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(12, 10, 16, 0.85);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-weight: 800;
    font-size: 12px;
    padding: 4px 9px;
    border-radius: 20px;
    z-index: 2;
}

.rec-match {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--crimson-bright), var(--crimson));
    color: var(--cream);
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.03em;
    padding: 5px 9px;
    border-radius: 20px;
    z-index: 2;
    box-shadow: 0 6px 16px -6px rgba(214, 31, 60, 0.7);
}

.rec-body {
    padding: 14px 14px 16px;
    margin-top: -42px;
    position: relative;
    z-index: 2;
}

.rec-body h3 {
    font-size: 18px;
    margin: 0 0 4px;
    line-height: 1.1;
}

.rec-body .meta {
    font-size: 11px;
    color: var(--cream-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.rec-why-btn {
    background: none;
    border: none;
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rec-why-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, margin-top .35s ease;
}

.rec-card.why-open .rec-why-panel {
    max-height: 160px;
    margin-top: 10px;
}

.rec-reason {
    font-size: 11.5px;
    color: var(--cream-dim);
    line-height: 1.5;
    padding: 4px 0;
    border-top: 1px solid var(--line);
}

.rec-reason:first-child {
    border-top: none;
}

@media (max-width: 880px) {
    main {
        padding: 40px 5vw 70px;
    }

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

    .genre-bar-row {
        grid-template-columns: 90px 1fr 40px;
        gap: 8px;
    }

    .compare-cols {
        grid-template-columns: 1fr;
    }

    .section-head {
        gap: 12px;
    }

    .section-num {
        font-size: 26px;
    }
}

@media (max-width: 520px) {
    .panel {
        padding: 22px 18px;
    }

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

    .stat-card-wide {
        grid-column: span 2;
    }

    .resonance-grid {
        grid-template-columns: 1fr;
    }

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