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

:root {
  --bg:           #f4f5f7;
  --surface:      #ffffff;
  --surface-2:    #f8f9fb;
  --border:       #e4e6ea;
  --text:         #0f1117;
  --text-muted:   #6b7280;
  --text-soft:    #9ca3af;
  --accent:       #5865F2;
  --accent-light: #eef0ff;
  --accent-hover: #4752c4;
  --danger:       #ef4444;
  --danger-light: #fef2f2;
  --success:      #22c55e;
  --warning:      #f59e0b;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.10);
  --transition:   .18s cubic-bezier(.4,0,.2,1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #0f1117;
    --surface:      #1a1d27;
    --surface-2:    #20232f;
    --border:       #2d3040;
    --text:         #f0f1f5;
    --text-muted:   #9ca3af;
    --text-soft:    #6b7280;
    --accent:       #7289da;
    --accent-light: #1e2140;
    --accent-hover: #5b6db5;
    --danger-light: #2a1515;
    --shadow:       0 1px 3px rgba(0,0,0,.3);
    --shadow-md:    0 4px 16px rgba(0,0,0,.3);
    --shadow-lg:    0 8px 32px rgba(0,0,0,.4);
  }
}

html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; }

/* ── SCROLLBAR ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-soft); }

/* ── NAV ─────────────────────────────────────────────── */
.nav { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 200; backdrop-filter: blur(12px); }
.nav-inner { max-width: 1280px; margin: 0 auto; padding: 0 28px; height: 62px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-weight: 800; font-size: 18px; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 10px; letter-spacing: -.3px; }
.logo-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.nav-username { font-size: 14px; font-weight: 500; color: var(--text-muted); }

/* ── BUTTONS ─────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 18px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all var(--transition); text-decoration: none; white-space: nowrap; user-select: none; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary  { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(88,101,242,.35); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 16px rgba(88,101,242,.4); }
.btn-outline  { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.btn-ghost    { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-success  { background: var(--success); color: #fff; }
.btn-lg  { padding: 14px 28px; font-size: 15px; border-radius: var(--radius); }
.btn-sm  { padding: 6px 12px; font-size: 13px; border-radius: 6px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 8px; }
.btn-icon-lg { width: 44px; height: 44px; padding: 0; border-radius: 10px; }

/* ── HERO ────────────────────────────────────────────── */
.hero { padding: 100px 28px 80px; text-align: center; position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(88,101,242,.12), transparent); pointer-events: none; }
.hero-inner { max-width: 700px; margin: 0 auto; position: relative; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-light); color: var(--accent); font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 99px; margin-bottom: 24px; border: 1px solid rgba(88,101,242,.2); }
.hero h1 { font-size: clamp(32px, 6vw, 58px); font-weight: 900; line-height: 1.1; margin-bottom: 20px; letter-spacing: -.5px; }
.accent { color: var(--accent); }
.hero p { font-size: 18px; color: var(--text-muted); margin-bottom: 40px; line-height: 1.7; max-width: 520px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 60px; }
.hero-preview { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px 24px; display: flex; align-items: center; gap: 16px; max-width: 420px; margin: 0 auto; box-shadow: var(--shadow-lg); text-align: left; }
.hero-preview-thumb { width: 56px; height: 56px; border-radius: 10px; background: var(--accent-light); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--accent); }
.hero-preview-info { flex: 1; min-width: 0; }
.hero-preview-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-preview-sub { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.hero-preview-bar { height: 3px; background: var(--border); border-radius: 99px; margin-top: 12px; overflow: hidden; }
.hero-preview-fill { height: 100%; width: 42%; background: var(--accent); border-radius: 99px; }

/* ── FEATURES ────────────────────────────────────────── */
.section { padding: 64px 28px; }
.section-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); margin-bottom: 12px; }
.section-title { font-size: clamp(24px, 4vw, 36px); font-weight: 800; margin-bottom: 16px; letter-spacing: -.3px; }
.section-sub   { font-size: 16px; color: var(--text-muted); max-width: 480px; line-height: 1.6; margin-bottom: 48px; }
.features-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; transition: all var(--transition); }
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--accent); }
.feature-icon { width: 46px; height: 46px; background: var(--accent-light); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--accent); margin-bottom: 18px; }
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature-card p  { font-size: 14px; color: var(--text-muted); line-height: 1.65; }

