:root{
  --bg: #0d0f14;
  --bg-alt: #12151c;
  --sidebar-bg: #12151c;
  --card-bg: #171a22;
  --card-border: #232733;
  --text: #e8e9ed;
  --text-dim: #8b8f9c;
  --text-dimmer: #5c6070;
  --accent: #ff4d5e;
  --accent-dark: #d63447;
  --radius: 10px;
  --radius-lg: 16px;
}

:root[data-theme="light"]{
  --bg: #f4f5f8;
  --bg-alt: #ffffff;
  --sidebar-bg: #ffffff;
  --card-bg: #ffffff;
  --card-border: #e3e5ea;
  --text: #1a1d24;
  --text-dim: #5c6170;
  --text-dimmer: #9299a6;
}

:root[data-theme="light"] .card,
:root[data-theme="light"] .radio-card,
:root[data-theme="light"] .genre-card,
:root[data-theme="light"] .partner-card,
:root[data-theme="light"] .stat-card{
  box-shadow: 0 1px 3px rgba(20,20,30,.06);
}

:root[data-theme="light"] .promoted-badge{
  box-shadow: 0 1px 3px rgba(20,20,30,.15);
}
:root[data-theme="light"] .radio-thumb,
:root[data-theme="light"] .radio-logo-lg,
:root[data-theme="light"] .partner-logo-fallback{
  background: linear-gradient(135deg,#dcdee3,#c7cad2);
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}

/* ---------- SCROLLBAR PERSONALIZAT (stil eradiouri.ro) ---------- */
* {
  scrollbar-width: thin;
  scrollbar-color: #6b7080 var(--bg);
}
::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background-color: #7a7f8c;
  border-radius: 20px;
  border: 3px solid var(--bg);
  min-height: 40px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent);
}
::-webkit-scrollbar-button {
  display: block;
  background-color: var(--bg);
  height: 14px;
  width: 14px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 10px;
}
::-webkit-scrollbar-button:vertical:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238b8f9c'%3E%3Cpath d='M7 14l5-5 5 5z'/%3E%3C/svg%3E");
}
::-webkit-scrollbar-button:vertical:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238b8f9c'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}
::-webkit-scrollbar-corner {
  background: var(--bg);
}

body{
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}
a{ color: inherit; text-decoration: none; }
a:hover{ color: var(--accent); }
img{max-width:100%; display:block;}
button, input, textarea, select{ font-family: inherit; }

.layout{
  display: flex;
  min-height: 100vh;
}

