:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #1f2937;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #22c55e;
  --danger: #ef4444;
  --border: #334155;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #020617, #0f172a);
  color: var(--text);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.card {
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.side-card {
  padding: 16px;
}

h1 {
  margin: 0 0 10px;
  font-size: 28px;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

.grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.input-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0;
}

input[type="text"] {
  flex: 1;
  min-width: 260px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  outline: none;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  background: #2563eb;
  color: white;
}

button.secondary {
  background: #475569;
}

button.success {
  background: var(--accent);
  color: #052e16;
}

button.danger {
  background: var(--danger);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 18px;
}

.options {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 14px 0 18px;
  color: var(--text);
}

.player-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}

#player {
  width: 100%;
  height: 100%;
  min-height: 320px;
}

.status {
  margin-top: 12px;
  padding: 12px 14px;
  background: #0b1220;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
}

.playlist-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.playlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  max-height: 560px;
  overflow: auto;
}

.playlist-item {
  border: 1px solid var(--border);
  background: #0b1220;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.playlist-item.active {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px #22c55e inset;
}

.playlist-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.playlist-title {
  font-weight: 700;
  word-break: break-word;
}

.playlist-meta {
  color: var(--muted);
  font-size: 13px;
  word-break: break-all;
}

.playlist-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.small {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.notice {
  margin-top: 16px;
  font-size: 13px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

@media (max-width: 860px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
