/* =============================================
   Beat Duel — Global Stylesheet
   ============================================= */

/* === Custom Properties === */
:root {
    --bg:           #0a0a0a;
    --surface:      #141414;
    --surface-2:    #1e1e1e;
    --border:       #2a2a2a;

    --pink:         #ff2d78;
    --purple:       #9333ea;
    --cyan:         #00e5ff;
    --green:        #39ff14;

    --text:         #f0f0f0;
    --text-muted:   #777;

    --radius:       8px;
    --font:         'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

/* === Base === */
html {
    font-size: 16px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    min-height: 100vh;
    padding: 0 24px 60px;
    max-width: 960px;
    margin: 0 auto;
}

/* === Typography === */
h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--pink) 0%, var(--purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

h1 button {
    -webkit-text-fill-color: #fff;
}

h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--cyan);
    margin: 2rem 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pink);
    margin: 1.5rem 0 0.5rem;
}

p {
    margin-bottom: 0.75rem;
    color: var(--text);
}

i, em {
    color: var(--text-muted);
    font-style: italic;
}

/* === Links === */
a {
    color: var(--cyan);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--pink);
}

/* === Nav bar (first div in body) === */
body:not(.auth-page) > div:first-of-type {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

body:not(.auth-page) > div:first-of-type h1 {
    font-size: 1.6rem;
    margin-right: 0.5rem;
}

body:not(.auth-page) > div:first-of-type a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.15s;
}

body:not(.auth-page) > div:first-of-type a:hover {
    color: var(--pink);
}

body:not(.auth-page) > div:first-of-type a.nav-link--active {
    color: var(--cyan);
    border-bottom: 1px solid var(--cyan);
    padding-bottom: 1px;
}

/* === Nav search === */
.nav-search {
    display: flex;
    align-items: center;
}

.nav-search__input {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.85rem;
    padding: 4px 8px;
    width: 140px;
    transition: border-color 0.2s, width 0.2s;
    outline: none;
}

.nav-search__input:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(255, 45, 120, 0.15);
    width: 200px;
}

.nav-search__input::placeholder {
    color: var(--text-muted);
}

/* === Search page === */
.search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    max-width: 500px;
}

.search-form__input {
    flex: 1;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    padding: 10px 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-form__input:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(255, 45, 120, 0.15);
}

.search-form__btn {
    background: linear-gradient(135deg, var(--pink), var(--purple));
    border: none;
    border-radius: var(--radius);
    color: #fff;
    -webkit-text-fill-color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 18px;
    transition: opacity 0.2s;
}

.search-form__btn:hover { opacity: 0.85; }

.search-form__genre {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.88rem;
    padding: 0 0.6rem;
    flex-shrink: 0;
}

.search-jump-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.search-jump-links a {
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

.search-jump-links a:hover {
    color: var(--cyan);
    border-color: var(--cyan);
}

.status-live     { background: var(--green);  color: #000; font-size: 0.7rem; font-weight: 700; padding: 2px 6px; border-radius: 3px; margin-left: 0.4rem; text-transform: uppercase; letter-spacing: 0.05em; }
.status-upcoming { background: var(--cyan);   color: #000; font-size: 0.7rem; font-weight: 700; padding: 2px 6px; border-radius: 3px; margin-left: 0.4rem; text-transform: uppercase; letter-spacing: 0.05em; }
.status-ended    { background: var(--border); color: var(--text-muted); font-size: 0.7rem; font-weight: 700; padding: 2px 6px; border-radius: 3px; margin-left: 0.4rem; text-transform: uppercase; letter-spacing: 0.05em; }

.search-count {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 0.4rem;
    text-transform: none;
    letter-spacing: 0;
}

.search-result-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.search-result-meta a { color: var(--text-muted); }
.search-result-meta a:hover { color: var(--cyan); }

.search-track-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}

.search-track-body {
    flex: 1;
}

.search-player-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.search-player-body {
    flex: 1;
}

/* === HR divider === */
hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

/* === Lists === */
ol, ul {
    padding-left: 1.5rem;
}

li {
    margin: 0.6rem 0;
    color: var(--text);
}

/* === Forms === */
label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea,
select {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font);
    width: 100%;
    max-width: 440px;
    transition: border-color 0.15s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(255, 45, 120, 0.15);
}

input[type="submit"],
button {
    background: linear-gradient(135deg, var(--pink), var(--purple));
    color: #fff;
    border: none;
    padding: 0.55rem 1.4rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font);
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: opacity 0.15s, transform 0.1s;
}

input[type="submit"]:hover,
button:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

input[type="submit"]:active,
button:active {
    transform: translateY(0);
}

input[type="checkbox"] {
    accent-color: var(--pink);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* === Tables === */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

/* === Ordered list rankings === */
ol li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
}

ol li:last-child {
    border-bottom: none;
}

/* === Auth pages (login, signup) === */
body.auth-page {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-brand {
    text-align: center;
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.auth-tagline {
    color: var(--text-muted);
    font-size: 1rem;
    text-align: center;
    margin-bottom: 2rem;
}

.auth-stats {
    color: var(--cyan);
    font-size: 0.9rem;
    text-align: center;
    margin: -1rem 0 1.5rem;
    opacity: 0.85;
}

.auth-stats-dot {
    margin: 0 0.5rem;
    color: var(--text-muted);
}

.auth-duo {
    display: flex;
    gap: 1.5rem;
    width: 100%;
    max-width: 820px;
    margin-bottom: 1.5rem;
}

.auth-duo .auth-card {
    flex: 1;
    max-width: none;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
}

.auth-card--signup {
    border-color: var(--purple);
}

.auth-card .brand {
    text-align: center;
    display: block;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.auth-card h2 {
    text-align: center;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    margin: 0 0 1.5rem;
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
    max-width: 100%;
    width: 100%;
}

.auth-card input[type="submit"] {
    width: 100%;
    padding: 0.7rem;
    margin-top: 0.5rem;
    font-size: 1rem;
}

.auth-links {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-links a {
    color: var(--text-muted);
}

.auth-links a:hover {
    color: var(--pink);
}

.auth-notice {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 1rem;
}

.waitlist-section {
    margin-top: 0;
    max-width: 820px;
    border-color: var(--border);
}
.waitlist-section h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

/* === Utility === */
br + br {
    display: none; /* collapse double line breaks */
}

/* === Avatar === */
.avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin-bottom: 1rem;
    border: 2px solid var(--purple);
}

.avatar-sm {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    border: 2px solid var(--purple);
    margin-right: 0.5rem;
}

.avatar-placeholder-sm {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    margin-right: 0.5rem;
    vertical-align: middle;
    user-select: none;
    border: 2px solid var(--purple);
}

.avatar-placeholder {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 1rem;
    user-select: none;
    border: 2px solid var(--purple);
}

/* === Duel image thumbnail === */
.duel-image {
    width: 150px;
    height: 150px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.duel-image-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(255,45,120,0.15), rgba(147,51,234,0.15));
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* === Track image thumbnail === */
.track-image {
    width: 150px;
    height: 150px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
    display: block;
    margin-bottom: 0.75rem;
}

.track-image-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(255,45,120,0.15), rgba(147,51,234,0.15));
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.track-image-sm {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.track-image-placeholder-sm {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(255,45,120,0.15), rgba(147,51,234,0.15));
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* === Extra-small avatar (inline with text) === */
.avatar-xs {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    border: 1px solid var(--purple);
    margin-right: 0.2rem;
}

.avatar-placeholder-xs {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: bold;
    color: #fff;
    margin-right: 0.2rem;
    vertical-align: middle;
    user-select: none;
    border: 1px solid var(--purple);
}

/* 40px — used in notification/activity feeds */
.avatar-feed {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--purple);
}

.avatar-placeholder-feed {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    flex-shrink: 0;
    user-select: none;
    border: 2px solid var(--purple);
}

/* === Leaderboard list === */
.leaderboard-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.leaderboard-list-stacked li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}

/* === Duel list item === */
.duel-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.duel-item-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

/* === Filter bar === */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.filter-bar-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.25rem;
}

