/* TeleMusic — aligned with TeleLive Design System (telelivee.ir/design-system) */

/* ============ FONTS ============ */
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }

/* ============ CSS VARIABLES — TeleLive DS tokens (mapped to TeleMusic names) ============ */
:root {
    /* TeleLive canonical */
    --bg: #0e0e10;
    --bg-elev-1: #18181b;
    --bg-elev-2: #1f1f23;
    --bg-elev-3: #26262c;
    --text: #efeff1;
    --line: #3a3a40;
    --brand: #1e56f5;
    --brand-strong: #1245d6;
    --brand-soft: #5280ff;
    /* TeleMusic aliases */
    --bg-primary: var(--bg);
    --bg-secondary: var(--bg-elev-1);
    --bg-tertiary: var(--bg-elev-2);
    --bg-card: var(--bg-elev-1);
    --bg-hover: rgba(30, 86, 245, 0.10);
    --bg-active: rgba(30, 86, 245, 0.16);
    --bg-elevated: var(--bg-elev-2);
    --text-primary: var(--text);
    --text-secondary: var(--text-muted);
    --text-muted: #a6a6b2;
    --accent: var(--brand);
    --accent-hover: var(--brand-soft);
    --accent-dark: var(--brand-strong);
    --danger: #f43f5e;
    --warning: #f59e0b;
    --info: var(--brand-soft);
    --success: #22c55e;
    --border-color: rgba(255, 255, 255, 0.10);
    --hairline: rgba(255, 255, 255, 0.08);
    --sidebar-width: 300px;
    --player-height: 76px;
    --topbar-height: 56px;
    --tabbar-height: 54px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --radius: 14px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 18px;
    --radius-pill: 999px;
    --glass-bg: rgba(22, 22, 26, 0.55);
    --glass-bg-strong: rgba(22, 22, 26, 0.72);
    --glass-stroke: rgba(255, 255, 255, 0.10);
    --glass-blur: saturate(160%) blur(18px);
    --shadow-sm: 0 8px 20px rgba(0,0,0,0.28);
    --shadow-md: 0 10px 24px rgba(0,0,0,0.35);
    --shadow-lg: 0 18px 40px rgba(0,0,0,0.42);
    --transition: 0.22s cubic-bezier(0.32, 0.72, 0, 1);
    --transition-slow: 0.42s cubic-bezier(0.32, 0.72, 0, 1);
    --spring: cubic-bezier(0.34, 1.3, 0.64, 1);
    --primary: var(--brand);
}

/* ============ LIGHT THEME ============ */
[data-theme="light"] {
    --bg: #f7f7f8;
    --bg-elev-1: #ffffff;
    --bg-elev-2: #f0f0f2;
    --bg-elev-3: #e8e8ec;
    --text: #0e0e10;
    --text-muted: #53535f;
    --line: #d4d4dc;
    --brand: #1e56f5;
    --brand-strong: #1245d6;
    --brand-soft: #7aa3ff;
    --bg-primary: var(--bg);
    --bg-secondary: var(--bg-elev-1);
    --bg-tertiary: var(--bg-elev-2);
    --bg-card: var(--bg-elev-1);
    --bg-hover: rgba(30, 86, 245, 0.08);
    --bg-active: rgba(30, 86, 245, 0.12);
    --bg-elevated: var(--bg-elev-1);
    --text-primary: var(--text);
    --text-secondary: var(--text-muted);
    --accent: var(--brand);
    --accent-hover: var(--brand-soft);
    --accent-dark: var(--brand-strong);
    --danger: #e91e63;
    --success: #059669;
    --warning: #d97706;
    --border-color: rgba(0, 0, 0, 0.10);
    --hairline: rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-bg-strong: rgba(255, 255, 255, 0.88);
    --glass-stroke: rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 8px 20px rgba(0,0,0,0.08);
    --shadow-md: 0 10px 24px rgba(0,0,0,0.10);
    --shadow-lg: 0 18px 40px rgba(0,0,0,0.12);
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; height: 100%; }
body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.4;
    letter-spacing: -0.01em;
    overflow: hidden;
    min-height: 100%;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; color: inherit; font-family: inherit; font-size: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
img { max-width: 100%; display: block; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ============ ANIMATIONS ============ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInScale { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes slideInLeft { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes slideInUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes bounceIn { 0% { transform: scale(0.3); opacity: 0; } 50% { transform: scale(1.05); } 70% { transform: scale(0.95); } 100% { transform: scale(1); opacity: 1; } }
@keyframes dotPulse { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }
@keyframes progressIndeterminate { 0% { left: -30%; } 100% { left: 100%; } }
@keyframes playingBars {
    0%, 100% { height: 4px; }
    25% { height: 16px; }
    50% { height: 8px; }
    75% { height: 20px; }
}
@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ============ SPLASH / LOADING ============ */
.splash {
    position: fixed; inset: 0; z-index: 10000;
    background: var(--tl-bg, #000000);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.tele-loader-content { text-align: center; animation: tlFadeIn 0.6s ease; }
.tele-loader-logo {
    position: relative; width: 88px; height: 88px; margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
    animation: tlFloat 2.5s ease-in-out infinite;
}
.tele-loader-glow {
    position: absolute; inset: -10px; border-radius: 50%;
    background: var(--tl-accent, #1db954); opacity: 0.15;
    filter: blur(20px); animation: tlPulse 2s ease-in-out infinite;
}
.tele-loader-logo img {
    width: 80px; height: 80px; object-fit: contain; border-radius: 20px;
    position: relative; z-index: 1;
    box-shadow: 0 10px 30px var(--tl-accent-glow, rgba(29,185,84,0.3));
}
.tele-loader-logo i { font-size: 48px; color: var(--tl-accent, #1db954); position: relative; z-index: 1; }
.tele-loader-name {
    font-size: 1.6rem; font-weight: 700;
    background: var(--tl-gradient, linear-gradient(135deg, #1db954, #1ed760));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    margin-bottom: 24px; letter-spacing: -0.3px;
}
.tele-loader-info {
    font-size: 13px; font-weight: 500; letter-spacing: 0.5px;
    color: rgba(255,255,255,0.45); margin-bottom: 10px; font-variant-numeric: tabular-nums;
}
.tele-loader-bar {
    width: 200px; height: 3px; border-radius: 3px;
    background: rgba(255,255,255,0.08); overflow: hidden; margin: 0 auto;
}
.tele-loader-fill {
    height: 100%; border-radius: 3px;
    background: var(--tl-gradient, linear-gradient(135deg, #1db954, #1ed760));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--tl-accent-glow, rgba(29,185,84,0.3));
}
@keyframes tlFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes tlFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes tlPulse { 0%, 100% { transform: scale(1); opacity: 0.15; } 50% { transform: scale(1.15); opacity: 0.25; } }

/* ============ LAYOUT ============ */
.app-container {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: 1fr calc(var(--player-height) + var(--safe-bottom));
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    animation: fadeIn 0.4s ease;
    overflow: hidden;
    background: transparent;
}

/* ============ SIDEBAR ============ */
.sidebar {
    grid-row: 1 / 3;
    background: var(--bg-primary);
    border-left: 1px solid var(--border-color);
    display: flex; flex-direction: column;
    overflow: hidden;
    transition: transform var(--transition-slow);
}
.sidebar-header {
    padding: 20px 24px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo i { font-size: 24px; color: var(--accent); }
.logo span { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.5px; }
.sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    background: var(--bg-hover);
    color: var(--text-primary);
    transition: var(--transition);
    flex-shrink: 0;
    line-height: 1;
}
.sidebar-close i {
    display: block;
    line-height: 1;
    font-size: 0.95rem;
    width: 1em;
    text-align: center;
}
.sidebar-close:hover { background: var(--bg-active); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px; }
.nav-section { margin-bottom: 4px; }
.nav-label {
    display: block; padding: 12px 16px 4px;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    color: var(--text-muted); letter-spacing: 1px;
}
.nav-item {
    display: flex; align-items: center; gap: 14px;
    padding: 10px 16px; border-radius: var(--radius-md);
    color: var(--text-secondary); font-weight: 500;
    transition: all var(--transition); position: relative;
}
.nav-item:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-item.active { color: var(--text-primary); background: var(--bg-hover); }
.nav-item.active::before {
    content: ''; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 60%; background: var(--accent); border-radius: 2px;
}
.nav-item i { width: 20px; text-align: center; font-size: 1rem; }
.nav-badge {
    margin-right: auto; background: var(--danger); color: #fff;
    font-size: 0.65rem; font-weight: 700; padding: 2px 7px;
    border-radius: 10px; min-width: 18px; text-align: center;
}
.nav-divider { height: 1px; background: var(--border-color); margin: 8px 16px; }

.sidebar-footer { padding: 16px; border-top: 1px solid var(--border-color); }
.user-info { display: flex; align-items: center; gap: 10px; }
.user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--bg-hover); display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-avatar i { color: var(--text-muted); font-size: 1rem; }
.user-details { flex: 1; min-width: 0; }
.user-name { display: block; font-weight: 600; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role-badge {
    font-size: 0.65rem; color: var(--accent); font-weight: 500;
}
.user-action {
    width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); transition: var(--transition);
}
.user-action:hover { color: var(--text-primary); background: var(--bg-hover); }

.auth-buttons { display: flex; gap: 8px; }

/* ============ MAIN CONTENT ============ */
.main-content {
    display: flex; flex-direction: column;
    overflow: hidden; background: transparent;
    border-radius: var(--radius-lg) 0 0 0;
}

/* ============ TOPBAR ============ */
.topbar {
    height: var(--topbar-height);
    padding: 0 16px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    background: rgba(10, 10, 12, 0.72);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-bottom: 1px solid var(--hairline);
    position: sticky; top: 0; z-index: 100;
}
.topbar-start,
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.topbar-start { justify-content: flex-start; }
.topbar-actions { justify-content: flex-end; margin: 0; }
.topbar-brand {
    display: none;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.02em;
    cursor: pointer;
    white-space: nowrap;
}
.topbar-brand i { color: var(--brand-soft); }
.topbar-brand .brand-soft { color: var(--brand-soft); }
.menu-toggle {
    display: none;
    width: 40px; height: 40px; border-radius: 50%;
    font-size: 1rem; transition: var(--transition);
    background: rgba(118,118,128,0.16);
}
.menu-toggle:hover { background: var(--bg-hover); }
.topbar-search-icon { display: none !important; }
.topbar-search {
    flex: 1; max-width: 420px; position: relative;
    background: rgba(118, 118, 128, 0.18); border-radius: 500px;
    display: flex; align-items: center; padding: 0 14px;
    border: 1px solid transparent; transition: var(--transition);
    min-width: 0; height: 40px;
}
.topbar-search:focus-within { border-color: rgba(48,209,88,0.55); background: rgba(118,118,128,0.28); }
.topbar-search i { color: var(--text-muted); font-size: 0.9rem; flex-shrink: 0; }
.topbar-search input {
    flex: 1; background: none; border: none; outline: none;
    color: var(--text-primary); padding: 8px 10px;
    font-size: 0.9rem; min-width: 0;
}
.topbar-search input::placeholder { color: var(--text-muted); }
.topbar-btn {
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text-secondary); transition: background var(--transition), color var(--transition);
    position: relative;
    background: rgba(118,118,128,0.14);
}
.topbar-btn:hover { color: var(--text-primary); background: rgba(118,118,128,0.28); transform: none; }
.lang-toggle {
    width: auto; min-width: 40px; height: 40px; padding: 0 12px;
    border-radius: 500px;
    background: rgba(118,118,128,0.14); font-weight: 700; font-size: 0.72rem;
    letter-spacing: 0.04em;
}
.lang-toggle:hover { background: rgba(118,118,128,0.28); }
.topbar-premium-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f5c518, #e6a800);
    color: #111;
    font-weight: 800;
    font-size: 0.8rem;
    white-space: nowrap;
    line-height: 1;
}
.topbar-premium-btn:hover { filter: brightness(1.06); }
.topbar-premium-btn i { color: #111; font-size: 0.9rem; }
.notif-badge {
    position: absolute; top: 2px; left: 2px;
    background: var(--danger); color: #fff; font-size: 0.58rem; font-weight: 700;
    width: 16px; height: 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

/* ============ PAGE CONTENT ============ */
.page-content {
    flex: 1; overflow-y: auto; padding: 24px;
    animation: fadeIn 0.3s ease;
}
.page-content > * { animation: fadeInUp 0.4s ease backwards; }

/* ============ SKELETON LOADING ============ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-active) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}
.skeleton-text { height: 14px; margin-bottom: 8px; border-radius: 4px; }
.skeleton-title { height: 20px; width: 60%; margin-bottom: 12px; }
.skeleton-card { height: 220px; border-radius: var(--radius-lg); }
.skeleton-circle { border-radius: 50%; }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 24px; border-radius: 500px;
    font-weight: 600; font-size: 0.9rem;
    transition: all var(--transition); cursor: pointer;
    border: none; outline: none; position: relative;
    overflow: hidden;
}
.btn::after {
    content: ''; position: absolute; inset: 0;
    background: rgba(255,255,255,0.1); opacity: 0;
    transition: opacity var(--transition);
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #000; font-weight: 700; }
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.02); }
.btn-outline {
    background: transparent; color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.3);
}
.btn-outline:hover { border-color: var(--text-primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 50%; flex-shrink: 0; }
.btn-icon::after { border-radius: 50%; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-hover); }

/* ============ CARDS ============ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg); padding: 16px;
    transition: all var(--transition);
    position: relative; overflow: hidden;
}
.card:hover { background: var(--bg-hover); }

.song-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg); padding: 16px;
    cursor: pointer; transition: all var(--transition);
    position: relative;
}
.song-card:hover { background: var(--bg-hover); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.song-card .card-cover {
    position: relative; width: 100%;
    aspect-ratio: 1 / 1; height: auto; padding-bottom: 0;
    border-radius: var(--radius-md); overflow: hidden;
    margin-bottom: 12px; background: var(--bg-hover); flex: 0 0 auto;
}
.song-card .card-cover img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.song-card .card-cover .cover-placeholder {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: var(--text-muted);
}
.song-card .play-overlay {
    position: absolute; bottom: 8px; left: 8px;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--accent); color: #000;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; opacity: 0; transform: translateY(8px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.4);
}
.song-card:hover .play-overlay { opacity: 1; transform: translateY(0); }
.song-card .card-title {
    font-weight: 600; font-size: 0.9rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 4px;
}
.song-card .card-subtitle {
    font-size: 0.8rem; color: var(--text-secondary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.song-card .card-subtitle:hover { color: var(--text-primary); text-decoration: underline; }

/* Song list items */
.song-row {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 12px; border-radius: var(--radius-md);
    cursor: pointer; transition: all var(--transition);
    position: relative;
}
.song-row:hover { background: var(--bg-hover); }
.song-row.playing { background: var(--bg-hover); }
.song-row .row-num { width: 24px; text-align: center; color: var(--text-muted); font-size: 0.85rem; }
.song-row:hover .row-num, .song-row.playing .row-num { color: var(--accent); }
.song-row .row-cover {
    width: 40px; height: 40px; border-radius: 4px;
    overflow: hidden; background: var(--bg-hover); flex-shrink: 0;
}
.song-row .row-cover img { width: 100%; height: 100%; object-fit: cover; }
.song-row .row-info { flex: 1; min-width: 0; }
.song-row .row-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.9rem; }
.song-row.playing .row-title { color: var(--accent); }
.song-row .row-artist { font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-row .row-duration { color: var(--text-muted); font-size: 0.8rem; min-width: 40px; text-align: left; }
.song-row .row-actions { display: flex; gap: 4px; opacity: 0; transition: var(--transition); }
.song-row:hover .row-actions { opacity: 1; }
/* ============ PLAYER ============ */
.player {
    grid-column: 1 / 3;
    height: var(--player-height);
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    display: flex; flex-direction: column;
    z-index: 500;
}
.player-progress-bar {
    height: 18px; background: transparent;
    cursor: pointer; position: relative;
    direction: ltr !important;
    touch-action: none;
    display: block;
    margin: 0 14px;
    padding: 0;
    box-sizing: border-box;
}
.player-progress-bar::before {
    content: ''; position: absolute; left: 0; right: 0; top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: rgba(255,255,255,0.16); border-radius: 4px;
}
.player-progress {
    position: absolute; left: 0; top: 50%;
    transform: translateY(-50%);
    height: 4px; background: var(--accent);
    width: 0; transition: none; z-index: 1;
    border-radius: 4px;
    max-width: 100%;
}
.player-progress::after {
    content: ''; position: absolute; left: 100%; top: 50%;
    transform: translate(-50%, -50%);
    width: 14px; height: 14px; border-radius: 50%;
    background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.player-content {
    flex: 1; display: flex; align-items: center;
    padding: 0 16px; gap: 16px;
}
.player-song-info { display: flex; align-items: center; gap: 12px; min-width: 200px; max-width: 30%; }
.player-cover {
    width: 48px; height: 48px; border-radius: var(--radius-sm);
    background: var(--bg-hover); display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0; cursor: pointer;
}
.player-cover img { width: 100%; height: 100%; object-fit: cover; }
.player-cover i { color: var(--text-muted); }
.player-details { min-width: 0; }
.player-title {
    display: block; font-weight: 500; font-size: 0.85rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-artist {
    display: block; font-size: 0.75rem; color: var(--text-secondary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-like { color: var(--text-muted); transition: var(--transition); }
.player-like:hover { color: var(--text-primary); transform: scale(1.1); }
.player-like.liked { color: var(--accent); }
.player-like.liked i { font-weight: 900; }

.player-controls { display: flex; align-items: center; gap: 12px; justify-content: center; flex: 1; direction: ltr; }
.player-btn {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); transition: all var(--transition);
    font-size: 0.85rem;
}
.player-btn:hover { color: var(--text-primary); transform: scale(1.1); }
.player-btn.active { color: var(--accent); }
.player-play {
    width: 36px; height: 36px;
    background: var(--text-primary); color: var(--bg-primary) !important;
    font-size: 1rem; transition: all var(--transition);
}
.player-play:hover { transform: scale(1.08); background: var(--text-primary); }

.player-extra { display: flex; align-items: center; gap: 10px; min-width: 0; justify-content: flex-end; }
.player-time { font-size: 0.7rem; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; direction: ltr; }
.player-more-wrap { position: relative; flex-shrink: 0; }
.player-more-btn { border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.06); }
.player-more-menu {
    position: fixed;
    min-width: 200px;
    max-height: min(70vh, 420px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid var(--glass-stroke);
    background: var(--glass-bg-strong);
    backdrop-filter: blur(22px) saturate(170%);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    box-shadow: 0 16px 40px rgba(0,0,0,0.45);
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 1200;
    scrollbar-width: thin;
}
.player-more-menu[hidden] { display: none !important; }
.player-more-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 650;
    cursor: pointer;
    text-align: start;
}
.player-more-item i { width: 1.1rem; text-align: center; color: var(--text-muted); }
.player-more-item:hover { background: var(--bg-hover); }
.player-more-item.active,
.player-more-item.active i { color: var(--brand-soft); }
.player-more-item small {
    margin-inline-start: 4px;
    font-size: 0.65rem;
    opacity: 0.8;
}
/* lock page scroll + hide mini player while expanded NP is open */
body.np-open { overflow: hidden; }
body.np-open.has-player .tm-tl-chrome > .player,
body.np-open.has-player .tm-tl-chrome > .player.has-song {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(18px) !important;
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
}

.volume-control { display: flex; align-items: center; gap: 4px; direction: ltr; }
.volume-slider {
    -webkit-appearance: none; appearance: none;
    width: 80px; height: 4px; border-radius: 2px;
    background: rgba(255,255,255,0.2); outline: none;
    cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 14px; height: 14px;
    border-radius: 50%; background: #fff;
    cursor: pointer; opacity: 1;
}
.volume-slider { direction: ltr; touch-action: none; }

/* ============ SIDE PANEL (QUEUE) ============ */
.side-panel {
    position: fixed; top: 0; right: 0; left: auto;
    bottom: calc(var(--player-height) + var(--safe-bottom));
    width: min(380px, 92vw); background: rgba(22, 22, 24, 0.94);
    border-left: 1px solid var(--glass-stroke);
    backdrop-filter: saturate(180%) blur(28px);
    -webkit-backdrop-filter: saturate(180%) blur(28px);
    z-index: 700; transform: translateX(110%);
    transition: transform var(--transition-slow);
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-lg);
}
.side-panel.open { transform: translateX(0); }
html[dir="ltr"] .side-panel {
    right: auto; left: 0;
    border-left: none; border-right: 1px solid var(--glass-stroke);
    transform: translateX(-110%);
}
html[dir="ltr"] .side-panel.open { transform: translateX(0); }
.side-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px; border-bottom: 1px solid var(--border-color);
}
.side-panel-header h3 { font-size: 1rem; font-weight: 700; }
.side-panel-body { flex: 1; overflow-y: auto; padding: 12px; }

/* ============ MODAL ============ */
.modal-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl); padding: 32px;
    max-width: 420px; width: 100%;
    animation: fadeInScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh; overflow-y: auto;
    border: 1px solid var(--border-color);
}
.modal-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; text-align: center; }
.modal-close {
    position: absolute; top: 16px; left: 16px;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg-hover); display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.modal-close:hover { background: var(--bg-active); }

/* ============ FORMS ============ */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-input {
    width: 100%; padding: 12px 16px;
    background: var(--bg-hover); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); color: var(--text-primary);
    outline: none; transition: all var(--transition);
    font-size: 0.9rem;
}
.form-input:focus { border-color: var(--accent); background: var(--bg-active); }
.form-input::placeholder { color: var(--text-muted); }
textarea.form-input { min-height: 100px; resize: vertical; }
select.form-input { cursor: pointer; }

/* ============ TOAST ============ */
.toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
    background: var(--bg-elevated); border: 1px solid var(--border-color);
    padding: 12px 24px; border-radius: var(--radius-lg);
    display: flex; align-items: center; gap: 10px;
    animation: fadeInDown 0.3s ease, fadeIn 0.3s ease;
    box-shadow: var(--shadow-lg); font-size: 0.85rem;
    max-width: 400px;
}
.toast.success { border-color: var(--accent); }
.toast.success i { color: var(--accent); }
.toast.error { border-color: var(--danger); }
.toast.error i { color: var(--danger); }
.toast.warning { border-color: var(--warning); }
.toast.warning i { color: var(--warning); }
.toast.hide { animation: fadeIn 0.3s ease reverse; }
/* ============ SECTION HEADERS ============ */
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.section-header h2 { font-size: 1.5rem; font-weight: 700; }
.section-header .see-all {
    font-size: 0.8rem; color: var(--text-secondary);
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    transition: var(--transition);
}
.section-header .see-all:hover { color: var(--text-primary); }

/* ============ GRID LAYOUTS ============ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 24px;
}
.card-grid-sm { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.list-grid { display: flex; flex-direction: column; gap: 2px; }

/* ============ HERO BANNER ============ */
.hero-banner {
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--radius-xl); padding: 40px;
    margin-bottom: 32px; position: relative; overflow: hidden;
}
.hero-banner::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(29,185,84,0.2), transparent 70%);
}
.hero-banner h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 8px; position: relative; z-index: 1; }
.hero-banner p { color: var(--text-secondary); font-size: 1rem; position: relative; z-index: 1; }
.hero-banner .hero-stats {
    display: flex; gap: 24px; margin-top: 16px; position: relative; z-index: 1;
}
.hero-banner .hero-stat { text-align: center; }
.hero-banner .hero-stat .stat-num { font-size: 1.5rem; font-weight: 700; display: block; }
.hero-banner .hero-stat .stat-label { font-size: 0.75rem; color: var(--text-secondary); }

/* ============ ARTIST CARD ============ */
.artist-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 20px; text-align: center; cursor: pointer;
    transition: all var(--transition);
}
.artist-card:hover { background: var(--bg-hover); transform: translateY(-4px); }
.artist-card .artist-avatar {
    width: 120px; height: 120px; border-radius: 50%;
    margin: 0 auto 16px; overflow: hidden;
    background: var(--bg-hover); display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-md);
}
.artist-card .artist-avatar img { width: 100%; height: 100%; object-fit: cover; }
.artist-card .artist-avatar i { font-size: 2.5rem; color: var(--text-muted); }
.artist-card .artist-name { font-weight: 600; margin-bottom: 4px; }
.artist-card .artist-meta { font-size: 0.8rem; color: var(--text-secondary); }
.verified-badge { color: var(--info); font-size: 0.85em; vertical-align: middle; }
.song-row-artist .verified-badge { margin-inline-start: 4px; }

