/* Islamic Radio — dark green + gold, RTL */
:root {
  --islam-green-dark: #0a2f24;
  --islam-green: #0d4a38;
  --islam-green-light: #145a45;
  --islam-gold: #c9a227;
  --islam-gold-bright: #e8c547;
  --islam-cream: #f5f0e6;
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  background: linear-gradient(180deg, var(--islam-green-dark) 0%, #061a14 100%);
  color: var(--islam-cream);
  min-height: 100vh;
  padding-bottom: 120px;
}

/* Navbar */
.navbar-custom {
  background: rgba(10, 47, 36, 0.92) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.25);
}

.navbar-custom .navbar-brand,
.navbar-custom .nav-link {
  color: var(--islam-cream) !important;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link:focus {
  color: var(--islam-gold-bright) !important;
}

.navbar-custom .navbar-toggler {
  border-color: rgba(201, 162, 39, 0.45);
}

/* Hero */
.hero-section {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(
      165deg,
      var(--islam-green-dark) 0%,
      var(--islam-green) 45%,
      #082219 100%
    );
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
      ellipse 120% 80% at 50% 120%,
      rgba(201, 162, 39, 0.12) 0%,
      transparent 55%
    ),
    radial-gradient(circle at 85% 18%, rgba(232, 197, 71, 0.15) 0%, transparent 25%);
  pointer-events: none;
}

.hero-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  opacity: 0.7;
  animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.hero-moon {
  position: absolute;
  top: 12%;
  left: 8%;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff9e6, #e8d89a 40%, #b8a050 100%);
  box-shadow: 0 0 40px rgba(232, 197, 71, 0.35);
  opacity: 0.95;
}

.hero-mosque {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 900px);
  height: 42%;
  opacity: 0.35;
  pointer-events: none;
}

.hero-mosque svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 2;
  animation: heroFadeIn 1.2s ease-out forwards;
  opacity: 0;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-weight: 800;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  color: var(--islam-gold-bright);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.9;
  color: rgba(245, 240, 230, 0.92);
  max-width: 560px;
  margin-inline: auto;
}

.hero-subtitle ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.hero-subtitle li::before {
  content: "✦ ";
  color: var(--islam-gold);
}

.btn-hero-cta {
  background: linear-gradient(135deg, var(--islam-gold) 0%, var(--islam-gold-bright) 100%);
  color: var(--islam-green-dark) !important;
  font-weight: 700;
  padding: 0.65rem 2rem;
  border: none;
  border-radius: 50px;
  box-shadow: 0 4px 24px rgba(201, 162, 39, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(232, 197, 71, 0.5);
  color: var(--islam-green-dark) !important;
}

/* Sections */
.section-heading {
  font-weight: 700;
  color: var(--islam-gold-bright);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(201, 162, 39, 0.35);
}

/* Search */
.search-wrap .form-control {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(201, 162, 39, 0.35);
  color: var(--islam-cream);
  border-radius: 12px;
  padding: 0.75rem 1rem;
}

.search-wrap .form-control::placeholder {
  color: rgba(245, 240, 230, 0.45);
}

.search-wrap .form-control:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--islam-gold);
  color: var(--islam-cream);
  box-shadow: 0 0 0 0.2rem rgba(201, 162, 39, 0.25);
}

/* Cards */
.station-card {
  background: linear-gradient(145deg, rgba(20, 90, 69, 0.45) 0%, rgba(10, 47, 36, 0.85) 100%);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  height: 100%;
}

.station-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(201, 162, 39, 0.45);
}

.station-card.is-playing {
  border-color: rgba(232, 197, 71, 0.65);
  box-shadow: 0 0 0 1px rgba(232, 197, 71, 0.3), var(--shadow-soft);
}

.station-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: var(--islam-green);
}

.station-card-body {
  padding: 1rem;
}

.station-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--islam-cream);
  min-height: 3rem;
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.btn-station {
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(201, 162, 39, 0.4);
  background: rgba(0, 0, 0, 0.2);
  color: var(--islam-cream);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-station:hover {
  background: rgba(201, 162, 39, 0.2);
  color: var(--islam-gold-bright);
  border-color: var(--islam-gold);
}

.btn-station.btn-fav-active {
  background: rgba(201, 162, 39, 0.25);
  color: var(--islam-gold-bright);
  border-color: var(--islam-gold);
}

/* Sound wave */
.sound-wave {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 28px;
  margin-top: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.sound-wave.active {
  opacity: 1;
}

.sound-wave span {
  display: block;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--islam-gold-bright), var(--islam-gold));
  animation: soundWave 0.8s ease-in-out infinite alternate;
}

.sound-wave span:nth-child(1) {
  height: 8px;
  animation-delay: 0s;
}
.sound-wave span:nth-child(2) {
  height: 16px;
  animation-delay: 0.1s;
}
.sound-wave span:nth-child(3) {
  height: 22px;
  animation-delay: 0.2s;
}
.sound-wave span:nth-child(4) {
  height: 14px;
  animation-delay: 0.15s;
}
.sound-wave span:nth-child(5) {
  height: 10px;
  animation-delay: 0.05s;
}

@keyframes soundWave {
  from {
    transform: scaleY(0.35);
    opacity: 0.6;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* Skeleton */
.skeleton-card {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  min-height: 320px;
}

.skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.04) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-img {
  height: 140px;
  width: 100%;
}

.skeleton-line {
  height: 14px;
  border-radius: 6px;
  margin: 0.5rem 0;
}

.skeleton-line.short {
  width: 60%;
}

/* Error alert */
.api-error-box {
  background: rgba(180, 50, 50, 0.2);
  border: 1px solid rgba(220, 100, 100, 0.5);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  color: #ffcccc;
}

/* Empty state */
.empty-favorites {
  text-align: center;
  padding: 2rem;
  color: rgba(245, 240, 230, 0.65);
  border: 1px dashed rgba(201, 162, 39, 0.3);
  border-radius: 12px;
}

/* Fixed player */
.fixed-audio-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  background: linear-gradient(180deg, rgba(10, 47, 36, 0.97) 0%, rgba(6, 26, 20, 0.99) 100%);
  border-top: 2px solid rgba(201, 162, 39, 0.45);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
  padding: 0.75rem 1rem;
}

.fixed-audio-player .now-playing-label {
  font-size: 0.75rem;
  color: rgba(245, 240, 230, 0.55);
  margin-bottom: 0.15rem;
}

.fixed-audio-player .now-playing-name {
  font-weight: 700;
  color: var(--islam-gold-bright);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.fixed-audio-player .player-controls .btn {
  min-width: 44px;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(201, 162, 39, 0.2);
  color: rgba(245, 240, 230, 0.55);
  font-size: 0.9rem;
  text-align: center;
}

/* Toast notification (copy success) */
.toast-copy {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 90, 69, 0.95);
  color: var(--islam-cream);
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--islam-gold);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
  z-index: 1100;
}

.toast-copy.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 576px) {
  .hero-moon {
    width: 56px;
    height: 56px;
    top: 8%;
  }

  .fixed-audio-player .row {
    text-align: center;
  }

  .fixed-audio-player .player-controls {
    justify-content: center !important;
    margin-top: 0.5rem;
  }
}
