:root {
  --primary: #14458C;
  --primary-light: #1e5cb8;
  --primary-dark: #0d2f61;
  --bg-dark: #0a0f1d;
  --text-light: #f8fafc;
  --text-muted: #94a3b8;
  --glass-bg: rgba(15, 23, 42, 0.75);
  --glass-border: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow-x: hidden;
}

.background-backdrop {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(12px) brightness(0.4);
  transform: scale(1.08);
  z-index: -2;
}

.background-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(20, 69, 140, 0.35) 0%, rgba(10, 15, 29, 0.95) 100%);
  z-index: -1;
}

.app-container {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
  z-index: 1;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ef4444;
}

.dot.live {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 1.5s infinite;
}

.dot.connecting {
  background-color: #f59e0b;
  animation: pulse-dot 0.8s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.btn-install {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background-color: var(--primary);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.player-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1.75rem;
  padding: 2rem 1.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-box {
  width: 170px;
  height: 170px;
  border-radius: 1.25rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  margin-bottom: 1.25rem;
}

.logo-box.playing {
  box-shadow: 0 0 30px rgba(20, 69, 140, 0.6);
  transform: scale(1.02);
}

.radio-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.equalizer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 24px;
  margin-bottom: 1rem;
}

.bar {
  width: 4px;
  height: 4px;
  background-color: var(--text-muted);
  border-radius: 2px;
  transition: height 0.2s ease, background-color 0.2s ease;
}

.equalizer.active .bar {
  background-color: #38bdf8;
}

.equalizer.active .bar-1 { animation: eqAnim 0.8s infinite alternate ease-in-out; }
.equalizer.active .bar-2 { animation: eqAnim 1.1s infinite alternate ease-in-out 0.2s; }
.equalizer.active .bar-3 { animation: eqAnim 0.7s infinite alternate ease-in-out 0.4s; }
.equalizer.active .bar-4 { animation: eqAnim 1.0s infinite alternate ease-in-out 0.1s; }
.equalizer.active .bar-5 { animation: eqAnim 0.9s infinite alternate ease-in-out 0.3s; }

@keyframes eqAnim {
  0% { height: 4px; }
  100% { height: 22px; }
}

.radio-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.radio-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  margin-bottom: 1.75rem;
}

.btn-play {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(20, 69, 140, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 1.5rem;
}

.btn-play:active { transform: scale(0.94); }

.loader {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 220px;
  margin-bottom: 1.5rem;
}

.btn-mute {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.volume-slider {
  flex: 1;
  accent-color: var(--primary);
  height: 5px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  cursor: pointer;
}

.social-links {
  display: flex;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--glass-border);
  width: 100%;
  justify-content: center;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s, color 0.2s;
}

.social-btn:hover {
  transform: translateY(-2px);
  background: var(--primary);
  color: #fff;
}

.app-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 1rem 0;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 100;
}

.modal-card {
  background: #1e293b;
  border: 1px solid var(--glass-border);
  border-radius: 1.25rem;
  max-width: 320px;
  width: 100%;
  padding: 1.5rem;
  text-align: center;
}

.modal-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.modal-card p {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.modal-close-btn {
  width: 100%;
  padding: 0.65rem;
  background: var(--primary);
  border: none;
  border-radius: 0.75rem;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}