.tm-breadcrumb {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
@media (max-width: 768px) {
    .tm-breadcrumb { display: flex; }
}
.tm-bc-link {
    background: none; border: none; padding: 0;
    color: var(--text-secondary); cursor: pointer; font: inherit;
}
.tm-bc-link:hover { color: var(--text-primary); text-decoration: underline; }
.tm-bc-current { color: var(--text-primary); font-weight: 600; }
.tm-bc-sep { opacity: 0.45; user-select: none; }

.search-form-has-suggest { position: relative; }
.search-suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    z-index: 1200;
    background: var(--bg-elevated, #18181c);
    border: 1px solid var(--border, rgba(255,255,255,.08));
    border-radius: var(--radius-md, 12px);
    box-shadow: var(--shadow-lg);
    max-height: 360px;
    overflow: auto;
    padding: 6px;
}
.search-suggest-row {
    display: flex; align-items: center; gap: 10px;
    width: 100%; text-align: start;
    border: none; background: transparent;
    padding: 8px 10px; border-radius: 8px;
    cursor: pointer; color: inherit; font: inherit;
}
.search-suggest-row:hover { background: var(--bg-hover); }
.search-suggest-row img {
    width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex-shrink: 0;
}
.search-suggest-row span { display: flex; flex-direction: column; min-width: 0; }
.search-suggest-row strong, .search-suggest-row em {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-suggest-row em { font-style: normal; font-size: 0.78rem; opacity: 0.7; }

.pl-filter-input {
    width: 100%; max-width: 420px;
    margin: 0 0 12px; padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border, rgba(255,255,255,.1));
    background: var(--bg-hover); color: var(--text-primary);
}

.blend-card { margin-bottom: 16px; padding: 14px 16px; }
.blend-form {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px;
}
.blend-form input {
    flex: 1 1 120px; min-width: 100px;
    padding: 8px 10px; border-radius: 8px;
    border: 1px solid var(--border, rgba(255,255,255,.1));
    background: var(--bg-hover); color: var(--text-primary);
}

.artist-social-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.artist-news-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.artist-news-item { padding: 12px 14px; }
.artist-news-item h3 { margin: 0 0 6px; font-size: 1rem; }
.artist-profile-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; padding: 14px; }
.artist-profile-form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; }
.artist-profile-form input, .artist-profile-form textarea {
    padding: 8px 10px; border-radius: 8px;
    border: 1px solid var(--border, rgba(255,255,255,.1));
    background: var(--bg-hover); color: var(--text-primary);
}

/* ============ CATEGORY CHIPS ============ */
.category-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.category-chip {
    padding: 8px 16px; border-radius: 500px;
    background: var(--bg-hover); color: var(--text-secondary);
    font-size: 0.8rem; font-weight: 500; cursor: pointer;
    transition: all var(--transition); border: 1px solid transparent;
}
.category-chip:hover { color: var(--text-primary); border-color: var(--text-primary); }
.category-chip.active { background: var(--accent); color: #000; font-weight: 700; border-color: var(--accent); }

/* ============ SEARCH PAGE ============ */
.search-big {
    max-width: 600px; margin: 0 auto 32px;
}
.search-big input {
    width: 100%; padding: 16px 24px;
    background: var(--bg-hover); border: 2px solid transparent;
    border-radius: var(--radius-lg); color: var(--text-primary);
    font-size: 1.1rem; outline: none;
    transition: all var(--transition);
}
.search-big input:focus { border-color: var(--accent); }

/* ============ UPLOAD PAGE ============ */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-xl); padding: 48px;
    text-align: center; cursor: pointer;
    transition: all var(--transition);
    background: var(--bg-card);
}
.upload-zone:hover { border-color: var(--accent); background: var(--bg-hover); }
.upload-zone.dragover { border-color: var(--accent); background: rgba(29,185,84,0.05); }
.upload-zone i { font-size: 3rem; color: var(--text-muted); margin-bottom: 16px; display: block; }
.upload-zone p { color: var(--text-secondary); }

/* ============ OWNER PANEL ============ */
.owner-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px; margin-bottom: 32px;
}
.stat-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 20px; transition: all var(--transition);
}
.stat-card:hover { background: var(--bg-hover); transform: translateY(-2px); }
.stat-card .stat-icon {
    width: 44px; height: 44px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; margin-bottom: 12px;
}
.stat-card .stat-icon.green { background: rgba(29,185,84,0.15); color: var(--accent); }
.stat-card .stat-icon.blue { background: rgba(33,150,243,0.15); color: var(--info); }
.stat-card .stat-icon.red { background: rgba(233,30,99,0.15); color: var(--danger); }
.stat-card .stat-icon.orange { background: rgba(255,152,0,0.15); color: var(--warning); }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; display: block; margin-bottom: 4px; }
.stat-card .stat-label { font-size: 0.75rem; color: var(--text-secondary); }

.owner-tabs { display: flex; gap: 4px; margin-bottom: 24px; flex-wrap: wrap; }
.owner-tab {
    padding: 10px 20px; border-radius: 500px;
    background: var(--bg-hover); color: var(--text-secondary);
    font-weight: 600; font-size: 0.85rem;
    transition: all var(--transition); cursor: pointer;
}
.owner-tab:hover { color: var(--text-primary); }
.owner-tab.active { background: var(--accent); color: #000; }

/* Approval cards */
.approval-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 16px; display: flex; align-items: center; gap: 16px;
    margin-bottom: 8px; transition: all var(--transition);
    border-right: 3px solid var(--warning);
}
.approval-card:hover { background: var(--bg-hover); }
.approval-card .approval-cover {
    width: 56px; height: 56px; border-radius: var(--radius-sm);
    background: var(--bg-hover); overflow: hidden; flex-shrink: 0;
}
.approval-card .approval-cover img { width: 100%; height: 100%; object-fit: cover; }
.approval-card .approval-info { flex: 1; min-width: 0; }
.approval-card .approval-title { font-weight: 600; margin-bottom: 2px; }
.approval-card .approval-meta { font-size: 0.8rem; color: var(--text-secondary); }
.approval-card .approval-actions { display: flex; gap: 8px; }

/* ============ DATA TABLE ============ */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: right; padding: 12px 16px;
    font-size: 0.7rem; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.5px; border-bottom: 1px solid var(--border-color);
}
.data-table td {
    padding: 12px 16px; border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}
.data-table tr:hover td { background: var(--bg-hover); }
.data-table .badge {
    display: inline-block; padding: 3px 10px;
    border-radius: 500px; font-size: 0.7rem; font-weight: 600;
}
.badge-success { background: rgba(29,185,84,0.15); color: var(--accent); }
.badge-warning { background: rgba(255,152,0,0.15); color: var(--warning); }
.badge-danger { background: rgba(233,30,99,0.15); color: var(--danger); }
.badge-info { background: rgba(33,150,243,0.15); color: var(--info); }

/* ============ TABS ============ */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.tab {
    padding: 12px 20px; color: var(--text-secondary);
    font-weight: 600; font-size: 0.85rem; cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--text-primary); border-bottom-color: var(--accent); }

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center; padding: 60px 20px;
    animation: fadeIn 0.4s ease;
}
.empty-state i { font-size: 3rem; color: var(--text-muted); margin-bottom: 16px; display: block; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px; }
.empty-msg { text-align: center; color: var(--text-muted); padding: 40px; font-size: 0.9rem; }

/* ============ NOTIFICATION PAGE ============ */
.notif-item {
    display: flex; gap: 12px; padding: 16px;
    border-radius: var(--radius-md); cursor: pointer;
    transition: all var(--transition); border-bottom: 1px solid var(--border-color);
}
.notif-item:hover { background: var(--bg-hover); }
.notif-item.unread { background: rgba(29,185,84,0.05); }
.notif-item .notif-icon {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--bg-hover); display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: var(--accent);
}
.notif-item .notif-content { flex: 1; min-width: 0; }
.notif-item .notif-title { font-weight: 500; margin-bottom: 2px; font-size: 0.9rem; }
.notif-item .notif-time { font-size: 0.75rem; color: var(--text-muted); }

/* ============ COMMENT ============ */
.comment-item { display: flex; gap: 12px; padding: 12px 0; }
.comment-item .comment-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--bg-hover); overflow: hidden; flex-shrink: 0;
}
.comment-item .comment-body { flex: 1; }
.comment-item .comment-header { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.comment-item .comment-user { font-weight: 600; font-size: 0.85rem; }
.comment-item .comment-date { font-size: 0.7rem; color: var(--text-muted); }
.comment-item .comment-text { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }

/* ============ STAR RATING ============ */
.star-rating { display: flex; gap: 2px; direction: ltr; }
.star-rating i { cursor: pointer; color: var(--text-muted); transition: all var(--transition); font-size: 1.1rem; }
.star-rating i:hover, .star-rating i.active { color: #ffc107; transform: scale(1.15); }

/* ============ PROFILE + ARTIST DETAIL ============ */
.profile-header {
    display: flex; align-items: flex-end; gap: 24px;
    margin-bottom: 32px; padding: 32px;
    background: linear-gradient(180deg, var(--bg-hover), transparent);
    border-radius: var(--radius-xl);
}
.profile-avatar {
    width: 180px; height: 180px; border-radius: 50%;
    overflow: hidden; background: var(--bg-hover);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-lg); flex-shrink: 0;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar i { font-size: 4rem; color: var(--text-muted); }
.profile-info h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 8px; }
.profile-info .profile-meta { display: flex; gap: 16px; color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 16px; }

/* ============ ABOUT PAGE ============ */
.about-content { max-width: 700px; margin: 0 auto; }
.about-content h1 { font-size: 2rem; margin-bottom: 16px; }
.about-content p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 16px; }

/* ============ STATUS INDICATORS ============ */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-left: 6px; }
.status-dot.online { background: var(--accent); }
.status-dot.pending { background: var(--warning); }
.status-dot.offline { background: var(--text-muted); }

/* Playing animation */
.playing-bars { display: flex; gap: 2px; align-items: flex-end; height: 16px; }
.playing-bars span {
    width: 3px; background: var(--accent); border-radius: 1px;
    animation: playingBars 1s ease-in-out infinite;
}
.playing-bars span:nth-child(2) { animation-delay: 0.2s; }
.playing-bars span:nth-child(3) { animation-delay: 0.4s; }
/* ============ RESPONSIVE BASE ============ */
.mobile-tabbar { display: none; }

@media (max-width: 1024px) {
    .app-container { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed; top: 0; right: 0; bottom: 0;
        width: min(var(--sidebar-width), 86vw); z-index: 1000;
        transform: translateX(110%);
        box-shadow: var(--shadow-lg);
        padding-top: var(--safe-top);
        background: rgba(20, 20, 22, 0.86);
        backdrop-filter: var(--glass-blur);
        -webkit-backdrop-filter: var(--glass-blur);
        border-left: 1px solid var(--glass-stroke);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-close { display: inline-flex; }
    .menu-toggle { display: inline-flex !important; }
    .player { grid-column: 1; }
    .main-content { border-radius: 0; }
    .page-content { padding: 14px 14px calc(var(--tabbar-height) + var(--safe-bottom) + 18px); }
    body.has-player .page-content { padding-bottom: calc(var(--player-height) + var(--tabbar-height) + var(--safe-bottom) + 18px); }
    .card-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
    .side-panel {
        width: 100%; left: 0; right: 0;
        bottom: calc(var(--tabbar-height, 0px) + var(--safe-bottom));
        top: var(--safe-top);
    }
    body.has-player .side-panel {
        bottom: calc(var(--player-height) + var(--tabbar-height, 0px) + var(--safe-bottom));
    }
    .topbar-search { max-width: none; flex: 1; min-width: 0; }
    .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 768px) {
    .mobile-tabbar { display: flex; }
    .player-extra { display: none !important; }
    .player-song-info { min-width: 0; max-width: none; flex: 1; }
    .player-controls { flex: 0 0 auto; gap: 4px; }
    .player-controls #shuffleBtn,
    .player-controls #repeatBtn { display: none; }
    .player-like { display: inline-flex; }
    .player-content { padding: 0 12px; gap: 10px; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat-cards { grid-template-columns: 1fr 1fr !important; }
    .owner-tabs { gap: 6px; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .owner-tabs .tab-btn { flex: 0 0 auto; white-space: nowrap; }
    .song-row-plays,
    .song-row-duration { display: none; }
    .song-row-actions { opacity: 1; }
    .song-row-actions .btn-icon:nth-child(n+3) { display: none; }
    .home-hero { min-height: 200px; margin: 0 0 16px; border-radius: var(--radius-lg); }
    .home-hero h1 { font-size: clamp(1.35rem, 6.5vw, 1.85rem); }
    .home-hero-content { padding: 16px !important; }
    .home-hero-actions .btn { padding: 10px 16px; min-height: 40px; font-size: 0.9rem; }
    .detail-header,
    .song-detail-header { padding: 16px; gap: 16px; flex-direction: column; align-items: center; text-align: center; }
    .detail-cover, .song-detail-cover { width: 160px; max-width: 48vw; border-radius: var(--radius-lg); }
    .plan-grid { grid-template-columns: 1fr !important; }
    .search-bar-big { flex-direction: column; }
    .search-bar-big .btn { width: 100%; }
    .form-card { padding: 16px; border-radius: var(--radius-lg); }
    .modal, .auth-modal { width: calc(100vw - 24px); max-width: 420px; margin: 12px; border-radius: var(--radius-xl); }
    .topbar {
        padding: 0 10px;
        gap: 6px;
        height: calc(var(--topbar-height) + var(--safe-top));
        padding-top: var(--safe-top);
        grid-template-columns: auto 1fr auto;
    }
    .topbar-search { display: none !important; }
    .topbar-search-icon { display: inline-flex !important; }
    .topbar-brand { display: inline-flex; font-size: 0.95rem; z-index: 1; }
    .topbar-start, .topbar-actions { z-index: 2; position: relative; }
    .menu-toggle { display: inline-flex !important; z-index: 3; }
    .topbar-brand span { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
    .topbar-actions { gap: 4px; }
    .topbar-btn, .menu-toggle, .topbar-search-icon {
        width: 36px; height: 36px; min-width: 36px; min-height: 36px;
    }
    .topbar-premium-btn {
        width: 36px; height: 36px; min-width: 36px; padding: 0;
        border-radius: 50%;
    }
    .topbar-premium-btn span { display: none !important; }
    .lang-toggle { padding: 0 8px !important; height: 36px; font-size: 0.68rem; }
    .section-header h2 { font-size: 1.2rem; }
    .approval-card { flex-direction: column; align-items: stretch; }
    .approval-actions { width: 100%; justify-content: stretch; }
    .approval-actions .btn { flex: 1; }
}

@media (max-width: 480px) {
    html { font-size: 15px; }
    :root {
        --player-height: 68px;
        --tabbar-height: 52px;
        --topbar-height: 52px;
    }
    .player-play { width: 38px; height: 38px; font-size: 0.9rem; }
    .player-btn { width: 32px; height: 32px; font-size: 0.8rem; }
    .player-cover { width: 42px; height: 42px; border-radius: 10px; }
    .player-title { font-size: 0.8rem; }
    .player-artist { font-size: 0.7rem; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .song-card { padding: 8px; border-radius: var(--radius-md); }
    .artist-card { padding: 12px; }
    .artist-card > img, .artist-card .artist-avatar { width: 88px; height: 88px; }
    .stat-cards { gap: 8px; }
    .stat-card { padding: 14px; }
    .stat-card .stat-value { font-size: 1.35rem; }
    .profile-banner-wrap, .artist-hero { min-height: 180px; border-radius: var(--radius-lg); }
    .detail-avatar-placeholder { width: 84px; height: 84px; }
    .artist-hero .detail-avatar { width: 88px; height: 88px; }
    .page-content { padding-left: 12px; padding-right: 12px; }
    .mobile-tab span { font-size: 0.55rem; }
}

/* ============ SIDEBAR MOBILE OVERLAY ============ */
.sidebar-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999; display: none;
    opacity: 0; transition: opacity 0.22s ease;
}
.sidebar-overlay.show,
.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ============ LTR MODE (ENGLISH) ============ */
html[dir="ltr"] .sidebar { border-left: none; border-right: 1px solid var(--border-color); }
html[dir="ltr"] .nav-item.active::before { right: auto; left: 0; }
html[dir="ltr"] .main-content { border-radius: 0 var(--radius-lg) 0 0; }
html[dir="ltr"] .data-table th { text-align: left; }

@media (max-width: 1024px) {
    html[dir="ltr"] .sidebar { right: auto; left: 0; transform: translateX(-110%); }
    html[dir="ltr"] .sidebar.open { transform: translateX(0); }
    html[dir="ltr"] .main-content { border-radius: 0; }
}

/* ============ PAGE TRANSITIONS ============ */
.page-enter { animation: fadeInUp 0.35s ease backwards; }
.page-item { animation: fadeInUp 0.35s ease backwards; }
.page-item:nth-child(1) { animation-delay: 0.03s; }
.page-item:nth-child(2) { animation-delay: 0.06s; }
.page-item:nth-child(3) { animation-delay: 0.09s; }
.page-item:nth-child(4) { animation-delay: 0.12s; }
.page-item:nth-child(5) { animation-delay: 0.15s; }
.page-item:nth-child(6) { animation-delay: 0.18s; }
.page-item:nth-child(7) { animation-delay: 0.21s; }
.page-item:nth-child(8) { animation-delay: 0.24s; }
.page-item:nth-child(9) { animation-delay: 0.27s; }
.page-item:nth-child(10) { animation-delay: 0.30s; }

/* ============ MISC ============ */
.divider { height: 1px; background: var(--border-color); margin: 24px 0; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-16 { margin-top: 16px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Audio visualizer placeholder */
.audio-wave {
    display: flex; align-items: center; gap: 3px; height: 20px;
}
.audio-wave span {
    width: 3px; background: var(--accent); border-radius: 2px;
    animation: playingBars 0.8s ease-in-out infinite;
}
.audio-wave span:nth-child(2) { animation-delay: 0.1s; height: 60%; }
.audio-wave span:nth-child(3) { animation-delay: 0.2s; height: 80%; }
.audio-wave span:nth-child(4) { animation-delay: 0.3s; height: 40%; }

/* ============ SONG CARD (JS VERSION) ============ */
.song-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-width: 0;
    max-width: 100%;
}
.song-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    padding-bottom: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 12px;
    background: var(--bg-hover);
    flex: 0 0 auto;
}
.song-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}
.song-card:hover .song-card-img img {
    transform: scale(1.05);
}
.song-card-img .play-overlay {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 6px 16px rgba(29, 185, 84, 0.4);
}
.song-card:hover .song-card-img .play-overlay {
    opacity: 1;
    transform: translateY(0);
}
.song-card-info {
    padding: 0 4px;
}
.song-card-title {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    color: var(--text-primary);
}
.song-card-artist {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.song-card-artist:hover {
    color: var(--text-primary);
}

/* ============ SONG ROW ITEM ============ */
.song-row-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}
.song-row-item:hover {
    background: var(--bg-hover);
}
.song-row-item.active {
    background: var(--bg-hover);
}
.song-row-item.active .song-row-title {
    color: var(--accent);
}
.song-row-num {
    width: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    flex-shrink: 0;
}
.song-row-item:hover .song-row-num {
    color: var(--accent);
}
.song-row-img {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-hover);
    flex-shrink: 0;
    object-fit: cover;
}
.song-row-info {
    flex: 1;
    min-width: 0;
}
.song-row-title {
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.song-row-artist {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.song-row-plays {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 80px;
    text-align: center;
}
.song-row-duration {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 45px;
    text-align: left;
    font-variant-numeric: tabular-nums;
}
.song-row-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--transition);
}
.song-row-item:hover .song-row-actions {
    opacity: 1;
}

/* ============ SEARCH PAGE ============ */
.search-page {
    max-width: 800px;
    margin: 0 auto;
}
.search-bar-big {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}
.search-bar-big input {
    flex: 1;
    padding: 16px 24px;
    background: var(--bg-hover);
    border: 2px solid var(--border-color);
    border-radius: 500px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all var(--transition);
}
.search-bar-big input:focus {
    border-color: var(--accent);
    background: var(--bg-active);
}
.search-bar-big input::placeholder {
    color: var(--text-muted);
}
.search-bar-big .btn {
    padding: 0 28px;
    border-radius: 500px;
}

/* ============ ARTIST CARD (GRID) ============ */
.artist-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}
.artist-card:hover {
    background: var(--bg-hover);
    transform: translateY(-4px);
}
.artist-card img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    margin: 0 auto 16px;
    object-fit: cover;
    background: var(--bg-hover);
    box-shadow: var(--shadow-md);
}
.artist-card h3 {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.artist-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ============ DETAIL HEADER ============ */
.detail-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 32px;
    background: linear-gradient(180deg, var(--bg-hover), transparent);
    border-radius: var(--radius-xl);
    margin-bottom: 24px;
}
.detail-header h1 {
    font-size: 2rem;
    font-weight: 800;
}
.detail-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.detail-header .btn {
    width: fit-content;
}

/* ============ SONG DETAIL PAGE ============ */
.song-detail {
    max-width: 900px;
    margin: 0 auto;
}
.song-detail-header {
    display: flex;
    gap: 32px;
    margin-bottom: 32px;
    padding: 32px;
    background: linear-gradient(135deg, var(--bg-hover) 0%, transparent 100%);
    border-radius: var(--radius-xl);
}
.song-detail-cover {
    width: 240px;
    height: 240px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-lg);
    background: var(--bg-tertiary);
}
.song-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.song-detail-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.song-detail-info h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.2;
}
.song-detail-info .detail-artist {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    cursor: pointer;
}
.song-detail-info .detail-artist:hover {
    color: var(--text-primary);
    text-decoration: underline;
}
.song-detail-info .detail-meta {
    display: flex;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 20px;
}
.song-detail-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.song-detail-actions .btn-play {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.song-detail-actions .btn-play:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 24px rgba(29, 185, 84, 0.4);
}

/* ============ UPLOAD FORM ============ */
.upload-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px;
}
.upload-form h2 {
    margin-bottom: 24px;
    font-size: 1.5rem;
}

/* ============ LOGIN PROMPT ============ */
.login-prompt {
    text-align: center;
    padding: 60px 20px;
}
.login-prompt i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: block;
}
.login-prompt h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}
.login-prompt p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ============ PLAYER COVER FIX ============ */
#playerCover {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-hover);
    flex-shrink: 0;
}
#playerCover img,
#playerCover {
    object-fit: cover;
}

/* ============ SUPPORT PAGE ============ */
.support-page {
    max-width: 600px;
    margin: 0 auto;
}
.support-page h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}
.support-page .support-desc {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ============ ABOUT PAGE ============ */
.about-page {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}
.about-page .about-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: var(--bg-hover);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.about-page .about-logo i {
    font-size: 3rem;
    color: var(--accent);
}
.about-page h1 {
    font-size: 2rem;
    margin-bottom: 16px;
}
.about-page p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

/* ============ OWNER PANEL FIXES ============ */
.owner-panel h2 {
    font-size: 1.5rem;
    margin-bottom: 24px;
}
.pending-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ============ MODAL AUTH ============ */
.auth-modal {
    position: relative;
    max-width: 400px;
}
.auth-modal .auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--accent);
}
.auth-modal .auth-brand i { font-size: 1.25rem; }
.auth-modal .auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 8px 0 4px;
}
.auth-modal .auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.auth-modal .form-group { margin-bottom: 16px; }
.auth-modal .auth-submit {
    width: 100%;
    margin-top: 8px;
    padding: 12px 16px;
    font-weight: 700;
}
.auth-modal .auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.auth-modal .auth-switch a {
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
}
.auth-modal .auth-switch a:hover { text-decoration: underline; }

/* ============ PREMIUM / SUBSCRIPTIONS ============ */
.premium-page { max-width: 1100px; margin: 0 auto; padding-bottom: 40px; }
.premium-hero {
    text-align: center;
    margin-bottom: 32px;
}
.premium-hero h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 8px;
}
.premium-hero h1 span { color: var(--accent); }
.premium-hero p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 520px;
    margin: 0 auto;
}
.premium-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(29,185,84,0.15);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
}
.benefit-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px 20px;
    margin: 28px 0 36px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
}
.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.92rem;
    color: var(--text-primary);
    line-height: 1.5;
}
.benefit-item i {
    color: var(--accent);
    margin-top: 3px;
    flex-shrink: 0;
}
.plan-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
@media (max-width: 1000px) {
    .plan-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .plan-grid { grid-template-columns: 1fr; }
}
.plan-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px 18px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 280px;
    transition: transform var(--transition), border-color var(--transition);
}
.plan-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.18); }
.plan-card.featured {
    background: linear-gradient(165deg, #1a4a7a 0%, #0d2a4a 55%, #121212 100%);
    border-color: rgba(64,156,255,0.45);
    box-shadow: 0 12px 40px rgba(30,100,200,0.25);
}
.plan-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    right: auto;
    background: #f5c518;
    color: #111;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
}
.plan-card.featured .plan-badge {
    background: #f5c518;
}
.plan-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 28px 0 12px;
}
.plan-old-price {
    color: var(--text-muted);
    text-decoration: line-through;
    font-size: 0.85rem;
    min-height: 1.2em;
}
.plan-price {
    font-size: 1.55rem;
    font-weight: 800;
    margin: 4px 0 8px;
}
.plan-price small {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.plan-card .btn {
    width: 100%;
    margin-top: auto;
    padding: 12px;
    font-weight: 800;
    border-radius: var(--radius-md);
    background: #f5c518;
    color: #111;
}
.plan-card .btn:hover { filter: brightness(1.08); }
.plan-card.featured .btn {
    background: #f5c518;
}
@media (max-width: 700px) {
    .topbar-premium-btn span { display: none; }
}

/* ============ LYRICS SECTION ============ */
.lyrics-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 24px;
}
.lyrics-section h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.lyrics-section h3 i {
    color: var(--accent);
}
.lyrics-content {
    color: var(--text-secondary);
    line-height: 2;
    white-space: pre-wrap;
    font-size: 0.95rem;
}
.lyrics-content .lyric-line {
    padding: 4px 0;
    transition: color var(--transition);
}
.lyrics-content .lyric-line.active {
    color: var(--accent);
    font-weight: 600;
}

/* ============ COMMENTS SECTION ============ */
.comments-section {
    margin-top: 32px;
}
.comments-section h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
}
.comment-form {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}
.comment-form input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 500px;
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition);
}
.comment-form input:focus {
    border-color: var(--accent);
}
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============ RATING SECTION ============ */
.rating-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    margin-top: 16px;
}
.rating-section .rating-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.rating-section .rating-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}
.rating-section .rating-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============ RESPONSIVE FIXES ============ */
@media (max-width: 768px) {
    .song-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px;
    }
    .song-detail-cover {
        width: min(200px, 48vw);
        height: auto;
        aspect-ratio: 1;
    }
    .song-detail-info h1 {
        font-size: 1.8rem;
    }
    .song-detail-info .detail-meta {
        justify-content: center;
    }
    .song-detail-actions {
        justify-content: center;
    }
    .search-bar-big {
        flex-direction: column;
    }
    .search-bar-big .btn {
        width: 100%;
        padding: 14px;
    }
    .song-row-plays {
        display: none;
    }
    .artist-card img {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .song-row-item {
        padding: 8px 12px;
        gap: 10px;
    }
    .song-row-img {
        width: 40px;
        height: 40px;
    }
    .song-row-num {
        display: none;
    }
    .song-row-duration {
        display: none;
    }
}