/* ── STATS ───────────────────────────────────────────── */
.stats-section { background: var(--accent); padding: 48px 28px; }
.stats-inner { max-width: 800px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stat { text-align: center; color: #fff; }
.stat-num   { display: block; font-size: 42px; font-weight: 900; letter-spacing: -1px; }
.stat-label { font-size: 14px; opacity: .75; margin-top: 4px; }

/* ── FOOTER ──────────────────────────────────────────── */
.footer { padding: 28px; text-align: center; color: var(--text-soft); font-size: 13px; border-top: 1px solid var(--border); }

/* ── PAGE ────────────────────────────────────────────── */
.page { max-width: 1200px; margin: 0 auto; padding: 36px 28px 80px; }
.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 28px; font-weight: 800; letter-spacing: -.3px; }
.page-header p  { color: var(--text-muted); margin-top: 6px; font-size: 15px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 14px; margin-bottom: 12px; transition: color var(--transition); }
.back-link:hover { color: var(--accent); text-decoration: none; }
.guild-header { display: flex; align-items: center; gap: 14px; }
.guild-header-icon { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.guild-header-initial { width: 48px; height: 48px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 22px; font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* ── GUILD GRID ──────────────────────────────────────── */
.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.guild-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 28px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-decoration: none; color: var(--text); transition: all var(--transition); }
.guild-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); transform: translateY(-3px); text-decoration: none; }
.guild-card-icon img { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; }
.guild-initial { width: 68px; height: 68px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 28px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.guild-name { font-weight: 700; font-size: 14px; text-align: center; }
.guild-badge { font-size: 11px; background: var(--accent-light); color: var(--accent); padding: 3px 8px; border-radius: 99px; font-weight: 600; }

/* ── DASHBOARD LAYOUT ────────────────────────────────── */
.dash-layout { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
.dash-left { display: flex; flex-direction: column; gap: 20px; }
.dash-right { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 82px; }

/* ── CARDS ───────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.card-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-title-icon { color: var(--accent); }
.card-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.6; }

/* ── NOW PLAYING ─────────────────────────────────────── */
.np-wrap { display: flex; gap: 18px; align-items: flex-start; }
.np-thumb { width: 88px; height: 88px; border-radius: 10px; object-fit: cover; flex-shrink: 0; box-shadow: var(--shadow-md); }
.np-thumb-placeholder { width: 88px; height: 88px; border-radius: 10px; background: var(--accent-light); display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0; }
.np-info { flex: 1; min-width: 0; }
.np-title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.np-artist { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.np-duration { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.np-progress-bar { height: 4px; background: var(--border); border-radius: 99px; margin-top: 14px; overflow: hidden; }
.np-progress-fill { height: 100%; background: var(--accent); border-radius: 99px; width: 0%; transition: width 1s linear; }
.np-progress-text { font-family: monospace; font-size: 11px; color: var(--text-soft); margin-top: 6px; white-space: pre; overflow: hidden; }

.player-controls { display: flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.ctrl-btn { width: 38px; height: 38px; border-radius: 9px; border: 1.5px solid var(--border); background: var(--surface-2); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); transition: all var(--transition); }
.ctrl-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.ctrl-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.ctrl-btn-lg { width: 46px; height: 46px; border-radius: 11px; }
.ctrl-play { background: var(--accent); color: #fff; border-color: var(--accent); }
.ctrl-play:hover { background: var(--accent-hover); color: #fff; }
.ctrl-danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-light); }

.loop-select { padding: 6px 10px; border: 1.5px solid var(--border); border-radius: 7px; font-size: 13px; background: var(--surface); color: var(--text); cursor: pointer; outline: none; }
.loop-select:focus { border-color: var(--accent); }

.volume-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.volume-icon { color: var(--text-muted); flex-shrink: 0; }
.volume-slider { flex: 1; -webkit-appearance: none; height: 4px; border-radius: 99px; background: var(--border); outline: none; cursor: pointer; }
.volume-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.volume-slider::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); cursor: pointer; border: none; }
#volume-label { font-size: 13px; font-weight: 600; width: 38px; text-align: right; color: var(--text-muted); }

/* ── PLAY INPUT ──────────────────────────────────────── */
.play-form { display: flex; gap: 8px; }
.play-input { flex: 1; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; background: var(--surface-2); color: var(--text); outline: none; transition: border-color var(--transition); }
.play-input:focus { border-color: var(--accent); background: var(--surface); }
.play-input::placeholder { color: var(--text-soft); }
.channel-select { padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: var(--surface-2); color: var(--text); outline: none; min-width: 0; max-width: 160px; }
.channel-select:focus { border-color: var(--accent); }

/* ── QUEUE ───────────────────────────────────────────── */
.queue-list { display: flex; flex-direction: column; gap: 3px; max-height: 400px; overflow-y: auto; }
.queue-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; transition: background var(--transition); }
.queue-row:hover { background: var(--surface-2); }
.queue-pos { font-size: 11px; color: var(--text-soft); width: 22px; text-align: right; flex-shrink: 0; font-weight: 600; }
.queue-thumb { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.queue-thumb-placeholder { width: 36px; height: 36px; border-radius: 6px; background: var(--accent-light); flex-shrink: 0; }
.queue-info { flex: 1; min-width: 0; }
.queue-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.queue-meta  { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.queue-actions { display: flex; gap: 4px; flex-shrink: 0; }
.queue-btn { width: 28px; height: 28px; border-radius: 6px; border: none; background: none; cursor: pointer; color: var(--text-soft); display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.queue-btn:hover { background: var(--surface-2); color: var(--text); }
.queue-btn.del:hover { background: var(--danger-light); color: var(--danger); }

/* ── RADIO ───────────────────────────────────────────── */
.radio-filters { display: flex; gap: 8px; margin-bottom: 14px; }
.radio-search { flex: 1; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: var(--surface-2); color: var(--text); outline: none; }
.radio-search:focus { border-color: var(--accent); }
.radio-country-sel { padding: 8px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: var(--surface-2); color: var(--text); outline: none; }
.radio-list { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; }
.radio-item { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; transition: all var(--transition); }
.radio-item:hover { border-color: var(--accent); background: var(--accent-light); }
.radio-name    { font-size: 14px; font-weight: 600; }
.radio-country { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── DJ ROLE ─────────────────────────────────────────── */
.form-row { display: flex; gap: 8px; align-items: center; }
.select { flex: 1; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; background: var(--surface-2); color: var(--text); outline: none; }
.select:focus { border-color: var(--accent); }
.saved-msg { margin-top: 10px; font-size: 13px; color: var(--success); font-weight: 600; display: flex; align-items: center; gap: 5px; }

/* ── TOAST ───────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 9999; }
.toast { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 18px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; min-width: 240px; animation: slideIn .2s ease; }
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--accent); }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(120%); opacity: 0; } }

/* ── SCROLL ANIMATIONS ───────────────────────────────── */
.fade-up { opacity: 0; transform: translateY(28px); transition: opacity .55s cubic-bezier(.4,0,.2,1), transform .55s cubic-bezier(.4,0,.2,1); }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up-delay-1 { transition-delay: .1s; }
.fade-up-delay-2 { transition-delay: .2s; }
.fade-up-delay-3 { transition-delay: .3s; }
.fade-up-delay-4 { transition-delay: .4s; }

/* ── MISC ────────────────────────────────────────────── */
.empty-state { padding: 32px; text-align: center; color: var(--text-muted); font-size: 14px; }
.empty-state svg { margin: 0 auto 10px; opacity: .35; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; }
.tag-accent { background: var(--accent-light); color: var(--accent); }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 900px) {
  .dash-layout { grid-template-columns: 1fr; }
  .dash-right { position: static; }
}
@media (max-width: 600px) {
  .nav-inner, .page { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 64px 16px 48px; }
  .stats-inner { grid-template-columns: 1fr; gap: 16px; }
}