.filter-bar a {
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: border-color 0.15s, color 0.15s;
}

.filter-bar a:hover {
    color: var(--text);
    border-color: var(--pink);
}

.filter-bar a.active {
    color: var(--pink);
    border-color: var(--pink);
    background: rgba(255, 45, 120, 0.08);
}

/* === Pagination === */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    margin: 1.5rem 0;
}

.pagination-link {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: border-color 0.15s, color 0.15s;
}

.pagination-link:hover {
    color: var(--text);
    border-color: var(--pink);
}

.pagination-link.active {
    color: var(--pink);
    border-color: var(--pink);
    background: rgba(255, 45, 120, 0.08);
    font-weight: 600;
}

.pagination-ellipsis {
    color: var(--text-muted);
    padding: 0 0.25rem;
}

/* === Invite page === */
.invite-stats {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.invite-stats strong {
    color: var(--text);
}

.invite-form {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.invite-form input[type="email"] {
    flex: 1;
    min-width: 200px;
}

.invite-message {
    padding: 0.65rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.invite-message--success {
    background: rgba(57, 255, 20, 0.1);
    border: 1px solid var(--green);
    color: var(--green);
}

.invite-message--error {
    background: rgba(255, 45, 120, 0.1);
    border: 1px solid var(--pink);
    color: var(--pink);
}

.invite-message--warning {
    background: rgba(255, 200, 0, 0.08);
    border: 1px solid #ffc800;
    color: #ffc800;
}

.invite-empty {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.invite-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.invite-table th,
.invite-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.invite-table th {
    color: var(--text-muted);
    font-weight: 500;
}

.invite-code {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.invite-status--used {
    color: var(--cyan);
}

.invite-status--pending {
    color: var(--text-muted);
}

/* ── Toast notifications ──────────────────────────────────────────────────── */

#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    pointer-events: none;
    max-width: 320px;
}

.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    pointer-events: all;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    font-size: 0.9rem;
    color: var(--text);
}

.toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.toast--dismissing {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast--submit {
    border-left: 3px solid var(--pink);
}

.toast--join {
    border-left: 3px solid var(--cyan);
}

.toast--follow {
    border-left: 3px solid var(--green);
}

.toast--points {
    border-left: 3px solid var(--purple);
}

.toast--error {
    border-left: 3px solid var(--pink);
    color: var(--text);
}

.btn-follow {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    -webkit-text-fill-color: var(--text);
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: border-color 0.2s;
}
.btn-follow:hover { border-color: var(--cyan); }
.btn-follow--active {
    border-color: var(--pink);
    -webkit-text-fill-color: var(--pink);
}
.btn-follow--active:hover {
    border-color: var(--text-muted);
    -webkit-text-fill-color: var(--text-muted);
}

/* === Welcome / How-to page === */
.welcome-page {
    max-width: 560px;
}

.welcome-hero {
    margin-bottom: 1.75rem;
}

.welcome-hero h2 {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
}

.welcome-hero p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.welcome-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.welcome-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.welcome-step__number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    margin-top: 0.1rem;
}

.welcome-step strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.welcome-step p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.45;
}

/* === Follow suggestions page === */
.avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--purple);
    display: block;
    margin: 0 auto 0.6rem;
}

.avatar-placeholder-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: bold;
    color: #fff;
    margin: 0 auto 0.6rem;
    user-select: none;
    border: 2px solid var(--purple);
}

.suggestions-page {
    max-width: 760px;
}

.suggestions-intro {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
}

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

.suggestion-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.1rem 0.9rem 0.9rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.suggestion-card__name {
    font-weight: 600;
    font-size: 0.92rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.suggestion-card__genre {
    font-size: 0.72rem;
    color: var(--cyan);
    font-weight: normal;
}

.suggestion-card__bio {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0.2rem 0 0;
    line-height: 1.4;
}

.suggestion-card__meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.suggestion-card .btn-follow {
    margin-top: 0.5rem;
    width: 100%;
}

.suggestions-footer {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.suggestions-more-link {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.suggestions-continue-btn {
    padding: 0.55rem 1.4rem;
    font-size: 0.9rem;
}

/* === Score share row === */
.score-share-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.score-share-btn {
    font-size: 0.82rem;
    padding: 0.4rem 1rem;
}

/* === Season record page === */
.record-page {
    max-width: 680px;
}

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

.record-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 0.9rem 0.75rem;
    text-align: center;
}

.record-stat-card__number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--pink);
}

.record-stat-card__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.record-section {
    margin-bottom: 2rem;
}

.record-section h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.record-highlight {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.record-highlight__label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.record-highlight__value {
    font-weight: 600;
    font-size: 0.95rem;
}

.toast__close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0 2px;
    font-size: 1.1rem;
    line-height: 1;
    -webkit-text-fill-color: var(--text-muted);
    color: var(--text-muted);
    flex-shrink: 0;
}

.toast__close:hover {
    -webkit-text-fill-color: var(--text);
    color: var(--text);
}

/* === Bell icon + notification badge === */
.nav-bell {
    position: relative;
    font-size: 1.1rem;
    text-decoration: none;
    line-height: 1;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--pink);
    color: #fff;
    -webkit-text-fill-color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.notification-badge--hidden { display: none; }

/* === Notification inbox === */
.notification-list {
    margin-top: 1rem;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.notification-item--unread { background: rgba(255, 45, 120, 0.04); }

.notification-item__body {
    flex: 1;
    font-size: 0.9rem;
}

.notification-item__meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.notification-item a { color: var(--cyan); }
.notification-item a:hover { color: var(--pink); }

.notification-list-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

.activity-day-header {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.75rem 0 0.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.25rem;
}

.track-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* === Inline action link next to a section heading === */
.section-header-link {
    font-size: 0.78rem;
    font-weight: normal;
    color: #555;
    margin-left: 1.25rem;
}

.section-header-link:hover { color: var(--pink); }

/* === Homepage two-column layout === */
.home-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 720px) {
    .home-two-col {
        grid-template-columns: 1fr;
    }
}