/* ============ MODAL (JS VERSION) ============ */
.modal {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 420px;
    width: 100%;
    animation: fadeInScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border-color);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.modal-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
}
.modal-header .btn-icon {
    color: var(--text-muted);
}
.modal-header .btn-icon:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* ============ DETAIL HEADER ELEMENTS ============ */
.detail-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
}
.detail-cover {
    width: 220px;
    height: 220px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
}
.detail-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

/* ============ FORM CARD ============ */
.form-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 600px;
}
.form-card .form-group {
    margin-bottom: 20px;
}
.form-card label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.form-card input,
.form-card textarea,
.form-card select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition);
}
.form-card input:focus,
.form-card textarea:focus,
.form-card select:focus {
    border-color: var(--accent);
    background: var(--bg-active);
}
.form-card input[type="file"] {
    padding: 10px;
    cursor: pointer;
}

/* ============ UPLOAD NOTE ============ */
.upload-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: rgba(29, 185, 84, 0.1);
    border-radius: var(--radius-md);
    border-right: 3px solid var(--accent);
}

/* ============ RATING IN DETAIL ============ */
.rating-section h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}
.rating-section span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============ COMMENTS FIXES ============ */
.comment-form textarea {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    resize: none;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all var(--transition);
}
.comment-form textarea:focus {
    border-color: var(--accent);
}
.comment-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
}
.comment-item .comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.comment-item .comment-header strong {
    font-size: 0.9rem;
}
.comment-item .comment-header span {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.comment-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* ============ SIDEBAR MOBILE FIX ============ */
.sidebar.open {
    transform: translateX(0) !important;
}
#sidebarOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}
#sidebarOverlay.show {
    opacity: 1;
    visibility: visible;
}

/* ============ TOAST FIXES ============ */
.toast-success { border-color: var(--accent); }
.toast-success i { color: var(--accent); }
.toast-error { border-color: var(--danger); }
.toast-error i { color: var(--danger); }
.toast-warning { border-color: var(--warning); }
.toast-warning i { color: var(--warning); }

/* ============ PLAYER ENHANCEMENTS ============ */
.player.playing .player-cover {
    animation: pulse 2s ease-in-out infinite;
}

/* ============ FOCUS STATES ============ */
button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ============ SELECTION ============ */
::selection {
    background: var(--accent);
    color: #000;
}

/* ============ LINK HOVER ============ */
a:hover {
    color: var(--accent);
}

/* ============ DETAIL HEADER RESPONSIVE ============ */
@media (max-width: 768px) {
    .detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .detail-avatar {
        width: 140px;
        height: 140px;
    }
    .detail-cover {
        width: 180px;
        height: 180px;
    }
    .detail-actions {
        justify-content: center;
    }
}

/* ============ THEME TOGGLE ============ */
.theme-toggle {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-secondary);
}
.theme-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.theme-toggle i {
    font-size: 1rem;
    transition: transform 0.3s ease;
    position: absolute;
}
.theme-toggle:hover i {
    transform: rotate(20deg);
}
.theme-toggle .fa-sun { display: none; }
.theme-toggle .fa-moon { display: block; }
[data-theme="light"] .theme-toggle .fa-moon { display: none; }
[data-theme="light"] .theme-toggle .fa-sun { display: block; }
[data-theme="dark"] .theme-toggle .fa-sun { display: none; }
[data-theme="dark"] .theme-toggle .fa-moon { display: block; }

/* ============ SLEEP TIMER ============ */
.sleep-timer-btn {
    position: relative;
}
.sleep-timer-btn.active {
    color: var(--accent) !important;
}
.sleep-timer-btn .timer-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent);
    color: #000;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
}

.sleep-timer-modal {
    text-align: center;
}
.sleep-timer-modal h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}
.sleep-timer-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sleep-timer-option {
    padding: 14px 20px;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 500;
}
.sleep-timer-option:hover {
    background: var(--bg-active);
    transform: scale(1.02);
}
.sleep-timer-option.active {
    background: var(--accent);
    color: #000;
}
.sleep-timer-option i {
    margin-left: 8px;
}
.sleep-timer-custom {
    margin-top: 16px;
    display: flex;
    gap: 8px;
}
.sleep-timer-custom input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: center;
}
.sleep-timer-status {
    margin-top: 20px;
    padding: 16px;
    background: rgba(29, 185, 84, 0.1);
    border-radius: var(--radius-md);
    display: none;
}
.sleep-timer-status.active {
    display: block;
}
.sleep-timer-status .timer-countdown {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.sleep-timer-status p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* ============ SHARE MODAL ============ */
.share-modal h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-align: center;
}
.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
}
.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.share-btn i {
    font-size: 1.2rem;
}
.share-btn.telegram {
    background: #0088cc;
    color: #fff;
}
.share-btn.whatsapp {
    background: #25d366;
    color: #fff;
}
.share-btn.twitter {
    background: #1da1f2;
    color: #fff;
}
.share-btn.copy-link {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.share-btn.copy-link.copied {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}
.share-qr {
    margin-top: 20px;
    text-align: center;
}
.share-qr canvas {
    margin: 0 auto;
    border-radius: var(--radius-md);
}
.share-link-preview {
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
}
.share-link-preview img {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}
.share-link-preview .link-info {
    flex: 1;
    min-width: 0;
}
.share-link-preview .link-title {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.share-link-preview .link-url {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============ LIGHT THEME ADJUSTMENTS ============ */
[data-theme="light"] .player {
    background: #ffffff;
    border-top: 1px solid rgba(0,0,0,0.08);
}
[data-theme="light"] .sidebar {
    background: #fafafa;
    border-left-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .splash {
    background: #ffffff;
    --tl-bg: #ffffff;
}
[data-theme="light"] .song-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
[data-theme="light"] .btn-primary {
    color: #fff;
}
[data-theme="light"] .player-play {
    background: var(--accent);
    color: #fff !important;
}
[data-theme="light"] ::selection {
    color: #fff;
}

/* ============ KEYBOARD SHORTCUTS HELP ============ */
.shortcuts-modal {
    max-width: 450px;
}
.shortcuts-modal h3 {
    margin-bottom: 20px;
    text-align: center;
}
.shortcut-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}
.shortcut-item:last-child {
    border-bottom: none;
}
.shortcut-keys {
    display: flex;
    gap: 4px;
}
.shortcut-key {
    background: var(--bg-hover);
    padding: 4px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    min-width: 32px;
    text-align: center;
}
.shortcut-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============ OFFLINE INDICATOR ============ */
.offline-indicator {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--warning);
    color: #000;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 9999;
    display: none;
    animation: slideDown 0.3s ease;
}
.offline-indicator.show {
    display: flex;
    align-items: center;
    gap: 8px;
}
@keyframes slideDown {
    from { transform: translateX(-50%) translateY(-100%); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}
.download-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}
.song-card-img {
    position: relative;
}

/* ============ CROSSFADE SETTINGS ============ */
.crossfade-setting {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 0;
}
.crossfade-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: var(--bg-hover);
    border-radius: 3px;
    outline: none;
}
.crossfade-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
}
.crossfade-value {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============ QUEUE MANAGEMENT ============ */
.queue-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}
.queue-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    gap: 12px;
    cursor: grab;
    transition: background var(--transition);
}
.queue-item:active {
    cursor: grabbing;
}
.queue-item.dragging {
    opacity: 0.5;
    background: var(--bg-active);
}
.queue-item.drag-over {
    border-top: 2px solid var(--accent);
}
.queue-item:hover {
    background: var(--bg-hover);
}
.queue-item .drag-handle {
    color: var(--text-muted);
    cursor: grab;
}
.queue-item .remove-btn {
    opacity: 0;
    transition: opacity var(--transition);
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
}
.queue-item:hover .remove-btn {
    opacity: 1;
}
.queue-item .remove-btn:hover {
    color: var(--danger);
}
.queue-clear-btn {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ============ LYRICS DISPLAY ============ */
.lyrics-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    margin-top: 16px;
}
.lyrics-content {
    text-align: center;
    font-size: 1.1rem;
    line-height: 2;
    color: var(--text-secondary);
    white-space: pre-wrap;
}
.lyrics-line {
    padding: 8px 0;
    transition: all var(--transition);
    cursor: pointer;
}
.lyrics-line:hover {
    color: var(--text-primary);
}
.lyrics-line.active {
    color: var(--accent);
    font-size: 1.3rem;
    font-weight: 600;
}
.lyrics-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}
.lyrics-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}
.lyrics-empty i {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}
.lyrics-toggle-btn {
    margin-top: 8px;
}
.lyrics-toggle-btn.active {
    background: var(--accent);
    color: #fff;
}

/* ============ MINI PLAYER / PiP ============ */
.mini-player {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 320px;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    overflow: hidden;
    display: none;
    animation: slideUp 0.3s ease;
}
.mini-player.show {
    display: block;
}
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.mini-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-hover);
}
.mini-player-header h4 {
    font-size: 0.85rem;
    font-weight: 500;
}
.mini-player-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}
.mini-player-content {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.mini-player-cover {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.mini-player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mini-player-info {
    flex: 1;
    min-width: 0;
}
.mini-player-title {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mini-player-artist {
    color: var(--text-muted);
    font-size: 0.8rem;
}
.mini-player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mini-player-controls button {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    font-size: 1.1rem;
    transition: color var(--transition);
}
.mini-player-controls button:hover {
    color: var(--accent);
}
.mini-player-progress {
    height: 3px;
    background: var(--bg-hover);
}
.mini-player-progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.1s linear;
}
.pip-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
}
.pip-btn:hover {
    color: var(--accent);
}

/* ============ SETTINGS MODAL ============ */
.settings-modal {
    max-width: 480px;
}
.settings-section {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}
.settings-section:last-child {
    border-bottom: none;
}
.settings-section h4 {
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}
.setting-row label {
    color: var(--text-primary);
}
.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-hover);
    border-radius: 24px;
    transition: var(--transition);
}
.toggle-slider:before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider {
    background: var(--accent);
}
.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* ============ RECENTLY PLAYED WIDGET ============ */
.recently-played-widget {
    position: fixed;
    bottom: 100px;
    left: 20px;
    width: 280px;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    display: none;
    max-height: 350px;
    overflow: hidden;
}
.recently-played-widget.show {
    display: block;
    animation: slideUp 0.3s ease;
}
.recently-played-header {
    padding: 12px 16px;
    background: var(--bg-hover);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}
.recently-played-header h4 {
    font-size: 0.9rem;
}
.recently-played-list {
    max-height: 280px;
    overflow-y: auto;
}
.recently-played-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background var(--transition);
}
.recently-played-item:hover {
    background: var(--bg-hover);
}
.recently-played-item img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}
.recently-played-item-info {
    flex: 1;
    min-width: 0;
}
.recently-played-item-title {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.recently-played-item-artist {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============ AUTH TABS ============ */
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 18px;
    padding: 4px;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
}
.auth-tab {
    padding: 10px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    color: var(--text-secondary);
}
.auth-tab.active {
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* ============ HOME HERO ============ */
.home-hero {
    position: relative;
    min-height: min(52vh, 420px);
    margin: -8px -8px 28px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.62) 100%),
        var(--hero-img) center/cover no-repeat,
        #111;
    display: flex;
    align-items: flex-end;
}
.home-hero-empty {
    background: radial-gradient(circle at 20% 20%, rgba(29,185,84,.25), transparent 45%),
                linear-gradient(160deg, #0b0b0b, #121212 60%, #0a1f12);
    min-height: 280px;
}
.home-hero-shade {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.55) 100%);
}
.home-hero-content {
    position: relative;
    z-index: 1;
    padding: 28px 32px 32px;
    max-width: 720px;
}
.home-hero-brand {
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}
.home-hero h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 8px;
}
.home-hero-meta {
    color: var(--text-secondary);
    margin-bottom: 18px;
}
.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.home-hero-actions .btn {
    padding: 12px 20px;
    font-weight: 800;
    border-radius: 999px;
}
.home-hero-actions .btn-outline {
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(0,0,0,.35);
}
@media (max-width: 700px) {
    .home-hero { margin: 0 0 20px; min-height: 260px; border-radius: var(--radius-lg); }
    .home-hero-content { padding: 20px; }
}

/* ============ PREMIUM AD OVERLAY ============ */
.premium-ad-overlay {
    position: fixed; inset: 0; z-index: 5000;
    display: none; align-items: center; justify-content: center;
    background: rgba(0,0,0,.72); backdrop-filter: blur(8px);
    padding: 20px;
}
.premium-ad-overlay.show { display: flex; }
.premium-ad-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 28px 24px;
    text-align: center;
    max-width: 360px;
    width: 100%;
    animation: fadeInScale .35s ease;
}
.premium-ad-card i {
    font-size: 2rem;
    color: #f5c518;
    margin-bottom: 10px;
}
.premium-ad-card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.premium-ad-card p { color: var(--text-secondary); margin-bottom: 18px; }
.premium-ad-card .btn { width: 100%; font-weight: 800; }

/* UI polish */
.page-content { padding-bottom: 24px; }
body.has-player .page-content { padding-bottom: calc(var(--player-height) + 24px); }

/* ============ iOS 26 Liquid Glass surfaces ============ */
.ios-glass,
.topbar,
.player,
.sidebar,
.modal,
.auth-modal,
.toast,
.premium-ad-card,
.stat-card,
.song-card,
.artist-card,
.form-card,
.approval-card,
.plan-card {
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}
.topbar {
    background: rgba(10, 10, 12, 0.55);
    border-bottom: 1px solid var(--hairline);
    backdrop-filter: saturate(180%) blur(28px);
    -webkit-backdrop-filter: saturate(180%) blur(28px);
}
[data-theme="light"] .topbar {
    background: rgba(242, 242, 247, 0.72);
}
.player {
    background: rgba(18, 18, 20, 0.72);
    border-top: 1px solid var(--glass-stroke);
    box-shadow: 0 -12px 40px rgba(0,0,0,0.35);
}
@media (min-width: 769px) {
    .player.has-song {
        height: calc(var(--player-height) + var(--safe-bottom));
        padding-bottom: var(--safe-bottom);
    }
}
[data-theme="light"] .player {
    background: rgba(255, 255, 255, 0.78);
}
.player-play {
    background: #fff;
    color: #000 !important;
    border-radius: var(--radius-pill);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.btn {
    border-radius: var(--radius-pill);
    min-height: 44px;
}
.btn-sm { min-height: 36px; }
.btn-primary {
    background: var(--accent);
    color: #04140a;
    box-shadow: 0 8px 24px rgba(48, 209, 88, 0.28);
}
.btn-outline {
    background: var(--glass-bg);
    border: 1px solid var(--glass-stroke);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.song-card, .artist-card, .stat-card, .form-card, .plan-card, .approval-card {
    background: var(--bg-card);
    border: 1px solid var(--hairline);
    box-shadow: var(--shadow-sm);
}
.modal-overlay {
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.modal, .auth-modal {
    background: rgba(28, 28, 30, 0.88);
    border: 1px solid var(--glass-stroke);
    box-shadow: var(--shadow-lg);
}
.form-input, .form-card input, .form-card textarea, .form-card select,
.search-bar-big input, .topbar-search {
    background: rgba(118, 118, 128, 0.18) !important;
    border: 1px solid transparent !important;
    border-radius: var(--radius-md) !important;
}
.form-input:focus, .form-card input:focus, .search-bar-big input:focus, .topbar-search:focus-within {
    border-color: rgba(48, 209, 88, 0.55) !important;
    background: rgba(118, 118, 128, 0.28) !important;
}
.nav-item {
    border-radius: var(--radius-md);
    min-height: 44px;
}
.nav-item.active {
    background: rgba(48, 209, 88, 0.14);
    color: var(--accent);
}
.tab-btn, .category-chip, .owner-tab {
    border-radius: var(--radius-pill);
    min-height: 36px;
}

/* Mobile tab bar — docked at bottom; player floats above only when playing */
.mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 520;
    height: calc(var(--tabbar-height) + var(--safe-bottom));
    padding: 4px 6px max(4px, var(--safe-bottom));
    display: none;
    align-items: stretch;
    justify-content: space-between;
    gap: 2px;
    border-radius: 0;
    background: rgba(18, 18, 20, 0.88);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: saturate(200%) blur(40px);
    -webkit-backdrop-filter: saturate(200%) blur(40px);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
}
.mobile-tab {
    flex: 1;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    transition: var(--transition);
    min-width: 0;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}
.mobile-tab i { font-size: 1.15rem; line-height: 1; display: block; }
.mobile-tab span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 2px;
    line-height: 1.1;
}
.mobile-tab.active {
    color: var(--accent);
    background: rgba(48, 209, 88, 0.12);
}
[data-theme="light"] .mobile-tabbar {
    background: rgba(255, 255, 255, 0.92);
    border-top-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
}

/* Hide empty player by default; show when .has-song */
.player:not(.has-song) {
    visibility: hidden;
    pointer-events: none;
}
body:not(.has-player) .app-container {
    grid-template-rows: 1fr;
}
body:not(.has-player) .player {
    position: absolute;
    height: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
}

@media (max-width: 768px) {
    .mobile-tabbar { display: flex; }
    .app-container {
        grid-template-rows: 1fr;
    }
    .main-content {
        background: var(--bg-primary);
        grid-row: 1;
    }
    .page-content {
        padding-bottom: calc(var(--tabbar-height) + var(--safe-bottom) + 24px) !important;
    }
    body.has-player .page-content {
        padding-bottom: calc(var(--player-height) + var(--tabbar-height) + var(--safe-bottom) + 24px) !important;
    }
    /* Player sits above tabbar only while a song is loaded */
    .player {
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(var(--tabbar-height) + var(--safe-bottom));
        height: var(--player-height);
        padding-bottom: 0;
        z-index: 515;
        grid-column: auto;
        visibility: hidden;
        opacity: 0;
        transform: translateY(12px);
        pointer-events: none;
        transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
        backdrop-filter: saturate(180%) blur(32px);
        -webkit-backdrop-filter: saturate(180%) blur(32px);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        border-top: 1px solid var(--glass-stroke);
        box-shadow: 0 -8px 28px rgba(0,0,0,0.35);
    }
    .player.has-song {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    .side-panel {
        bottom: calc(var(--tabbar-height) + var(--safe-bottom));
    }
    body.has-player .side-panel {
        bottom: calc(var(--player-height) + var(--tabbar-height) + var(--safe-bottom));
    }
}

/* Landscape phones */
@media (max-height: 480px) and (orientation: landscape) {
    .mobile-tabbar { display: none !important; }
    .home-hero { min-height: 160px; }
    .page-content { padding-bottom: calc(var(--safe-bottom) + 16px) !important; }
    body.has-player .page-content { padding-bottom: calc(var(--player-height) + var(--safe-bottom) + 16px) !important; }
    .player {
        bottom: 0;
        border-radius: 0;
    }
}

/* Large tablets */
@media (min-width: 1025px) and (max-width: 1280px) {
    :root { --sidebar-width: 240px; }
    .card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* Very large desktops */
@media (min-width: 1440px) {
    .page-content { max-width: 1280px; margin-inline: auto; width: 100%; }
}
.card-grid { gap: 18px; }
.song-card { border-radius: var(--radius-lg); }
.btn-primary {
    background: var(--accent);
    color: #04140a;
    font-weight: 800;
}
.btn-primary:hover { background: var(--accent-hover); }
.form-input {
    background: var(--bg-secondary);
}
:root { --primary: var(--accent); }

/* Page layouts that the menus actually render */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}
.stat-card { height: auto; }
.tab-btn {
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    background: var(--bg-hover);
    color: var(--text-secondary);
    font-weight: 650;
    font-size: 0.82rem;
    cursor: pointer;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { background: var(--accent); color: #04140a; }
#ownerContent { overflow-x: auto; }
.data-table { min-width: 640px; background: var(--bg-card); border-radius: 12px; overflow: hidden; }
.song-row-cover {
    width: 48px; height: 48px; border-radius: 6px; overflow: hidden;
    flex-shrink: 0; background: var(--bg-hover); position: relative;
}
.song-row-cover img,
.song-row-item .song-row-img {
    width: 48px; height: 48px; object-fit: cover; display: block; position: static;
}
.song-row-item { background: transparent; }
.song-row-item .song-card-img {
    width: 48px; height: 48px; padding-bottom: 0; margin: 0; flex-shrink: 0;
}
.card-grid .artist-card > img {
    width: 112px; height: 112px; border-radius: 50%; object-fit: cover;
    margin: 0 auto 12px; display: block; background: var(--bg-hover);
}
.notification-item {
    display: flex; gap: 12px; padding: 14px 16px; margin-bottom: 8px;
    border-radius: 12px; background: var(--bg-card);
}
.notification-item.unread { box-shadow: inset 3px 0 0 var(--accent); }
.detail-header.profile-header {
    flex-direction: row; align-items: center; gap: 24px;
}
.detail-avatar-placeholder {
    width: 128px; height: 128px; border-radius: 50%; overflow: hidden;
    background: var(--bg-hover); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.detail-avatar-placeholder img { width: 100%; height: 100%; object-fit: cover; }
.user-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.user-action { border: none; background: transparent; cursor: pointer; }
.profile-edit-preview {
    width: 84px; height: 84px; border-radius: 50%; overflow: hidden;
    background: var(--bg-hover); display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px; font-size: 1.6rem; color: var(--text-muted);
}
.profile-edit-preview img { width: 100%; height: 100%; object-fit: cover; }
.page-content .card-grid,
.page-content .song-row-item { margin-bottom: 4px; }
.page-content .section-header + .card-grid { margin-bottom: 28px; }
@media (max-width: 720px) {
    .detail-header.profile-header { flex-direction: column; align-items: flex-start; }
    .song-row-plays { display: none; }
    .stat-cards { grid-template-columns: 1fr 1fr; }
}

.artist-hero {
    position: relative; min-height: 280px; margin: 0 0 24px;
    border-radius: var(--radius-xl); overflow: hidden;
    background: linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.75)), var(--hero-img) center/cover no-repeat, #111;
    display: flex; align-items: flex-end;
}
.artist-hero-content {
    position: relative; z-index: 1; display: flex; gap: 20px; align-items: flex-end;
    padding: 24px; width: 100%;
}
.artist-hero .detail-avatar {
    width: 140px; height: 140px; border-radius: 50%; object-fit: cover;
    box-shadow: var(--shadow-lg); flex-shrink: 0; background: var(--bg-hover);
}
.profile-banner-wrap {
    position: relative; min-height: 240px; margin: 0 0 24px;
    border-radius: var(--radius-xl); overflow: hidden;
    background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.78)), var(--banner) center/cover no-repeat,
                linear-gradient(135deg, #1a1a1a, #0d1f14);
    display: flex; align-items: flex-end;
}
.profile-banner-wrap.no-banner {
    background: linear-gradient(135deg, #171717 0%, #0d1f14 55%, #101010 100%);
}
.profile-banner-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.55)); }
.profile-banner-body {
    position: relative; z-index: 1; display: flex; gap: 18px; align-items: flex-end;
    padding: 24px; width: 100%;
}
.profile-handle { color: var(--text-secondary); margin: 2px 0 8px; }
.profile-stats { color: var(--text-secondary); font-size: 0.9rem; }
.checkbox-row {
    display: flex; align-items: center; gap: 8px; margin: 12px 0 18px;
    color: var(--text-secondary); font-size: 0.9rem; cursor: pointer;
}
.upload-status { margin-top: 10px; color: var(--accent); font-size: 0.85rem; }
.profile-edit-modal { max-width: 440px; max-height: 90vh; overflow-y: auto; }
@media (max-width: 700px) {
    .artist-hero-content, .profile-banner-body { flex-direction: column; align-items: flex-start; }
    .artist-hero .detail-avatar { width: 96px; height: 96px; }
}