/* ---------- SIDEBAR ---------- */
.sidebar{
  width: 280px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--card-border);
  padding: 22px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand-row{
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  margin-bottom: 22px; padding: 0 6px;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.theme-toggle{
  flex-shrink:0; width:36px; height:36px; border-radius:50%;
  background: var(--card-bg); border:1px solid var(--card-border);
  color: var(--text); cursor:pointer; font-size:16px;
  display:flex; align-items:center; justify-content:center;
}
.theme-toggle:hover{ border-color: var(--accent); }
.site-logo-fallback{
  width:44px;height:44px;border-radius:12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display:flex;align-items:center;justify-content:center;
  font-size:20px; flex-shrink:0;
}
.site-logo-img{ width:44px; height:44px; border-radius:12px; object-fit:cover; flex-shrink:0; }
.brand-text .name{ font-weight:700; font-size:17px; }
.brand-text .tagline{ font-size:12px; color: var(--text-dim); }

.search-box{
  display:flex; align-items:center; gap:8px;
  background: var(--card-bg);
  border:1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 18px;
}
.search-box input{
  background:none; border:none; outline:none; color:var(--text); width:100%; font-size: 14px;
}
.search-box svg{ flex-shrink:0; opacity:.6; }

.nav-list{ list-style:none; margin:0 0 20px 0; padding:0; }
.nav-list li a{
  display:flex; align-items:center; gap:10px;
  padding: 10px 12px; border-radius: var(--radius);
  color: var(--text-dim); font-size: 14px; font-weight: 500;
  margin-bottom: 2px;
}
.nav-list li a:hover{ background: var(--card-bg); color: var(--text); }
.nav-list li a.active{ background: var(--accent); color:#fff; }
.nav-list li a .badge{
  margin-left:auto; background: rgba(255,255,255,0.08); color: var(--text-dim);
  font-size:11px; padding:2px 7px; border-radius:20px;
}
.nav-list li a.active .badge{ background: rgba(255,255,255,0.25); color:#fff; }

.sidebar-heading{
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-dimmer); margin: 18px 6px 8px;
  font-weight:700;
}
.genre-list{ list-style:none; margin:0; padding:0; }
.genre-list li a{
  display:flex; align-items:center; gap:10px;
  padding: 8px 12px; border-radius: var(--radius);
  font-size: 14px; color: var(--text-dim);
}
.genre-list li a:hover{ background: var(--card-bg); color: var(--text); }
.genre-dot{ width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.genre-list li a .count{ margin-left:auto; font-size:12px; color: var(--text-dimmer); }

/* ---------- MAIN ---------- */
.main{
  flex:1;
  min-width:0;
  padding: 26px 32px 60px;
}
.topbar{
  display:flex; justify-content:space-between; align-items:flex-start; gap:20px;
  margin-bottom: 26px; flex-wrap:wrap;
}
.page-title{ font-size: 26px; font-weight:800; margin:0 0 6px; }
.page-subtitle{ color: var(--text-dim); font-size: 14px; margin:0; max-width:640px; }
.top-menu{ display:flex; gap:8px; flex-wrap:wrap; }
.top-menu a{
  padding: 8px 14px; border-radius: 20px; background: var(--card-bg);
  border:1px solid var(--card-border); font-size:13px; color:var(--text-dim);
}
.top-menu a:hover{ color: var(--text); border-color: var(--accent); }

.section{ margin-bottom: 36px; }
.section-head{
  display:flex; align-items:center; justify-content:space-between; margin-bottom: 14px;
}
.section-head h2{
  font-size: 17px; margin:0; display:flex; align-items:center; gap:8px;
}
.section-head .see-all{ font-size: 13px; color: var(--accent); font-weight:600; }

/* Radio grid cards */
.radio-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.radio-card{
  background: var(--card-bg);
  border:1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 12px;
  display:flex; align-items:center; gap:12px;
  position:relative;
  transition: border-color .15s, transform .15s;
}
.radio-card:hover{ border-color: var(--accent); transform: translateY(-1px); }
.radio-thumb{
  width:52px; height:52px; border-radius:12px; object-fit:cover; flex-shrink:0;
  background: linear-gradient(135deg,#333,#222);
}
.radio-info{ min-width:0; flex:1; }
.radio-info .rname{ font-weight:700; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.radio-info .rgenre{ font-size: 12.5px; margin-top:2px; }
.fav-btn{
  background:none;border:none;color:var(--text-dim); cursor:pointer; font-size:16px; flex-shrink:0; padding:4px;
}
.fav-btn.active, .fav-btn:hover{ color: var(--accent); }
.play-btn{
  width:38px;height:38px;border-radius:50%; border:none; cursor:pointer; flex-shrink:0;
  background: var(--accent); color:#fff; display:flex; align-items:center; justify-content:center;
  font-size:14px; transition: background .15s;
}
.play-btn:hover{ background: var(--accent-dark); }
.play-btn.playing{ background:#22c55e; }
.promoted-badge{
  position:absolute; top:-8px; right:10px;
  background: var(--accent); color:#fff; font-size:10px; font-weight:800;
  padding:3px 8px; border-radius: 6px; letter-spacing:.03em;
}

/* Genre discovery cards */
.genre-grid{
  display:grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap:14px;
}
.genre-card{
  background: var(--card-bg); border:1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 16px; display:flex; align-items:center; gap:12px;
}
.genre-card:hover{ border-color: var(--accent); }
.genre-icon{
  width:38px;height:38px;border-radius:10px; display:flex;align-items:center;justify-content:center;
  font-size:16px; flex-shrink:0;
}
.genre-card .gname{ font-weight:700; font-size:14.5px; }
.genre-card .gcount{ font-size:12.5px; color: var(--text-dim); }
.genre-card .arrow{ margin-left:auto; color: var(--text-dim); }

/* Buttons */
.btn{
  display:inline-flex; align-items:center; gap:8px; justify-content:center;
  padding: 10px 20px; border-radius: 999px; font-weight:700; font-size:14px;
  border:none; cursor:pointer; text-align:center;
}
.btn-primary{ background: var(--accent); color:#fff; }
.btn-primary:hover{ background: var(--accent-dark); color:#fff; }
.btn-outline{ background: transparent; border:1px solid var(--card-border); color: var(--text); }
.btn-outline:hover{ border-color: var(--accent); color: var(--accent); }
.btn-sm{ padding: 6px 14px; font-size: 13px; }
.btn-danger{ background:#dc2626; color:#fff; }
.btn-block{ width:100%; }

/* Forms */
.form-group{ margin-bottom: 16px; }
.form-group label{ display:block; font-size:13px; font-weight:600; margin-bottom:6px; color: var(--text-dim); }
.form-control{
  width:100%; background: var(--bg-alt); border:1px solid var(--card-border); color: var(--text);
  padding: 10px 12px; border-radius: var(--radius); font-size:14px; outline:none;
}
.form-control:focus{ border-color: var(--accent); }
textarea.form-control{ resize: vertical; min-height: 100px; }
.form-row{ display:flex; gap:14px; flex-wrap:wrap; }
.form-row > .form-group{ flex:1; min-width:200px; }
.form-hint{ font-size:12px; color: var(--text-dimmer); margin-top:4px; }

.card{
  background: var(--card-bg); border:1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 22px;
}

/* Alerts */
.alert{ padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 18px; }
.alert-success{ background: rgba(34,197,94,.12); color:#4ade80; border:1px solid rgba(34,197,94,.3); }
.alert-error{ background: rgba(239,68,68,.12); color:#f87171; border:1px solid rgba(239,68,68,.3); }
.alert-info{ background: rgba(59,130,246,.12); color:#60a5fa; border:1px solid rgba(59,130,246,.3); }

/* Radio detail page */
.radio-header{
  display:flex; gap:20px; align-items:flex-start; flex-wrap:wrap;
  background: var(--card-bg); border:1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 22px; margin-bottom: 20px;
}
.radio-logo-lg{ width:100px; height:100px; border-radius: 14px; object-fit:cover; flex-shrink:0; }
.radio-header-info{ flex:1; min-width:220px; }
.radio-header-info h1{ margin:0 0 10px; font-size: 24px; }
.tags{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom: 6px; }
.tag{
  font-size:12.5px; padding:5px 12px; border-radius:20px; background: rgba(255,255,255,.06);
  border: 1px solid var(--card-border); display:inline-flex; align-items:center; gap:5px; color: var(--text-dim);
}
.radio-actions{ display:flex; flex-direction:column; gap:10px; align-items:flex-end; }
.vote-row{ display:flex; gap:8px; }
.vote-btn{
  display:flex; align-items:center; gap:6px; background: var(--bg-alt); border:1px solid var(--card-border);
  color: var(--text-dim); padding: 8px 12px; border-radius: var(--radius); cursor:pointer; font-size:13px;
}
.vote-btn:hover{ border-color: var(--accent); color:var(--text); }

.now-playing-box{
  background: var(--card-bg); border:1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 16px 20px; margin-bottom:20px; display:flex; align-items:center; gap:10px;
}
.now-playing-box .dot{ width:9px;height:9px;border-radius:50%; background:#22c55e; flex-shrink:0; }

.similar-list{ display:flex; flex-direction:column; gap:10px; }

.comment{
  padding: 14px 0; border-bottom: 1px solid var(--card-border);
}
.comment:last-child{ border-bottom:none; }
.comment .author{ font-weight:700; font-size:14px; }
.comment .date{ font-size:12px; color: var(--text-dimmer); margin-left:8px; }
.comment .content{ margin-top:4px; font-size:14px; color: var(--text-dim); }

.two-col{ display:flex; gap:24px; align-items:flex-start; flex-wrap:wrap; }
.two-col .col-main{ flex:2; min-width:320px; }
.two-col .col-side{ flex:1; min-width:260px; }

/* Player bar (sticky bottom) */
.player-bar{
  position: fixed; bottom:0; left:280px; right:0; background: #171a22ee;
  backdrop-filter: blur(6px); border-top:1px solid var(--card-border);
  padding: 12px 24px; display:none; align-items:center; gap:16px; z-index:200;
}
.player-bar.visible{ display:flex; }
.player-bar .p-logo{ width:42px;height:42px;border-radius:8px; object-fit:cover; }
.player-bar .p-info{ min-width:0; }
.player-bar .p-name{ font-weight:700; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.player-bar .p-status{ font-size:12px; color: var(--text-dim); }
.player-bar .p-controls{ margin-left:auto; display:flex; align-items:center; gap:14px; }
.player-bar .p-close{ background:none;border:none;color:var(--text-dim); cursor:pointer; font-size:20px; }

/* Mobile */
.mobile-toggle{ display:none; }
@media (max-width: 900px){
  .sidebar{ position:fixed; z-index:300; left:-300px; transition: left .2s; box-shadow: 10px 0 40px rgba(0,0,0,.4); }
  .sidebar.open{ left:0; }
  .main{ padding: 18px 16px 80px; }
  .mobile-toggle{
    display:flex; align-items:center; justify-content:center;
    width:38px; height:38px; border-radius:10px; background:var(--card-bg); border:1px solid var(--card-border);
    color:var(--text); margin-bottom:16px; cursor:pointer;
  }
  .player-bar{ left:0; }
  .overlay-bg{ display:none; position:fixed; inset:0; background: rgba(0,0,0,.5); z-index:250; }
  .overlay-bg.visible{ display:block; }
}

/* Admin specific tweaks reuse most of the above via admin/style additions */
.table{ width:100%; border-collapse: collapse; font-size:14px; }
.table th, .table td{ text-align:left; padding: 10px 12px; border-bottom:1px solid var(--card-border); }
.table th{ color: var(--text-dim); font-size:12.5px; text-transform:uppercase; letter-spacing:.03em; }
.table tr:hover td{ background: rgba(255,255,255,.02); }
.pill{ font-size:11px; padding:3px 10px; border-radius:20px; font-weight:700; }
.pill-approved{ background: rgba(34,197,94,.15); color:#4ade80; }
.pill-pending{ background: rgba(245,158,11,.15); color:#fbbf24; }
.color-swatch{ width:16px;height:16px;border-radius:4px; display:inline-block; vertical-align:middle; }

.stat-cards{ display:grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap:14px; margin-bottom:28px; }
.stat-card{ background: var(--card-bg); border:1px solid var(--card-border); border-radius: var(--radius-lg); padding:18px; }
.stat-card .num{ font-size:28px; font-weight:800; }
.stat-card .label{ font-size:13px; color: var(--text-dim); margin-top:4px; }
.stat-card a{ color: inherit; }

.pagination{ display:flex; gap:6px; margin-top:20px; }
.pagination a, .pagination span{
  padding: 7px 12px; border-radius: 8px; background: var(--card-bg); border:1px solid var(--card-border); font-size:13px;
}
.pagination .current{ background: var(--accent); color:#fff; border-color: var(--accent); }
/* Partners section */
.partners-grid{
  display:grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap:14px;
}
.partner-card{
  background: var(--card-bg); border:1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 18px 14px; display:flex; flex-direction:column; align-items:center; gap:10px; text-align:center;
  transition: border-color .15s, transform .15s;
}
.partner-card:hover{ border-color: var(--accent); transform: translateY(-2px); }
.partner-logo{
  width:64px; height:64px; border-radius:12px; object-fit:contain; background:#fff; padding:6px;
}
.partner-logo-fallback{
  width:64px; height:64px; border-radius:12px; background: linear-gradient(135deg,#333,#222);
  display:flex; align-items:center; justify-content:center; font-size:22px; color: var(--text-dim);
}
.partner-card .pname{ font-size:13px; font-weight:600; color: var(--text-dim); }
.partner-card:hover .pname{ color: var(--text); }

/* Ranked cards (Cele mai ascultate) */
.rank-badge{
  position:absolute; top:-8px; left:10px;
  background: var(--bg-alt); border:1px solid var(--card-border); color: var(--text-dim);
  font-size:10px; font-weight:800; padding:3px 8px; border-radius:6px;
}
.rank-badge.top3{ background: var(--accent); color:#fff; border-color: var(--accent); }

/* Footer */
footer.site-footer{
  margin-top: 40px; padding-top: 32px; border-top:1px solid var(--card-border);
  color: var(--text-dimmer); font-size: 13px;
}
.footer-grid{
  display:grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap:24px; margin-bottom:24px;
}
.footer-col{ min-width:0; }
.footer-col h4{ font-size:13px; color: var(--text); margin: 0 0 12px; text-transform:uppercase; letter-spacing:.04em; }
.footer-col ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.footer-col ul a{ color: var(--text-dim); font-size:13.5px; }
.footer-col ul a:hover{ color: var(--accent); }
.footer-brand{ display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.footer-brand .name{ font-weight:800; color: var(--text); font-size:15px; }
.footer-desc{ color: var(--text-dim); font-size:13.5px; max-width:320px; line-height:1.6; }
.footer-bottom{
  border-top:1px solid var(--card-border); padding-top:16px; text-align:center; font-size:12.5px;
}
@media (max-width: 1100px){
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .footer-desc{ max-width:100%; }
}
@media (max-width: 560px){
  .footer-grid{ grid-template-columns: 1fr; }
}

