/* admin-panel.css — admin drawer + tabs + popups */

#admin-panel {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(420px, 100vw);
  background: var(--panel-bg-color, rgba(0, 15, 40, 0.78));
  border-right: 2px solid var(--theme-color);
  border-left: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 15000;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .3s ease;
  color: #fff;
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 8px 0 40px rgba(0,0,0,0.5);
}
#admin-panel.open { transform: translateX(0); }

/* Right-side variant */
#admin-panel.panel-right {
  left: auto; right: 0;
  border-right: none;
  border-left: 2px solid var(--theme-color);
  transform: translateX(100%);
  box-shadow: -8px 0 40px rgba(0,0,0,0.5);
}
#admin-panel.panel-right.open { transform: translateX(0); }

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0,240,255,0.25);
}
.admin-header h2 {
  font-size: 1.05rem;
  color: var(--theme-color);
  text-shadow: 0 0 8px var(--theme-glow);
}
.admin-close, .admin-hdr-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  position: relative;
  transition: background .15s;
}
.admin-close:hover, .admin-hdr-btn:hover { background: rgba(255,255,255,0.12); }

/* Notification bell toggle: off = red, on = green */
#notif-bell-btn {
  background: linear-gradient(135deg, rgba(239,68,68,0.22), rgba(239,68,68,0.10));
  border: 1.5px solid rgba(239,68,68,0.55);
  transition: background .2s ease, border-color .2s ease;
}
#notif-bell-btn:hover {
  background: linear-gradient(135deg, rgba(239,68,68,0.32), rgba(239,68,68,0.18));
}
#notif-bell-btn.notif-on {
  background: linear-gradient(135deg, rgba(34,197,94,0.22), rgba(34,197,94,0.10));
  border: 1.5px solid rgba(34,197,94,0.55);
}
#notif-bell-btn.notif-on:hover {
  background: linear-gradient(135deg, rgba(34,197,94,0.32), rgba(34,197,94,0.18));
}

.admin-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 12px 0;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab {
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
}
.admin-tab.active {
  color: var(--theme-color);
  background: rgba(0,240,255,0.12);
  border-bottom: 2px solid var(--theme-color);
}