.owner-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.owner-stats .stat-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(48,209,88,0.14); color: var(--accent); margin-bottom: 8px;
}
.owner-quick-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px;
}
.owner-two-col {
    display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
.owner-two-col h3, .owner-quick h3 {
    font-size: 1rem; margin-bottom: 10px; color: var(--text-secondary);
}
.owner-inline-form {
    display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 10px; align-items: end;
    margin-bottom: 16px;
}
.owner-inline-form .form-group { margin: 0; }
.approval-card.compact { padding: 10px 12px; margin-bottom: 8px; }
@media (max-width: 900px) {
    .owner-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .owner-two-col, .owner-inline-form, .owner-quick-grid { grid-template-columns: 1fr; }
}
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Expanded now playing — hero + content panels (positioned via JS) */
.now-playing {
    position: fixed;
    top: 80px;
    left: 240px;
    right: 16px;
    bottom: 24px;
    z-index: 950;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    background: #121216;
    border: 1px solid var(--glass-stroke);
    border-radius: 24px;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(0,0,0,0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(22px) scale(0.975);
    transition: opacity .32s ease, transform .42s cubic-bezier(.22,.8,.28,1), visibility .42s;
}
.now-playing.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
}
[data-theme="light"] .now-playing {
    background: #f2f2f5;
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}
[data-theme="light"] .np-side {
    background: rgba(255,255,255,0.72);
}
[data-theme="light"] .np-tabs { background: rgba(0,0,0,0.05); }
[data-theme="light"] .np-tab.active { background: #fff; }
@media (prefers-reduced-motion: reduce) {
    .now-playing { transition: none; transform: none; }
}
.np-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity .35s ease;
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(var(--np-tint, 30, 86, 245), 0.55), transparent 62%),
        linear-gradient(180deg, rgba(var(--np-tint, 30, 86, 245), 0.28), rgba(8, 10, 16, 0.92) 70%);
}
.now-playing.has-tint .np-bg { opacity: 1; }
.now-playing .np-stage {
    position: relative;
    z-index: 1;
    transition: transform 0.18s ease-out;
}
.np-stage {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
}
.np-topbar {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 0;
}
.np-close {
    width: 38px; height: 38px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.08); color: var(--text);
    border: 1px solid var(--hairline);
}
.np-now-label {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.np-now-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.np-now-label strong {
    font-size: 0.92rem;
    font-weight: 750;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.np-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
}
.np-tab {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.np-tab:hover { color: var(--text); }
.np-tab.active {
    color: var(--text);
    background: rgba(255,255,255,0.12);
}
.np-body {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(320px, 1.2fr) minmax(260px, 0.8fr);
    gap: 0;
}
.np-hero {
    min-height: 0;
    overflow-y: auto;
    padding: 12px 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.np-cover-wrap {
    width: min(72%, 340px);
    aspect-ratio: 1;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 22px 48px rgba(0,0,0,0.4);
    flex-shrink: 0;
    touch-action: pan-y;
    user-select: none;
}
.np-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.np-meta {
    width: 100%;
    max-width: 360px;
    text-align: center;
}
.np-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.25;
}
.np-artist {
    color: var(--text-muted);
    margin-top: 4px;
    font-size: 0.92rem;
}
.np-progress {
    width: 100%;
    max-width: 360px;
    height: 22px;
    position: relative;
    display: flex;
    align-items: center;
    direction: ltr;
    touch-action: none;
    cursor: pointer;
}
.np-progress::before {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 4px;
    background: rgba(255,255,255,0.16);
    border-radius: 4px;
}
.np-progress-fill {
    height: 4px;
    width: 0;
    background: var(--brand);
    border-radius: 4px;
    position: relative;
    z-index: 1;
}
.np-progress-fill::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
}
.np-times {
    width: 100%;
    max-width: 360px;
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.75rem;
    direction: ltr;
    font-variant-numeric: tabular-nums;
}
.np-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    direction: ltr;
    margin-top: 4px;
}
.np-controls .player-btn { color: var(--text); width: 48px; height: 48px; }
.np-controls .player-play {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    min-height: 64px !important;
    font-size: 1.2rem;
}
.np-toolbar {
    width: 100%;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 2px;
}
.np-toolbar .player-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    color: var(--text-muted);
    background: transparent;
    border: 0;
}
.np-volume {
    flex: 1 1 auto;
    min-width: 72px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-inline-start: 6px;
    color: var(--text-muted);
    direction: ltr;
}
.np-volume input {
    flex: 1;
    width: 100%;
    direction: ltr;
    accent-color: var(--brand);
    height: 4px;
}
.np-side {
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 14px;
    margin-inline-start: 0;
    border-radius: 20px;
    background: rgba(255,255,255,0.035);
    border: 1px solid var(--hairline);
}
.np-pane {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 14px 16px;
    display: none;
    flex-direction: column;
    gap: 10px;
}
.np-pane.active { display: flex; }
.np-pane-head h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
}
.np-pane-head p {
    margin: 6px 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
}
.np-pane-empty {
    margin: 0;
    padding: 18px 8px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.5;
}
.np-pane-empty[hidden] { display: none !important; }
.np-suggest {
    display: grid;
    gap: 8px;
}
.np-suggest-skel {
    height: 58px;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08), rgba(255,255,255,0.04));
    background-size: 200% 100%;
    animation: npSkel 1.4s ease-in-out infinite;
}
@keyframes npSkel {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
.np-lyrics-text {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text);
    white-space: pre-wrap;
}
.np-queue-preview {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.np-row {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--text);
    text-align: start;
    cursor: pointer;
}
.np-row:hover { background: rgba(255,255,255,0.05); }
.np-row.active {
    background: rgba(30, 86, 245, 0.16);
}
.np-row img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}
.np-row-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.np-row-meta strong,
.np-row-meta small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.np-row-meta strong { font-size: 0.9rem; font-weight: 700; }
.np-row-meta small { font-size: 0.75rem; color: var(--text-muted); }
.np-row-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    direction: ltr;
}
.np-queue-open {
    align-self: stretch;
    margin-top: 4px;
}
@media (max-width: 980px) {
    .np-body { grid-template-columns: 1fr; }
    .np-hero {
        padding: 8px 16px 12px;
        justify-content: flex-start;
    }
    .np-cover-wrap { width: min(42vw, 220px); }
    .np-side {
        min-height: 200px;
        margin: 0 12px 12px;
    }
}
@media (max-width: 768px) {
    .now-playing {
        top: 64px;
        left: 10px;
        right: 10px;
        bottom: 88px;
        border-radius: 22px;
    }
    .np-topbar {
        grid-template-columns: auto 1fr;
        padding: 10px 10px 0;
        gap: 8px;
    }
    .np-now-label { display: none; }
    .np-tabs { justify-self: end; }
    .np-tab { padding: 0 12px; }
    .np-body {
        grid-template-rows: auto minmax(160px, 1fr);
        overflow: hidden;
    }
    .np-hero {
        padding: 8px 14px 10px;
        gap: 6px;
    }
    .np-cover-wrap { width: min(42vw, 168px); border-radius: 16px; }
    .np-title { font-size: 1.05rem; }
    .np-controls { gap: 12px; }
    .np-controls .player-play {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        min-height: 52px !important;
    }
    .np-toolbar .np-volume { display: none; }
    .np-side { margin: 0 10px 10px; min-height: 0; }
    .np-pane { padding: 12px; }
}

/* ============ ICON BUTTON LAW (centered glyphs) ============ */
:root { --icon-btn: 40px; }
.menu-toggle,
.topbar-btn,
.topbar-search-icon,
.user-action,
.player-btn,
.btn-icon,
.sidebar-close,
.mini-player-close,
.modal-header .btn-icon {
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    width: var(--icon-btn);
    height: var(--icon-btn);
    min-width: var(--icon-btn);
    min-height: var(--icon-btn);
    padding: 0 !important;
    margin: 0;
    border-radius: 50%;
    line-height: 1;
    flex-shrink: 0;
}
.topbar-btn,
.user-action,
.player-btn,
.btn-icon,
.mini-player-close {
    display: inline-flex;
}
/* menu-toggle / search-icon visibility controlled by responsive rules */
.menu-toggle i,
.topbar-btn i,
.topbar-search-icon i,
.user-action i,
.player-btn i,
.btn-icon i,
.sidebar-close i,
.mini-player-close i,
.modal-header .btn-icon i {
    display: block;
    line-height: 1;
    width: 1em;
    height: 1em;
    text-align: center;
    margin: 0;
    font-size: 0.95rem;
}
.player-play {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
}
.player-play i { font-size: 0.9rem; }
.lang-toggle {
    width: auto !important;
    min-width: var(--icon-btn);
    padding: 0 12px !important;
    border-radius: var(--radius-pill) !important;
}
.topbar-premium-btn {
    width: auto !important;
    min-width: 0 !important;
    height: 40px;
    padding: 0 14px !important;
    border-radius: 999px !important;
}
.sidebar-header {
    gap: 12px;
}
.sidebar-header .logo {
    min-width: 0;
}

/* ============ PAGE HERO / LIBRARY / INFO (V15) ============ */
.page-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 4px 24px;
    margin-bottom: 8px;
}
.page-hero-icon {
    width: 64px; height: 64px; border-radius: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(145deg, rgba(48,209,88,0.28), rgba(48,209,88,0.08));
    color: var(--accent); font-size: 1.45rem; flex-shrink: 0;
    border: 1px solid rgba(48,209,88,0.22);
}
.page-hero-icon.liked { background: linear-gradient(145deg, rgba(255,69,58,0.28), rgba(255,69,58,0.08)); color: #ff453a; border-color: rgba(255,69,58,0.22); }
.page-hero-icon.about-hero-logo { padding: 0; overflow: hidden; background: var(--bg-elevated); }
.page-hero-icon.about-hero-logo img { width: 100%; height: 100%; object-fit: cover; }
.page-hero h1 { font-size: clamp(1.35rem, 3vw, 1.85rem); margin: 0 0 4px; font-weight: 800; letter-spacing: -0.02em; }
.page-hero p { margin: 0; color: var(--text-secondary); font-size: 0.92rem; }
.page-hero-eyebrow { margin: 0 0 2px !important; font-size: 0.75rem !important; color: var(--accent) !important; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.glass-empty { padding: 48px 20px; text-align: center; color: var(--text-muted); background: rgba(118,118,128,0.08); border-radius: var(--radius-xl); border: 1px solid var(--hairline); }
.info-card {
    background: rgba(118,118,128,0.1);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-xl);
    padding: 22px;
    max-width: 560px;
}
.info-card-desc { color: var(--text-secondary); margin: 0 0 16px; }
.about-card { max-width: 640px; }
.about-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.about-meta span {
    padding: 6px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
    background: rgba(118,118,128,0.16); color: var(--text-secondary);
}
.about-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .form-row-2 { grid-template-columns: 1fr; } }
.profile-edit-head { align-items: flex-start; }
.artist-grid .artist-card {
    text-align: center; padding: 16px 12px; border-radius: var(--radius-xl);
    background: rgba(118,118,128,0.08); border: 1px solid transparent;
    cursor: pointer; transition: var(--transition);
}
.artist-grid .artist-card:hover { border-color: var(--hairline); background: rgba(118,118,128,0.14); transform: translateY(-2px); }
.artist-grid .artist-card img {
    width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; display: block;
}

/* ============ SMART UPLOAD ============ */
.up-note {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    margin-bottom: 16px;
    border-radius: 18px;
    border: 1px solid rgba(30, 86, 245, 0.28);
    background: rgba(30, 86, 245, 0.1);
}
.up-note-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 86, 245, 0.18);
    color: var(--brand-soft);
    flex-shrink: 0;
}
.up-note strong { display: block; margin-bottom: 4px; }
.up-note p { margin: 0; color: var(--text-muted); font-size: 0.88rem; line-height: 1.5; }
.up-layout {
    display: grid;
    gap: 16px;
}
.up-card {
    border: 1px solid var(--glass-stroke);
    background: var(--glass-bg-strong);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-radius: 22px;
    padding: 18px 18px 20px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}
.up-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.up-card-head h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
}
.up-card-head p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 0.86rem;
}
.up-badge {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    background: rgba(30, 86, 245, 0.16);
    color: var(--brand-soft);
    flex-shrink: 0;
}
.up-batch-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 720px) {
    .up-batch-grid { grid-template-columns: 1fr; }
}
/* ---- Spotify import card (spotDL) ---- */
.up-card-spotify { border-color: rgba(29, 185, 84, 0.32); }
.up-card-spotify .up-card-head h2 i { color: #1DB954; margin-inline-end: 4px; }
.up-badge-spotify {
    background: rgba(29, 185, 84, 0.16);
    color: #1DB954;
    font-size: 1.05rem;
}
.up-spotify-live {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 0;
    color: #1DB954;
    font-size: 0.9rem;
}
.up-spotify-results { margin-top: 6px; }
.up-spotify-list-title {
    font-size: 0.78rem;
    font-weight: 750;
    color: var(--text-muted);
    margin: 10px 0 6px;
}
.up-spotify-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    margin-bottom: 6px;
    font-size: 0.88rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--hairline);
}
.up-spotify-row.ok i { color: #1DB954; }
.up-spotify-row.fail i { color: #e5484d; }
.up-spotify-title { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-spotify-artist { color: var(--text-muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-spotify-cover {
    font-style: normal;
    font-size: 0.72rem;
    color: #1DB954;
    background: rgba(29, 185, 84, 0.12);
    padding: 3px 8px;
    border-radius: 999px;
    flex-shrink: 0;
}
.up-spotify-extra { color: var(--text-muted); font-size: 0.8rem; margin: 6px 0 0; }
.up-spotify-log {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(229, 72, 77, 0.08);
    border: 1px solid rgba(229, 72, 77, 0.25);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font-mono, monospace);
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
}
[data-theme="light"] .up-spotify-row { background: rgba(0,0,0,0.03); }
.up-import-urls {
    min-height: 110px;
    resize: vertical;
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 0.86rem;
    line-height: 1.45;
}
.up-import-hint {
    margin: 6px 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.up-import-playlist {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0 8px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(29, 185, 84, 0.35);
    background: rgba(29, 185, 84, 0.1);
}
.up-import-playlist > i {
    font-size: 1.2rem;
    color: #1DB954;
    flex-shrink: 0;
}
.up-import-playlist div { flex: 1; min-width: 0; }
.up-import-playlist strong { display: block; font-size: 0.92rem; }
.up-import-playlist span {
    display: block;
    color: var(--text-muted);
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.up-import-playlist .btn { flex-shrink: 0; margin: 0; }

/* ---- Owner V2Ray (Xray) cards — TeleLive-style ---- */
.tmx-wrap { display: flex; flex-direction: column; gap: 14px; }
.tmx-hero {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(74, 222, 128, 0.25);
    background: rgba(74, 222, 128, 0.08);
}
.tmx-hero-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 222, 128, 0.16);
    color: #4ade80;
    flex-shrink: 0;
    font-size: 1.15rem;
}
.tmx-hero h2 { margin: 0; font-size: 1.1rem; font-weight: 800; }
.tmx-hero p { margin: 3px 0 0; color: var(--text-muted); font-size: 0.84rem; }
.tmx-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
}
.tmx-card {
    border: 1px solid var(--glass-stroke);
    background: var(--glass-bg-strong);
    border-radius: 18px;
    padding: 16px;
}
.tmx-card-title { font-weight: 800; font-size: 0.95rem; margin-bottom: 10px; }
.tmx-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tmx-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 999px;
}
.tmx-pill.ok { background: rgba(74, 222, 128, 0.14); color: #4ade80; }
.tmx-pill.off { background: rgba(229, 72, 77, 0.12); color: #e5484d; }
.tmx-hint { margin: 10px 0 0; font-size: 0.8rem; color: var(--text-muted); line-height: 1.6; }
.tmx-url {
    margin-top: 10px;
    font-size: 0.75rem;
    font-family: var(--font-mono, monospace);
    color: var(--text-muted);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    padding: 8px 10px;
    word-break: break-all;
}
.tmx-textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 140px;
    resize: vertical;
    font-family: var(--font-mono, monospace);
    font-size: 0.76rem;
    line-height: 1.5;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--hairline);
    background: rgba(255,255,255,0.04);
    color: var(--text);
}
.tmx-textarea:focus { outline: 1px solid var(--brand); }
.tmx-apply-btn { margin-top: 10px; width: 100%; justify-content: center; }
.tmx-status {
    font-size: 0.8rem;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--hairline);
    color: var(--text-muted);
    min-height: 36px;
}
.tmx-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tmx-result {
    margin-top: 12px;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    padding: 12px;
    font-size: 0.72rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    direction: ltr;
    text-align: left;
    max-height: 320px;
    overflow: auto;
}
[data-theme="light"] .tmx-card { background: rgba(0,0,0,0.02); }
[data-theme="light"] .tmx-textarea,
[data-theme="light"] .tmx-url,
[data-theme="light"] .tmx-status { background: rgba(0,0,0,0.03); }
.up-file-list-wrap {
    margin: 4px 0 14px;
    border: 1px solid var(--hairline);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
}
.up-file-list-title {
    padding: 10px 12px;
    font-size: 0.78rem;
    font-weight: 750;
    color: var(--text-muted);
    border-bottom: 1px solid var(--hairline);
}
.up-file-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 6px;
}
.up-file-row {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 12px;
}
.up-file-row:hover { background: rgba(255,255,255,0.04); }
.up-file-idx {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    background: rgba(255,255,255,0.06);
    color: var(--text-muted);
}
.up-file-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.86rem;
    font-weight: 650;
}
.up-file-size {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    direction: ltr;
}
.up-empty {
    margin: 0;
    padding: 18px 10px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.84rem;
}
.up-progress {
    margin: 8px 0 14px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--hairline);
    background: rgba(255,255,255,0.04);
}
.up-progress[hidden] { display: none !important; }
.up-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.86rem;
}
.up-progress-top span {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    color: var(--brand-soft);
}
.up-progress-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}
.up-progress-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), #5b8cff);
    transition: width .12s linear;
}
.up-progress-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.up-progress-meta b {
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.up-progress .btn { margin-top: 10px; }
.upload-status {
    margin-top: 10px;
    font-size: 0.86rem;
    color: var(--text-muted);
}
.upload-smart-card {
    background: rgba(118,118,128,0.1);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-xl);
    padding: 20px;
    margin-bottom: 20px;
}
.upload-smart-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 720px) {
    .upload-smart-grid { grid-template-columns: 1fr; justify-items: center; }
    .upload-fields { width: 100%; }
}
.upload-cover-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.upload-cover-preview {
    width: 168px; height: 168px; border-radius: 16px; object-fit: cover;
    background: var(--bg-elevated); border: 1px solid var(--hairline);
    box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}
.upload-cover-preview.has-art { border-color: rgba(48,209,88,0.45); }
.upload-meta-hint { font-size: 0.85rem; color: var(--text-muted); margin: -4px 0 12px; }
.upload-batch-details { margin-top: 8px; color: var(--text-secondary); }
.upload-batch-details summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
[data-theme="light"] .up-card {
    background: rgba(255,255,255,0.88);
    box-shadow: 0 10px 28px rgba(0,0,0,0.08);
}
[data-theme="light"] .up-note {
    background: rgba(30, 86, 245, 0.08);
}

/* ============ FILE PICKERS + FORM FIELDS ============ */
.field-label,
.upload-fields .form-group > label,
.upload-smart-card .form-group > label,
.profile-edit-form .form-label,
.form-card .form-group > label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.upload-fields .form-group,
.upload-smart-card .form-group,
.up-card .form-group { margin-bottom: 14px; }
.upload-fields .form-input,
.upload-smart-card .form-input,
.upload-smart-card select.form-input,
.up-card .form-input,
.up-card select.form-input {
    width: 100%;
    display: block;
    min-height: 46px;
    padding: 12px 14px;
    box-sizing: border-box;
}
.tm-file {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 6px;
    border-radius: 14px;
    background: rgba(118, 118, 128, 0.18);
    border: 1px solid transparent;
    cursor: pointer;
    box-sizing: border-box;
}
.tm-file:hover { background: rgba(118, 118, 128, 0.28); }
.tm-file input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}
.tm-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    background: #f5f5f7;
    color: #111;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 0.82rem;
    pointer-events: none;
}
.tm-file-name {
    color: var(--text-secondary);
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    pointer-events: none;
}
input[type="file"]:not(.tm-file input) {
    color: var(--text-secondary);
}
input[type="file"]::file-selector-button {
    margin-inline-end: 10px;
    border: none;
    border-radius: 10px;
    background: #f5f5f7;
    color: #111;
    font-weight: 700;
    padding: 8px 12px;
    cursor: pointer;
}
.player-like.liked { color: #ff453a !important; }
.player-like.liked i { color: #ff453a; }

.sheet-song-preview {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 0 16px; border-bottom: 1px solid var(--hairline); margin-bottom: 8px;
}
.sheet-song-preview img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.sheet-song-preview strong { display: block; font-size: 0.95rem; }
.sheet-song-preview small { color: var(--text-muted); font-size: 0.8rem; }
.sheet-action-list { display: flex; flex-direction: column; gap: 2px; }
.sheet-action {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 14px 10px; border: none; border-radius: 12px;
    background: transparent; color: var(--text-primary); text-align: start;
    font-size: 0.95rem; font-weight: 600; cursor: pointer;
}
.sheet-action i { width: 1.2em; color: var(--accent); text-align: center; }
.sheet-action:hover { background: rgba(118,118,128,0.14); }
.sheet-form .form-group { margin-bottom: 14px; }
.sheet-form .form-input { width: 100%; min-height: 46px; }

/* ============ PLAYER SHEET ============ */
.player-sheet {
    position: fixed; inset: 0; z-index: 2200;
    pointer-events: none; opacity: 0; transition: opacity 0.2s ease;
}
.player-sheet.open { pointer-events: auto; opacity: 1; }
.player-sheet-backdrop {
    position: absolute; inset: 0; background: rgba(0,0,0,0.55);
}
.player-sheet-panel {
    position: absolute; left: 0; right: 0; bottom: 0;
    max-height: min(78vh, 640px);
    background: rgba(22,22,24,0.96);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-radius: 22px 22px 0 0;
    border: 1px solid var(--hairline);
    border-bottom: none;
    display: flex; flex-direction: column;
    transform: translateY(110%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    padding-bottom: calc(12px + var(--safe-bottom));
}
.player-sheet.open .player-sheet-panel { transform: translateY(0); }
.player-sheet-handle {
    width: 40px; height: 4px; border-radius: 4px;
    background: rgba(255,255,255,0.22); margin: 10px auto 4px;
}
.player-sheet-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 16px 12px; gap: 12px;
}
.player-sheet-header h3 {
    margin: 0; font-size: 1.05rem; font-weight: 800;
    display: flex; align-items: center; gap: 8px;
}
.player-sheet-header h3 i { color: var(--accent); }
.player-sheet-body {
    overflow-y: auto; padding: 4px 16px 16px; -webkit-overflow-scrolling: touch;
}
.sheet-chip-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin-bottom: 14px;
}
.sheet-chip {
    border: 1px solid var(--hairline); background: rgba(118,118,128,0.14);
    color: var(--text-primary); border-radius: 12px; padding: 14px 8px;
    font-weight: 700; cursor: pointer; transition: var(--transition);
}
.sheet-chip:hover { border-color: rgba(48,209,88,0.5); background: rgba(48,209,88,0.12); }
.sheet-song-list { display: flex; flex-direction: column; gap: 4px; }
.sheet-song-row {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 10px; border: none; border-radius: 12px;
    background: transparent; color: inherit; text-align: start; cursor: pointer;
}
.sheet-song-row:hover { background: rgba(118,118,128,0.14); }
.sheet-song-row img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.sheet-song-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sheet-song-meta strong { font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-song-meta small { color: var(--text-muted); font-size: 0.78rem; }
.lyrics-sheet-body .lyrics-content {
    text-align: center; font-size: 1.05rem; line-height: 1.9; color: var(--text-secondary);
}
.lyrics-song-label {
    text-align: center; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 16px;
}
.settings-section { margin-bottom: 18px; }
.settings-section h4 { margin: 0 0 10px; font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.setting-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid var(--hairline);
}
.setting-row:last-child { border-bottom: none; }

/* Topbar: don't let brand steal taps from menu/search */
.topbar-brand { pointer-events: auto; position: relative; z-index: 1; }
.topbar-start, .topbar-actions { position: relative; z-index: 5; }
.menu-toggle { position: relative; z-index: 6; cursor: pointer; }

@media (min-width: 900px) {
    .player-sheet-panel {
        left: 50%; right: auto; bottom: calc(var(--player-height) + 16px);
        width: min(420px, calc(100vw - 32px));
        transform: translate(-50%, 24px);
        border-radius: 20px;
        border-bottom: 1px solid var(--hairline);
        max-height: min(70vh, 560px);
        opacity: 0;
    }
    .player-sheet.open .player-sheet-panel {
        transform: translate(-50%, 0);
        opacity: 1;
    }
    .player-sheet-handle { display: none; }
}

/* ============ TeleLive Design System adaptation — home + player ============ */
.page-content { line-height: 1.55; }
/* Home top-plays banner slideshow */
.ed-banner {
    position: relative;
    margin: 0 0 22px;
}
.ed-banner-track { position: relative; }
.ed-banner-slide { margin: 0; }
.ed-banner-slide[hidden] { display: none !important; }
.ed-banner-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}
.ed-banner-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--hairline);
    background: rgba(255,255,255,0.06);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.ed-banner-btn:hover { background: rgba(255,255,255,0.12); }