/* === Onboarding card === */
.onboarding-card {
    background: var(--surface);
    border: 1px solid rgba(255, 45, 120, 0.3);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    max-width: 600px;
}

.onboarding-duels {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.onboarding-duel-card {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.75rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s;
}

.onboarding-duel-card:hover {
    border-color: var(--pink);
    color: var(--text);
}

.onboarding-duel-card__name {
    font-weight: 600;
    font-size: 0.92rem;
}

.onboarding-duel-card__reason {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cyan);
}

.onboarding-duel-card__meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.onboarding-browse-link {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.onboarding-steps {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.onboarding-steps li { font-size: 0.9rem; }
.onboarding-steps li span { color: var(--text-muted); font-size: 0.82rem; }

.onboarding-cta {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity 0.15s;
}
.onboarding-cta:hover { opacity: 0.85; color: #fff; }

/* === Hidden gem card (home.php discovery section) === */
.hidden-gem-card {
    background: var(--surface);
    border: 1px solid rgba(0,229,255,0.2);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    margin-bottom: 1.25rem;
}

.hidden-gem-card__caption {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}

.hidden-gem-card__row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.hidden-gem-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.88rem;
}

.hidden-gem-card__stats {
    font-size: 0.78rem;
    color: var(--cyan);
}

.hidden-gem-card__cta {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.82rem;
    color: var(--pink);
    font-weight: 600;
}

.hidden-gem-card__cta:hover { text-decoration: underline; }

/* === Track analytics === */
.analytics-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0.75rem 0;
}

.analytics-stats .stat-card { min-width: 90px; }

.analytics-chart {
    max-width: 480px;
    margin-bottom: 0.5rem;
}

.analytics-bar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
    font-size: 0.78rem;
}

.analytics-bar-label {
    color: var(--text-muted);
    min-width: 120px;
    flex-shrink: 0;
}

.analytics-bar-wrap {
    flex: 1;
    background: var(--surface-2);
    border-radius: 4px;
    height: 14px;
    overflow: hidden;
}

.analytics-bar {
    background: linear-gradient(135deg, var(--pink), var(--purple));
    height: 100%;
    border-radius: 4px;
}

.analytics-bar-count {
    color: var(--text-muted);
    min-width: 18px;
    text-align: right;
}

/* === Discovery + streak badges === */
.badge-for-you {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--cyan);
    border: 1px solid rgba(0,229,255,0.35);
    border-radius: 999px;
    padding: 0.1em 0.55em;
    margin-left: 0.4rem;
    vertical-align: middle;
}

.streak-display {
    color: var(--pink);
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0 0 0.75rem;
}

/* === Score page — duel groups + events === */
.score-duel-group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.score-duel-group__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    background: var(--surface-2);
    font-size: 0.88rem;
    font-weight: 600;
}

.score-duel-group__pts {
    color: var(--cyan);
    font-size: 0.82rem;
    font-weight: 600;
}

.score-event {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    font-size: 0.83rem;
    border-left: 3px solid transparent;
    border-bottom: 1px solid var(--border);
}

.score-event:last-child { border-bottom: none; }

.score-event--submit  { border-left-color: var(--pink); }
.score-event--toppick { border-left-color: #f0c040; }
.score-event--vote    { border-left-color: var(--purple); }
.score-event--listen  { border-left-color: var(--cyan); }

.score-event__icon  { font-size: 0.9rem; flex-shrink: 0; }
.score-event__label { flex: 1; color: var(--text); }
.score-event__pts   { color: var(--green); font-weight: 600; min-width: 36px; text-align: right; white-space: nowrap; }
.score-event__date  { color: var(--text-muted); font-size: 0.75rem; white-space: nowrap; }
.score-event__overlimit { color: var(--text-muted); font-size: 0.78rem; font-weight: normal; }

/* === Pricing cards === */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    max-width: 860px;
    margin: 1.5rem 0 2rem;
}

@media (max-width: 680px) {
    .plan-grid { grid-template-columns: 1fr; }
}

.plan-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.plan-card--current {
    border-color: var(--pink);
    box-shadow: 0 0 0 1px var(--pink);
}

.plan-card__name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cyan);
    margin: 0;
}

.plan-card__badge {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pink);
    background: rgba(255, 45, 120, 0.1);
    border: 1px solid rgba(255, 45, 120, 0.25);
    border-radius: 999px;
    padding: 2px 8px;
    display: inline-block;
    margin-bottom: 0.25rem;
}

.plan-card__price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    margin: 0.25rem 0;
}

.plan-card__price span {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
}

.plan-card__current-label {
    font-size: 0.78rem;
    color: var(--pink);
    font-weight: 600;
}

.plan-card__features {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
}

.plan-card__features li {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.plan-card__features li::before {
    content: '✓';
    color: var(--green);
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1.4;
}

.plan-card__features li.plan-feat--no {
    color: #555;
}

.plan-card__features li.plan-feat--no::before {
    content: '✕';
    color: #444;
}

.plan-card__features li.plan-feat--soon::before {
    content: '◷';
    color: var(--text-muted);
}

/* === Site footer === */
.site-footer {
    margin-top: 4rem;
    border-top: 1px solid var(--border);
    padding: 1.5rem 2rem;
}

.site-footer__inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.site-footer__brand {
    font-weight: 700;
    font-size: 0.95rem;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.site-footer__links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.site-footer__links a {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
}

.site-footer__links a:hover {
    color: var(--text);
}

.site-footer__copy {
    margin-left: auto;
    font-size: 0.8rem;
    color: #444;
}

/* === PWA install banner === */
#pwa-install-banner {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.pwa-install-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
}

.pwa-install-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.pwa-install-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.pwa-install-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.2;
}

#pwa-install-btn {
    background: linear-gradient(135deg, var(--pink), var(--purple));
    color: #fff;
    -webkit-text-fill-color: #fff;
    border: none;
    border-radius: 20px;
    padding: 0.4rem 1.1rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

#pwa-install-dismiss {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    line-height: 1;
    flex-shrink: 0;
}

#pwa-install-dismiss:hover { color: var(--text); }

.btn-dismiss-all {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-muted);
    -webkit-text-fill-color: var(--text-muted);
    padding: 0;
    transition: color 0.15s;
}
.btn-dismiss-all:hover {
    color: var(--pink);
    -webkit-text-fill-color: var(--pink);
}

.notification-dismiss {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    -webkit-text-fill-color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 2px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}
.notification-item:hover .notification-dismiss { opacity: 1; }
.notification-dismiss:hover {
    color: var(--pink);
    -webkit-text-fill-color: var(--pink);
}

/* Profile bio & social links */
textarea {
    min-height: 80px;
    resize: vertical;
}

