:root {
  --bg: #07110d;
  --panel: rgba(10, 24, 18, 0.96);
  --panel-2: rgba(255, 255, 255, 0.06);
  --accent: #22c55e;
  --accent-2: #16a34a;
  --text: #f5fff8;
  --muted: #a7c9b4;
  --success: #4ade80;
  --danger: #f87171;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: radial-gradient(circle at top, #123524 0%, var(--bg) 55%, #030806 100%);
  color: var(--text);
  min-height: 100vh;
}

body, button, input, textarea { font: inherit; }

.app-shell, .admin-shell {
  min-height: 100vh;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-card, .admin-card {
  width: min(100%, 760px);
  background: linear-gradient(180deg, rgba(10, 28, 18, 0.98), rgba(6, 14, 10, 0.98));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 32px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  padding: 26px;
  display: grid;
  gap: 24px;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.player-breadcrumb {
  color: #8ec99b;
  font-size: 0.88rem;
}

.button-fav {
  background: transparent;
  box-shadow: none;
  padding: 0;
  font-size: 1.2rem;
}

.cover-panel {
  width: 170px;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.22));
  display: grid;
  place-items: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.cover-image {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1f472d 0%, #1b3d27 100%);
  color: #e9ffef;
  font-size: 2.8rem;
  letter-spacing: 0.08em;
}

.player-main {
  display: flex;
  gap: 24px;
  align-items: center;
}

.track-info {
  display: grid;
  gap: 10px;
}

.track-info h1 {
  margin: 0;
  font-size: 2rem;
}

.track-subtitle {
  color: #9bd8a4;
  margin: 0;
}

.track-tag {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(28, 113, 68, 0.24);
  color: #c6f7d1;
  font-size: 0.9rem;
  font-weight: 700;
  width: fit-content;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.big-button {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  font-size: 1.4rem;
}

.volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.player-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-pill {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
}

.action-pill.active {
  background: linear-gradient(135deg, rgba(34,197,94,0.18), rgba(22,163,74,0.24));
  color: #04260f;
  font-weight: 800;
}

button {
  border: none;
  cursor: pointer;
  color: white;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: transform 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.22);
}
button:hover { transform: translateY(-1px); opacity: 0.95; }
button.secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  box-shadow: none;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  text-decoration: none;
}

.admin-card h2 { margin-top: 0; }
.admin-card p { color: var(--muted); }
.admin-form { display: grid; gap: 12px; }
.admin-form label { display: grid; gap: 6px; font-weight: 600; }
.admin-form input,
.admin-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

.alert {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(251, 113, 133, 0.14);
  color: #fecdd3;
  margin-bottom: 10px;
}

.alert-success {
  background: rgba(16, 185, 129, 0.14);
  color: #a7f3d0;
}

.alert-error {
  background: rgba(251, 113, 133, 0.14);
  color: #fecdd3;
}

.small { font-size: 0.9rem; color: var(--muted); }

/* Admin Enhancements */
.admin-card h3 {
  color: var(--accent);
  margin-top: 0;
  font-size: 1.1rem;
}

.admin-card h4 {
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

/* Transitions for theme changes */
:root {
  transition: --bg 0.3s ease, --panel 0.3s ease, --accent 0.3s ease, --text 0.3s ease;
}

body {
  transition: background 0.3s ease, color 0.3s ease;
}

/* Playlist Selector Styles */
.playlist-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slideUp 0.3s ease;
}

.playlist-selector label {
  font-weight: 600;
  color: var(--muted);
  display: block;
}

.playlist-selector select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.playlist-selector select:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.15);
}

.playlist-selector select:focus {
  outline: none;
  background: rgba(255,255,255,0.15);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.playlist-selector select option {
  background: #07110d;
  color: var(--text);
  padding: 8px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .player-main { flex-direction: column; align-items: flex-start; }
  .cover-panel { width: 100%; max-width: 220px; }
  .player-status { flex-direction: column; align-items: flex-start; }
  
  #themeBtn {
    bottom: 10px !important;
    right: 10px !important;
    width: 45px !important;
    height: 45px !important;
    font-size: 18px !important;
  }
}
