/* BDBOYS RADIO — clean player layout */
:root {
  --bg: #0b0b10;
  --card: #16161f;
  --text: #f2f2f7;
  --text2: #9a9aab;
  --accent: #ff3b5c;
  --accent2: #ff6b81;
  --live: #00e676;
  --border: #2a2a36;
  --radius: 18px;
}

[data-theme="light"] {
  --bg: #f3f4f8;
  --card: #ffffff;
  --text: #1a1a2e;
  --text2: #5a5a70;
  --accent: #e11d48;
  --accent2: #fb7185;
  --live: #059669;
  --border: #e4e4ec;
}

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

body {
  font-family: Inter, "Noto Sans Bengali", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.app {
  max-width: 440px;
  margin: 0 auto;
  padding: 16px 16px 48px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.logo-area { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--card); display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.radio-name { font-size: 1.05rem; font-weight: 700; }
.tagline { font-size: 0.72rem; color: var(--text2); }
.header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.live-badge {
  display: flex; align-items: center; gap: 6px;
  background: var(--live); color: #000; font-size: 0.68rem; font-weight: 700;
  padding: 4px 10px; border-radius: 20px;
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%; background: #000;
  animation: blink 1s infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }
.listeners {
  background: var(--card); padding: 5px 10px; border-radius: 20px;
  font-size: 0.8rem; color: var(--text2);
}
.theme-btn {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: var(--card); cursor: pointer; font-size: 1rem;
}

/* Player card */
.player-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px 22px;
  text-align: center;
  margin-bottom: 16px;
}

.cover-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 18px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0,0,0,0.35);
  background: #111;
}
.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.45), transparent);
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 14px; opacity: 0; transition: opacity 0.25s;
  pointer-events: none;
}
.cover-wrap.playing .cover-overlay { opacity: 1; }

.equalizer { display: flex; gap: 3px; height: 22px; align-items: flex-end; }
.equalizer span {
  width: 4px; background: var(--accent); border-radius: 2px;
  animation: eq 0.7s ease-in-out infinite alternate;
}
.equalizer span:nth-child(1) { height: 35%; animation-delay: 0s; }
.equalizer span:nth-child(2) { height: 65%; animation-delay: 0.1s; }
.equalizer span:nth-child(3) { height: 100%; animation-delay: 0.2s; }
.equalizer span:nth-child(4) { height: 55%; animation-delay: 0.3s; }
.equalizer span:nth-child(5) { height: 30%; animation-delay: 0.4s; }
@keyframes eq { from { height: 20%; } to { height: 100%; } }

.track-info { margin-bottom: 16px; padding: 0 8px; }
.track-title {
  font-size: 1.15rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.track-artist { color: var(--text2); font-size: 0.9rem; }
.track-type {
  display: inline-block; margin-top: 8px; font-size: 0.68rem;
  padding: 2px 10px; border-radius: 10px; background: var(--bg); color: var(--text2);
}
.track-type.ad { background: var(--accent); color: #fff; }

.progress-area {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px; padding: 0 4px;
}
.time { font-size: 0.72rem; color: var(--text2); min-width: 34px; }
.progress-bar {
  flex: 1; height: 5px; background: var(--bg); border-radius: 3px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 3px; transition: width 0.15s linear;
}

.controls {
  display: flex; justify-content: center; margin-bottom: 16px;
}
.play-btn {
  width: 68px; height: 68px; border-radius: 50%; border: none; cursor: pointer;
  font-size: 1.5rem; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 8px 24px rgba(255, 59, 92, 0.4);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s;
}
.play-btn:hover { transform: scale(1.06); }
.play-btn:active { transform: scale(0.97); }

.volume-area {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 18px;
}
.mute-btn {
  background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--text);
}
.volume-area input[type="range"] {
  width: 130px; accent-color: var(--accent);
}

.share-box { text-align: left; border-top: 1px solid var(--border); padding-top: 14px; }
.share-box label { font-size: 0.78rem; color: var(--text2); display: block; margin-bottom: 6px; }
.share-row { display: flex; gap: 8px; }
.share-row input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 0.78rem;
}
.btn-copy {
  padding: 10px 14px; border: none; border-radius: 10px; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 600; white-space: nowrap; font-size: 0.85rem;
}
.share-hint { font-size: 0.72rem; color: var(--text2); margin-top: 6px; }

/* Sections */
.card-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}
.card-section h3 { font-size: 0.95rem; margin-bottom: 12px; }

.request-section input,
.request-section textarea {
  width: 100%; padding: 11px 13px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.9rem;
}
.request-section input:focus,
.request-section textarea:focus { outline: none; border-color: var(--accent); }
.request-section button[type="submit"] {
  width: 100%; padding: 12px; border: none; border-radius: 10px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-weight: 600; font-size: 0.95rem;
}
.request-msg { margin-top: 8px; font-size: 0.85rem; text-align: center; }
.request-msg.success { color: var(--live); }
.request-msg.error { color: var(--accent); }

.history-list { list-style: none; max-height: 220px; overflow-y: auto; }
.history-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem;
}
.history-list li:last-child { border-bottom: none; }
.hist-cover { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--bg); }
.hist-info { flex: 1; min-width: 0; }
.hist-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-artist { font-size: 0.78rem; color: var(--text2); }
.history-list .empty { color: var(--text2); text-align: center; padding: 20px; display: block; }

.footer { text-align: center; padding: 12px; color: var(--text2); font-size: 0.8rem; }

@media (max-width: 400px) {
  .cover-wrap { width: 170px; height: 170px; }
  .track-title { font-size: 1.05rem; }
}