.ed-banner-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    max-width: min(100%, 420px);
}
.ed-banner-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    border: 0;
    padding: 0;
    background: rgba(255,255,255,0.28);
    cursor: pointer;
}
.ed-banner-dot.is-active {
    width: 18px;
    background: var(--brand, #1e56f5);
}
/* Home spotlight (TeleLive / Apple Music / Spotify style) */
.ed-spot {
    position: relative;
    isolation: isolate;
    width: 100%;
    overflow: hidden;
    min-height: 280px;
    height: clamp(280px, 42vw, 420px);
    margin: 0 0 22px;
    border-radius: 20px;
    background: #07080d;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 24px 48px rgba(0, 0, 0, 0.55);
}
.ed-banner .ed-spot { margin-bottom: 0; }
.ed-spot-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.ed-spot-pic {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.03);
    transition: transform 8s ease-out;
}
.ed-spot:hover .ed-spot-pic { transform: scale(1.07); }
.ed-spot-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(5, 6, 12, 0.55) 0%, rgba(5, 6, 12, 0.08) 38%, rgba(5, 6, 12, 0.05) 52%, rgba(5, 6, 12, 0.9) 100%),
        linear-gradient(90deg, rgba(5, 6, 12, 0.45) 0%, transparent 58%);
}
html[dir="rtl"] .ed-spot-shade {
    background:
        linear-gradient(180deg, rgba(5, 6, 12, 0.55) 0%, rgba(5, 6, 12, 0.08) 38%, rgba(5, 6, 12, 0.05) 52%, rgba(5, 6, 12, 0.9) 100%),
        linear-gradient(270deg, rgba(5, 6, 12, 0.45) 0%, transparent 58%);
}
.ed-spot-inner {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 16px;
    padding: clamp(18px, 3.2vw, 28px);
    box-sizing: border-box;
}
.ed-spot-copy { max-width: min(36rem, 100%); }
.ed-spot-title {
    margin: 0 0 6px;
    color: #fff;
    font-size: clamp(1.55rem, 4.2vw, 2.55rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.12;
    text-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ed-spot-eyebrow {
    margin: 0 0 6px;
    color: rgba(255,255,255,0.78);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.section-header-new {
    align-items: flex-end;
    margin-top: 6px;
}
.section-header-new .section-sub {
    margin: 2px 0 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.section-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(30,86,245,0.16);
    color: var(--brand-soft);
    font-size: 0.72rem;
    font-weight: 800;
}
.ed-spot-artist {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ed-spot-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ed-spot-play {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #0b1020;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    transition: transform .18s ease, background .18s ease;
}
.ed-spot-play i { font-size: 0.85rem; }
.ed-spot-play:hover { transform: scale(1.03); background: #f4f6fb; }
.ed-spot-more {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background .18s ease;
}
.ed-spot-more:hover { background: rgba(255, 255, 255, 0.22); }
@media (max-width: 640px) {
    .ed-spot {
        min-height: 220px;
        height: clamp(220px, 58vw, 300px);
        border-radius: 16px;
        margin-bottom: 18px;
    }
    .ed-spot-inner { gap: 12px; padding: 16px; }
    .ed-spot-play { min-height: 44px; padding: 0 18px; font-size: 0.9rem; }
    .ed-spot-more { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    .ed-spot-pic,
    .ed-spot:hover .ed-spot-pic { transform: none; transition: none; }
}
.section-header h2 { font-size: 1.05rem; font-weight: 800; line-height: 1.45; }

.song-card {
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: none;
    transform: none;
    display: flex;
    flex-direction: column;
    height: auto;
    min-width: 0;
}
.song-card:hover,
.song-card:focus-visible {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.10);
    transform: none;
    box-shadow: none;
}
.song-card-img {
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    aspect-ratio: 1 / 1;
    padding-bottom: 0;
    height: auto;
    flex: 0 0 auto;
}
.song-card-img img {
    transform: none;
    object-fit: cover;
    object-position: center;
}
.song-card:hover .song-card-img img { transform: none; }
.song-card-info {
    flex: 0 0 auto;
    min-width: 0;
}
.song-card-img .play-overlay {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    box-shadow: 0 8px 18px rgba(30, 86, 245, 0.35);
}
.song-card-title { font-size: 0.92rem; line-height: 1.45; font-weight: 750; }
.song-card-artist { line-height: 1.4; color: var(--text-muted); }
.song-card.is-playing {
    background: rgba(30, 86, 245, 0.12);
    border-color: rgba(82, 128, 255, 0.35);
}
.ed-playing-mark {
    display: none;
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    width: 14px;
    height: 12px;
}
.song-card.is-playing .ed-playing-mark { display: block; }
.song-card.is-playing .ed-playing-mark::before {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 3px; height: 6px;
    background: var(--brand-soft);
    box-shadow: 5px -4px 0 var(--brand-soft), 10px 2px 0 var(--brand-soft);
    border-radius: 1px;
}
.song-row-item {
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    min-height: 64px;
}
.song-row-item:hover,
.song-row-item:focus-visible {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.10);
}
.song-row-item.is-playing {
    background: rgba(30, 86, 245, 0.12);
    border-color: rgba(82, 128, 255, 0.35);
}
.song-row-item.is-playing .song-row-num {
    color: transparent;
    position: relative;
}
.song-row-item.is-playing .song-row-num::after {
    content: '';
    position: absolute;
    inset-inline-start: 6px;
    top: 50%;
    width: 3px; height: 6px;
    margin-top: -3px;
    background: var(--brand-soft);
    box-shadow: 5px -4px 0 var(--brand-soft), 10px 2px 0 var(--brand-soft);
    border-radius: 1px;
}
.song-row-title, .song-row-artist { line-height: 1.45; }

.player {
    background: var(--glass-bg-strong);
    border-top: 1px solid var(--glass-stroke);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: 0 -8px 24px rgba(0,0,0,0.28);
}
.player-content {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(200px, 1.15fr) minmax(160px, 1fr);
    align-items: center;
    gap: 12px;
}
.player-song-info,
.player-controls,
.player-extra {
    min-width: 0;
    max-width: none;
    flex: unset;
}
.player-controls { justify-content: center; }
.player-extra { justify-content: flex-end; overflow: auto; }
.player .player-play {
    background: var(--brand);
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(30, 86, 245, 0.35);
}
.player .player-play:hover { background: var(--brand-strong); }
.player-progress { background: var(--brand); }
.player-btn.active { color: var(--brand-soft); }
.player-btn:focus-visible,
.song-card:focus-visible,
.song-row-item:focus-visible,
.ed-banner-play:focus-visible,
.ed-banner-more:focus-visible,
.nav-item:focus-visible,
.mobile-tab:focus-visible {
    outline: 2px solid var(--brand-soft);
    outline-offset: 2px;
}
.nav-item.active,
.mobile-tab.active {
    color: #fff;
    background: transparent;
    border-bottom: 2px solid var(--brand);
    border-radius: 0;
}
.btn-primary {
    background: var(--brand);
    color: #fff;
    border: 0;
    box-shadow: none;
    border-radius: var(--radius-sm);
    font-weight: 750;
}
.btn-primary:hover { background: var(--brand-strong); color: #fff; }
.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text);
    border-radius: var(--radius-sm);
}
.form-input, .form-control, textarea.form-input, input.form-input {
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
}
.form-input:focus, .form-control:focus {
    border-color: rgba(82, 128, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(30, 86, 245, 0.15);
}

@media (max-width: 1100px) {
    .player-content { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
    .player-time { display: none; }
    .player-extra { gap: 4px; }
}
@media (max-width: 768px) {
    .ed-banner { min-height: 210px; border-radius: 20px; }
    .ed-banner-body { padding: 18px 16px 16px; max-width: none; }
    .ed-banner-play { width: auto; flex: 0 0 auto; }
    .player {
        border-radius: var(--radius) var(--radius) 0 0;
        box-shadow: 0 -8px 24px rgba(0,0,0,0.35);
    }
    .player-content { display: flex; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mobile-tab.active {
        color: var(--brand-soft);
        background: rgba(30, 86, 245, 0.12);
        border-bottom: 0;
        border-radius: var(--radius-sm);
    }
}
@media (max-width: 390px) {
    .page-content { padding-left: 12px; padding-right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============ TeleLive chrome parity (navbar / drawer / bottom nav) ============ */
.app-container.tm-tl-chrome {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    grid-template-rows: none;
}
.tm-tl-chrome > .navbar { flex: 0 0 auto; }
.tm-tl-chrome > .main-content {
    flex: 1 1 auto;
    min-height: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: transparent;
}
.tm-tl-chrome .page-content {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: 12px;
    background: transparent;
}
.tm-tl-chrome > .player { flex: 0 0 auto; }

/* Navbar — glass capsule (TeleLive-like), brand LEFT / search CENTER / actions RIGHT */
:root {
    --tm-rail-w: 210px;
}
.tm-tl-chrome {
    --tm-chrome-inset: 12px;
    --tm-chrome-gap: 10px;
    --tm-nav-top: 10px;
    --tm-mob-nav-h: 64px;
}
.navbar {
    position: sticky;
    top: 0;
    z-index: 900;
    background: transparent;
    border-bottom: none;
    color: var(--text);
    padding: var(--tm-nav-top) var(--tm-chrome-inset) 0;
}
.navbar-container {
    direction: inherit; /* mirrors with html[dir]: FA brand on right, EN on left */
    max-width: none;
    margin: 0;
    min-height: 56px;
    padding: 6px 12px;
    display: grid;
    grid-template-columns: auto minmax(140px, 1fr) auto;
    align-items: center;
    gap: 12px;
    border-radius: 24px;
    border: 1px solid var(--glass-stroke);
    border-top-color: rgba(255,255,255,0.14);
    background: var(--glass-bg-strong);
    backdrop-filter: blur(22px) saturate(170%);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    box-shadow:
        0 12px 36px rgba(0,0,0,0.32),
        inset 0 1px 0 rgba(255,255,255,0.08);
}
.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-weight: 900;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    justify-self: start;
    min-width: 0;
}
.navbar-brand i { color: var(--brand-soft); }
.navbar-brand .brand-soft { color: var(--brand-soft); }
.navbar-logo-wordmark {
    display: block;
    height: 28px;
    width: auto;
    max-width: min(168px, 42vw);
    object-fit: contain;
}
.navbar-logo-mark {
    display: none;
    height: 30px;
    width: 30px;
    object-fit: contain;
}
@media (max-width: 420px) {
    .navbar-logo-wordmark { display: none; }
    .navbar-logo-mark { display: block; }
}
.mob-drawer-logo {
    display: block;
    height: 26px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}
.tm-boot-mark img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}
.navbar-center {
    min-width: 0;
    justify-self: center;
    width: 100%;
    max-width: 440px;
}
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-self: end;
    min-width: 0;
}
.navbar-links {
    display: none;
    align-items: center;
    gap: 2px;
}
.navbar-links .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.navbar-links .nav-link:hover { color: var(--text); background: var(--bg-hover); }
.navbar-links .nav-link.active {
    color: var(--brand-soft);
    background: rgba(30, 86, 245, 0.14);
}
.tl-navbar-end, .tl-navbar-brand-cluster { display: contents; }

/* Left rail: desktop only (both langs) */
.tm-left-rail { display: none; }
.desk-only { display: none; }
.tm-nav-profile {
    display: none;
    align-items: center;
    gap: 4px;
    margin-inline-start: 4px;
    padding: 2px 4px 2px 2px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--hairline);
    max-width: 260px;
}
.tm-nav-profile-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    padding: 2px 6px 2px 2px;
    min-width: 0;
    border-radius: 999px;
}
.tm-nav-profile-main:hover { background: var(--bg-hover); }
.tm-nav-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-elev-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tm-nav-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tm-nav-profile-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    line-height: 1.15;
    text-align: start;
}
.tm-nav-profile-text strong {
    font-size: 0.82rem;
    font-weight: 800;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tm-nav-profile-text small {
    font-size: 0.68rem;
    color: var(--text-muted);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.search-form {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-elev-2);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 2px 4px 2px 12px;
    min-width: 220px;
}
.search-input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    padding: 8px 6px;
    outline: none;
}
.search-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}
.search-btn:hover { color: var(--text); background: var(--bg-hover); }
.mob-hdr-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    position: relative;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.mob-hdr-btn:hover { background: rgba(255,255,255,0.12); }
.tm-premium-chip {
    color: #fbbf24 !important;
    border-color: rgba(251, 191, 36, 0.45) !important;
    background: rgba(251, 191, 36, 0.10) !important;
}
.mob-hdr-btn .notif-badge {
    position: absolute;
    top: 2px;
    inset-inline-end: 2px;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
.tm-nav-login { border-radius: 999px !important; padding: 8px 14px !important; min-height: 36px !important; }
.mob-menu-btn { display: none; }

/* Drawer */
.mob-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 10100;
    opacity: 0;
    transition: opacity .28s;
}
.mob-drawer-overlay.open { display: block; opacity: 1; }
.mob-drawer {
    display: flex;
    position: fixed;
    top: 0;
    bottom: 0;
    width: min(300px, 82vw);
    z-index: 10110;
    background: rgba(20, 20, 24, 0.72);
    color: var(--text);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    flex-direction: column;
    overflow-y: auto;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
html[dir="rtl"] .mob-drawer {
    left: 0;
    transform: translateX(-105%);
    border-right: 1px solid rgba(255,255,255,0.1);
    border-radius: 0 28px 28px 0; /* rounded free edge like TeleLive */
}
html[dir="ltr"] .mob-drawer {
    right: 0;
    transform: translateX(105%);
    border-left: 1px solid rgba(255,255,255,0.1);
    border-radius: 28px 0 0 28px;
}
.mob-drawer.open,
html[dir="rtl"] .mob-drawer.open,
html[dir="ltr"] .mob-drawer.open {
    transform: translateX(0);
    pointer-events: auto;
}
body.mob-drawer-open { overflow: hidden; }
.mob-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid var(--hairline);
}
.mob-drawer-user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    min-width: 0;
}
.mob-drawer-user strong, .mob-drawer-brand {
    display: block;
    font-weight: 800;
}
.mob-drawer-user small { color: var(--text-muted); font-size: 0.75rem; }
.mob-drawer-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-elev-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mob-drawer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mob-drawer-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-muted);
}
.mob-drawer-close:hover { background: var(--bg-hover); color: var(--text); }
.mob-drawer-body { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.mob-drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 650;
    font-size: 0.92rem;
    background: transparent;
    border: 0;
    text-align: start;
    width: 100%;
}
.mob-drawer-item i { width: 1.15rem; color: var(--text-muted); text-align: center; }
.mob-drawer-item:hover, .mob-drawer-item.active {
    background: rgba(30, 86, 245, 0.12);
}
.mob-drawer-item.active i { color: var(--brand-soft); }
.mob-drawer-divider {
    height: 1px;
    background: var(--hairline);
    margin: 8px 10px;
}
.mob-drawer-controls { padding: 4px 6px 16px; }
.mob-drawer-pills {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 12px 4px;
}
.mob-drawer-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: var(--text);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}
.mob-drawer-pill i:last-child {
    margin-inline-start: auto;
    opacity: 0.55;
    font-size: 0.7rem;
}
.mob-drawer-pill-flag {
    min-width: 28px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(30,86,245,0.2);
    color: var(--brand-soft);
    font-size: 0.68rem;
    font-weight: 800;
}

/* Bottom nav: desktop hidden */
.mob-bottom-nav { display: none; }

@media (min-width: 769px) {
    .mob-menu-btn { display: none !important; }
    .desk-only { display: inline-flex; }
    .tm-nav-profile.desk-only { display: inline-flex; }
}

@media (max-width: 768px) {
    .navbar-links { display: none !important; }
    .desk-only { display: none !important; }
    .tm-nav-profile { display: none !important; }
    .mob-hide-sm { display: none !important; }
    .tm-nav-login { display: none; }
    .tm-left-rail { display: none !important; }
    .search-form { display: none !important; }
    .navbar-center { display: none !important; }
    .mob-menu-btn { display: inline-flex !important; }
    .tm-premium-chip { display: inline-flex !important; }
    .navbar {
        position: fixed !important;
        top: calc(8px + env(safe-area-inset-top, 0px)) !important;
        left: 12px !important;
        right: 12px !important;
        z-index: 10050 !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }
    .navbar.is-compact .navbar-container { min-height: 46px; }
    .navbar-container {
        min-height: 52px !important;
        padding: 4px 10px !important;
        gap: 6px !important;
        border-radius: 26px !important;
        grid-template-columns: auto auto; /* brand | actions */
    }
    .tm-tl-chrome > .main-content {
        padding-top: calc(68px + env(safe-area-inset-top, 0px));
    }
    .tm-tl-chrome .page-content {
        padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
    }
    body.has-player .tm-tl-chrome .page-content {
        padding-bottom: calc(var(--player-height) + var(--tm-mob-nav-h) + 28px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .mob-bottom-nav {
        display: flex;
        position: fixed;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        left: 12px;
        right: 12px;
        z-index: 520;
        background: var(--glass-bg);
        border: 1px solid var(--glass-stroke);
        border-radius: 30px;
        min-height: var(--tm-mob-nav-h);
        height: var(--tm-mob-nav-h);
        padding: 5px 6px;
        overflow: hidden;
        isolation: isolate;
        box-shadow:
            0 12px 36px rgba(0,0,0,0.45),
            0 2px 8px rgba(0,0,0,0.25),
            inset 0 1px 0 rgba(255,255,255,0.08);
        transition: height .35s cubic-bezier(0.4,0,0.2,1), min-height .35s, left .35s, right .35s;
    }
    .mob-bottom-nav::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: -2;
        backdrop-filter: blur(28px) saturate(180%);
        -webkit-backdrop-filter: blur(28px) saturate(180%);
    }
    .mob-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 7px 4px 6px;
        min-height: 0;
        height: 100%;
        border-radius: 24px;
        color: var(--text-muted);
        font-size: 0.68rem;
        font-weight: 600;
        text-decoration: none;
    }
    .mob-nav-item i { font-size: 1.15rem; line-height: 1; }
    .mob-nav-item span {
        max-height: 16px;
        overflow: hidden;
        white-space: nowrap;
        transition: max-height .3s, opacity .25s, transform .3s;
    }
    .mob-nav-item.active {
        color: var(--text);
        background: var(--bg-active);
        border-bottom: 0;
    }
    .mob-nav-item.active i { color: var(--brand); }
    .mob-nav-avatar {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid transparent;
    }
    .mob-nav-item.active .mob-nav-avatar { border-color: var(--brand); }
    .mob-bottom-nav.is-compact {
        left: max(44px, 11vw);
        right: max(44px, 11vw);
    }
    .mob-bottom-nav.is-compact .mob-nav-item { padding: 6px 4px; }
    .mob-bottom-nav.is-compact .mob-nav-item span {
        max-height: 0;
        opacity: 0;
        transform: translateY(6px);
    }
    body:has(.mob-bottom-nav.is-compact) {
        --tm-mob-nav-h: 48px;
    }

    /* Mobile player: full width always; cover LEFT; progress under title → under next (LTR music) */
    .tm-tl-chrome > .player {
        position: fixed;
        left: 14px;
        right: 14px;
        bottom: calc(10px + var(--tm-mob-nav-h) + 8px + env(safe-area-inset-bottom, 0px));
        height: auto;
        min-height: 78px;
        border-radius: 22px;
        z-index: 515;
        border: 1px solid var(--glass-stroke);
        background: var(--glass-bg-strong);
        backdrop-filter: blur(22px) saturate(170%);
        -webkit-backdrop-filter: blur(22px) saturate(170%);
        box-shadow: 0 10px 28px rgba(0,0,0,0.35);
        overflow: visible;
        display: flex !important;
        flex-direction: row;
        align-items: stretch;
        gap: 10px;
        padding: 10px 12px;
        direction: ltr !important; /* cover left + seek LTR in FA & EN */
        transition: bottom .35s cubic-bezier(0.4,0,0.2,1);
    }
    body.has-player .tm-tl-chrome > .player.has-song {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }
    .tm-tl-chrome > .player .player-seek {
        position: absolute;
        left: 80px;
        right: 12px;
        bottom: 6px;
        display: flex;
        align-items: center;
        min-width: 0;
    }
    .tm-tl-chrome > .player .player-seek .player-time { display: none; }
    .tm-tl-chrome > .player .player-tool { display: none !important; }
    .tm-tl-chrome > .player .player-progress-bar {
        position: relative;
        left: auto;
        right: auto;
        flex: 1 1 auto;
        height: 14px;
        margin: 0;
        z-index: 2;
    }
    .tm-tl-chrome > .player .player-content {
        display: flex !important;
        flex: 1 1 auto;
        align-items: flex-start;
        gap: 8px;
        min-width: 0;
        padding: 0 0 16px; /* room for absolute progress */
        margin: 0;
    }
    .tm-tl-chrome > .player .player-song-info {
        display: flex !important;
        flex: 1 1 auto;
        align-items: center;
        gap: 10px;
        max-width: none !important;
        min-width: 0 !important;
    }
    .tm-tl-chrome > .player .player-cover {
        width: 58px !important;
        height: 58px !important;
        border-radius: 14px !important;
        flex-shrink: 0;
    }
    .tm-tl-chrome > .player .player-details {
        flex: 1 1 auto;
        min-width: 0;
        padding-top: 2px;
    }
    .tm-tl-chrome > .player .player-like {
        flex-shrink: 0;
    }
    .tm-tl-chrome > .player .player-controls {
        flex: 0 0 auto;
        gap: 2px;
        direction: ltr !important;
        padding-top: 8px;
    }
    .tm-tl-chrome > .player .player-extra { display: none !important; }
    .tm-tl-chrome > .player .player-title { font-size: 0.84rem; font-weight: 700; }
    .tm-tl-chrome > .player .player-artist { font-size: 0.7rem; }

    .mobile-tabbar { display: none !important; }
}

/* Desktop: same chrome for FA + EN — left rail full height, player beside to the end */
@media (min-width: 769px) {
    .mob-bottom-nav { display: none !important; }

    .tm-left-rail {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        left: var(--tm-chrome-inset);
        top: calc(56px + var(--tm-nav-top) + var(--tm-chrome-gap));
        width: var(--tm-rail-w);
        bottom: var(--tm-chrome-inset);
        z-index: 850;
        border-radius: 24px;
        border: 1px solid var(--glass-stroke);
        border-top-color: rgba(255,255,255,0.14);
        background: var(--glass-bg-strong);
        backdrop-filter: blur(22px) saturate(170%);
        -webkit-backdrop-filter: blur(22px) saturate(170%);
        box-shadow:
            0 12px 36px rgba(0,0,0,0.32),
            inset 0 1px 0 rgba(255,255,255,0.08);
        overflow: hidden;
    }
    .tm-rail-toggle { display: none !important; }
    .tm-rail-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 8px 6px 12px;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    .tm-rail-hd {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        padding: 12px 12px 10px;
        color: var(--text-muted);
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }
    .tm-rail-hd-label {
        max-width: 160px;
        opacity: 1;
        overflow: hidden;
        white-space: nowrap;
    }
    .tm-rail-item {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        min-height: 42px;
        padding: 8px 12px;
        border-radius: 14px;
        color: var(--text-muted);
        text-decoration: none;
        font-weight: 650;
        font-size: 0.88rem;
        white-space: nowrap;
    }
    .tm-rail-item i { width: 1.15rem; text-align: center; flex-shrink: 0; }
    .tm-rail-item span {
        max-width: 140px;
        opacity: 1;
        overflow: hidden;
    }
    .tm-rail-item:hover { color: var(--text); background: var(--bg-hover); }
    .tm-rail-item.active {
        color: var(--brand-soft);
        background: rgba(30, 86, 245, 0.14);
    }
    .tm-rail-divider {
        height: 1px;
        margin: 6px 8px;
        background: var(--hairline);
    }

    /* Player beside rail: one row — song, seek, transport, tools */
    .tm-tl-chrome > .player {
        position: fixed;
        left: calc(var(--tm-chrome-inset) + var(--tm-rail-w) + 18px);
        right: 20px;
        width: auto;
        bottom: var(--tm-chrome-inset);
        height: 76px;
        border-radius: 22px;
        z-index: 860;
        border: 1px solid var(--glass-stroke);
        background: var(--glass-bg-strong);
        backdrop-filter: blur(22px) saturate(170%);
        -webkit-backdrop-filter: blur(22px) saturate(170%);
        box-shadow: 0 12px 36px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
        overflow: hidden;
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0 12px;
    }
    .tm-tl-chrome > .player .player-content {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
        display: flex !important;
        align-items: center;
        gap: 6px;
        padding: 0;
    }
    .tm-tl-chrome > .player .player-seek {
        flex: 1 1 180px;
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 120px;
        direction: ltr;
    }
    .tm-tl-chrome > .player .player-progress-bar {
        flex: 1 1 auto;
        height: 18px;
        margin: 0;
        padding: 0;
    }
    .tm-tl-chrome > .player .player-tool { display: inline-flex; }
    .tm-tl-chrome > .player .volume-control.player-tool { display: inline-flex; gap: 2px; }
    .tm-tl-chrome > .player .player-play {
        width: 46px;
        height: 46px;
        min-width: 46px;
        min-height: 46px;
    }
    .tm-tl-chrome > .player .player-song-info {
        flex: 0 1 230px;
        max-width: 260px !important;
        min-width: 0 !important;
        width: auto;
    }
    .tm-tl-chrome > .player .player-details {
        min-width: 0;
        flex: 1;
    }
    .tm-tl-chrome > .player .player-title,
    .tm-tl-chrome > .player .player-artist {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: block;
    }
    .tm-tl-chrome > .player .player-title { font-size: 0.92rem; font-weight: 700; }
    .tm-tl-chrome > .player .player-artist { font-size: 0.78rem; }
    .tm-tl-chrome > .player .player-controls {
        flex: 0 0 auto;
        gap: 2px;
        direction: ltr;
    }
    .tm-tl-chrome > .player .player-btn:not(.player-play) {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
    .tm-tl-chrome > .player .player-extra {
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        min-width: 0;
        flex-wrap: nowrap;
        direction: ltr;
    }
    .tm-tl-chrome > .player .player-time { display: inline-block; }
    .tm-tl-chrome > .player .volume-control { display: inline-flex !important; }

    .tm-tl-chrome > .main-content {
        padding-left: calc(var(--tm-chrome-inset) + var(--tm-rail-w) + 14px);
        padding-right: var(--tm-chrome-inset);
    }
    body.has-player .tm-tl-chrome .page-content {
        padding-bottom: calc(76px + 28px) !important;
    }

    /* RTL mirror: rail on the right, player/content mirrored */
    html[dir="rtl"] .tm-left-rail {
        left: auto;
        right: var(--tm-chrome-inset);
    }
    html[dir="rtl"] .tm-tl-chrome > .player {
        left: 20px;
        right: calc(var(--tm-chrome-inset) + var(--tm-rail-w) + 18px);
    }
    html[dir="rtl"] .tm-tl-chrome > .main-content {
        padding-left: var(--tm-chrome-inset);
        padding-right: calc(var(--tm-chrome-inset) + var(--tm-rail-w) + 14px);
    }

    /* Queue panel: proper size; closed state must fully hide */
    .tm-tl-chrome .side-panel {
        top: calc(56px + var(--tm-nav-top) + var(--tm-chrome-gap)) !important;
        bottom: calc(var(--tm-chrome-inset) + 84px + var(--tm-chrome-gap)) !important;
        width: min(380px, 36vw) !important;
        min-width: 300px !important;
        max-width: 420px !important;
        height: auto !important;
        border-radius: 20px !important;
        right: 16px !important;
        left: auto !important;
        border: 1px solid var(--glass-stroke) !important;
        background: var(--glass-bg-strong) !important;
        z-index: 870 !important;
        overflow: hidden;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translateX(110%) !important;
        transition: transform .28s ease, opacity .2s ease, visibility .2s !important;
    }
    .tm-tl-chrome .side-panel.open {
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: translateX(0) !important;
    }
    html[dir="rtl"] .tm-tl-chrome .side-panel {
        right: auto !important;
        left: 16px !important;
        transform: translateX(-110%) !important;
    }
    html[dir="rtl"] .tm-tl-chrome .side-panel.open {
        transform: translateX(0) !important;
    }
}
.queue-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 865;
    background: rgba(0,0,0,0.35);
    border: 0;
    padding: 0;
    cursor: pointer;
}
.queue-backdrop.open { display: block; }