.admin-body {
  flex: 1;
  overflow-y: scroll;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.admin-body::-webkit-scrollbar { display: none; }

.admin-section {
  margin-bottom: 20px;
  padding: 14px;
  background: rgba(0,20,60,0.55);
  border-radius: 10px;
  border: 1px solid rgba(0,240,255,0.25);
}
.admin-section h3 { color: var(--theme-color); font-size: 14px; margin-bottom: 10px; }
.admin-section label {
  display: block;
  margin: 10px 0 4px;
  color: #ddd;
  font-size: 12px;
  font-weight: 600;
}
.admin-section input[type="text"],
.admin-section input[type="url"],
.admin-section select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid rgba(0,240,255,0.4);
  border-radius: 8px;
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}
.admin-section input[type="color"] {
  width: 48px; height: 40px;
  border: 2px solid rgba(0,240,255,0.4);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.admin-section input[type="range"] {
  width: 100%;
  accent-color: var(--theme-color);
}

.btn-primary, .btn-danger, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  min-height: 40px;
  font-family: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary {
  background: linear-gradient(45deg, #00f0ff, #4a90ff);
  color: #001122;
  box-shadow: 0 3px 10px rgba(0,240,255,0.35);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-danger {
  background: linear-gradient(45deg, #ff4444, #ff6666);
  color: #fff;
}
.btn-ghost {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.btn-row > * { flex: 1; }

/* Password overlay */
.pw-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
  z-index: 20001;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.pw-box {
  width: min(380px, 96vw);
  padding: 22px;
  border-radius: 16px;
  background: rgba(0,15,40,0.98);
  border: 2px solid var(--theme-color);
  text-align: center;
  color: #fff;
}
.pw-box h3 { color: var(--theme-color); margin-bottom: 10px; }
.pw-box input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid rgba(0,240,255,0.5);
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 16px;
  margin: 10px 0;
  box-sizing: border-box;
}
.pw-err { color: #ff6b6b; font-size: 12px; min-height: 16px; }

/* Wallpaper cropper modal */
.crop-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 20002;
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.crop-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  color: #fff;
}
.crop-top h3 { color: var(--theme-color); font-size: 1rem; }
.crop-top .crop-btns { display: flex; gap: 6px; }
.crop-stage {
  flex: 1;
  overflow: hidden;
  background: #111;
  display: flex; align-items: center; justify-content: center;
}
.crop-stage img { max-width: 100%; max-height: 100%; }
.crop-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: rgba(0,15,40,0.95);
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
  gap: 8px;
}
.crop-bottom .crop-controls { display: flex; gap: 6px; flex-wrap: wrap; }

/* Request list */
.request-item {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: rgba(0,20,60,0.7);
  border-radius: 8px;
  border-left: 3px solid var(--theme-color);
  font-size: 13px;
  gap: 10px;
  max-width: 100%;
  box-sizing: border-box;
}
.request-item .req-main { flex: 1; min-width: 0; overflow-wrap: break-word; word-wrap: break-word; }
.request-item .req-user { color: var(--theme-color); font-weight: 700; margin-right: 6px; }
.request-item .req-del {
  background: #ff4444; color: #fff;
  border: none; width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}

/* Player style picker */
.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.style-card {
  background: rgba(0,0,0,0.5);
  border: 2px solid rgba(0,240,255,0.3);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  transition: transform .15s ease, border-color .15s ease;
  min-height: 80px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.style-card.active {
  border-color: var(--theme-color);
  box-shadow: 0 0 14px var(--theme-glow);
  transform: translateY(-2px);
}
.style-card .style-swatch {
  width: 60px; height: 36px; border-radius: 6px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
}
.style-card[data-style="cube"] .style-swatch { background: linear-gradient(135deg, #667eea, #764ba2); }
.style-card[data-style="minimal"] .style-swatch { background: rgba(0,0,0,0.7); border-radius: 999px; }
.style-card[data-style="neon"] .style-swatch { background: rgba(5,10,30,0.9); box-shadow: 0 0 10px var(--theme-color); border: 1px solid var(--theme-color); }
.style-card[data-style="vinyl"] .style-swatch { background: radial-gradient(circle, #0a0a0a 40%, #2a2a3e); border-radius: 50%; width: 40px; height: 40px; }
.style-card[data-style="wave"] .style-swatch { background: linear-gradient(160deg, #0f2d5a, #0a4d7c); }
.style-card[data-style="glass"] .style-swatch { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25); backdrop-filter: blur(4px); }
.style-card[data-style="retro"] .style-swatch { background: #0d0d1a; border: 1px solid #ff00cc; box-shadow: 0 0 8px rgba(255,0,204,0.5); }
.style-card[data-style="card"] .style-swatch { background: linear-gradient(135deg, #1a1a2e 50%, #222 50%); }
.style-card[data-style="party"] .style-swatch { background: linear-gradient(135deg, #ff0080, #ff8c00, #40e0d0, #a64dff); }

/* Mobile: full-width drawer */
@media (max-width: 480px) {
  #admin-panel { width: 100vw; }
}

/* Song request toast notification */
.req-toast {
  position: fixed;
  top: 60px;
  right: 20px;
  z-index: 20010;
  background: rgba(0, 15, 40, 0.92);
  border: 2px solid #00ff88;
  border-radius: 12px;
  padding: 12px 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
  color: #fff;
  font-size: 13px;
  max-width: 280px;
  animation: toastIn .25s ease forwards;
  pointer-events: auto;
  margin-bottom: 10px;
}
.req-toast .toast-label { font-size: 12px; opacity: 0.8; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; color: #00ff88; font-weight: bold; }
.req-toast .toast-user { color: #00ff88; font-weight: 700; }
.req-toast .toast-song { opacity: 0.9; word-wrap: break-word; word-break: break-word; }
.req-toast.toast-out { animation: toastOut .3s ease forwards; }

@keyframes toastIn  { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }
@keyframes toastOut { from { opacity:1; transform: translateX(0); } to { opacity:0; transform: translateX(20px); } }
