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

:root{
  --bg-1: #1a2a6c;
  --bg-2: #b21f1f;
  --bg-3: #1a2a6c;
  --accent-gold: #ffd700;
  --accent-amber: #ffae42;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  background: #0a0f24; /* fallback color for old browsers */
  background: -webkit-linear-gradient(135deg, var(--bg-1), var(--bg-2), var(--bg-3));
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2), var(--bg-3));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.player-container {
  width: 96%;
  max-width: 720px;
  background: rgba(0,0,0,0.22);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 26px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  border: 1px solid rgba(255,215,0,0.08);
}

.header {
  display: flex;
  align-items: center;
  justify-content: center; 
  margin-bottom: 16px;
}
.title {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(to right, var(--accent-gold), var(--accent-amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.6px;
  text-align: center;
}

.now-playing {
  margin-bottom: 14px;
}
.bismillah {
  background: rgba(255,255,255,0.03);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,215,0,0.06);
  text-align: center; 
}
.bismallah-text {
  font-weight: 800;
  font-size: 18px; 
  background: linear-gradient(to right, var(--accent-gold), var(--accent-amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
  font-family: 'Cairo', sans-serif; 
}
.dedication {
  font-size: 16px;
  color: rgba(255,255,255,0.92);
  line-height: 1.5;
}

.station-controls {
  margin: 14px 0;
}
.station-dropdown {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06); 
  color: #fff;
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 15px;
  font-family: 'Cairo', sans-serif; 
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffd700'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 14px;
  padding-left: 40px;
  outline: none;
}
.station-dropdown option {
  background: #111; 
  color: #fff;
  font-family: 'Cairo', sans-serif; 
  }
.controls { margin-top: 6px; }
.main-controls {
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: center;
  margin-bottom: 4px;
}

.control-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
  color: #fff;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}
.control-btn:hover { transform: translateY(-4px); }

.play-btn {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  box-shadow: 0 8px 30px rgba(238,90,36,0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.play-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.spinner {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: var(--accent-gold);
  animation: spin 1s linear infinite;
  display: none; /* shown/hidden by JS */
  z-index: 5;
}
@keyframes spin { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } }

.volume-section {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}
.volume-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.volume-slider {
  width: 180px;
  max-width: 45%;
  accent-color: var(--accent-gold);
}

.message {
  margin-top: 14px;
  display: none; 
  background: rgba(0,0,0,0.4);
  padding: 8px 10px;
  border-radius: 8px;
  color: #9fffb7;
  border: 1px solid rgba(78,255,107,0.12);
  text-align: center;
  font-weight: 700;
}

.marquee-box {
  margin-top: 14px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,0.28);
  overflow: hidden;
  border: 1px solid rgba(255,215,0,0.06);
  height: 44px;
  display: flex;
  align-items: center;
}
.marquee-box #marqueeText {
  white-space: nowrap;
  display: inline-block;
  animation: marquee 20s linear infinite;
  font-weight: 700;
  color: #fff;
  direction: rtl;
}
.marquee-box #marqueeText span {
  background: linear-gradient(to right, var(--accent-gold), var(--accent-amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.marquee-box #marqueeText .emoji {
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
}
@keyframes marquee { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.credit {
  margin-top: 14px;
  text-align: center;
  font-size: 7px;
  color: rgba(255,255,255,0.7);
  font-family: 'Cairo', sans-serif;
}

@media (max-width: 900px) {
  .player-container { padding: 18px; }
  .title { font-size: 24px; }
  .play-btn { width: 58px; height: 58px; }
  .spinner { width: 72px; height: 72px; }
  .volume-slider { max-width: 55%; }
}
@media (max-width: 480px) {
  .player-container { padding: 14px; border-radius: 14px; }
  .title { font-size: 20px; }
  .play-btn { width: 52px; height: 52px; }
  .spinner { width: 66px; height: 66px; }
  .control-btn { width: 44px; height: 44px; }
  .volume-slider { max-width: 60%; width: 120px; }
  .marquee-box { height: 38px; }
  .marquee-box #marqueeText { animation-duration: 16s; }
}
.share-section {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.share-btn {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
  background: linear-gradient(135deg, #45a049, #4CAF50);
}

.share-btn:active {
  transform: translateY(0);
}

.share-btn i {
  font-size: 18px;
}

/* Responsive design for share button */
@media (max-width: 480px) {
  .share-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .share-btn i {
    font-size: 16px;
  }
}