/* ============ Light theme — TeleLive chrome surfaces ============ */
[data-theme="light"] {
    color-scheme: light;
}
[data-theme="dark"],
:root:not([data-theme="light"]) {
    color-scheme: dark;
}
[data-theme="light"] .navbar {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--text);
}
[data-theme="light"] .navbar-container,
[data-theme="light"] .tm-left-rail {
    background: rgba(252, 252, 253, 0.88) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    border-top-color: rgba(255, 255, 255, 0.85) !important;
    box-shadow:
        0 12px 36px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}
[data-theme="light"] .navbar-links .nav-link.active,
[data-theme="light"] .navbar-links .nav-link:hover {
    color: var(--brand);
}
[data-theme="light"] .search-form {
    background: var(--bg-elev-2);
    border-color: var(--line);
}
[data-theme="light"] .mob-hdr-btn:hover,
[data-theme="light"] .search-btn:hover,
[data-theme="light"] .mob-drawer-close:hover {
    background: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .mob-drawer {
    background: rgba(252, 252, 253, 0.92);
    color: var(--text);
}
[data-theme="light"] .mob-drawer-item:hover,
[data-theme="light"] .mob-drawer-item.active {
    background: rgba(30, 86, 245, 0.10);
}
[data-theme="light"] .splash,
[data-theme="light"] .tele-loader {
    --tl-bg: #f7f7f8;
}
[data-theme="light"] .tm-tl-chrome > .player,
[data-theme="light"] .player {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--text);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
    [data-theme="light"] .navbar {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }
    [data-theme="light"] .navbar-container {
        background: rgba(252, 252, 253, 0.88) !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        border-top-color: rgba(255, 255, 255, 0.85) !important;
        box-shadow:
            0 12px 36px rgba(0, 0, 0, 0.14),
            0 2px 8px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
    }
    [data-theme="light"] .mob-bottom-nav {
        background: rgba(252, 252, 253, 0.72) !important;
        border-color: rgba(0, 0, 0, 0.08) !important;
        box-shadow:
            0 12px 36px rgba(0, 0, 0, 0.14),
            0 2px 8px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
    }
    [data-theme="light"] .mob-nav-item.active {
        color: var(--text);
        background: rgba(0, 0, 0, 0.07);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
    [data-theme="light"] .tm-tl-chrome > .player {
        background: rgba(255, 255, 255, 0.94) !important;
        border-color: rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }
}

/* Desktop player: keep overflow clipped; more-menu is position:fixed on body */
@media (min-width: 769px) {
    .tm-tl-chrome > .player {
        overflow: hidden !important;
    }
    .tm-tl-chrome > .player .player-extra {
        overflow: hidden;
    }
}
@media (min-width: 769px) and (max-width: 1180px) {
    .tm-tl-chrome > .player #lyricsBtn,
    .tm-tl-chrome > .player .volume-slider { display: none !important; }
    .tm-tl-chrome > .player .player-song-info { flex-basis: 160px; max-width: 180px !important; }
}
[data-theme="light"] .mob-hdr-btn {
    border-color: rgba(0,0,0,0.08);
    background: rgba(0,0,0,0.04);
    box-shadow: none;
}
[data-theme="light"] .mob-drawer-pill {
    border-color: rgba(0,0,0,0.1);
    background: rgba(0,0,0,0.04);
    color: var(--text);
}
[data-theme="light"] .mob-drawer {
    background: rgba(252,252,253,0.92);
}


/* ============ Motion system (V41) ============ */
@keyframes tm-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes tm-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes tm-scale-in {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}
.page-content.page-enter {
    animation: tm-fade-up 0.38s var(--spring) both;
}
.ed-spot {
    animation: tm-scale-in 0.5s var(--spring) both;
}
/* Banner slides toggle [hidden] — fill-mode:both left them stuck at opacity:0 */
.ed-banner .ed-spot,
.ed-banner .ed-spot.is-active {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}
.card-grid > *,
.song-list > .song-row-item,
.category-chips > .category-chip {
    animation: tm-fade-up 0.42s var(--spring) both;
}
.card-grid > *:nth-child(1), .song-list > .song-row-item:nth-child(1) { animation-delay: 0.02s; }
.card-grid > *:nth-child(2), .song-list > .song-row-item:nth-child(2) { animation-delay: 0.05s; }
.card-grid > *:nth-child(3), .song-list > .song-row-item:nth-child(3) { animation-delay: 0.08s; }
.card-grid > *:nth-child(4), .song-list > .song-row-item:nth-child(4) { animation-delay: 0.11s; }
.card-grid > *:nth-child(5), .song-list > .song-row-item:nth-child(5) { animation-delay: 0.14s; }
.card-grid > *:nth-child(6), .song-list > .song-row-item:nth-child(6) { animation-delay: 0.17s; }
.card-grid > *:nth-child(n+7), .song-list > .song-row-item:nth-child(n+7) { animation-delay: 0.2s; }
.song-card,
.artist-card,
.up-card,
.approval-card {
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
}
.song-card:hover,
.artist-card:hover {
    transform: translateY(-4px);
}
.btn, .sheet-chip, .category-chip, .mob-nav-item, .tm-rail-item, .ed-spot-play {
    transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.btn:active, .sheet-chip:active, .category-chip:active, .ed-spot-play:active {
    transform: scale(0.97);
}
.tm-rail-item:hover, .mob-drawer-item:hover {
    transform: translateX(-2px);
}
html[dir="ltr"] .tm-rail-item:hover, html[dir="ltr"] .mob-drawer-item:hover {
    transform: translateX(2px);
}
.player.has-song {
    animation: tm-fade-up 0.35s var(--spring) both;
}
.toast {
    animation: tm-fade-up 0.28s var(--spring) both;
}
.modal-overlay.open .modal,
.player-sheet.open .player-sheet-panel {
    animation: tm-scale-in 0.32s var(--spring) both;
}
@media (prefers-reduced-motion: reduce) {
    .page-content.page-enter,
    .ed-spot,
    .card-grid > *,
    .song-list > .song-row-item,
    .category-chips > .category-chip,
    .player.has-song,
    .toast,
    .modal-overlay.open .modal,
    .player-sheet.open .player-sheet-panel {
        animation: none !important;
    }
    .song-card:hover,
    .artist-card:hover,
    .btn:active,
    .tm-rail-item:hover {
        transform: none !important;
    }
}

/* Home rails, moods, catalog empty, real skeletons (V42) */
.sk-wrap { display: flex; flex-direction: column; gap: 16px; }
.sk-hero { height: clamp(180px, 32vw, 280px); border-radius: 20px; }
.sk-heading { width: 9rem; height: 18px; border-radius: 8px; }
.sk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}
.sk-cover { aspect-ratio: 1; border-radius: 12px; margin-bottom: 10px; }
.sk-line { height: 12px; border-radius: 6px; margin-bottom: 8px; }
.sk-line.short { width: 62%; }
.empty-catalog {
    min-height: 46vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 36px 16px;
}
.empty-catalog-art {
    width: 88px; height: 88px; border-radius: 28px;
    display: grid; place-items: center;
    background: linear-gradient(145deg, rgba(30,86,245,.35), rgba(82,128,255,.08));
    color: #fff; font-size: 2rem;
    box-shadow: 0 16px 40px rgba(30,86,245,.25);
    margin-bottom: 6px;
}
.empty-catalog h2 { margin: 0; font-size: 1.35rem; }
.empty-catalog p { margin: 0 0 8px; max-width: 28rem; color: var(--text-muted); }
.mood-row {
    display: flex; gap: 10px; overflow-x: auto;
    padding: 2px 2px 14px; margin-bottom: 6px;
    scrollbar-width: none;
}
.mood-row::-webkit-scrollbar { display: none; }
.mood-chip {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 40px; padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--glass-stroke);
    background: rgba(255,255,255,.04);
    color: var(--text);
    font-weight: 750;
    cursor: pointer;
}
.mood-chip i { color: var(--brand-soft); }
.mood-chip.active {
    background: var(--brand);
    border-color: transparent;
    color: #fff;
}
.mood-chip.active i { color: #fff; }
@media (max-width: 768px) {
    .card-grid.card-rail {
        display: flex;
        flex-wrap: nowrap;
        align-items: flex-start;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 12px;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .card-grid.card-rail::-webkit-scrollbar { display: none; }
    .card-grid.card-rail > * {
        flex: 0 0 148px;
        width: 148px;
        max-width: 148px;
        align-self: flex-start;
        scroll-snap-align: start;
        height: auto;
    }
    .card-grid:not(.card-rail) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
    .card-grid:not(.card-rail) > .song-card,
    .card-grid:not(.card-rail) > .artist-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: auto;
    }
    .song-card-img,
    .song-card .card-cover {
        aspect-ratio: 1 / 1 !important;
        padding-bottom: 0 !important;
        height: auto !important;
    }
    .sk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Player wave + preview + similar (V44) */
.player-wave {
    display: none;
    align-items: flex-end;
    gap: 2px;
    height: 18px;
    flex: 0 0 auto;
}
.player.has-song .player-wave { display: inline-flex; }
.player-wave i {
    display: block;
    width: 3px;
    height: 6px;
    border-radius: 2px;
    background: var(--brand-soft);
    opacity: 0.45;
}
.player.playing .player-wave i {
    opacity: 1;
    animation: tm-wave 0.9s ease-in-out infinite;
}
.player-wave i:nth-child(1) { animation-delay: 0.05s; }
.player-wave i:nth-child(2) { animation-delay: 0.18s; height: 10px; }
.player-wave i:nth-child(3) { animation-delay: 0.02s; height: 14px; }
.player-wave i:nth-child(4) { animation-delay: 0.28s; height: 9px; }
.player-wave i:nth-child(5) { animation-delay: 0.12s; height: 12px; }
@keyframes tm-wave {
    0%, 100% { transform: scaleY(0.45); }
    50% { transform: scaleY(1); }
}
.player-wave.is-on i { transform-origin: center bottom; }
#npSimilar.active, #npSimilar:hover { color: var(--brand-soft); }
.song-card .preview-badge {
    position: absolute;
    left: 8px; bottom: 8px;
    z-index: 2;
    display: none;
    align-items: center; gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0,0,0,0.62);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
}
.song-card.is-previewing .preview-badge { display: inline-flex; }
.song-card.is-previewing .song-card-img::after {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 2px var(--brand-soft);
    pointer-events: none;
}
.song-card.is-previewing .play-overlay {
    opacity: 1;
    background: rgba(30,86,245,0.55);
}
.song-card.is-previewing .play-overlay i::before { content: "\f04b"; }
@media (max-width: 768px) {
    .player.has-song .player-wave { display: inline-flex; }
    .player-wave { height: 14px; gap: 2px; margin-inline-end: 2px; }
    .player-wave i { width: 2px; }
}
@media (prefers-reduced-motion: reduce) {
    .player.playing .player-wave i { animation: none; }
}

/* ===== V45: playlist mosaic, pin rail, likes chips, offline, profile, story ===== */
.pl-mosaic {
    position: absolute; inset: 0;
    display: grid; gap: 2px;
    width: 100%; height: 100%;
    border-radius: inherit; overflow: hidden;
    background: var(--bg-elevated);
}
.pl-mosaic.n2 { grid-template-columns: 1fr 1fr; }
.pl-mosaic.n3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pl-mosaic.n3 span:first-child { grid-row: 1 / -1; }
.pl-mosaic.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pl-mosaic span {
    display: block; background-size: cover; background-position: center;
    min-height: 0;
}
.song-card-img .pl-mosaic,
.page-hero-icon .pl-mosaic,
.pl-hero-cover .pl-mosaic { position: absolute; inset: 0; }
.page-hero-icon.pl-hero-cover {
    position: relative; overflow: hidden; padding: 0;
    width: 96px; height: 96px; border-radius: 16px;
    background: var(--bg-elevated); border-color: var(--border-color); color: transparent;
}
.page-hero-icon.pl-hero-cover > img,
.pl-hero-cover > img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
@media (min-width: 769px) {
    .page-hero-icon.pl-hero-cover { width: 128px; height: 128px; border-radius: 20px; }
}
.song-card-img > .pl-mosaic + .play-overlay,
.song-card-img > img + .play-overlay { z-index: 2; }

.pl-sortable .pl-drag-row { cursor: grab; }
.pl-sortable .pl-drag-row.dragging { opacity: 0.45; cursor: grabbing; }
.pl-sortable .pl-drag-row.drag-over {
    box-shadow: inset 0 2px 0 0 var(--brand-soft);
}
.pl-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.filter-chip-row {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin: 0 0 14px;
}
.filter-chip {
    appearance: none; border: 1px solid var(--border-color);
    background: var(--bg-elevated); color: var(--text-secondary);
    border-radius: 999px; padding: 7px 14px;
    font: inherit; font-size: 0.82rem; font-weight: 650;
    cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.filter-chip:hover { color: var(--text); border-color: var(--brand-soft); }
.filter-chip.active {
    color: #fff; background: var(--brand);
    border-color: transparent;
}
.filter-chip.toggle-chip { display: inline-flex; align-items: center; gap: 6px; }
.offline-pill {
    display: inline-block; margin-inline-end: 6px;
    padding: 1px 7px; border-radius: 999px;
    font-size: 0.68rem; font-weight: 800; letter-spacing: 0.02em;
    vertical-align: middle;
    background: rgba(48,209,88,0.18); color: #30d158;
}

.tm-pinned-rail {
    display: flex; flex-direction: column; gap: 2px;
    margin: 2px 0 4px;
}
.tm-pinned-label {
    padding: 6px 12px 4px;
    font-size: 0.68rem; font-weight: 800;
    letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--text-muted);
}
.tm-pinned-item {
    color: var(--brand-soft) !important;
}
.tm-pinned-item i { opacity: 0.85; font-size: 0.78rem; }

.profile-hero {
    position: relative; min-height: 260px; margin: 0 0 22px;
    border-radius: var(--radius-xl); overflow: hidden;
    background:
        linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.78)),
        var(--banner) center/cover no-repeat,
        linear-gradient(135deg, #141820 0%, #0c1838 55%, #101018 100%);
    display: flex; align-items: flex-end;
}
.profile-hero.no-banner {
    background: linear-gradient(135deg, #141820 0%, #0c1838 50%, #101018 100%);
}
.profile-hero-shade {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 25%, rgba(0,0,0,.62));
    pointer-events: none;
}
.profile-hero-inner {
    position: relative; z-index: 1;
    display: flex; gap: 18px; align-items: flex-end;
    padding: 22px 24px; width: 100%;
}
.profile-hero-avatar {
    width: 112px; height: 112px; border-radius: 50%;
    overflow: hidden; flex-shrink: 0;
    background: var(--bg-elevated);
    border: 3px solid rgba(255,255,255,0.18);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); font-size: 2.2rem;
}
.profile-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-hero-meta h1 { margin: 0 0 2px; font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.profile-bio { max-width: 42rem; color: rgba(255,255,255,0.82); margin: 6px 0 0; line-height: 1.5; }
.profile-stat-grid {
    display: flex; flex-wrap: wrap; gap: 10px 18px;
    margin: 12px 0 0;
}
.profile-stat-grid > div {
    display: flex; flex-direction: column; gap: 2px; min-width: 4.5rem;
}
.profile-stat-grid strong { font-size: 1.05rem; color: #fff; }
.profile-stat-grid span { font-size: 0.72rem; color: rgba(255,255,255,0.62); font-weight: 650; }
.profile-self-actions {
    display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px;
}
@media (max-width: 700px) {
    .profile-hero { min-height: 220px; border-radius: var(--radius-lg); }
    .profile-hero-inner { flex-direction: column; align-items: flex-start; }
    .profile-hero-avatar { width: 88px; height: 88px; }
}

.share-story-card {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    margin: 0 0 14px; padding: 18px 14px;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, #0e0e10, #1e56f5 140%);
    text-align: center;
}
.share-story-cover {
    width: min(72%, 220px); aspect-ratio: 1;
    border-radius: 18px; object-fit: cover;
    box-shadow: 0 16px 40px rgba(0,0,0,0.45);
}
.share-story-meta { display: flex; flex-direction: column; gap: 4px; color: #fff; }
.share-story-meta strong { font-size: 1.05rem; }
.share-story-meta span { color: rgba(255,255,255,0.72); font-size: 0.88rem; }
.share-story-meta em { font-style: normal; font-weight: 800; color: #9db4ff; font-size: 0.78rem; letter-spacing: 0.04em; }
.share-btn.story {
    background: linear-gradient(135deg, #1e56f5, #5b8cff);
    color: #fff;
}

/* ===== V46: media chrome polish + ideas 21–30 ===== */
.page-content.page-slide.slide-rtl {
    animation: tm-slide-rtl 0.38s var(--spring, cubic-bezier(.22,1,.36,1)) both;
}
.page-content.page-slide.slide-ltr {
    animation: tm-slide-ltr 0.38s var(--spring, cubic-bezier(.22,1,.36,1)) both;
}
@keyframes tm-slide-rtl {
    from { opacity: 0; transform: translateX(-18px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes tm-slide-ltr {
    from { opacity: 0; transform: translateX(18px); }
    to { opacity: 1; transform: translateX(0); }
}

.song-card.is-playing .song-card-img,
.song-row-item.is-playing .song-row-img,
.song-row-item.is-playing .song-card-img {
    animation: tm-playing-pulse 2.4s ease-in-out infinite;
}
@keyframes tm-playing-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(82,128,255,0.0); }
    50% { box-shadow: 0 0 0 6px rgba(82,128,255,0.18); }
}
@media (prefers-reduced-motion: reduce) {
    .song-card.is-playing .song-card-img,
    .song-row-item.is-playing .song-row-img { animation: none; }
    .page-content.page-slide.slide-rtl,
    .page-content.page-slide.slide-ltr { animation: tm-fade-up 0.28s ease both; }
}

/* Public mobile card lock: identical square covers, no stretch */
.song-card-img,
.song-card .card-cover {
    aspect-ratio: 1 / 1;
    padding-bottom: 0;
    height: auto;
    overflow: hidden;
}
.song-card-img > img,
.song-card .card-cover > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Upload wizard + crop */
.up-wizard-steps {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin: 0 0 16px;
}
.up-wiz-step {
    flex: 1; min-width: 7rem;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 12px; border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-elevated); color: var(--text-secondary);
    font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer;
}
.up-wiz-step span {
    width: 22px; height: 22px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(118,118,128,0.2); font-size: 0.75rem;
}
.up-wiz-step.active {
    color: #fff; background: var(--brand); border-color: transparent;
}
.up-wiz-step.active span { background: rgba(255,255,255,0.22); }
.up-wiz-step.done { border-color: rgba(82,128,255,0.45); color: var(--brand-soft); }
.up-wiz-nav { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.up-cover-crop {
    width: 160px; height: 160px; border-radius: 16px; overflow: hidden;
    background: var(--bg-elevated); margin: 0 auto 10px;
    border: 1px solid var(--border-color);
}
.up-cover-crop .upload-cover-preview {
    width: 100%; height: 100%; object-fit: cover;
    transform: scale(var(--crop-zoom, 1));
    object-position: var(--crop-pan, 50%) center;
    display: block;
}
.up-crop-slider {
    display: flex; flex-direction: column; gap: 4px;
    font-size: 0.72rem; color: var(--text-muted); margin-top: 8px;
}
.up-crop-slider input { width: 100%; }
.up-review-card {
    display: flex; gap: 14px; align-items: center;
    padding: 14px; border-radius: 16px;
    background: rgba(118,118,128,0.1); border: 1px solid var(--hairline);
    margin-bottom: 12px;
}
.up-review-card img {
    width: 72px; height: 72px; border-radius: 12px; object-fit: cover;
}
.up-review-card strong { display: block; font-size: 1.05rem; }
.up-review-card p { margin: 2px 0; color: var(--text-secondary); }
.up-review-card span, .up-review-card em {
    display: block; font-size: 0.78rem; color: var(--text-muted); font-style: normal;
}

/* Owner chart + pending focus */
.owner-chart {
    margin: 0 0 18px; padding: 16px;
    border-radius: var(--radius-xl);
    background: rgba(118,118,128,0.08);
    border: 1px solid var(--hairline);
}
.owner-chart h3 { margin: 0 0 12px; font-size: 0.95rem; color: var(--text-secondary); }
.owner-chart-bars {
    display: flex; align-items: flex-end; gap: 8px;
    height: 140px; padding-top: 8px;
}
.owner-chart-col {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    height: 100%; gap: 4px;
}
.owner-chart-bar {
    width: 100%; max-width: 36px;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, #5b8cff, #1e56f5);
    min-height: 6px;
}
.owner-chart-val { font-size: 0.68rem; font-weight: 700; color: var(--text-muted); }
.owner-chart-day { font-size: 0.65rem; color: var(--text-muted); }
.owner-kb-hint {
    margin: 0 0 12px; font-size: 0.82rem; color: var(--text-muted);
}
.approval-card.is-focused {
    border-color: rgba(82,128,255,0.55);
    box-shadow: 0 0 0 2px rgba(30,86,245,0.22);
}
.approval-card .pending-audio {
    width: 100%; max-width: 400px; margin-top: 8px;
}

/* Concert stage NP */
body.np-concert.np-open .now-playing {
    background: #050508 !important;
}
body.np-concert.np-open .np-bg { opacity: 0.22; filter: brightness(0.55) saturate(0.7); }
body.np-concert.np-open .np-cover-wrap {
    filter: drop-shadow(0 24px 60px rgba(0,0,0,0.75));
}
body.np-concert.np-open .np-side {
    opacity: 0.72;
}
body.np-concert.np-open .np-hero {
    position: relative;
}
body.np-concert.np-open .np-hero::before {
    content: "";
    position: absolute; inset: auto 10% -8% 10%; height: 40%;
    background: radial-gradient(ellipse at center, rgba(30,86,245,0.28), transparent 70%);
    pointer-events: none; z-index: 0;
}
body.np-concert.np-open .np-cover-wrap,
body.np-concert.np-open .np-meta,
body.np-concert.np-open .np-controls,
body.np-concert.np-open .np-toolbar,
body.np-concert.np-open .np-progress,
body.np-concert.np-open .np-times { position: relative; z-index: 1; }

/* Compact left rail */
.tm-rail-hd { position: relative; }
.tm-rail-toggle {
    margin-inline-start: auto;
    width: 28px; height: 28px; border-radius: 8px;
    border: 0; background: transparent; color: var(--text-muted);
    display: none; align-items: center; justify-content: center; cursor: pointer;
}
.tm-rail-toggle:hover { color: var(--text); background: var(--bg-hover); }
@media (min-width: 769px) {
    .tm-rail-toggle { display: inline-flex !important; }
}

/* Guest onboarding */
.tm-onboard {
    position: fixed; inset: 0; z-index: 4000;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(10px);
    animation: tm-fade-in 0.28s ease both;
}
.tm-onboard.hide { opacity: 0; transition: opacity 0.28s ease; pointer-events: none; }
.tm-onboard-card {
    width: min(420px, 100%);
    padding: 28px 24px 22px;
    border-radius: 24px;
    background: var(--bg-elevated, #16161a);
    border: 1px solid var(--glass-stroke, rgba(255,255,255,0.1));
    box-shadow: 0 24px 80px rgba(0,0,0,0.45);
    text-align: center;
    position: relative;
}
.tm-onboard-skip {
    position: absolute; top: 12px; inset-inline-end: 12px;
    border: 0; background: transparent; color: var(--text-muted);
    font: inherit; font-size: 0.82rem; cursor: pointer;
}
.tm-onboard-icon {
    width: 64px; height: 64px; margin: 8px auto 14px;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(30,86,245,0.16); color: var(--brand-soft);
    font-size: 1.5rem;
}
.tm-onboard-card h2 { margin: 0 0 8px; font-size: 1.35rem; }
.tm-onboard-card p { margin: 0 0 18px; color: var(--text-secondary); line-height: 1.55; }
.tm-onboard-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; }
.tm-onboard-dots i {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(118,118,128,0.45); display: block;
}
.tm-onboard-dots i.on { background: var(--brand-soft); width: 18px; border-radius: 999px; }
.tm-onboard-card .btn { width: 100%; }

/* ===== V49: boot splash + auth redesign ===== */
.splash.tm-boot {
    background:
        radial-gradient(ellipse at 50% 18%, rgba(30,86,245,0.28), transparent 46%),
        #07080d;
    overflow: hidden;
}
.tm-boot-orb {
    position: absolute; border-radius: 50%; filter: blur(40px); pointer-events: none;
}
.tm-boot-orb-a {
    width: 280px; height: 280px; top: 12%; left: 50%;
    transform: translateX(-70%);
    background: rgba(30,86,245,0.45);
    animation: tm-boot-drift 6s ease-in-out infinite;
}
.tm-boot-orb-b {
    width: 220px; height: 220px; bottom: 16%; left: 55%;
    background: rgba(82,128,255,0.22);
    animation: tm-boot-drift 7.5s ease-in-out infinite reverse;
}
@keyframes tm-boot-drift {
    0%, 100% { transform: translate(-20%, 0) scale(1); }
    50% { transform: translate(10%, -12px) scale(1.08); }
}
.tm-boot-card {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center;
    text-align: center; padding: 24px;
    animation: tlFadeIn 0.55s ease both;
}
.tm-boot-mark {
    position: relative; width: 96px; height: 96px; margin-bottom: 18px;
}
.tm-boot-mark img {
    width: 96px; height: 96px; border-radius: 26px; display: block;
    box-shadow: 0 18px 40px rgba(30,86,245,0.35);
    position: relative; z-index: 1;
}
.tm-boot-ring {
    position: absolute; inset: -10px; border-radius: 32px;
    border: 1.5px solid rgba(82,128,255,0.55);
    animation: tm-boot-ring 1.8s ease-out infinite;
}
@keyframes tm-boot-ring {
    0% { transform: scale(0.92); opacity: 0.85; }
    100% { transform: scale(1.18); opacity: 0; }
}
.tm-boot-word {
    font-size: 1.85rem; font-weight: 850; letter-spacing: -0.03em;
    color: #fff; line-height: 1.1;
}
.tm-boot-fa {
    margin-top: 4px; color: rgba(255,255,255,0.62);
    font-size: 0.95rem; font-weight: 650;
}
.tm-boot-track {
    width: min(220px, 62vw); height: 4px; margin-top: 22px;
    border-radius: 999px; overflow: hidden;
    background: rgba(255,255,255,0.1);
}
.tm-boot-fill {
    height: 100%; width: 8%; border-radius: inherit;
    background: linear-gradient(90deg, #1e56f5, #8eb0ff);
    box-shadow: 0 0 16px rgba(30,86,245,0.55);
    transition: width 0.35s ease;
}
.tm-boot-status {
    margin-top: 12px; font-size: 0.78rem; font-weight: 650;
    letter-spacing: 0.04em; color: rgba(255,255,255,0.48);
}

.modal.tm-auth {
    padding: 22px 22px 18px;
    max-width: 420px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        radial-gradient(ellipse at 100% 0%, rgba(30,86,245,0.22), transparent 42%),
        var(--bg-elevated);
    box-shadow: 0 24px 70px rgba(0,0,0,0.45);
    position: relative;
}
.tm-auth-close {
    position: absolute; top: 12px; inset-inline-end: 12px;
    width: 36px; height: 36px; border-radius: 12px;
    border: 0; background: rgba(255,255,255,0.06);
    color: var(--text-secondary); cursor: pointer;
}
.tm-auth-close:hover { color: #fff; background: rgba(255,255,255,0.12); }
.tm-auth-hero {
    display: flex; align-items: center; gap: 12px;
    margin: 8px 0 18px;
}
.tm-auth-hero img {
    width: 52px; height: 52px; border-radius: 16px;
    box-shadow: 0 10px 24px rgba(30,86,245,0.28);
}
.tm-auth-hero strong { display: block; font-size: 1.15rem; letter-spacing: -0.02em; }
.tm-auth-hero span { color: var(--text-muted); font-size: 0.82rem; font-weight: 650; }
.tm-auth .auth-title { margin: 0 0 4px; font-size: 1.45rem; font-weight: 800; }
.tm-auth .auth-subtitle { margin: 0 0 16px; }
.tm-auth .auth-tabs {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 16px;
}
.tm-auth .auth-tab {
    border: 0; background: transparent; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 11px; font: inherit; font-size: 0.86rem;
}
.tm-auth .auth-tab.active {
    background: var(--brand);
    color: #fff;
    box-shadow: none;
}
.tm-auth .auth-form { display: flex; flex-direction: column; gap: 10px; }
.tm-field {
    display: flex; align-items: center; gap: 10px;
    min-height: 50px; padding: 0 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}
.tm-field:focus-within {
    border-color: rgba(82,128,255,0.7);
    box-shadow: 0 0 0 3px rgba(30,86,245,0.18);
}
.tm-field > i { color: var(--text-muted); width: 1rem; text-align: center; flex: 0 0 auto; }
.tm-field .form-input {
    border: 0; background: transparent; box-shadow: none;
    padding: 12px 0; min-height: 48px; width: 100%;
}
.tm-field .form-input:focus { border: 0; background: transparent; box-shadow: none; }
.tm-auth .auth-submit {
    min-height: 48px; border-radius: 14px; margin-top: 4px;
    font-size: 0.95rem;
}
.tm-auth .auth-switch { margin-top: 16px; }
[data-theme="light"] .modal.tm-auth {
    background:
        radial-gradient(ellipse at 100% 0%, rgba(30,86,245,0.12), transparent 42%),
        #fff;
}
[data-theme="light"] .tm-auth .auth-tabs,
[data-theme="light"] .tm-field {
    background: rgba(14,14,16,0.04);
    border-color: rgba(14,14,16,0.08);
}
@media (prefers-reduced-motion: reduce) {
    .tm-boot-ring, .tm-boot-orb { animation: none; }
}

/* ============ TeleLive-aligned controls (last wins) ============ */
html { color-scheme: dark; }
[data-theme="light"] { color-scheme: light; }

.btn {
    border-radius: 10px !important;
    min-height: 44px;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 0.92rem;
    gap: 8px;
}
.btn-sm { min-height: 36px; padding: 8px 12px; border-radius: 10px !important; }
.btn-primary {
    background: linear-gradient(135deg, #1a4fd4 0%, #3b82f6 50%, #1e56f5 100%) !important;
    color: #fff !important;
    border: 0 !important;
    box-shadow: 0 10px 28px rgba(30, 86, 245, 0.38) !important;
}
.btn-primary:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    background: linear-gradient(135deg, #6a98ff, #1e56f5) !important;
    color: #fff !important;
}
.btn-outline {
    border-radius: 10px !important;
    background: rgba(255,255,255,0.03) !important;
    border: 1px solid var(--line) !important;
    color: var(--text) !important;
    box-shadow: none !important;
}
.btn-outline:hover { border-color: var(--brand) !important; color: #fff !important; }

.form-input,
.form-control,
textarea.form-input,
input.form-input,
.form-card input,
.form-card textarea,
.form-card select,
.search-bar-big input {
    background: rgba(255, 255, 255, 0.055) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    color: var(--text) !important;
    min-height: 46px;
    padding: 12px 14px;
    box-shadow: none;
}
.form-input:focus,
.form-control:focus,
.search-bar-big input:focus {
    outline: none;
    border-color: rgba(30, 86, 245, 0.75) !important;
    box-shadow: 0 0 0 3px rgba(30, 86, 245, 0.22) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}
.form-input::placeholder { color: rgba(161, 161, 170, 0.7); }
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23a6a6b2' d='M1 1l5 5 5-5'/></svg>");
    background-repeat: no-repeat;
    background-position: left 14px center;
    padding-inline-end: 36px;
}

/* Custom category dropdown */
.tm-select { position: relative; width: 100%; }
.tm-select-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.055);
    color: var(--text);
    font: inherit;
    cursor: pointer;
    text-align: start;
}
.tm-select.open .tm-select-toggle,
.tm-select-toggle:focus {
    outline: none;
    border-color: rgba(30, 86, 245, 0.75);
    box-shadow: 0 0 0 3px rgba(30, 86, 245, 0.22);
    background: rgba(255,255,255,0.08);
}
.tm-select-toggle i { color: var(--text-muted); font-size: 0.75rem; transition: transform .15s; }
.tm-select.open .tm-select-toggle i { transform: rotate(180deg); }
.tm-select-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-select-menu {
    position: absolute;
    z-index: 80;
    top: calc(100% + 6px);
    inset-inline: 0;
    max-height: 240px;
    overflow: auto;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #1a1a20;
    box-shadow: 0 16px 40px rgba(0,0,0,0.45);
}
.tm-select-opt {
    display: block;
    width: 100%;
    text-align: start;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
}
.tm-select-opt:hover,
.tm-select-opt.active { background: rgba(30, 86, 245, 0.18); color: #fff; }
[data-theme="light"] .tm-select-menu { background: #fff; }
[data-theme="light"] .tm-select-toggle,
[data-theme="light"] .form-input {
    background: #fff !important;
    border-color: var(--line) !important;
    color: var(--text) !important;
}

/* Login / register — same field language as TeleLive */
.modal.tm-auth {
    max-width: 420px;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 50% at 15% 0%, rgba(30, 86, 245, 0.22), transparent 55%),
        rgba(22, 24, 32, 0.92) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    backdrop-filter: blur(22px) saturate(1.15);
}
.tm-auth-orbs {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(circle at 0% 0%, rgba(30,86,245,0.28), transparent 42%),
        radial-gradient(circle at 100% 100%, rgba(59,130,246,0.14), transparent 46%);
}
.tm-auth .form-group { margin-bottom: 14px; }
.tm-auth .form-group label {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 7px; font-size: 0.8rem; font-weight: 600; color: #d4d4dc;
}
.tm-auth .form-group label i { color: var(--brand-soft); width: 14px; font-size: 0.82rem; }
.tm-auth .form-group .form-input {
    min-height: 46px;
}
.tm-auth .password-input { position: relative; }
.tm-auth .password-input .form-input { padding-inline-end: 44px; }
.tm-auth .toggle-password {
    position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
    border: 0; background: transparent; color: #a1a1aa;
    width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
    display: grid; place-items: center;
}
.tm-auth .toggle-password:hover { color: #fff; background: rgba(255,255,255,0.06); }
.tm-auth .auth-submit {
    width: 100%;
    min-height: 48px;
    border-radius: 12px !important;
    margin-top: 4px;
}
.up-badge-spotify { display: inline-flex; gap: 6px; align-items: center; }
.up-badge-spotify i { font-size: 0.85rem; }

/* ===== V63: richer ambiance + icons-only rail ===== */
html {
    background: #07080c;
}
body {
    background: transparent;
}
.tm-ambiance {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(ellipse 90% 55% at 8% -5%, rgba(30, 86, 245, 0.38), transparent 58%),
        radial-gradient(ellipse 70% 50% at 96% 8%, rgba(56, 189, 248, 0.14), transparent 52%),
        radial-gradient(ellipse 65% 45% at 70% 100%, rgba(30, 86, 245, 0.20), transparent 55%),
        radial-gradient(ellipse 50% 40% at 40% 60%, rgba(14, 165, 233, 0.06), transparent 60%),
        linear-gradient(180deg, #0a0b10 0%, #07080c 45%, #05060a 100%);
}
.tm-ambiance::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.28) 100%);
    opacity: 0.55;
}
.tm-ambiance-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(56px);
    opacity: 0.7;
    animation: tm-amb-drift 16s ease-in-out infinite;
    will-change: transform;
}
.tm-ambiance-orb-1 {
    width: min(56vw, 520px);
    height: min(56vw, 520px);
    top: -12%;
    inset-inline-start: -10%;
    background: rgba(30, 86, 245, 0.55);
}
.tm-ambiance-orb-2 {
    width: min(44vw, 400px);
    height: min(44vw, 400px);
    top: 28%;
    inset-inline-end: -14%;
    background: rgba(56, 189, 248, 0.22);
    animation-delay: -5s;
    animation-duration: 20s;
}
.tm-ambiance-orb-3 {
    width: min(42vw, 380px);
    height: min(42vw, 380px);
    bottom: 4%;
    inset-inline-start: 22%;
    background: rgba(30, 86, 245, 0.18);
    animation-delay: -9s;
    animation-duration: 18s;
}
.tm-ambiance-grid {
    position: absolute;
    inset: 0;
    opacity: 0.045;
    z-index: 1;
    background-image:
        linear-gradient(rgba(255,255,255,0.55) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.55) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at 50% 30%, #000 15%, transparent 72%);
}
@keyframes tm-amb-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(2.5%, -3.5%) scale(1.07); }
}
[data-theme="light"] html { background: #eef1f7; }
[data-theme="light"] .tm-ambiance {
    background:
        radial-gradient(ellipse 90% 55% at 8% -5%, rgba(30, 86, 245, 0.18), transparent 58%),
        radial-gradient(ellipse 70% 50% at 96% 8%, rgba(56, 189, 248, 0.10), transparent 52%),
        linear-gradient(180deg, #f4f6fb 0%, #eef1f7 100%);
}
[data-theme="light"] .tm-ambiance::after { opacity: 0.25; }
[data-theme="light"] .tm-ambiance-grid { opacity: 0.05; }
@media (prefers-reduced-motion: reduce) {
    .tm-ambiance-orb { animation: none; }
}
@media (min-width: 769px) {
    .tm-ambiance-orb { opacity: 0.85; filter: blur(64px); }
}

.app-container,
#app {
    position: relative;
    z-index: 1;
}
.splash { z-index: 10000; }

/* Left rail: collapse to icons-only with width animation (stay visible) */
@media (min-width: 769px) {
    .tm-left-rail {
        transition:
            width 0.34s cubic-bezier(0.22, 1, 0.36, 1),
            box-shadow 0.28s ease;
        will-change: width;
        overflow: hidden;
    }
    .tm-left-rail .tm-rail-item span,
    .tm-left-rail .tm-rail-hd-label,
    .tm-left-rail .tm-pinned-label,
    .tm-left-rail .tm-pinned-item span {
        transition: opacity 0.2s ease, max-width 0.28s ease, margin 0.28s ease;
        max-width: 160px;
        opacity: 1;
        white-space: nowrap;
    }
    .tm-left-rail.is-compact {
        width: 72px !important;
        min-width: 72px !important;
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }
    .tm-left-rail.is-compact .tm-rail-hd {
        justify-content: center;
        padding-inline: 8px;
    }
    .tm-left-rail.is-compact .tm-rail-item,
    .tm-left-rail.is-compact .tm-pinned-item {
        justify-content: center;
        gap: 0;
        padding-inline: 0;
    }
    .tm-left-rail.is-compact .tm-rail-item span,
    .tm-left-rail.is-compact .tm-rail-hd-label,
    .tm-left-rail.is-compact .tm-pinned-label,
    .tm-left-rail.is-compact .tm-pinned-item span {
        opacity: 0;
        max-width: 0;
        margin: 0;
        overflow: hidden;
        pointer-events: none;
    }
    .tm-left-rail.is-compact .tm-rail-toggle {
        position: static;
        margin: 0;
    }
    .tm-tl-chrome > .player,
    .tm-tl-chrome > .main-content,
    #app.tm-tl-chrome .player {
        transition: left 0.34s cubic-bezier(0.22, 1, 0.36, 1),
                    right 0.34s cubic-bezier(0.22, 1, 0.36, 1),
                    padding 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    }
}

.tm-rail-reopen { display: none !important; }
#audioPlayer, #audioCrossfade {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

/* Roadmap: public like counts, synced lyrics, discover, typeahead, focus mode */
.tm-like-btn { display: inline-flex; align-items: center; gap: 0.28rem; }
.tm-like-count { font-size: 0.72rem; color: var(--text-muted); min-width: 0.8em; }
.tm-like-btn.liked .tm-like-count { color: var(--accent, #ff453a); }
.np-lyrics .lyric-line,
.lyrics-content .lyric-line {
    display: block;
    padding: 0.35rem 0.25rem;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    color: var(--text-muted);
}
.np-lyrics .lyric-line.active,
.lyrics-content .lyric-line.active {
    color: var(--text-primary);
    background: color-mix(in srgb, var(--primary, #1db954) 18%, transparent);
    font-weight: 600;
    transform: scale(1.02);
}
.tm-suggest-box {
    position: absolute;
    inset-inline-start: 0;
    inset-inline-end: 0;
    top: calc(100% + 6px);
    z-index: 80;
    background: var(--bg-elevated, var(--bg-secondary, #1a1a1a));
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
    max-height: 70vh;
    overflow: auto;
    padding: 0.35rem;
}
.tm-suggest-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    cursor: pointer;
    border: 0;
    width: 100%;
    background: transparent;
    color: inherit;
    text-align: start;
}
.tm-suggest-item:hover,
.tm-suggest-item:focus-visible { background: rgba(255,255,255,0.06); outline: none; }
.tm-suggest-item img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
.tm-suggest-meta { min-width: 0; }
.tm-suggest-title { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-suggest-sub { font-size: 0.75rem; color: var(--text-muted); }
.tm-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}
.tm-breadcrumb a { color: inherit; text-decoration: none; }
.tm-breadcrumb a:hover { color: var(--text-primary); }
.tm-breadcrumb .sep { opacity: 0.45; }
body.tm-focus-mode .tm-left-rail,
body.tm-focus-mode .tm-topbar,
body.tm-focus-mode .navbar,
body.tm-focus-mode .mob-bottom-nav,
body.tm-focus-mode .main-content { opacity: 0; pointer-events: none; }
body.tm-focus-mode .player,
body.tm-focus-mode #nowPlaying { opacity: 1; pointer-events: auto; }
.tm-cover-swap img { animation: tmCoverIn 0.45s ease; }
@keyframes tmCoverIn {
    from { opacity: 0.35; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}
.tm-yt-warn {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: color-mix(in srgb, #f5a524 16%, transparent);
    color: var(--text-primary);
    font-size: 0.85rem;
    margin: 0.75rem 0;
}
.tm-skip-link {
    position: absolute;
    inset-inline-start: -999px;
    top: 0;
    background: var(--primary);
    color: #fff;
    padding: 0.5rem 0.75rem;
    z-index: 9999;
    border-radius: 0 0 8px 0;
}
.tm-skip-link:focus { inset-inline-start: 0; }
.tm-sso-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.85rem 0 0.65rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.tm-sso-divider::before,
.tm-sso-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border, rgba(255,255,255,0.12));
}
.tm-telelive-sso {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    text-decoration: none;
}
.tm-discover-rail { display: flex; gap: 0.75rem; overflow-x: auto; padding-bottom: 0.35rem; }
.tm-pl-filter { width: 100%; max-width: 280px; margin: 0 0 0.75rem; }

.up-file-row-edit { align-items: flex-start; gap: 0.5rem; }
.up-file-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.up-file-meta .up-file-name { font-size: 0.75rem; color: var(--text-muted); }
.up-file-status { font-size: 0.72rem; white-space: nowrap; padding: 0.2rem 0.45rem; border-radius: 6px; }
.up-file-status-wait { color: var(--text-muted); }
.up-file-status-active { color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); }
.up-file-status-ok { color: #30d158; }
.up-file-status-fail { color: var(--danger); }
.up-file-status-skip { color: var(--warning); }

.yt-pick-modal { max-width: 520px; width: calc(100% - 2rem); }
.yt-pick-list { display: flex; flex-direction: column; gap: 0.35rem; margin: 0.75rem 0; max-height: 50vh; overflow: auto; }
.yt-pick-row {
    display: grid;
    grid-template-columns: 2rem 1fr auto;
    gap: 0.5rem;
    align-items: center;
    text-align: start;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    background: rgba(255,255,255,0.03);
    color: inherit;
    cursor: pointer;
}
.yt-pick-row:hover { border-color: var(--primary); }
.yt-pick-title { font-weight: 600; font-size: 0.88rem; }
.yt-pick-dur { font-size: 0.75rem; color: var(--text-muted); }

.premium-gift-card {
    margin-top: 1.5rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    background: var(--surface-light, rgba(255,255,255,0.04));
}
.premium-gift-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; margin-top: 0.65rem; }
.premium-gift-redeem { display: flex; gap: 0.5rem; flex: 1; min-width: 200px; }
.premium-gift-out { font-family: ui-monospace, monospace; margin-top: 0.5rem; }

.artist-plays-chart { margin: 1rem 0 1.25rem; }
.artist-plays-bars { display: flex; align-items: flex-end; gap: 0.45rem; height: 100px; }
.artist-plays-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; height: 100%; justify-content: flex-end; }
.artist-plays-bar span {
    display: block;
    width: 100%;
    max-width: 36px;
    min-height: 4px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 40%, transparent));
}
.artist-plays-bar em { font-size: 0.65rem; color: var(--text-muted); font-style: normal; }

/* Discover daily + synced lyrics polish */
.discover-daily {
    margin: 1.25rem 0 1.5rem;
    padding: 1rem 1.1rem 1.1rem;
    border-radius: var(--radius-lg, 16px);
}
.discover-daily-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}
.discover-daily-head h2 { margin: 0; font-size: 1.15rem; }
.discover-day-pill {
    font-size: 0.72rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 14%, transparent);
    color: var(--text-secondary);
    white-space: nowrap;
}
.discover-daily-play { margin-top: 0.65rem; }
.np-lyrics-text .lyric-line,
.lyrics-content .lyric-line {
    display: block;
    width: 100%;
    text-align: inherit;
    border: 0;
    background: transparent;
    padding: 0.35rem 0.15rem;
    color: var(--text-secondary);
    font: inherit;
    line-height: 1.75;
    cursor: pointer;
    transition: color 0.2s ease, opacity 0.2s ease;
}
.np-lyrics-text .lyric-line.active,
.lyrics-content .lyric-line.active {
    color: var(--accent, var(--primary));
    font-weight: 600;
}
.song-row-played-at {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}
.library-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* ── Owner panel = TeleLive admin chrome (exact) ─────────────────────── */
.admin-wrap { max-width: none; margin: 0; padding: 18px 10px; position: relative; width: 100%; }

/* Owner luxe palette overrides — gold accent, subtle glow */
.admin-wrap {
    --owner-gold: #f5b941;
    --owner-gold-2: #ffd47a;
    --owner-glow: 0 0 0 1px rgba(245,185,65,.18), 0 8px 32px rgba(245,185,65,.06);
}

/* Header — owner-luxe variant of dashboard header */
.admin-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
    padding: 14px 18px;
    background:
      radial-gradient(120% 200% at 0% 0%, rgba(245,185,65,.08), transparent 55%),
      linear-gradient(180deg, var(--bg-elev-1), var(--bg-elev-1));
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--owner-glow);
    position: relative;
    overflow: hidden;
}
.admin-header::after {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--owner-gold), transparent);
    opacity: .55;
}
.admin-header h1 {
    margin: 0;
    font-size: 1.45rem; font-weight: 800;
    display: inline-flex; align-items: center; gap: 10px;
    letter-spacing: .2px;
}
.admin-header h1 i {
    color: var(--owner-gold);
    text-shadow: 0 0 12px rgba(245,185,65,.55);
}
.admin-owner-tag {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    font-size: .7rem; font-weight: 800;
    color: #1a1208;
    background: linear-gradient(135deg, var(--owner-gold), var(--owner-gold-2));
    border-radius: 999px;
    text-transform: uppercase; letter-spacing: .08em;
    box-shadow: 0 4px 12px rgba(245,185,65,.35);
}

