:root {
  --primary: #057307;
  --primary-hover: #078c09;
  --primary-glow: rgba(5, 115, 7, 0.45);
  --bg-dark: #040905;
  --card-bg: rgba(10, 18, 11, 0.72);
  --text-white: #ffffff;
  --text-muted: #a3b8a5;
}

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

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

.app-background {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(4, 9, 5, 0.78) 0%, rgba(4, 9, 5, 0.94) 100%),
              url('./assets/background.jpg') center/cover no-repeat;
  z-index: 0;
}

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

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

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(5, 115, 7, 0.2);
  border: 1px solid rgba(5, 115, 7, 0.4);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.live-text {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #34d399;
}

.btn-install {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-install:hover {
  background: var(--primary-hover);
}

.player-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 2.2rem 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  margin: auto 0;
}

.logo-wrapper {
  width: 170px;
  height: 170px;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(5, 115, 7, 0.35);
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

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

.station-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 0.25rem;
}

.station-url {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  color: #d1d5db;
  margin-bottom: 1.25rem;
}

.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ca3af;
}

.status-indicator.active {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.visualizer {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 24px;
  margin-bottom: 1.5rem;
  opacity: 0.2;
  transition: opacity 0.3s ease;
}

.visualizer.active {
  opacity: 1;
}

.v-bar {
  width: 4px;
  height: 4px;
  background: var(--primary-hover);
  border-radius: 2px;
}

.visualizer.active .v-bar:nth-child(1) { animation: jump 1.2s infinite ease-in-out alternate; }
.visualizer.active .v-bar:nth-child(2) { animation: jump 0.8s infinite ease-in-out alternate-reverse; }
.visualizer.active .v-bar:nth-child(3) { animation: jump 1.4s infinite ease-in-out alternate; }
.visualizer.active .v-bar:nth-child(4) { animation: jump 0.7s infinite ease-in-out alternate-reverse; }
.visualizer.active .v-bar:nth-child(5) { animation: jump 1.1s infinite ease-in-out alternate; }

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

.controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  width: 100%;
  margin-bottom: 1.5rem;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
}

.btn-icon:hover {
  color: var(--text-white);
}

.btn-play {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 25px var(--primary-glow);
  transition: all 0.2s ease;
}

.btn-play:hover {
  background: var(--primary-hover);
  transform: scale(1.04);
}

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

.volume-slider {
  width: 80px;
  accent-color: var(--primary);
  cursor: pointer;
}

.social-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.2rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  transition: transform 0.2s ease;
}

.social-btn:hover {
  transform: translateY(-2px);
}

.hidden {
  display: none !important;
}

.spinner {
  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); }
}

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

.ios-modal-card {
  background: #111a12;
  border: 1px solid rgba(5, 115, 7, 0.5);
  border-radius: 20px;
  padding: 1.75rem;
  max-width: 340px;
  width: 100%;
  position: relative;
  text-align: left;
}

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

.ios-modal-card p, .ios-modal-card ol {
  font-size: 0.8rem;
  color: #d1d5db;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.ios-modal-card ol {
  padding-left: 1.2rem;
}

.btn-primary {
  width: 100%;
  padding: 0.65rem;
  background: var(--primary);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 1.4rem;
  cursor: pointer;
}