.profile-bio {
    color: var(--text);
    max-width: 500px;
    margin: 0.75rem 0;
    line-height: 1.5;
}

.profile-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.5rem 0 1rem;
}

.profile-link {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: border-color 0.15s, color 0.15s;
}

.profile-link:hover {
    color: var(--cyan);
    border-color: var(--cyan);
}

.profile-saved,
.msg--success {
    color: var(--green);
}

.msg--error {
    color: var(--pink);
}

/* === Achievement badges === */
.achievement-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.achievement-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.8rem;
    cursor: default;
    user-select: none;
}

.achievement-badge__icon { font-size: 1rem; line-height: 1; }
.achievement-badge__name { font-weight: 600; color: var(--text); }

.achievement-badge--locked {
    opacity: 0.35;
    filter: grayscale(1);
}

.voting-history-table {
    width: 70%;
    border: 1px solid var(--border);
    text-align: center;
    border-collapse: collapse;
}

.voting-history-table th,
.voting-history-table td {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.digest-form {
    display: inline;
}

.digest-form label {
    margin-right: 0.75rem;
}

.admin-table {
    width: 100%;
    border: 1px solid var(--border);
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.admin-table th {
    color: var(--text-muted);
    font-weight: normal;
}

.admin-table .admin-invite-form {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.admin-table .admin-invite-form input[type="number"] {
    width: 5rem;
}

.admin-saved {
    color: var(--green);
    font-size: 0.85rem;
}

.admin-btn-grant {
    font-size: 0.78rem;
    padding: 0.15rem 0.5rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
}

.admin-btn-grant:hover { border-color: var(--cyan); color: var(--cyan); }

.admin-btn-revoke {
    font-size: 0.78rem;
    padding: 0.15rem 0.5rem;
    background: transparent;
    border: 1px solid rgba(255, 45, 120, 0.4);
    color: var(--pink);
    border-radius: 4px;
    cursor: pointer;
}

.admin-btn-revoke:hover { background: rgba(255, 45, 120, 0.1); }

.admin-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.admin-stats-grid {
    max-width: 100%;
}

.stat-card--alert {
    border-color: rgba(255, 45, 120, 0.4);
    background: rgba(255, 45, 120, 0.06);
}

.stat-card__number--alert {
    color: var(--pink);
}

/* === Email verification banner === */
.verify-banner {
    background: rgba(255, 45, 120, 0.08);
    border-bottom: 1px solid rgba(255, 45, 120, 0.3);
    color: var(--text);
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.verify-banner a { color: var(--cyan); }

/* === Guest banner (unauthenticated public pages) === */
.guest-banner {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    color: var(--text-muted);
}

.guest-banner a { color: var(--cyan); }

/* === Personal Stats grid === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    max-width: 640px;
    margin: 1rem 0;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.stat-card__number { font-size: 1.8rem; font-weight: 700; color: var(--cyan); display: block; }
.stat-card__label  { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.25rem; }
.stat-card__label small { font-size: 0.72rem; }

a.stat-card--link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
a.stat-card--link:hover {
    border-color: var(--pink);
    box-shadow: 0 0 0 2px rgba(255, 45, 120, 0.12);
    color: inherit;
}
a.stat-card--link .stat-card__number { color: var(--cyan); }

/* === Creator dashboard track list === */
.creator-track-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 680px;
}

.creator-track-row {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
}

.creator-track-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.creator-track-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.creator-track-title a { color: var(--text); }
.creator-track-title a:hover { color: var(--cyan); }

.creator-track-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.creator-track-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* === Trending tracks (home.php) === */
.trending-track-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 580px;
    margin-bottom: 1rem;
}

.trending-track-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.trending-track-body a { color: var(--text); font-weight: 500; }
.trending-track-body a:hover { color: var(--cyan); }

.trending-track-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.badge-live {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--green);
    border: 1px solid rgba(57, 255, 20, 0.35);
    border-radius: 999px;
    padding: 0.1em 0.5em;
    letter-spacing: 0.04em;
    vertical-align: middle;
}


.stats-history-table {
    width: 100%;
    max-width: 640px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.stats-history-table th,
.stats-history-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.stats-history-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* === Duel ended results view === */

.duel-ended-hero {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.duel-ended-hero__img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.duel-ended-hero__meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.3rem 0;
}

.duel-ended-hero__creator {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.result-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    max-width: 320px;
}

.result-card--gold   { border-color: #ffd700; }
.result-card--silver { border-color: #c0c0c0; }
.result-card--bronze { border-color: #cd7f32; }

.result-card__rank {
    font-size: 3rem;
    font-weight: 800;
    color: var(--cyan);
    display: block;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.result-card__rank--gold   { color: #ffd700; }
.result-card__rank--silver { color: #c0c0c0; }
.result-card__rank--bronze { color: #cd7f32; }

.result-card__sub    { color: var(--text-muted); font-size: 0.9rem; }
.result-card__points { font-size: 1.1rem; font-weight: 600; margin-top: 0.5rem; }
.result-card__links  { margin-top: 0.75rem; font-size: 0.85rem; }

.result-card__your-tracks { margin-top: 0.75rem; font-size: 0.85rem; }

.result-card__track-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.2rem 0;
    border-bottom: 1px solid var(--border);
}

.result-card__track-row:last-child { border-bottom: none; }
.result-card__track-votes { color: var(--text-muted); flex-shrink: 0; }

.leaderboard-duel-links { margin-top: 0.5rem; font-size: 0.85rem; }

/* Podium player list */
.podium-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    max-width: 480px;
}

.podium-list__item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 3px;
    border-left: 3px solid transparent;
}

.podium-list__item--gold   { background: rgba(255,215,0,0.07);   border-left-color: #ffd700; }
.podium-list__item--silver { background: rgba(192,192,192,0.07); border-left-color: #c0c0c0; }
.podium-list__item--bronze { background: rgba(205,127,50,0.07);  border-left-color: #cd7f32; }
.podium-list__item--self   { background: rgba(0,229,255,0.05);   border-left-color: var(--cyan); }

.podium-list__pos {
    font-size: 0.8rem;
    font-weight: 700;
    width: 2rem;
    text-align: right;
    flex-shrink: 0;
    color: var(--text-muted);
}

.podium-list__pos--gold   { color: #ffd700; }
.podium-list__pos--silver { color: #c0c0c0; }
.podium-list__pos--bronze { color: #cd7f32; }

.podium-list__name { flex: 1; }

.podium-list__you {
    font-size: 0.72rem;
    color: var(--cyan);
    border: 1px solid var(--cyan);
    border-radius: 3px;
    padding: 1px 5px;
    margin-left: 0.4rem;
    vertical-align: middle;
}

.podium-list__pts {
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Top tracks in ended summary */
.podium-track-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    max-width: 480px;
}

.podium-track-item__pos {
    font-size: 0.8rem;
    font-weight: 700;
    width: 1.5rem;
    text-align: right;
    color: var(--text-muted);
    flex-shrink: 0;
}

.podium-track-item__body { flex: 1; }

.podium-track-item__meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.podium-track-item__meta a { color: var(--text-muted); }
.podium-track-item__meta a:hover { color: var(--cyan); }

/* Ended summary action buttons */
.duel-ended-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    color: #fff;
    -webkit-text-fill-color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: opacity 0.15s;
}

.btn-primary:hover { opacity: 0.85; color: #fff; -webkit-text-fill-color: #fff; }

/* ── Play page ─────────────────────────────────────────────── */

.play-player-wrap {
    max-width: 640px;
    width: 100%;
    position: relative;
}

#yt-player {
    aspect-ratio: 16 / 9;
    width: 100%;
}

.play-player-wrap #yt-player iframe {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    display: block;
}

#sc-player {
    width: 100%;
    max-width: 640px;
    display: block;
}

#audio-player {
    width: 100%;
    max-width: 640px;
    display: block;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 200px;
    border-radius: 6px;
}

.play-overlay .join-btn {
    font-size: 2rem;
    padding: 0.5rem 1.5rem;
}

.play-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    font-size: 1.5rem;
    max-width: 640px;
}

.play-nav a {
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--cyan);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.play-nav a:hover {
    border-color: var(--pink);
    color: var(--pink);
}

.play-nav a.nav-hidden {
    visibility: hidden;
    pointer-events: none;
}

.play-nav .nav-loading {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.track-meta {
    max-width: 640px;
    margin: 0.75rem 0 0.25rem;
}

.track-meta__name {
    font-weight: bold;
    font-size: 1.1rem;
}

.track-meta__votes {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

.vote-panel {
    max-width: 640px;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.vote-btn {
    font-size: 1.25rem;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    border: none;
    border-radius: 4px;
    color: #fff;
    transition: opacity 0.15s;
}

.vote-btn:hover { opacity: 0.85; }

.vote-btn--voted {
    background: transparent;
    border: 1px solid var(--green);
    color: var(--green);
}

.vote-btn--voted:hover {
    border-color: var(--pink);
    color: var(--pink);
    opacity: 1;
}

.top-pick-btn {
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(255, 200, 0, 0.08);
    border: 1.5px solid rgba(255, 200, 0, 0.35);
    color: #ffc800;
    padding: 0.35rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.top-pick-btn:hover {
    background: rgba(255, 200, 0, 0.15);
    border-color: #ffc800;
    color: #ffd633;
    box-shadow: 0 0 10px rgba(255, 200, 0, 0.2);
}

.top-pick-btn--active {
    background: rgba(255, 200, 0, 0.18);
    border-color: #ffc800;
    color: #ffd633;
    box-shadow: 0 0 12px rgba(255, 200, 0, 0.25);
}

.votes-remaining {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.listen-timer {
    font-size: 0.8rem;
    color: var(--cyan);
    margin-top: 0.15rem;
    font-variant-numeric: tabular-nums;
}

.keyboard-hint {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.leave-duel-link { font-size: 0.78rem; color: var(--text-muted); text-decoration: none; }
.leave-duel-link:hover { color: var(--pink); }

/* === Nav links wrapper (desktop) === */
.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    flex: 1;
}

/* === Nav stat pills (points + rank) === */
.nav-stat {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cyan) !important;
    -webkit-text-fill-color: var(--cyan) !important;
    background: rgba(0, 229, 255, 0.07);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 999px;
    padding: 3px 10px;
    text-decoration: none;
    white-space: nowrap;
}

.nav-stat:hover {
    background: rgba(0, 229, 255, 0.14);
    border-color: rgba(0, 229, 255, 0.4);
}

.nav-stat.nav-link--active {
    color: var(--cyan) !important;
    -webkit-text-fill-color: var(--cyan) !important;
}

/* === Nav brand as link — keep gradient text, no underline === */
body:not(.auth-page) > div:first-of-type h1 a,
body:not(.auth-page) > div:first-of-type h1 a:hover {
    background: linear-gradient(135deg, var(--pink), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

/* === Nav: push bell+dropdown to the right on desktop === */
.nav-links .nav-bell {
    margin-left: auto;
}

.nav-links .nav-dropdown {
    position: relative;
}

/* === Nav username dropdown trigger button === */
.nav-dropdown__trigger {
    background: none;
    border: none;
    color: var(--text-muted);
    -webkit-text-fill-color: var(--text-muted);
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.nav-dropdown__trigger.nav-link--active,
.nav-dropdown__trigger:hover {
    color: var(--text);
    -webkit-text-fill-color: var(--text);
}

/* === Dropdown menu === */
.nav-dropdown__menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 130px;
    z-index: 200;
    padding: 0.35rem 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    /* Push the visible box down visually without creating a hover gap */
    margin-top: 0.5rem;
}

/* Transparent bridge fills the gap between trigger and menu so hover stays active */
.nav-dropdown__menu::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 0;
    right: 0;
    height: 0.5rem;
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu {
    display: flex;
    flex-direction: column;
}

.nav-dropdown__menu a {
    padding: 0.45rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    white-space: nowrap;
}

.nav-dropdown__menu a:hover,
.nav-dropdown__menu a.nav-link--active {
    color: var(--text);
    background: var(--surface-2);
}

/* === Hamburger toggle (hidden on desktop) === */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    -webkit-text-fill-color: var(--text);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

/* === Mobile — play page (≤ 680px) === */
@media (max-width: 680px) {
    .vote-btn { font-size: 1rem; width: 100%; text-align: center; }
}

/* === Mobile — full layout (≤ 600px) === */
@media (max-width: 600px) {
    body {
        padding: 0 16px 40px;
    }

    .auth-duo {
        flex-direction: column;
    }

    .auth-brand {
        font-size: 2rem;
    }

    h1 {
        font-size: 1.6rem;
    }

    /* === Hamburger nav === */
    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    /* Hide the links wrapper by default; toggle shows it */
    .nav-links {
        display: none;
        width: 100%;
        order: 3; /* wraps below h1 + toggle row */
    }

    /* Outer nav: allow the nav-links row to wrap below */
    body:not(.auth-page) > div:first-of-type {
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1.25rem;
    }

    /* Open state: show links stacked */
    body:not(.auth-page) > div:first-of-type.nav--open .nav-links {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.75rem 0;
        border-top: 1px solid var(--border);
    }

    /* bell + dropdown don't need auto margin in column layout */
    body:not(.auth-page) > div:first-of-type.nav--open .nav-links .nav-bell {
        margin-left: 0;
    }

    body:not(.auth-page) > div:first-of-type.nav--open .nav-links .nav-dropdown {
        width: 100%;
    }

    /* In mobile open state, show dropdown items inline (no absolute popup) */
    body:not(.auth-page) > div:first-of-type.nav--open .nav-dropdown__menu {
        display: flex;
        position: static;
        border: none;
        box-shadow: none;
        background: none;
        padding: 0;
        border-radius: 0;
        flex-direction: column;
        gap: 0.5rem;
    }

    body:not(.auth-page) > div:first-of-type.nav--open .nav-dropdown__menu a {
        padding: 0;
        font-size: 0.95rem;
    }

    body:not(.auth-page) > div:first-of-type.nav--open .nav-dropdown__trigger {
        display: none;
    }

    /* Search form fills full width when menu is open */
    body:not(.auth-page) > div:first-of-type.nav--open .nav-search {
        width: 100%;
    }

    body:not(.auth-page) > div:first-of-type.nav--open .nav-search__input {
        width: 100%;
        max-width: none;
    }

    /* Smaller duel thumbnails so body text has room */
    .duel-image,
    .duel-image-placeholder {
        width: 80px;
        height: 80px;
    }

    /* Tables: scroll horizontally rather than overflow */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .voting-history-table {
        width: 100%;
    }

    /* Keyboard shortcuts are irrelevant on touch */
    .keyboard-hint {
        display: none;
    }

    /* Play nav: larger tap targets, slightly smaller text */
    .play-nav {
        font-size: 1rem;
    }

    .play-nav a {
        padding: 0.5rem 1rem;
    }

    /* Vote button already full-width from ≤680px rule */

    /* Top-pick button: full width for easier tap */
    .top-pick-btn {
        width: 100%;
        font-size: 1rem;
    }

    /* Track meta badges: wrap gracefully on narrow screens */
    .track-meta__votes {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.25rem;
    }

    /* Ending-soon share: stack on narrow screens */
    .ending-soon-share {
        flex-wrap: wrap;
        font-size: 0.8rem;
        padding: 0.5rem;
    }

    /* SC waveform: constrain to viewport */
    .sc-waveform-img {
        max-width: 100%;
    }

    /* Vote reveal: cap height on small screens */
    #vote-reveal {
        max-height: 200px;
        overflow-y: auto;
    }

    /* Duel ended hero: stack image above text */
    .duel-ended-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .duel-ended-hero__img {
        width: 80px;
        height: 80px;
    }

    /* Ended actions: stack buttons vertically */
    .duel-ended-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* === Create duel form === */
.create-duel-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 480px;
}

.create-duel-form__label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.create-duel-form__label input,
.create-duel-form__label select,
.create-duel-form__label textarea {
    width: 100%;
}

.create-duel-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.create-duel-form small {
    font-size: 0.78rem;
    color: var(--text-muted);
}

@media (max-width: 520px) {
    .create-duel-form__row {
        grid-template-columns: 1fr;
    }
}

/* === Submit track page === */
.submit-error {
    background: rgba(255, 45, 120, 0.08);
    border: 1px solid rgba(255, 45, 120, 0.35);
    border-radius: var(--radius);
    color: var(--pink);
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    max-width: 480px;
}

.submit-success {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(0, 229, 255, 0.06);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    max-width: 480px;
    margin-bottom: 1.5rem;
}

.submit-success__icon {
    font-size: 1.5rem;
    color: var(--cyan);
    line-height: 1;
    flex-shrink: 0;
}

.submit-success__title {
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.submit-success__sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.submit-success__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.submit-success__play-btn {
    background: linear-gradient(135deg, var(--pink), var(--purple));
    color: #fff;
    -webkit-text-fill-color: #fff;
    border-radius: var(--radius);
    padding: 0.45rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}

.submit-success__play-btn:hover {
    opacity: 0.85;
    color: #fff;
    -webkit-text-fill-color: #fff;
}

.submit-success__more-link {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.submit-success__more-link:hover { color: var(--cyan); }

.slot-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.slot-indicator__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    border: 1px solid var(--border);
    display: inline-block;
}

.slot-indicator__dot--used {
    background: var(--cyan);
    border-color: var(--cyan);
}

.slot-indicator__label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 0.2rem;
}

.yt-preview {
    margin-top: 0.5rem;
}

.yt-preview img {
    max-width: 320px;
    width: 100%;
    border-radius: var(--radius);
    display: block;
}

.submit-track-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    max-width: 480px;
}

.submit-track-row a {
    flex: 1;
}

.submit-track-row__remove {
    margin: 0;
    padding: 0;
}

.btn-remove-sm {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.78rem;
    padding: 3px 10px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.btn-remove-sm:hover {
    border-color: var(--pink);
    color: var(--pink);
    background: rgba(255, 45, 120, 0.06);
}

/* === Change password form === */
.change-pw-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: 320px;
}

/* === Select inputs === */
select {
    appearance: none;
    background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23777' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.95rem;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    width: 100%;
    cursor: pointer;
    transition: border-color 0.15s;
}

select:focus {
    outline: none;
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(255, 45, 120, 0.15);
}

/* === Report form === */
.report-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 480px;
}

.report-form__label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.report-form__notes {
    min-height: 100px;
    resize: vertical;
}

/* === Track view page === */
.track-view {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.track-view__meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.track-view__submitter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.track-view__stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text);
}

.track-view__duel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.track-view__player {
    margin-bottom: 1.5rem;
}

.track-view__voters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 0.5rem;
}

.track-view__voter {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .track-view {
        flex-direction: column;
    }
}

/* === Top picks feed === */
.top-picks-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.top-picks-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.top-picks-item__body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
}

/* ── Premium upsell & feature notices ─────────────────── */

/* Full upsell card — used on hard-gated pages for free users */
.upsell-card {
    background: var(--surface);
    border: 1px solid rgba(255, 45, 120, 0.25);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 460px;
}
.upsell-card__icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.upsell-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.35rem;
}
.upsell-card__sub {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0 0 1rem;
}
.upsell-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.upsell-card__features li { font-size: 0.875rem; color: var(--text); }
.upsell-card__features li::before { content: '✓ '; color: var(--green); font-weight: 700; }
.upsell-card__cta {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}
.upsell-card__cta:hover { color: #fff; opacity: 0.9; }

/* Inline upsell — sits inside a form for free users */
.upsell-inline {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    background: var(--surface);
    border: 1px solid rgba(255, 45, 120, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.upsell-inline__icon { font-size: 1rem; flex-shrink: 0; margin-top: 0.1rem; }
.upsell-inline strong { color: var(--text); display: block; margin-bottom: 0.15rem; }

/* Ambient notice shown to premium users on premium pages */
.premium-feature-notice {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--cyan);
    background: rgba(0, 229, 255, 0.07);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 999px;
    padding: 0.25em 0.7em;
    margin-bottom: 1.25rem;
}

/* Small inline badge on form labels for premium features */
.badge-creator {
    display: inline-block;
    font-size: 0.68rem;
    color: var(--cyan);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 999px;
    padding: 0.1em 0.5em;
    margin-left: 0.35rem;
    vertical-align: middle;
    font-weight: normal;
}

/* Subtle upsell strip at the bottom of list pages */
.upsell-strip {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.upsell-strip a { white-space: nowrap; }

/* ── Vote count bump animation (live update on play page) ────────────────── */

@keyframes vote-bump {
    0%   { transform: scale(1);    color: var(--text); }
    30%  { transform: scale(1.25); color: var(--cyan); }
    100% { transform: scale(1);    color: var(--text); }
}
.vote-count--bump {
    display: inline-block;
    animation: vote-bump 0.45s ease-out forwards;
}

/* ── Vote reveal (crowd distribution bar chart after voting) ─────────────── */

.vote-reveal {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.vote-reveal__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.6rem;
}
.vote-reveal__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
}
.vote-reveal__row--current .vote-reveal__name { color: var(--cyan); font-weight: 600; }
.vote-reveal__name {
    width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}
a.vote-reveal__link {
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
}
a.vote-reveal__link:hover {
    color: var(--cyan);
    text-decoration: underline;
}
.vote-reveal__bar-wrap {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.vote-reveal__bar {
    height: 100%;
    background: linear-gradient(90deg, var(--pink), var(--purple));
    border-radius: 3px;
    transition: width 0.5s ease;
}
.vote-reveal__row--current .vote-reveal__bar { background: linear-gradient(90deg, var(--cyan), var(--purple)); }
.vote-reveal__pct {
    width: 2.5rem;
    text-align: right;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ── Win celebration banner (play page — ended duel, user backed winner) ─── */

.win-celebration {
    text-align: center;
    padding: 1.25rem 1rem;
    background: linear-gradient(135deg, rgba(255,45,120,0.08), rgba(147,51,234,0.08));
    border: 1px solid rgba(255,45,120,0.3);
    border-radius: 10px;
    margin-bottom: 1.25rem;
}
.win-celebration__emoji { font-size: 2rem; display: block; margin-bottom: 0.4rem; }
.win-celebration__text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pink);
    margin-bottom: 0.25rem;
}
.win-celebration__sub { font-size: 0.82rem; color: var(--text-muted); }

/* ── Weekly challenges widget (home page right column) ───────────────────── */

.challenges-widget {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}
.challenge-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
}
.challenge-item--done {
    border-color: rgba(57,255,20,0.3);
    background: rgba(57,255,20,0.04);
}
.challenge-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.2rem;
}
.challenge-item__name { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.challenge-item__progress { font-size: 0.75rem; color: var(--text-muted); }
.challenge-item__check { font-size: 0.85rem; color: var(--green); font-weight: 700; }
.challenge-item--done .challenge-item__name { color: var(--green); }
.challenge-item__desc { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.45rem; }
.challenge-item__bar-wrap {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}
.challenge-item__bar {
    height: 100%;
    background: linear-gradient(90deg, var(--pink), var(--purple));
    border-radius: 2px;
    transition: width 0.4s ease;
    min-width: 4px;
}
.challenge-item--done .challenge-item__bar { background: var(--green); width: 100% !important; }

/* ── Listening party / listener count (play page) ────────────────────────── */

.listener-count {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--cyan);
    background: rgba(0,229,255,0.06);
    border: 1px solid rgba(0,229,255,0.2);
    border-radius: 999px;
    padding: 0.2em 0.65em;
    margin-top: 0.4rem;
}

/* ── Momentum badge (votes/hr on hot tracks) ─────────────────────────────── */

.badge-momentum {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    color: var(--pink);
    background: rgba(255,45,120,0.08);
    border: 1px solid rgba(255,45,120,0.3);
    border-radius: 999px;
    padding: 0.1em 0.55em;
    margin-left: 0.35rem;
    vertical-align: middle;
}

/* ── Hidden gem badge ────────────────────────────────────────────────────── */

.badge-gem {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    color: var(--cyan);
    background: rgba(0,229,255,0.07);
    border: 1px solid rgba(0,229,255,0.25);
    border-radius: 999px;
    padding: 0.1em 0.55em;
    margin-left: 0.35rem;
    vertical-align: middle;
}

/* ── Underdog badge (high external views but low duel votes) ─────────────── */

.badge-underdog {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    color: var(--green);
    background: rgba(57,255,20,0.07);
    border: 1px solid rgba(57,255,20,0.25);
    border-radius: 999px;
    padding: 0.1em 0.55em;
    margin-left: 0.35rem;
    vertical-align: middle;
}

/* ── Bot top pick badge (synthetic player endorsement) ───────────────────── */

.badge-bot-pick {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    color: var(--pink);
    background: rgba(255,45,120,0.06);
    border: 1px solid rgba(255,45,120,0.2);
    border-radius: 999px;
    padding: 0.1em 0.55em;
    margin-left: 0.35rem;
    vertical-align: middle;
    font-style: italic;
}

/* ── SC repost button on result/leaderboard ──────────────────────────────── */

.btn-sc-repost {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    background: rgba(255,85,0,0.12);
    color: #ff5500;
    border: 1px solid rgba(255,85,0,0.35);
    border-radius: 999px;
    padding: 0.3em 0.85em;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}
.btn-sc-repost:hover:not(:disabled) { background: rgba(255,85,0,0.2); }
.btn-sc-repost:disabled { opacity: 0.55; cursor: default; }

/* ── SC trending duel discovery card (duel index) ───────────────────────── */

.sc-trending-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,85,0,0.05);
    border: 1px solid rgba(255,85,0,0.28);
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.25rem;
}

.sc-trending-card__img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.sc-trending-card__img--placeholder {
    background: rgba(255,85,0,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: rgba(255,85,0,0.5);
}

.sc-trending-card__body { flex: 1; min-width: 0; }

.sc-trending-card__eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #ff5500;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.sc-trending-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.2rem;
}

.sc-trending-card__meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* ── SC Crowd Favorite badge ─────────────────────────────────────────────── */

.badge-crowd-fav {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    color: #bf5fff;
    background: rgba(175,50,255,0.08);
    border: 1px solid rgba(175,50,255,0.3);
    border-radius: 999px;
    padding: 0.1em 0.55em;
    margin-left: 0.35rem;
    vertical-align: middle;
}

/* ── SC waveform image below SC player ───────────────────────────────────── */

.sc-waveform-img {
    width: 100%;
    height: 48px;
    object-fit: fill;
    display: block;
    border-radius: 4px;
    margin-top: 0.5rem;
    filter: brightness(0) invert(1) sepia(1) saturate(4) hue-rotate(155deg);
    opacity: 0.65;
}

.sc-player-error {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
}

/* ── External platform stats row on play.php track meta ─────────────────── */

.track-meta__external {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.track-view-count {
    color: var(--text-muted);
}

.track-out-link {
    color: var(--cyan);
    text-decoration: none;
    font-size: 0.78rem;
}

.track-out-link:hover { color: var(--pink); }

/* ── Hot duel badge (home page discover section) ─────────────────────────── */

.badge-hot {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    color: var(--pink);
    background: rgba(255,45,120,0.08);
    border: 1px solid rgba(255,45,120,0.3);
    border-radius: 999px;
    padding: 0.1em 0.55em;
    margin-left: 0.35rem;
    vertical-align: middle;
}

/* ── Recap stat highlights (result.php) ──────────────────────────────────── */

.recap-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}
.recap-stat {
    flex: 1 1 120px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    text-align: center;
}
.recap-stat--gem { border-color: rgba(0,229,255,0.25); background: rgba(0,229,255,0.04); }
.recap-stat__number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cyan);
    line-height: 1.2;
}
.recap-stat--gem .recap-stat__number { font-size: 1.8rem; }
.recap-stat__label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    line-height: 1.4;
}
.recap-stat__label small { font-size: 0.68rem; color: var(--text-muted); }

/* ── Share card button ────────────────────────────────────────────────────── */

.btn-share {
    font-size: 0.82rem;
    color: var(--cyan);
    border: 1px solid rgba(0, 229, 255, 0.35);
    border-radius: 6px;
    padding: 0.2em 0.55em;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s;
}
.btn-share:hover { color: var(--pink); border-color: rgba(255, 45, 120, 0.45); }

/* ── Ending-soon share nudge (play.php) ──────────────────────────────────── */

.ending-soon-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface);
    border: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.btn-share-countdown {
    font-size: 0.82rem;
    color: var(--cyan);
    text-decoration: none;
    flex-shrink: 0;
}
.btn-share-countdown:hover { color: var(--pink); }

