﻿/* TeleMusic v3.0 - Spotify-inspired Professional Design */

/* ============ 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 ============ */
:root {
    --bg-primary: #000000;
    --bg-secondary: #121212;
    --bg-tertiary: #181818;
    --bg-card: #1a1a1a;
    --bg-hover: #282828;
    --bg-active: #333333;
    --bg-elevated: #242424;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #6a6a6a;
    --accent: #1db954;
    --accent-hover: #1ed760;
    --accent-dark: #158a3e;
    --danger: #e91e63;
    --warning: #ff9800;
    --info: #2196f3;
    --success: #1db954;
    --border-color: rgba(255,255,255,0.08);
    --sidebar-width: 280px;
    --player-height: 80px;
    --topbar-height: 64px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --transition: 0.2s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ LIGHT THEME ============ */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #eeeeee;
    --bg-card: #ffffff;
    --bg-hover: #e8e8e8;
    --bg-active: #d5d5d5;
    --bg-elevated: #fafafa;
    --text-primary: #191414;
    --text-secondary: #535353;
    --text-muted: #888888;
    --border-color: rgba(0,0,0,0.1);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
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 var(--player-height);
    height: 100vh;
    animation: fadeIn 0.4s ease;
}

/* ============ 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; width: 32px; height: 32px; border-radius: 50%; background: var(--bg-hover); transition: var(--transition); }
.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: var(--bg-secondary);
    border-radius: var(--radius-lg) 0 0 0;
}

/* ============ TOPBAR ============ */
.topbar {
    height: var(--topbar-height);
    padding: 0 24px; display: flex; align-items: center; gap: 16px;
    background: var(--bg-secondary);
    position: sticky; top: 0; z-index: 100;
}
.menu-toggle { display: none; width: 40px; height: 40px; border-radius: 50%; font-size: 1.1rem; transition: var(--transition); }
.menu-toggle:hover { background: var(--bg-hover); }
.topbar-search {
    flex: 1; max-width: 400px; position: relative;
    background: var(--bg-hover); border-radius: 500px;
    display: flex; align-items: center; padding: 0 16px;
    border: 1px solid transparent; transition: var(--transition);
}
.topbar-search:focus-within { border-color: var(--accent); background: var(--bg-active); }
.topbar-search i { color: var(--text-muted); font-size: 0.9rem; }
.topbar-search input {
    flex: 1; background: none; border: none; outline: none;
    color: var(--text-primary); padding: 10px 12px;
    font-size: 0.9rem;
}
.topbar-search input::placeholder { color: var(--text-muted); }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-right: auto; }
.topbar-btn {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); transition: all var(--transition);
    position: relative;
}
.topbar-btn:hover { color: var(--text-primary); background: var(--bg-hover); transform: scale(1.05); }
.lang-toggle {
    width: auto; padding: 0 12px; border-radius: 500px;
    background: var(--bg-hover); font-weight: 600; font-size: 0.75rem;
    letter-spacing: 0.5px;
}
.lang-toggle:hover { background: var(--bg-active); }
.notif-badge {
    position: absolute; top: -2px; left: -2px;
    background: var(--danger); color: #fff; font-size: 0.6rem; font-weight: 700;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    animation: bounceIn 0.4s ease;
}

/* ============ 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%; padding-bottom: 100%;
    border-radius: var(--radius-md); overflow: hidden;
    margin-bottom: 12px; background: var(--bg-hover);
}
.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: 4px; background: rgba(255,255,255,0.1);
    cursor: pointer; position: relative;
    transition: height var(--transition);
}
.player-progress-bar:hover { height: 6px; }
.player-progress {
    height: 100%; background: var(--accent);
    width: 0; transition: none; position: relative;
    border-radius: 0 2px 2px 0;
}
.player-progress-bar:hover .player-progress::after {
    content: ''; position: absolute; left: 0; top: 50%;
    transform: translateY(-50%);
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--text-primary);
}
.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;
}
.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; }
.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: 12px; min-width: 200px; justify-content: flex-end; }
.player-time { font-size: 0.7rem; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.volume-control { display: flex; align-items: center; gap: 4px; }
.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: 12px; height: 12px;
    border-radius: 50%; background: var(--text-primary);
    cursor: pointer; opacity: 0; transition: opacity var(--transition);
}
.volume-control:hover .volume-slider::-webkit-slider-thumb { opacity: 1; }

/* ============ SIDE PANEL (QUEUE) ============ */
.side-panel {
    position: fixed; top: 0; left: 0; bottom: var(--player-height);
    width: 350px; background: var(--bg-elevated);
    border-right: 1px solid var(--border-color);
    z-index: 600; transform: translateX(-100%);
    transition: transform var(--transition-slow);
    display: flex; flex-direction: column;
}
.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); margin-right: 4px; }

/* ============ 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 ============ */
@media (max-width: 900px) {
    .app-container { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed; top: 0; right: 0; bottom: 0;
        width: var(--sidebar-width); z-index: 1000;
        transform: translateX(100%);
        box-shadow: var(--shadow-lg);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-close { display: flex; }
    .menu-toggle { display: flex; }
    .player { grid-column: 1; }
    .player-song-info { min-width: 120px; }
    .player-extra { display: none; }
    .main-content { border-radius: 0; }
    .page-content { padding: 16px; }
    .card-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
    .hero-banner { padding: 24px; }
    .hero-banner h1 { font-size: 1.5rem; }
    .profile-header { flex-direction: column; align-items: center; text-align: center; padding: 24px; }
    .profile-avatar { width: 120px; height: 120px; }
    .profile-info h1 { font-size: 1.5rem; }
    .profile-info .profile-meta { justify-content: center; }
    .owner-grid { grid-template-columns: repeat(2, 1fr); }
    .side-panel { width: 100%; }
    .topbar-search { max-width: none; }
}

@media (max-width: 480px) {
    .player-controls { gap: 8px; }
    .player-play { width: 32px; height: 32px; font-size: 0.85rem; }
    .player-btn { width: 28px; height: 28px; font-size: 0.75rem; }
    .player-cover { width: 40px; height: 40px; }
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .song-card { padding: 10px; }
    .section-header h2 { font-size: 1.2rem; }
    .hero-banner h1 { font-size: 1.2rem; }
    .owner-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* ============ SIDEBAR MOBILE OVERLAY ============ */
.sidebar-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    z-index: 999; display: none;
}
.sidebar-overlay.active { display: block; }

/* ============ 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: 900px) {
    html[dir="ltr"] .sidebar { right: auto; left: 0; transform: translateX(-100%); }
    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-img {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 12px;
    background: var(--bg-hover);
}
.song-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    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;
}
.topbar-premium-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f5c518, #e6a800);
    color: #111;
    font-weight: 800;
    font-size: 0.8rem;
    white-space: nowrap;
}
.topbar-premium-btn:hover { filter: brightness(1.06); }
.topbar-premium-btn i { color: #111; }
@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: 24px;
    }
    .song-detail-cover {
        width: 200px;
        height: 200px;
    }
    .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;
}
.theme-toggle:hover i {
    transform: rotate(20deg);
}
[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,
:root .theme-toggle .fa-sun { display: none; }
[data-theme="dark"] .theme-toggle .fa-moon,
:root .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(120deg, rgba(0,0,0,.75) 10%, rgba(0,0,0,.25) 55%, rgba(29,185,84,.2)),
        var(--hero-img) center/cover no-repeat,
        var(--bg-card);
    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 20%, rgba(0,0,0,.85) 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: calc(var(--player-height) + 24px); }
.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); }
