:root{
  --bg: #0f0f10;
  --panel: #151617;
  --muted: #bdbdbd;
  --accent: #ff6b35;
  --card: #1c1c1c;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background:var(--bg);
  color:#e9e9e9;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  min-height:100vh;
  padding:28px;
}

.player-container{
  width:100%;
  max-width:980px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.video-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px;
  color: #fff;
  text-align: center;
}

.video-wrap .video-js {
  width: 100% !important;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  background: #000;
}

/* Controls row */
.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.right-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}
.nav-buttons{
  display:flex;
  gap:8px;
}

.btn{
  background:var(--card);
  border:0;
  color:var(--muted);
  padding:8px 12px;
  font-size:16px;
  border-radius:10px;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(0,0,0,0.4);
  transition:transform .12s ease, background .12s;
}
.btn:hover{ transform:translateY(-2px); color:#fff; background:#232323;}

/* Shuffle toggle */
.shuffle-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:var(--panel);
  padding:8px 12px;
  border-radius:10px;
  font-size:14px;
  cursor:pointer;
  color:var(--muted);
}
.shuffle-toggle input{ accent-color:var(--accent); transform:scale(1.02); }

/* Playlist */
.playlist{
  background:linear-gradient(180deg,#0f0f10, #0c0c0c);
  border-radius:12px;
  padding:8px;
  max-height:260px;
  overflow:auto;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.02);
}
.playlist {
  max-height: 60vh; /* ограничение высоты */
  overflow-y: auto;
  scrollbar-width: thin;
  margin-top: 12px;
  border-top: 1px solid #222;
  padding-top: 8px;
}
/* Playlist item */
.playlist-item {
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s, transform 0.08s;
  color: var(--muted);
}
.playlist-item:hover {
  background: #141414;
  transform: translateY(-1px);
  color: #fff;
}

.playlist-item.active {
  background: linear-gradient(
    90deg,
    rgba(255, 107, 53, 0.06),
    rgba(255, 107, 53, 0.02)
  );
  border-left: 4px solid var(--accent);
  color: #fff;
}

.thumb{
  width:84px;
  height:56px;
  border-radius:6px;
  background:#222;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  color:var(--muted);
  overflow:hidden;
}
.thumb img{ width:100%; height:100%; object-fit:cover; display:block; }

/* Title + meta */
.item-info{ display:flex; flex-direction:column; min-width:0; }
.item-title{ font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.item-id{ font-size:12px; color:var(--muted); margin-top:4px; }

/* Message area */
.message {
  color: #ff6b35;
  font-size: 13px;
  padding: 6px 0;
  min-height: 18px;
}
/* Toast */
#toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
}
.toast {
  background: rgba(40, 40, 40, 0.95);
  color: #fff;
  padding: 10px 16px;
  margin-top: 8px;
  border-radius: 8px;
  font-size: 14px;
  animation: fadein 0.3s, fadeout 0.3s 2.2s;
}
@keyframes fadein {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes fadeout {
  from { opacity: 1; transform: translate(-50%, 0); }
  to   { opacity: 0; transform: translate(-50%, 20px); }
}