/* ── Owner presence widget (live counters) ─────────────────────────────── */
.owner-presence {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 10px;
    margin: 14px 0 18px;
    padding: 14px;
    background:
      radial-gradient(120% 180% at 100% 0%, rgba(245,185,65,.07), transparent 60%),
      var(--bg-elev-1);
    border: 1px solid var(--line);
    border-radius: 14px;
    position: relative;
    box-shadow: var(--owner-glow);
}
.owner-presence::before {
    content: 'LIVE';
    position: absolute; top: -10px; inset-inline-start: 14px;
    background: #ef4444; color: #fff;
    font-size: .65rem; font-weight: 800; letter-spacing: .12em;
    padding: 3px 8px; border-radius: 999px;
    box-shadow: 0 0 12px rgba(239,68,68,.55);
    animation: opPulse 1.6s infinite ease-in-out;
}
@keyframes opPulse {
    0%,100% { box-shadow: 0 0 0 rgba(239,68,68,.6); }
    50%     { box-shadow: 0 0 14px rgba(239,68,68,.85); }
}
.op-card {
    position: relative;
    padding: 12px 14px;
    background: var(--bg-elev-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: flex; align-items: center; gap: 12px;
    overflow: hidden;
}
.owner-visits {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 10px;
    margin: 0 0 18px;
    padding: 14px;
    background: var(--bg-elev-1);
    border: 1px solid var(--line);
    border-radius: 14px;
    position: relative;
}
.owner-visits::before {
    content: attr(data-badge);
    position: absolute; top: -10px; inset-inline-start: 14px;
    background: #6366f1; color: #fff;
    font-size: .65rem; font-weight: 800; letter-spacing: .08em;
    padding: 3px 8px; border-radius: 999px;
}
.op-card-btn {
    cursor: pointer;
    transition: border-color .15s ease, transform .12s ease;
    text-align: inherit;
    font: inherit;
    color: inherit;
    width: 100%;
}
.op-card-btn:hover {
    border-color: color-mix(in srgb, var(--op-clr, var(--brand)) 45%, var(--line));
    transform: translateY(-1px);
}
.op-card-btn:focus-visible {
    outline: 2px solid var(--op-clr, var(--brand));
    outline-offset: 2px;
}
.op-sub {
    font-size: .68rem;
    color: var(--text-muted);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#visitRefModal .admin-modal {
    max-width: 560px;
    width: min(94vw, 560px);
}
.visit-ref-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}
.visit-ref-table th,
.visit-ref-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    text-align: start;
}
.visit-ref-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: .75rem;
}
.visit-ref-table td.num {
    text-align: end;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}
