:root {
    --background: #10121f;
    --panel: rgba(255, 255, 255, 0.08);
    --panel-strong: rgba(255, 255, 255, 0.14);
    --text: #f8f7ff;
    --muted: #bab7d4;
    --accent: #1db954;
    --accent-dark: #159743;
    --warning: #ff6b6b;
    --border: rgba(255, 255, 255, 0.16);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(29, 185, 84, 0.28), transparent 32rem),
        radial-gradient(circle at bottom right, rgba(129, 80, 255, 0.24), transparent 28rem),
        var(--background);
}

button,
input {
    font: inherit;
}

button {
    border: none;
}

.app-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0;
}

.hero-card,
.panel {
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
    border-radius: 28px;
}

.hero-card {
    padding: 42px;
    margin-bottom: 24px;
}

.badge {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    color: #09120d;
    background: var(--accent);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(3rem, 9vw, 6.5rem);
    margin: 18px 0 8px;
    letter-spacing: -0.08em;
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 14px;
}

.subtitle {
    max-width: 720px;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

.setup-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
    margin: 28px 0 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
}

.setup-card label,
.setup-card small {
    grid-column: 1 / -1;
    color: var(--muted);
}

input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 13px 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

input:focus {
    border-color: var(--accent);
}

.button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.primary-button,
.secondary-button,
#save-client-id {
    cursor: pointer;
    border-radius: 14px;
    padding: 13px 18px;
    font-weight: 700;
    transition: transform 0.15s ease, background 0.15s ease;
}

.primary-button,
#save-client-id {
    color: #07110b;
    background: var(--accent);
}

.secondary-button {
    color: var(--text);
    background: var(--panel-strong);
}

button:hover {
    transform: translateY(-1px);
}

.primary-button:hover,
#save-client-id:hover {
    background: var(--accent-dark);
}

.status-message {
    min-height: 24px;
    margin: 16px 0 0;
    color: var(--muted);
}

.status-message.error {
    color: var(--warning);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.panel {
    padding: 24px;
}

.wide-panel {
    grid-column: span 2;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.panel-heading span,
.panel-copy,
.empty-state,
.manual-summary,
.artist-card small,
.media-item small {
    color: var(--muted);
}

.profile-summary {
    display: flex;
    gap: 16px;
    align-items: center;
}

.avatar {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--accent), #8c6bff);
    color: #080b13;
    font-size: 2rem;
    font-weight: 900;
}

.score-panel {
    text-align: center;
}

.score-ring {
    width: 170px;
    height: 170px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 50%;
    border: 14px solid rgba(29, 185, 84, 0.32);
    background: rgba(29, 185, 84, 0.12);
}

.score-ring span {
    display: block;
    font-size: 3.5rem;
    line-height: 1;
    font-weight: 900;
}

.media-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.media-item,
.artist-card {
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
}

.media-item {
    display: grid;
    grid-template-columns: auto 64px 1fr;
    gap: 14px;
    align-items: center;
    border-radius: 18px;
    padding: 12px;
}

.rank {
    color: var(--accent);
    font-weight: 900;
}

.media-item img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
}

.media-item strong,
.media-item small,
.artist-card strong,
.artist-card small {
    display: block;
}

.artist-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.artist-card {
    padding: 14px;
    border-radius: 20px;
}

.artist-card img,
.artist-placeholder {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 18px;
    object-fit: cover;
    margin-bottom: 12px;
}

.artist-placeholder {
    display: grid;
    place-items: center;
    background: var(--panel-strong);
    font-size: 2rem;
}

.preference-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.preference-form button {
    grid-column: span 2;
}

.manual-summary {
    margin-top: 18px;
    line-height: 1.6;
}

.hidden {
    display: none;
}

@media (max-width: 760px) {
    .hero-card {
        padding: 28px;
    }

    .setup-card,
    .dashboard-grid,
    .media-list,
    .artist-grid,
    .preference-form {
        grid-template-columns: 1fr;
    }

    .wide-panel,
    .preference-form button {
        grid-column: span 1;
    }

    .media-item {
        grid-template-columns: auto 52px 1fr;
    }
}