/* ── Social login buttons (index.php) ────────────────────────────────────── */

.social-login-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin: 1rem 0;
}
.social-login-divider::before,
.social-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.btn-social {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--surface-2);
    color: var(--text);
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: opacity 0.15s;
    box-sizing: border-box;
}
.btn-social:hover { opacity: 0.85; color: var(--text); }
.btn-social--tiktok      { border: 1px solid #69C9D0; }
.btn-social--instagram   { border: 1px solid var(--pink); }
.btn-social--soundcloud  { border: 1px solid #ff5500; color: #ff5500; }
.btn-social--spotify     { background: #1DB954; color: #000; font-weight: 600; border: none; }
.btn-social--spotify:hover { background: #1ed760; opacity: 1; }

/* ── Spotify connected row ───────────────────────────────────────────────── */
.spotify-connected-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
}
.spotify-badge { color: #1DB954; font-weight: 600; font-size: 0.88rem; }

/* ── Music DNA (user profile) ────────────────────────────────────────────── */
.music-dna-section { margin: 1.5rem 0; max-width: 420px; }
.music-dna-section h3 { margin-bottom: 0.75rem; }
.dna-source { font-size: 0.7rem; color: #1DB954; font-weight: normal; margin-left: 0.4rem; }

/* ── Taste-match badge (duel list) ──────────────────────────────────────── */
.taste-match-badge { display: inline-block; font-size: 0.7rem; color: #1DB954; font-weight: 600; margin-left: 0.4rem; }

/* ── Voter Audience DNA (track view) ────────────────────────────────────── */
.audience-dna { margin-top: 1.25rem; max-width: 420px; }
.audience-dna h4 { font-size: 0.85rem; margin-bottom: 0.6rem; }

/* ── SoundCloud one-click submission browser ─────────────────────────────── */

.sc-connect-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.sc-connect-bar--connected { color: var(--cyan); }

.btn-sc-browse {
    background: transparent;
    border: 1px solid rgba(0,229,255,0.3);
    color: var(--cyan);
    border-radius: 5px;
    padding: 0.2em 0.75em;
    font-size: 0.8rem;
    cursor: pointer;
}
.btn-sc-browse:hover { border-color: var(--cyan); }

.sc-track-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    background: var(--surface);
}

.sc-track-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: 5px;
    transition: background 0.1s;
}
.sc-track-row:hover { background: var(--surface-2); }

.sc-track-thumb {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.sc-track-thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.sc-track-info { flex: 1; min-width: 0; }
.sc-track-title {
    font-size: 0.83rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sc-track-duration { font-size: 0.75rem; color: var(--text-muted); }

/* ── SC suggested-follows page ───────────────────────────────────────────── */

.sc-suggest-list { list-style: none; max-width: 480px; }

.sc-suggest-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}

.sc-suggest-name { flex: 1; font-size: 0.95rem; }
.sc-suggest-btn  { white-space: nowrap; }

/* ── SC deep link share box (submit.php + track/view.php) ─────────────────── */

.sc-share-box {
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid rgba(255,85,0,0.25);
    border-radius: var(--radius);
}
.sc-share-box__title {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.sc-share-box__desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}
.sc-share-box__url {
    font-family: monospace;
    font-size: 0.77rem;
    background: var(--surface-2);
    padding: 0.55rem 0.7rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    word-break: break-all;
    color: #ff7033;
    user-select: all;
    cursor: text;
    line-height: 1.55;
}
.btn-sc-copy {
    background: transparent;
    border: 1px solid rgba(255,85,0,0.35);
    color: #ff5500;
    font-size: 0.82rem;
    padding: 0.28rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-sc-copy:hover { background: rgba(255,85,0,0.08); }

/* ── Waveform + vote overlay canvas (track/view.php) ─────────────────────── */
.waveform-chart-wrap { margin: 0.5rem 0 0; }

/* ── Upload audio player ─────────────────────────────────────────────────── */

.upload-player {
    width: 100%;
    max-width: 640px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
}
.upload-player__waveform {
    width: 100%;
    height: 48px;
    display: block;
    border-radius: 4px;
    background: var(--surface-2);
    margin-bottom: 0.6rem;
}
.upload-player__controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.upload-player__play {
    background: linear-gradient(135deg, var(--pink), var(--purple));
    border: none;
    color: #fff;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.7rem;
    flex-shrink: 0;
    transition: opacity 0.15s;
}
.upload-player__play:hover { opacity: 0.85; }
.upload-player__time,
.upload-player__duration {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.upload-player__progress {
    flex: 1;
    height: 4px;
    background: var(--surface-2);
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
}
.upload-player__bar {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--pink));
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

/* ── Stream mode ──────────────────────────────────────────────────────────── */

.stream-mode nav                    { display: none !important; }
.stream-mode .site-footer           { display: none !important; }
.stream-mode h1                     { display: none; }
.stream-mode .play-player-wrap      { min-height: 55vh; }
.stream-mode #votes_left_display    { font-size: 1.5rem; font-weight: 800; }
.stream-mode .play-vote-wrap        { gap: 1.5rem; }

.stream-badge {
    display: inline-block;
    background: #e00;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2em 0.6em;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}
.btn-stream-mode {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 400;
    margin-left: 0.75rem;
    vertical-align: middle;
}
.btn-stream-mode:hover { color: var(--cyan); }
.btn-exit-stream {
    font-size: 0.78rem;
    color: var(--pink);
    text-decoration: none;
    font-weight: 400;
    margin-left: 0.75rem;
    vertical-align: middle;
}