.visit-ref-empty {
    color: var(--text-muted);
    font-size: .88rem;
    padding: 18px 4px;
    text-align: center;
}
.visit-ref-scroll {
    max-height: min(55vh, 420px);
    overflow: auto;
    margin-top: 8px;
}
.op-card::after {
    content: ''; position: absolute; inset-inline-end: 0; top: 0; bottom: 0;
    width: 3px; background: var(--op-clr, var(--brand));
}
.op-icon {
    width: 38px; height: 38px; flex: 0 0 38px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: color-mix(in srgb, var(--op-clr, var(--brand)) 14%, transparent);
    color: var(--op-clr, var(--brand));
    font-size: 1.05rem;
}
.op-body { flex: 1 1 auto; min-width: 0; }
.op-num {
    font-size: 1.5rem; font-weight: 800; color: var(--text);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.op-lbl {
    font-size: .72rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .05em;
    margin-top: 4px;
}
.op-pulse-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #22c55e; display: inline-block;
    margin-inline-end: 6px;
    box-shadow: 0 0 8px rgba(34,197,94,.7);
    animation: opDot 1.4s infinite;
}
@keyframes opDot {
    0%,100% { opacity: 1; transform: scale(1); }
    50%     { opacity: .35; transform: scale(.85); }
}

/* WS watchdog (admin) */
.ws-watchdog {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-elev-1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.ws-watchdog-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ws-watchdog-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
    flex: 0 0 10px;
}
.ws-watchdog-dot.ok { background:#22c55e; box-shadow:0 0 10px rgba(34,197,94,.65); }
.ws-watchdog-dot.err { background:#ef4444; box-shadow:0 0 10px rgba(239,68,68,.65); }
.ws-watchdog-title { font-size: .9rem; font-weight: 700; }
.ws-watchdog-sub { font-size: .76rem; color: var(--text-muted); margin-top: 2px; }
.ws-watchdog-right { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.ws-chip {
    font-size: .72rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-elev-2);
    color: var(--text-muted);
}

/* Stats row — luxe variant of dashboard stat boxes */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.admin-stat-card {
    position: relative;
    background:
      linear-gradient(180deg, rgba(245,185,65,.04), transparent 35%),
      var(--bg-elev-1);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex; flex-direction: column; gap: 4px;
    overflow: hidden;
    transition: transform .15s, border-color .15s;
}
.admin-stat-card:hover { border-color: rgba(245,185,65,.4); transform: translateY(-1px); }
.admin-stat-card::before {
    content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0;
    width: 3px; background: var(--owner-gold);
}
.admin-stat-card .stat-num {
    font-size: 1.55rem; font-weight: 800; color: var(--text);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.admin-stat-card .stat-lbl {
    font-size: .78rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .04em;
}

.owner-svc-balances {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-elev-1);
}
.owner-svc-balances-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.owner-svc-balances-head h3 {
    margin: 0;
    font-size: .95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.owner-svc-balances-meta {
    font-size: .72rem;
    color: var(--text-muted);
}
.owner-svc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}
.owner-svc-card {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg-elev-2);
}
.owner-svc-card .svc-lbl {
    font-size: .72rem;
    color: var(--text-muted);
    line-height: 1.35;
    margin-bottom: 6px;
}
.owner-svc-card .svc-amt {
    font-size: 1.15rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--owner-gold, var(--brand));
}
.owner-svc-card .svc-amt.is-muted { color: var(--text-muted); font-size: .9rem; font-weight: 600; }
.owner-svc-card .svc-err { font-size: .68rem; color: #f87171; margin-top: 4px; line-height: 1.3; }

.owner-host-resources {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-elev-1);
}
.owner-host-resources-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.owner-host-resources-head h3 {
    margin: 0;
    font-size: .95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.owner-host-resources-meta {
    font-size: .72rem;
    color: var(--text-muted);
}
.owner-host-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}
.owner-host-card {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg-elev-2);
}
.owner-host-card .host-lbl {
    font-size: .72rem;
    color: var(--text-muted);
    line-height: 1.35;
    margin-bottom: 6px;
}
.owner-host-card .host-val {
    font-size: 1.05rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}
.owner-host-card .host-sub {
    font-size: .68rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.35;
}
.owner-host-card.is-warn .host-val { color: #fbbf24; }
.owner-host-card.is-crit .host-val { color: #f87171; }
.owner-host-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--line);
    margin-top: 8px;
    overflow: hidden;
}
.owner-host-bar > i {
    display: block;
    height: 100%;
    border-radius: 2px;
    background: var(--brand, #a78bfa);
    max-width: 100%;
}
.owner-host-bar.is-warn > i { background: #fbbf24; }
.owner-host-bar.is-crit > i { background: #f87171; }

/* Tabs — scrollable row (TeleLive-style), gold underline on active */
.admin-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    border-bottom: 2px solid var(--line);
    margin-bottom: 18px;
    padding-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.admin-tabs::-webkit-scrollbar { height: 4px; }
.admin-tabs::-webkit-scrollbar-thumb { background: rgba(245,185,65,.35); border-radius: 4px; }
.admin-tab {
    padding: 10px 14px; background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    font-size: .82rem; font-weight: 600;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: color .15s, border-color .15s, background .15s;
    white-space: nowrap;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    border-radius: 8px 8px 0 0;
    flex: 0 0 auto;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active {
    color: var(--owner-gold);
    border-bottom-color: var(--owner-gold);
    text-shadow: 0 0 10px rgba(245,185,65,.35);
}

/* Tab content — wrap each panel in a dash-card-like surface */
.admin-tab-content { display: none; }
.admin-tab-content.active {
    display: block;
    background: var(--bg-elev-1);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    animation: dashFadeIn .2s ease;
}
.admin-tab-content > h2,
.admin-tab-content > h3 {
    margin: 0 0 12px;
    font-size: 1.05rem; font-weight: 700;
    display: inline-flex; align-items: center; gap: 8px;
}
.admin-tab-content > h2 i,
.admin-tab-content > h3 i { color: var(--owner-gold); }

/* Nested sub-tabs (KYC / streamer approval / verified …) */
.admin-stabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.admin-stab {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-elev-2);
    color: var(--text-muted);
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.admin-stab.active {
    color: var(--owner-gold);
    border-color: rgba(245,185,65,.45);
    background: rgba(245,185,65,.08);
}
.admin-stab-content {
    padding-bottom: 56px;
    margin-bottom: 24px;
    min-height: 120px;
}

/* Table — mirrors .dash-table */
.admin-table-wrap { overflow-x: auto; border-radius: 10px; }
.admin-table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    font-size: .88rem;
    background: var(--bg-elev-2);
    border-radius: 10px;
    overflow: hidden;
}
.admin-table th {
    background: var(--bg-elev-3, var(--bg-elev-2));
    padding: 11px 14px; text-align: start;
    color: var(--text-muted);
    font-weight: 600; font-size: .78rem;
    text-transform: uppercase; letter-spacing: .03em;
    white-space: nowrap;
    border-bottom: 1px solid var(--line);
}
.admin-table th.tl-th-sort {
    cursor: pointer;
    user-select: none;
    transition: color .15s;
}
.admin-table th.tl-th-sort:hover { color: var(--text); }
.admin-table th.tl-th-sort.is-active { color: var(--owner-gold, var(--brand)); }
.admin-table th.tl-th-sort .tl-sort-icon {
    display: inline-block;
    margin-inline-start: 4px;
    font-size: .65rem;
    opacity: .45;
    vertical-align: middle;
}
.admin-table th.tl-th-sort.is-active .tl-sort-icon { opacity: 1; }
.admin-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-elev-1); }
.admin-table .user-cell { display: flex; align-items: center; gap: 10px; }
.admin-table .user-cell img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.tl-admin-google-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: rgba(255,255,255,.06);
    vertical-align: middle;
}
.tl-admin-google-icon svg { display: block; }

/* Status badges */
.badge-status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.badge-live   { background: rgba(249,58,58,.15); color: #f93a3a; }
.badge-ban    { background: rgba(244,63,94,.15);  color: var(--danger); }
.badge-ok     { background: rgba(34,197,94,.15);  color: var(--success); }
.badge-mod    { background: rgba(30,86,245,.15); color: var(--brand); }

/* Action buttons row */
.action-row { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-xs { font-size: 0.75rem; padding: 4px 10px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; font-weight: 600; transition: all .2s; }
.btn-xs.btn-ban    { background: rgba(244,63,94,.12); color: var(--danger); border-color: var(--danger); }
.btn-xs.btn-ban:hover { background: var(--danger); color: #fff; }
.btn-xs.btn-unban  { background: rgba(34,197,94,.12); color: var(--success); border-color: var(--success); }
.btn-xs.btn-unban:hover { background: var(--success); color: #fff; }
.btn-xs.btn-badge  { background: rgba(30,86,245,.1); color: var(--brand); border-color: var(--brand); }
.btn-xs.btn-badge:hover { background: var(--brand); color: #fff; }
.btn-xs.btn-hbd-off { background: rgba(255,255,255,.06); color: var(--text-muted); border: 1px solid var(--line); }
.btn-xs.btn-hbd-off:hover { background: rgba(245,185,65,.15); color: #ffd47a; border-color: #f5b941; }
.btn-xs.btn-hbd-on { background: linear-gradient(135deg, #f5b941, #ffd47a); color: #1a1208; border: 1px solid #f5b941; font-weight: 800; box-shadow: 0 0 12px rgba(245,185,65,.35); }
.btn-xs.btn-hbd-on:hover { filter: brightness(1.05); }
.btn-xs.btn-mod    { background: rgba(34,197,94,.1); color: var(--success); border-color: var(--success); }
.btn-xs.btn-mod:hover { background: var(--success); color: #fff; }
.btn-xs.btn-end    { background: rgba(244,63,94,.12); color: var(--danger); border-color: var(--danger); }
.btn-xs.btn-end:hover { background: var(--danger); color: #fff; }
.btn-xs.btn-edit   { background: rgba(96,165,250,.12); color: #60a5fa; border-color: #60a5fa; }
.btn-xs.btn-edit:hover { background: #3b82f6; color: #fff; }
.btn-xs.btn-ghost  { background: transparent; color: var(--text-muted); border-color: var(--line); }
.btn-xs.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); background: rgba(255,255,255,.04); }
.badge-hbd-off { background: rgba(255,255,255,.06); color: var(--text-muted); }

/* Search input */
.admin-search { display: flex; gap: 10px; margin-bottom: 14px; align-items: center; flex-wrap: wrap; }
.admin-search input {
    flex: 1; min-width: 200px;
    padding: 9px 14px; border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg-elev-2); color: var(--text);
    font-size: .9rem;
    transition: border-color .15s;
}
.admin-search input:focus { outline: none; border-color: var(--brand); }

/* Pagination */
.admin-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.admin-page-btn {
    padding: 6px 14px; border-radius: 8px;
    border: 1px solid var(--line); background: var(--bg-elev-2);
    color: var(--text-muted); cursor: pointer; font-size: .85rem;
    transition: all .15s;
}
.admin-page-btn:hover { color: var(--text); border-color: var(--owner-gold, var(--brand)); }
.admin-page-btn.active { background: var(--owner-gold, var(--brand)); color: #1a1208; border-color: var(--owner-gold, var(--brand)); }
.admin-page-btn:disabled { opacity: .4; cursor: not-allowed; }
.admin-pagination-meta {
    width: 100%;
    text-align: center;
    font-size: .78rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.admin-wrap .admin-pagination {
    display: flex; gap: 8px; justify-content: center; align-items: center;
    flex-wrap: wrap; margin-top: 16px;
}
.admin-wrap .owner-kb-hint {
    color: var(--text-muted);
    font-size: .82rem;
    margin: 0 0 12px;
}
.admin-wrap .owner-role-select {
    min-width: 120px;
    max-width: 160px;
}

@media (max-width: 900px) {
    .admin-emoji-bottom-split { grid-template-columns: 1fr !important; }
}

/* Modal */
.admin-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 1000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.admin-modal-backdrop.open { display: flex; }
.admin-modal { background: var(--bg-elev-1); border: 1px solid var(--line); border-radius: 14px; padding: 24px; min-width: 340px; max-width: 480px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.admin-modal h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 16px; display: inline-flex; align-items: center; gap: 8px; }
.admin-modal h3 i { color: var(--brand); }
.admin-modal .form-group { margin-bottom: 14px; }
.admin-modal label { display: block; font-size: .82rem; color: var(--text-muted); margin-bottom: 6px; }
.admin-modal input, .admin-modal select, .admin-modal textarea {
    width: 100%; padding: 9px 12px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--bg-elev-2); color: var(--text); font-size: .9rem;
}
.admin-modal input:focus, .admin-modal select:focus, .admin-modal textarea:focus { outline: none; border-color: var(--brand); }
.admin-modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* ── Admin permissions modal redesign ── */
#adminPermModal .aperm-shell {
    max-width: 820px; width: min(96vw, 820px); padding: 0; overflow: hidden;
    display: flex; flex-direction: column; max-height: min(92vh, 900px);
    background: var(--bg-elev-1); border: 1px solid var(--line); border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0,0,0,.55);
}
#adminPermModal .aperm-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    padding: 16px 18px; border-bottom: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(30,86,245,.12), rgba(167,139,250,.08));
}
#adminPermModal .aperm-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
#adminPermModal .aperm-user img {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
    border: 2px solid rgba(255,255,255,.12); background: var(--bg-elev-2); flex-shrink: 0;
}
#adminPermModal .aperm-user strong { display: block; font-size: .95rem; line-height: 1.25; }
#adminPermModal .aperm-user small { color: var(--text-muted); font-size: .78rem; }
#adminPermModal .aperm-close {
    width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line);
    background: var(--bg-elev-2); color: var(--text-muted); cursor: pointer; flex-shrink: 0;
}
#adminPermModal .aperm-close:hover { color: var(--text); border-color: rgba(255,255,255,.2); }
#adminPermModal .aperm-body { padding: 14px 16px; overflow-y: auto; flex: 1; min-height: 0; }
#adminPermModal .aperm-modes {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px;
}
@media (max-width: 640px) {
    #adminPermModal .aperm-modes { grid-template-columns: 1fr; }
}
#adminPermModal .aperm-mode {
    display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
    padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
    background: var(--bg-elev-2); transition: border-color .15s, background .15s, box-shadow .15s;
}
#adminPermModal .aperm-mode:hover { border-color: rgba(30,86,245,.35); }
#adminPermModal .aperm-mode.is-on {
    border-color: rgba(30,86,245,.55);
    background: rgba(30,86,245,.1);
    box-shadow: 0 0 0 1px rgba(30,86,245,.2);
}
#adminPermModal .aperm-mode input { margin-top: 3px; accent-color: var(--brand); flex-shrink: 0; width: auto; }
#adminPermModal .aperm-mode .t { font-weight: 700; font-size: .86rem; margin-bottom: 3px; color: var(--text); }
#adminPermModal .aperm-mode .d { font-size: .74rem; color: var(--text-muted); line-height: 1.45; }
#adminPermModal .aperm-toolbar {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px;
}
#adminPermModal .aperm-search {
    flex: 1; min-width: 160px; padding: 8px 12px; border-radius: 9px;
    border: 1px solid var(--line); background: var(--bg-elev-2); color: var(--text); font-size: .84rem;
}
#adminPermModal .aperm-count {
    font-size: .76rem; color: var(--text-muted); padding: 4px 10px; border-radius: 999px;
    background: rgba(255,255,255,.04); border: 1px solid var(--line); white-space: nowrap;
}
#adminPermModal .aperm-groups { display: flex; flex-direction: column; gap: 12px; }
#adminPermModal .aperm-group {
    border: 1px solid var(--line); border-radius: 12px; background: var(--bg-elev-2); overflow: hidden;
}
#adminPermModal .aperm-group-hd {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.06);
    background: rgba(0,0,0,.18);
}
#adminPermModal .aperm-group-hd .left { display: flex; align-items: center; gap: 8px; min-width: 0; }
#adminPermModal .aperm-group-hd .left i {
    width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(30,86,245,.15); color: #93b4ff; font-size: .8rem; flex-shrink: 0;
}
#adminPermModal .aperm-group-hd strong { font-size: .84rem; }
#adminPermModal .aperm-group-hd .hint { display: block; font-size: .7rem; color: var(--text-muted); font-weight: 400; margin-top: 2px; }
#adminPermModal .aperm-chips {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 10px;
}
@media (max-width: 560px) {
    #adminPermModal .aperm-chips { grid-template-columns: 1fr; }
}
#adminPermModal .aperm-chip {
    display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
    padding: 9px 10px; border-radius: 10px; border: 1px solid transparent;
    background: rgba(255,255,255,.03); transition: border-color .12s, background .12s;
}
#adminPermModal .aperm-chip:hover { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.05); }
#adminPermModal .aperm-chip.is-checked {
    border-color: rgba(30,86,245,.4); background: rgba(30,86,245,.12);
}
#adminPermModal .aperm-chip.is-master {
    grid-column: 1 / -1; border-style: dashed; border-color: rgba(245,185,65,.28);
    background: rgba(245,185,65,.06);
}
#adminPermModal .aperm-chip.is-master.is-checked {
    border-color: rgba(245,185,65,.55); background: rgba(245,185,65,.12);
}
#adminPermModal .aperm-chip.is-child { margin-inline-start: 8px; }
#adminPermModal .aperm-chip input { width: auto; margin: 0; accent-color: var(--brand); flex-shrink: 0; }
#adminPermModal .aperm-chip .ico {
    width: 22px; text-align: center; color: var(--text-muted); font-size: .78rem; flex-shrink: 0;
}
#adminPermModal .aperm-chip.is-checked .ico { color: #93b4ff; }
#adminPermModal .aperm-chip .lbl { font-size: .8rem; font-weight: 600; color: var(--text); line-height: 1.3; }
#adminPermModal .aperm-chip.is-hidden { display: none; }
#adminPermModal .aperm-empty {
    text-align: center; padding: 28px 12px; color: var(--text-muted); font-size: .85rem;
}
#adminPermModal .aperm-foot {
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center;
    padding: 12px 16px; border-top: 1px solid var(--line); background: rgba(0,0,0,.2);
}
#adminPermModal .aperm-foot .note { font-size: .72rem; color: var(--text-muted); max-width: 420px; line-height: 1.4; }
#adminPermModal .aperm-foot .acts { display: flex; gap: 8px; margin-inline-start: auto; }
#adminPermModal .aperm-pick { opacity: 1; transition: opacity .15s; }
#adminPermModal .aperm-pick.is-disabled { opacity: .38; pointer-events: none; filter: grayscale(.2); }

/* User badges row */
.user-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.user-badge-pill { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; font-size: .7rem; font-weight: 700; background: rgba(30,86,245,.15); color: var(--brand); }

/* Filter pills (dashboard-style) */
.user-filter-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.user-filter-pills .filter-pill,
.user-filter-pills button {
    padding: 6px 14px; border-radius: 999px;
    background: var(--bg-elev-2); border: 1px solid var(--line);
    color: var(--text-muted); font-size: .82rem; font-weight: 600;
    cursor: pointer; transition: all .15s;
}
.user-filter-pills .filter-pill:hover,
.user-filter-pills button:hover { color: var(--text); border-color: var(--brand); }
.user-filter-pills .filter-pill.active,
.user-filter-pills button.active { background: var(--brand); color: #fff; border-color: var(--brand); }

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

/* ---- Admin Mobile ---- */
@media (max-width: 768px) {
    .admin-wrap { padding: 12px 8px; }
    .admin-header { padding: 12px 14px; }
    .admin-header h1 { font-size: 1.15rem; }
    .admin-tabs { gap: 2px; }
    .admin-tabs::-webkit-scrollbar { display: none; }
    .admin-tab { padding: 9px 12px; font-size: .72rem; }
    .admin-tab i { font-size: .8rem; }
    .admin-tab-content.active { padding: 12px; border-radius: 12px; }
    .admin-table th, .admin-table td { padding: 8px 10px; font-size: .78rem; }
    .admin-table .user-cell img { width: 26px; height: 26px; }
    .admin-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .admin-stat-card { padding: 12px 10px; }
    .admin-stat-card .stat-num { font-size: 1.25rem; }
    .admin-modal { padding: 18px 16px; }
    .admin-search input { font-size: .85rem; padding: 8px 12px; }
    .owner-presence,
    .owner-visits { grid-template-columns: repeat(2, 1fr); padding: 12px; }
    .op-card { padding: 10px; gap: 10px; }
    .op-icon { width: 32px; height: 32px; flex-basis: 32px; font-size: .9rem; }
    .op-num { font-size: 1.15rem; }
}
@media (max-width: 480px) {
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ── Shared pagination control (tickets, reports, bug reports, broadcast apps) ── */
.tl-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 0;
    font-size: .82rem;
    color: var(--text-muted);
}
.tl-pager-info {
    margin-inline-end: 10px;
    font-weight: 600;
    color: var(--text);
}
.tl-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--line);
    background: var(--bg-elev-2);
    color: var(--text);
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.tl-pager-btn:hover:not(:disabled) {
    background: var(--bg-elev-1);
    border-color: var(--owner-gold);
    color: var(--owner-gold);
}
.tl-pager-btn[aria-current="true"] {
    background: linear-gradient(135deg, var(--owner-gold), var(--owner-gold-2));
    color: #1a1208;
    border-color: var(--owner-gold);
    cursor: default;
}
.tl-pager-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* TeleMusic owner: force TeleLive button/table language inside panel */
.admin-wrap .btn {
  border-radius: 8px;
  font-weight: 700;
  font-size: .82rem;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: var(--bg-elev-2);
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
}
.admin-wrap .btn:hover { border-color: var(--owner-gold); color: var(--owner-gold); }
.admin-wrap .btn-primary,
.admin-wrap .btn.btn-primary {
  background: linear-gradient(135deg, var(--owner-gold), var(--owner-gold-2));
  color: #1a1208 !important;
  border-color: var(--owner-gold);
  box-shadow: 0 4px 14px rgba(245,185,65,.28);
}
.admin-wrap .btn-primary:hover { filter: brightness(1.05); color: #1a1208 !important; transform: none; }
.admin-wrap .btn-outline,
.admin-wrap .btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-muted);
}
.admin-wrap .btn-outline:hover,
.admin-wrap .btn-ghost:hover {
  border-color: var(--owner-gold);
  color: var(--owner-gold);
  background: rgba(245,185,65,.08);
}
.admin-wrap .btn-danger,
.admin-wrap .btn.btn-danger {
  background: rgba(244,63,94,.12);
  color: #fb7185;
  border-color: rgba(244,63,94,.45);
}
.admin-wrap .btn-danger:hover { background: #f43f5e; color: #fff; }
.admin-wrap .btn-sm { padding: 5px 10px; font-size: .75rem; }
.admin-wrap .data-table,
.admin-wrap .admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.admin-wrap .data-table th,
.admin-wrap .admin-table th {
  text-align: start;
  padding: 10px 12px;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.admin-wrap .data-table td,
.admin-wrap .admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.admin-wrap .data-table tr:hover td,
.admin-wrap .admin-table tr:hover td { background: var(--bg-elev-2); }
.admin-wrap .admin-table-wrap,
.admin-wrap .owner-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elev-1);
}
.admin-wrap .badge-status,
.admin-wrap .badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: .72rem; font-weight: 700;
}
.admin-wrap .badge-success, .admin-wrap .badge-ok { background: rgba(34,197,94,.15); color: #4ade80; }
.admin-wrap .badge-danger, .admin-wrap .badge-ban { background: rgba(244,63,94,.15); color: #fb7185; }
.admin-wrap .badge-warning { background: rgba(245,185,65,.15); color: var(--owner-gold); }
.admin-wrap .owner-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.admin-wrap .owner-quick-grid .btn,
.admin-wrap .owner-quick-grid .btn-xs {
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  width: 100%;
}
.admin-wrap .tmx-apply-btn.btn-xs {
  margin-top: 10px;
  padding: 8px 14px;
  font-size: .82rem;
}
.admin-wrap .owner-inline-form .btn-xs {
  min-height: 36px;
  align-self: end;
}
.admin-wrap .owner-inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elev-2);
}
.admin-wrap .owner-inline-form .form-group { margin: 0; }
.admin-wrap .owner-inline-form label {
  display: block; font-size: .72rem; color: var(--text-muted); margin-bottom: 6px; font-weight: 600;
}
.admin-wrap .owner-inline-form input,
.admin-wrap .admin-search input,
.admin-wrap .form-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev-1);
  color: var(--text);
  font-size: .9rem;
}
.admin-wrap .owner-inline-form input:focus,
.admin-wrap .admin-search input:focus,
.admin-wrap .form-input:focus {
  outline: none; border-color: var(--owner-gold);
}
.admin-wrap .approval-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-elev-2);
  border-right: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.admin-wrap .approval-card.is-focused {
  border-color: var(--owner-gold);
  box-shadow: 0 0 0 1px rgba(245,185,65,.35);
}
.admin-wrap .approval-info { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.admin-wrap .approval-info img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.admin-wrap .approval-info h4 { margin: 0 0 4px; font-size: .92rem; }
.admin-wrap .approval-info p { margin: 0; color: var(--text-muted); font-size: .8rem; }
.admin-wrap .approval-actions,
.admin-wrap .approval-card .action-row { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }
body.page-admin .admin-wrap { padding-bottom: 24px; }
@media (max-width: 700px) {
  .admin-wrap .approval-card { flex-direction: column; align-items: stretch; }
  .admin-wrap .approval-card .action-row { width: 100%; }
  .admin-wrap .approval-card .action-row .btn-xs { flex: 1; justify-content: center; }
}
.admin-wrap .owner-two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.admin-wrap .owner-two-col > section {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--bg-elev-2);
}
.admin-wrap .owner-two-col h3,
.admin-wrap .owner-quick h3,
.admin-wrap .owner-chart h3 {
  margin: 0 0 12px; font-size: .95rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: 8px;
}
.admin-wrap .owner-two-col h3::before,
.admin-wrap .owner-quick h3::before { content: ""; }
@media (max-width: 900px) {
  .admin-wrap .owner-two-col { grid-template-columns: 1fr; }
}
/* Override green tab-btn leftovers inside owner */
.admin-wrap .tab-btn { display: none !important; }
