:root {
  --bg: #0c1220;
  --bg-panel: #121a2c;
  --bg-panel-2: #17203660;
  --border: rgba(255,255,255,0.08);
  --text: #eef1f8;
  --text-dim: rgba(238,241,248,0.55);
  --text-dim2: rgba(238,241,248,0.35);
  --accent: #2e8bf0;
  --accent-dark: #1c5fb0;
  --danger: #e0483f;
  --radius: 14px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', Arial, sans-serif;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ===== NAVIGACIJA ===== */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.navbar .wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: .5px; }
.logo .accent { color: var(--accent); }
.logo small { display: block; font-weight: 400; font-size: 11px; color: var(--text-dim); letter-spacing: 0; }
.nav-links { display: flex; gap: 22px; font-size: 14px; color: var(--text-dim); }
.nav-links a.active, .nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.pill { border: 1px solid var(--border); border-radius: 20px; padding: 6px 14px; font-size: 13px; }
.pill.live { background: rgba(224,72,63,0.15); border-color: rgba(224,72,63,0.4); color: #ff8b83; display:flex; align-items:center; gap:6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #ff5c53; display:inline-block; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.dot.blink { animation: pulse 1.4s infinite; }

/* ===== HERO ===== */
.hero {
  padding: 50px 0 30px;
  background: radial-gradient(ellipse at top left, rgba(46,139,240,0.12), transparent 60%);
  border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: 42px; margin: 10px 0; }
.hero h1 .accent { color: var(--accent); }
.hero p.tagline { color: var(--text-dim); max-width: 480px; margin-bottom: 22px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 24px; border: none; font-weight: 600; font-size: 14px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }

/* ===== LAYOUT GRID ===== */
.layout { display: grid; grid-template-columns: 220px 1fr 300px; gap: 20px; padding: 24px 0 60px; align-items: start; }
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; } }

.sidebar { display: flex; flex-direction: column; gap: 4px; }
.sidebar a { padding: 10px 14px; border-radius: 10px; color: var(--text-dim); font-size: 14px; display:flex; align-items:center; gap: 10px; }
.sidebar a.active, .sidebar a:hover { background: var(--bg-panel); color: var(--text); }

.card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.card h3 { margin: 0 0 14px; font-size: 14px; color: var(--text-dim); font-weight: 600; letter-spacing: .3px; }

/* ===== PLAYER ===== */
.player-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.player-cover { width: 64px; height: 64px; border-radius: 10px; background: linear-gradient(135deg,#3C3489,#26215C); flex-shrink:0; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.player-info { flex: 1; min-width: 160px; }
.player-info .now-title { font-weight: 700; font-size: 16px; }
.player-info .now-artist { color: var(--text-dim); font-size: 13px; margin-top: 2px; }
.progress { height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); width: 0%; }
.play-btn { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); border: none; color: #fff; display:flex; align-items:center; justify-content:center; font-size: 18px; flex-shrink: 0; }
.play-btn:hover { background: var(--accent-dark); }

/* ===== LISTS ===== */
.list-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.list-row:last-child { border-bottom: none; }
.list-row .rank { color: var(--text-dim2); width: 20px; display:inline-block; }
.badge-live { background: rgba(224,72,63,0.15); color: #ff8b83; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }

/* ===== CHAT ===== */
.chat-box { display: flex; flex-direction: column; height: 420px; }
.chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.chat-msg { font-size: 13px; }
.chat-msg .who { font-weight: 600; margin-right: 6px; }
.chat-msg .time { color: var(--text-dim2); font-size: 11px; margin-left: 6px; }
.chat-form { display: flex; gap: 8px; margin-top: 12px; }
.chat-form input { flex: 1; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 20px; padding: 9px 14px; color: var(--text); font-size: 13px; }
.chat-form button { background: var(--accent); border: none; color: #fff; width: 36px; height: 36px; border-radius: 50%; }
.chat-disabled { color: var(--text-dim2); text-align: center; padding: 30px 10px; font-size: 13px; }

/* ===== FORMS ===== */
.form-page { max-width: 400px; margin: 60px auto; }
.form-page .card { padding: 30px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; color: var(--text); font-size: 14px; }
.error-box { background: rgba(224,72,63,0.12); border: 1px solid rgba(224,72,63,0.3); color: #ff8b83; padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.ok-box { background: rgba(99,153,34,0.15); border: 1px solid rgba(99,153,34,0.35); color: #a9d76a; padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }

/* ===== FOOTER / SPONSORS ===== */
footer { border-top: 1px solid var(--border); padding: 20px 0; }
.sponsors-row { display: flex; align-items: center; justify-content: center; gap: 30px; padding: 20px 0; flex-wrap: wrap; color: var(--text-dim); font-size: 13px; }
.sponsors-row a { border: 1px solid var(--border); padding: 6px 16px; border-radius: 20px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-dim2); flex-wrap: wrap; gap: 10px; }

/* ===== ADMIN ===== */
.admin-wrap { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--bg-panel); border-right: 1px solid var(--border); padding: 20px 14px; }
.admin-sidebar a { display:block; padding: 10px 12px; border-radius: 8px; color: var(--text-dim); font-size: 14px; margin-bottom: 2px; }
.admin-sidebar a.active, .admin-sidebar a:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.admin-main { padding: 28px 34px; }
.admin-topbar { display:flex; justify-content: space-between; align-items:center; margin-bottom: 24px; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.admin-table th { text-align: left; color: var(--text-dim); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.admin-table td { padding: 10px; border-bottom: 1px solid var(--border); }
.btn-small { padding: 5px 12px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--text); font-size: 12px; }
.btn-small.danger { border-color: rgba(224,72,63,0.4); color: #ff8b83; }
.btn-small.ok { border-color: rgba(99,153,34,0.4); color: #a9d76a; }
.toggle { position: relative; width: 42px; height: 24px; }
.toggle input { display: none; }
.toggle .slider { position: absolute; inset:0; background: rgba(255,255,255,0.15); border-radius: 20px; transition: .2s; }
.toggle .slider:before { content:''; position:absolute; width:18px; height:18px; left:3px; top:3px; background:#fff; border-radius:50%; transition:.2s; }
.toggle input:checked + .slider { background: var(--accent); }
.toggle input:checked + .slider:before { transform: translateX(18px); }
.stat-grid { display:grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 26px; }
.stat-card { background: var(--bg-panel); border:1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.stat-card .n { font-size: 26px; font-weight: 700; }
.stat-card .l { font-size: 12px; color: var(--text-dim); }
