:root {
  --primary: #6b8f3d;
  --primary-hover: #547030;
  --bg-body: #f1f5f9;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --radius: 16px;
}

/* Scrollbar Polish */
html {
  scroll-behavior: smooth;
}

html.dark-mode {
  --primary: #6b8f3d;
  --bg-body: #0f172a;
  --bg-card: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 10px 20px -3px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Cairo", sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  animation: fadeIn 0.4s ease-in-out;
  overflow-x: hidden;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 10px;
  opacity: 0.3;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* --- HEADER --- */
header {
  background-color: rgba(var(--bg-card), 0.8); /* Fallback */
  background: var(--bg-card);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 500;
  padding: 0.4rem 0;
  backdrop-filter: blur(12px); /* Glass Effect */
  border-bottom: 1px solid rgba(128, 128, 128, 0.05);
}
.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 300px;
}
.logo {
  font-family: "Amiri Quran", serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
  margin-bottom: 20px;
}
.clock-badge {
  font-family: monospace;
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--text-muted);
  background: rgba(128, 128, 128, 0.1);
  padding: 5px 10px;
  border-radius: 8px;
}

/* Navigation */
.nav-links {
  display: flex;
  /* gap: 6px; */
  align-items: center;
}
.nav-item {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 50px;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}
.nav-item:hover {
  color: var(--primary);
  background: rgba(128, 128, 128, 0.05);
}
.nav-item.active {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px var(--primary);
  transform: translateY(-1px);
}

/* Left Controls */
.header-left {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 300px;
}
.icon-btn {
  background: var(--bg-card);
  border: 1px solid rgba(128, 128, 128, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}
.icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.05);
}
.icon-btn.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary);
}

/* Theme Menu */
.theme-menu {
  display: none;
  position: absolute;
  top: 120%;
  left: 0;
  background: var(--bg-card);
  border: 1px solid rgba(128, 128, 128, 0.1);
  border-radius: 16px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 2000;
  width: 140px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  transform: translateY(-10px);
}
.theme-menu.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.color-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: 0.2s;
}
.color-btn:hover {
  transform: scale(1.2);
}

/* --- MAIN CONTENT --- */
main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 2.5rem 1rem 180px 1rem;
}

.top-controls {
  text-align: center;
  margin-bottom: 2.5rem;
}
#reciter-name,
#section-title {
  color: var(--primary);
  font-family: "Amiri Quran", serif;
  font-size: 2.4rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}
input[type="text"] {
  width: 100%;
  padding: 14px 20px 14px 50px;
  border-radius: 16px;
  border: 2px solid rgba(128, 128, 128, 0.1);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1.1rem;
  transition: 0.3s;
  box-shadow: var(--shadow);
}
input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
  outline: none;
}
.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
  font-size: 1.2rem;
}

/* --- RECENT SECTION (Optimized) --- */
.recent-section {
  margin-bottom: 3rem;
  display: none;
  animation: slideDown 0.4s ease;
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0 5px;
}
.section-header h3 {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Styled Clear Button */
.clear-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}
.clear-btn:hover {
  background: #ef4444;
  color: white;
}

.recent-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 5px 5px 15px 5px;
  scroll-behavior: smooth;
}
.recent-card {
  min-width: 140px;
  background: var(--bg-card);
  border: 1px solid rgba(128, 128, 128, 0.05);
  padding: 15px;
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow);
  transition: 0.3s;
}
.recent-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}
.recent-card i {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 5px;
  opacity: 0.8;
}
.recent-card span {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* --- GRID SYSTEM --- */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1.2rem;
  width: 100%;
}

button.surah-btn,
button.station-btn {
  background: linear-gradient(
    145deg,
    var(--bg-card),
    rgba(128, 128, 128, 0.02)
  );
  border: 1px solid rgba(128, 128, 128, 0.1);
  color: var(--text-main);
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-family: "Amiri Quran", serif;
  text-align: center;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  height: auto;
  min-height: 140px;
  padding: 1.5rem 1rem;
  font-size: 1.15rem;
  box-shadow: var(--shadow);
  gap: 12px;
  overflow: visible;
}
button.surah-btn:hover,
button.station-btn:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
}
button.surah-btn.active,
button.station-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
button.surah-btn.active .card-fav-btn {
  color: rgba(255, 255, 255, 0.7);
}
button.surah-btn.active .card-fav-btn.active {
  color: white;
}

.card-fav-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: rgba(128, 128, 128, 0.2);
  cursor: pointer;
  z-index: 10;
  transition: 0.2s;
}
.card-fav-btn:hover {
  transform: scale(1.2);
  color: #ef4444;
}
.card-fav-btn.active {
  color: #ef4444;
  animation: heartPop 0.3s ease;
  opacity: 1;
}
@keyframes heartPop {
  50% {
    transform: scale(1.4);
  }
}

/* --- PLAYER BAR --- */
.sticky-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(var(--bg-card), 0.95); /* Semi-transparent */
  backdrop-filter: blur(15px);
  border-top: 1px solid rgba(128, 128, 128, 0.1);
  padding: 15px 25px;
  z-index: 1000;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
}

.progress-container {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  margin-bottom: 12px;
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: bold;
}
.range-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  height: 10px;
  position: relative;
}

input[type="range"] {
  width: 100%;
  cursor: pointer;
  height: 6px;
  -webkit-appearance: none;
  background: transparent;
  z-index: 10;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 10px;
  background: rgba(128, 128, 128, 0.2);
  background-image: linear-gradient(var(--primary), var(--primary));
  background-size: 0% 100%;
  background-repeat: no-repeat;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: -5px;
  box-shadow: 0 0 0 4px var(--bg-card);
  transition: transform 0.1s;
}
input[type="range"]:hover::-webkit-slider-thumb {
  transform: scale(1.2);
}

.controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.player-left {
  width: 30%;
  display: flex;
  align-items: center;
  gap: 15px;
  overflow: hidden;
}
.player-info-text {
  font-size: 1.1rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--primary);
}

.main-controls {
  width: 40%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
}
.control-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-main);
  font-size: 1.5rem;
  transition: 0.2s;
  opacity: 0.8;
}
.control-btn:hover {
  color: var(--primary);
  transform: scale(1.1);
  opacity: 1;
}
.play-btn {
  font-size: 2rem;
  color: white;
  width: 60px;
  height: 60px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
  opacity: 1;
}
.play-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.player-right {
  width: 30%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Tools */
.volume-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100px;
}
.volume-icon {
  font-size: 1.1rem;
  color: var(--text-muted);
  width: 20px;
  text-align: center;
}
input[id="volume-slider"] {
  height: 4px;
}
input[id="volume-slider"]::-webkit-slider-thumb {
  height: 12px;
  width: 12px;
  margin-top: -4px;
  background: var(--text-main);
  box-shadow: none;
}

.speed-control,
.timer-control {
  position: relative;
}
.speed-btn {
  font-size: 0.85rem;
  font-weight: bold;
  padding: 0 12px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-body);
  border: 1px solid rgba(128, 128, 128, 0.1);
  color: var(--text-main);
  cursor: pointer;
  transition: 0.2s;
}
.speed-menu,
.timer-menu {
  display: none;
  position: absolute;
  bottom: 145%;
  right: 0;
  background: var(--bg-card);
  border: 1px solid rgba(128, 128, 128, 0.1);
  border-radius: 12px;
  padding: 5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  min-width: 90px;
  z-index: 2000;
  animation: popUp 0.2s ease;
}
.timer-menu {
  width: 170px;
  right: -30px;
}
.speed-menu.show,
.timer-menu.show {
  display: block;
}
.speed-menu div,
.timer-menu div {
  padding: 10px;
  cursor: pointer;
  text-align: center;
  border-radius: 8px;
  font-weight: bold;
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 2px;
}
.speed-menu div:hover,
.timer-menu div:hover {
  background: rgba(128, 128, 128, 0.05);
  color: var(--primary);
}
.speed-menu div.selected,
.timer-menu div.active {
  background: var(--primary);
  color: white;
}
.icon-btn.timer-active {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.1);
}

.custom-timer-row {
  display: flex;
  gap: 5px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(128, 128, 128, 0.1);
}
.timer-input {
  width: 60%;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid rgba(128, 128, 128, 0.2);
  background: var(--bg-body);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  text-align: center;
}
.timer-set-btn {
  width: 40%;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
}

/* Live Badge */
.live-badge {
  display: none;
  background: #ef4444;
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}
.live-badge.on {
  display: inline-block;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    opacity: 1;
  }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}
.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  background: var(--bg-card);
  padding: 2.5rem 2rem;
  border-radius: 24px;
  width: 90%;
  max-width: 450px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s;
  border: 1px solid rgba(128, 128, 128, 0.1);
  position: relative;
}
.modal-overlay.show .modal-content {
  transform: scale(1) translateY(0);
}
.modal-title {
  font-family: "Amiri Quran", serif;
  color: var(--primary);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
.modal-text {
  font-size: 1.2rem;
  color: var(--text-main);
  line-height: 1.8;
  margin-bottom: 2rem;
  font-weight: 600;
}
.modal-close-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 35px;
  border-radius: 50px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.2s;
  box-shadow: 0 5px 15px var(--primary);
}
.modal-close-btn:hover {
  transform: scale(1.05);
}
.modal-x {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

/* ------------------------------------------- */
/* MOBILE OPTIMIZATION */
/* ------------------------------------------- */
@media (max-width: 768px) {
  header {
    padding: 10px 0;
  }

  .header-container {
    padding: 0.5rem 1rem; /* Slightly more side padding */
    gap: 15px; /* Increase gap */
  }
  .header-left .icon-btn {
    width: 35px; /* Slightly larger touch target */
    height: 35px;
  }
  .header-left {
    width: auto;
    gap: 8px;
  }
  .logo {
    font-size: 1.4rem; /* Slightly larger for better brand visibility */
  }
  .clock-badge {
    display: none; /* Hide clock on mobile header to save space */
  }

  .nav-links {
    /* display: flex; */
    justify-content: space-around;
    align-items: center;
    padding: 10; /* Extra padding for iPhone Home bar */
    z-index: 2000; /* Highest priority */
    border-top: 1px solid rgba(128, 128, 128, 0.1);
  }

  /* Style the Buttons in the Bar */
  .nav-item {
    flex-direction: column; /* Icon top, Text bottom */
    gap: 4px;
    background: transparent !important; /* Remove pill background */
    box-shadow: none !important;
    padding: 5px;
    border-radius: 0;
    color: var(--text-muted);
    font-size: 0.7rem; /* Tiny text */
    font-weight: 600;
  }

  .nav-item i {
    font-size: 1.4rem; /* Big Icons */
    margin-bottom: 2px;
  }

  /* Active State for Bottom Bar */
  .nav-item.active {
    color: var(--primary);
    transform: translateY(0); /* Remove desktop hover effect */
  }

  main {
    padding-bottom: 20px;
  }

  /* INCREASE FOOTER PADDING ON MOBILE */
  /* Because player + bottom nav take up more space on mobile */
  footer {
    padding-bottom: 200px !important;
  }
  /* --- UPDATED GRID & BUTTONS --- */

  .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
  button.surah-btn,
  button.station-btn {
    padding: 0.8rem;
    min-height: 120px;
    font-size: 1rem;
  }

  /* Ensure text wraps nicely */
  button.surah-btn span,
  button.station-btn span {
    line-height: 1.4;
    white-space: normal; /* Allow text wrapping */
    max-width: 100%;
    direction: rtl;
  }

  /* Fix Icon Sizes */
  button.station-btn i.fa-broadcast-tower {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: var(--primary);
  }

  /* Player Compact */
  .sticky-player {
    border-radius: 16px; /* Rounded floating player */
    border: 1px solid rgba(128, 128, 128, 0.1);
  }
  .controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
  }

  .player-left {
    width: 50%; /* Limit width */
    /* max-width: 100px; */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .player-info-text {
    font-size: 0.8rem;
  }

  .main-controls {
    width: auto;
    flex: 0 0 auto;
    gap: 8px;
    margin-right: 30px;
  }
  .play-btn {
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
  }
  .control-btn {
    font-size: 1.1rem;
  }

  /* 3. Tools: SHOW ALL except Volume */
  .player-right {
    width: auto;
    flex: 1; /* Allow it to take remaining space */
    justify-content: flex-end;
    gap: 4px; /* Tight gap */
  }

  /* HIDE VOLUME ONLY */
  .volume-wrapper {
    display: none !important;
  }

  /* Make tool buttons smaller to fit */
  .icon-btn {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
  .speed-btn {
    padding: 0 4px;
    font-size: 0.7rem;
    height: 30px;
  }
}

/* --- CONTINUE BANNER --- */
.continue-banner {
  background: var(--bg-card);
  border: 1px solid var(--primary);
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 5px 20px var(--primary);
  animation: slideDown 0.5s ease;
}
.continue-info {
  display: flex;
  flex-direction: column;
  text-align: right;
}

/* Shortcuts Modal */
.shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  text-align: right;
}
.shortcut-item {
  background: rgba(128, 128, 128, 0.05);
  padding: 10px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
}
.key-badge {
  background: var(--text-main);
  color: var(--bg-card);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-weight: bold;
}

/* --- SHORTCUTS HELP BUTTON (PC ONLY) --- */
.help-btn {
  position: fixed;
  bottom: 140px; /* High enough to clear the player bar */
  right: 30px;
  width: 45px;
  height: 45px;
  background: var(--bg-card);
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(128, 128, 128, 0.1);
  color: var(--text-muted);
  cursor: pointer;
  z-index: 900;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.help-btn:hover {
  color: var(--primary);
  transform: scale(1.1);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
}

/* HIDE ON MOBILE & TABLET */
@media (max-width: 1024px) {
  .help-btn {
    display: none !important;
  }
}

/* Shortcuts Modal Grid */
.shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  text-align: right;
}
.shortcut-item {
  background: rgba(128, 128, 128, 0.05);
  padding: 10px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.key-badge {
  background: var(--text-main);
  color: var(--bg-card);
  padding: 4px 8px;
  border-radius: 6px;
  font-family: monospace;
  font-weight: bold;
  font-size: 0.85rem;
}

/* --- PROFESSIONAL LOADER --- */
.loading-pulse {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}
.loading-pulse div {
  position: absolute;
  border: 4px solid var(--primary);
  opacity: 1;
  border-radius: 50%;
  animation: ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}
.loading-pulse div:nth-child(2) {
  animation-delay: -0.5s;
}

@keyframes ripple {
  0% {
    top: 36px;
    left: 36px;
    width: 0;
    height: 0;
    opacity: 0;
  }
  4.9% {
    top: 36px;
    left: 36px;
    width: 0;
    height: 0;
    opacity: 0;
  }
  5% {
    top: 36px;
    left: 36px;
    width: 0;
    height: 0;
    opacity: 1;
  }
  100% {
    top: 0px;
    left: 0px;
    width: 72px;
    height: 72px;
    opacity: 0;
  }
}

/* Helper to center the loader */
.loader-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  width: 100%;
  grid-column: 1 / -1;
}

/* --- FOOTER --- */
/* --- FOOTER --- */
footer {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid rgba(128, 128, 128, 0.1);
  margin-top: auto;

  /* IMPORTANT: Add padding at bottom so text is visible above player */
  padding-bottom: 140px;
}
footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: bold;
}

/* --- SCROLL TO TOP BUTTON --- */
.scroll-top {
  position: fixed;
  bottom: 20px;
  left: 20px; /* Left side to not conflict with help btn */
  width: 45px;
  height: 45px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px var(--primary);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  transform: translateY(10px);
  z-index: 800;
  border: none;
  font-size: 1.2rem;
}
.scroll-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.scroll-top:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
}

/* --- NETWORK TOAST (Offline/Online) --- */
.network-toast {
  position: fixed;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: bold;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  transition: 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  display: flex;
  align-items: center;
  gap: 10px;
}
.network-toast.show {
  top: 20px;
}
.network-toast.offline {
  background: #ef4444;
}
.network-toast.online {
  background: #10b981;
}

/* --- ICON FIX FOR MOBILE --- */
.fas,
.far,
.fab,
.fa {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900; /* Solid icons need weight 900 */
}

/* Specific fix for the outline heart (Regular style) */
.far {
  font-weight: 400 !important;
}

/* Ensure the Heart Button stays in the corner and doesn't move */
.card-fav-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #cbd5e1; /* Lighter gray by default */
  cursor: pointer;
  z-index: 20;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

/* When active (Red Heart) */
.card-fav-btn.active {
  color: #ef4444;
  opacity: 1;
}

/* Active Heart Icon specifically */
.card-fav-btn.active i {
  font-weight: 900 !important; /* Ensure it becomes Solid */
}

/* --- TIMER CIRCLE ANIMATION --- */
.timer-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.timer-svg {
  position: absolute;
  top: -2px; /* Adjust to center over the 40px button */
  left: -2px;
  width: 44px;
  height: 44px;
  transform: rotate(-90deg); /* Start animation from top */
  pointer-events: none; /* Let clicks pass through to the button */
  z-index: 10;
}

.timer-svg circle {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.timer-bar {
  stroke: #ef4444; /* Red color for the timer */
  stroke-dasharray: 126; /* Circumference for r=20 */
  stroke-dashoffset: 126; /* Start hidden (offset = array) */
  transition: stroke-dashoffset 1s linear;
}

.control-btn.active {
  color: var(--primary);
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
  transform: scale(1.1);
}

/* --- PRAYER TIMES MODULE --- */
.prayer-hero {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--bg-card), rgba(16, 185, 129, 0.05));
  border-radius: 24px;
  margin-bottom: 30px;
  border: 1px solid rgba(128, 128, 128, 0.1);
  box-shadow: var(--shadow);
}

.next-prayer-label {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.countdown-display {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary);
  font-family: monospace; /* Monospace keeps numbers from jumping */
  letter-spacing: -2px;
}

.hijri-date {
  margin-top: 15px;
  font-family: "Amiri Quran", serif;
  color: var(--text-main);
  font-size: 1.2rem;
  opacity: 0.8;
}

.prayer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
}

.prayer-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(128, 128, 128, 0.05);
  transition: 0.3s;
  position: relative;
  overflow: hidden;
}

.prayer-card:hover {
  transform: translateY(-5px);
}

/* Active Prayer Card (Current/Next) */
.prayer-card.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
  border-color: var(--primary);
}

.prayer-card.active .prayer-name,
.prayer-card.active .prayer-time {
  color: white;
}

.prayer-name {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.prayer-time {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
}

.location-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(128, 128, 128, 0.1);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-top: 10px;
  color: var(--text-muted);
}

/* --- TIMER CIRCLE ANIMATION --- */
.timer-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.timer-svg {
  position: absolute;
  top: -2px; /* Adjust to center over the 40px button */
  left: -2px;
  width: 44px;
  height: 44px;
  transform: rotate(-90deg); /* Start animation from top */
  pointer-events: none; /* Let clicks pass through to the button */
  z-index: 10;
}

.timer-svg circle {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.timer-bar {
  stroke: #ef4444; /* Red color for the timer */
  stroke-dasharray: 126; /* Circumference for r=20 */
  stroke-dashoffset: 126; /* Start hidden (offset = array) */
  transition: stroke-dashoffset 1s linear;
}

.control-btn.active {
  color: var(--primary);
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
  transform: scale(1.1);
}

/* --- PRAYER TIMES MODULE --- */
.prayer-hero {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--bg-card), rgba(16, 185, 129, 0.05));
  border-radius: 24px;
  margin-bottom: 30px;
  border: 1px solid rgba(128, 128, 128, 0.1);
  box-shadow: var(--shadow);
}

.next-prayer-label {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.countdown-display {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary);
  font-family: monospace; /* Monospace keeps numbers from jumping */
  letter-spacing: -2px;
}

.hijri-date {
  margin-top: 15px;
  font-family: "Amiri Quran", serif;
  color: var(--text-main);
  font-size: 1.2rem;
  opacity: 0.8;
}

.prayer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
}

.prayer-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(128, 128, 128, 0.05);
  transition: 0.3s;
  position: relative;
  overflow: hidden;
}

.prayer-card:hover {
  transform: translateY(-5px);
}

/* Active Prayer Card (Current/Next) */
.prayer-card.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
  border-color: var(--primary);
}

.prayer-card.active .prayer-name,
.prayer-card.active .prayer-time {
  color: white;
}

.prayer-name {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.prayer-time {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
}

.location-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(128, 128, 128, 0.1);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-top: 10px;
  color: var(--text-muted);
}

/* --- إضافة وضع القراءة --- */
.quran-text-container {
  background: var(--bg-card);
  padding: 30px;
  margin: 20px 0 100px 0; /* مسافة من الأسفل عشان المشغل */
  border-radius: 20px;
  box-shadow: var(--shadow);
  text-align: center;
  line-height: 2.2;
  font-family: "Amiri Quran", serif;
  display: none; /* مخفي افتراضيًا */
  border: 2px solid #6c8f3d5e;
  font-size: 1.4rem;
}

.quran-text-container.show {
  display: block;
  animation: fadeIn 0.5s ease;
}

.basmala {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 20px;
  display: block;
  font-family: "Amiri Quran", serif;
}

.ayah-text {
  color: var(--text-main);
  display: inline;
}

.ayah-number {
  color: var(--primary);
  font-size: 1rem;
  margin: 0 8px;
  border: 1px solid var(--primary);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Cairo", sans-serif;
  vertical-align: middle;
}

/* زر التبديل */
.toggle-text-btn {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 8px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: bold;
  font-family: "Cairo", sans-serif;
  margin-top: 15px;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px auto;
}

.toggle-text-btn:hover,
.toggle-text-btn.active {
  background: var(--primary);
  color: white;
}

/* --- Audio Visualizer --- */
.visualizer-container {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 25px;
  margin-left: 10px; /* مسافة بين الموجات والنص */
  opacity: 0.5;
  transition: opacity 0.3s;
}

/* إذا كان المشغل يعمل، نزيد الوضوح */
.visualizer-container.running {
  opacity: 1;
}

.visualizer-container .bar {
  width: 4px;
  background-color: var(--primary);
  border-radius: 2px;
  height: 100%;
  animation: none; /* متوقفة افتراضيًا */
}

/* الحركة (Animation) */
@keyframes equalizer {
  0% {
    height: 10%;
  }
  50% {
    height: 100%;
  }
  100% {
    height: 10%;
  }
}

/* عند التشغيل، ابدأ الحركة */
.visualizer-container.running .bar {
  animation: equalizer 1s infinite ease-in-out;
}

/* تنويع سرعة كل عمود لتبدو عشوائية وطبيعية */
.visualizer-container .bar:nth-child(1) {
  animation-duration: 0.8s;
}
.visualizer-container .bar:nth-child(2) {
  animation-duration: 1.1s;
}
.visualizer-container .bar:nth-child(3) {
  animation-duration: 0.9s;
}
.visualizer-container .bar:nth-child(4) {
  animation-duration: 1.2s;
}
.visualizer-container .bar:nth-child(5) {
  animation-duration: 0.7s;
}

/* --- تنسيق التفسير التفاعلي --- */
.ayah-text {
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 2px 5px;
  border-radius: 6px;
}

.ayah-text:hover {
  background-color: #6c8f3d5e; /* لون خلفية خفيف عند التمرير */
  color: var(--primary);
}

/* تنسيق التفسير داخل النافذة المنبثقة */
.tafseer-text {
  font-family: "Cairo", sans-serif; /* خط سهل القراءة للتفسير */
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-main);
  text-align: justify;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(128, 128, 128, 0.2);
}

.modal-ayah-preview {
  font-family: "Amiri Quran", serif;
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 15px;
  display: block;
}

/* --- تحسين نافذة التفسير --- */

/* عنوان الآية ورقمها في الهيدر */
.ayah-badge {
  background: var(--primary);
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-family: "Cairo", sans-serif;
  font-size: 1rem;
}

/* التسميات الصغيرة فوق الصناديق */
.label-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 5px;
}
.label-text::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
}

/* حاوية الآية (مظهر المصحف) */
.modal-ayah-container {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.05), transparent);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-right: 4px solid var(--primary); /* خط جانبي جمالي */
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  text-align: center;
  position: relative;
}

.modal-ayah-text {
  font-family: "Amiri Quran", serif;
  font-size: 1.6rem; /* حجم كبير للآية */
  line-height: 2.2;
  color: var(--primary); /* لون الآية مميز */
  text-shadow: 0 2px 10px #6c8f3d5e;
}

.ayah-symbol {
  font-family: serif;
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-right: 5px;
}

/* حاوية التفسير */
.modal-tafseer-container {
  padding: 10px 5px;
}

.tafseer-text {
  font-family: "Cairo", sans-serif;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-main);
  text-align: justify;
  border-top: 1px solid rgba(128, 128, 128, 0.1);
  padding-top: 15px;
}

/* في الوضع الليلي نجعل خلفية الآية أغمق قليلًا للتباين */
html.dark-mode .modal-ayah-container {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(16, 185, 129, 0.3);
}

/* --- أزرار التفاعل في النافذة المنبثقة --- */
.modal-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(128, 128, 128, 0.1);
}

.action-btn {
  background: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
  padding: 8px 15px;
  border-radius: 50px;
  cursor: pointer;
  font-family: "Cairo", sans-serif;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.action-btn i {
  font-size: 1rem;
}

/* تنسيق خاص لرسالة "تم النسخ" */
.toast-msg {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-family: "Cairo", sans-serif;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 5000;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.toast-msg.show {
  opacity: 1;
  bottom: 100px;
}

/* --- تصميم بطاقة المشاركة (Story Style) --- */
.story-card {
  position: fixed;
  left: 0;
  top: 0;
  width: 1080px;
  height: 1920px;
  background: radial-gradient(circle at center, #1e293b, #0f172a);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px;
  text-align: center;
  font-family: "Amiri Quran", serif;
  color: #fff;
  border: 20px solid #10b981;
  /* التغيير هنا: نجعله خلف كل العناصر بدلًا من إخراجه من الشاشة */
  z-index: -9999;
  visibility: visible; /* يجب أن يكون مرئيًا للمتصفح لكي يصوره */
  transform: translateX(-200vw); /* نبعده جانبًا بدلًا من الأعلى */
} /* --- تصميم بطاقة المشاركة (مصحح) --- */
.story-card {
  position: fixed;
  left: -3000px; /* المكان الافتراضي (مخفي) */
  top: 0;
  width: 1080px;
  height: 1920px;
  background: radial-gradient(circle at center, #1e293b, #0f172a);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px;
  text-align: center;
  font-family: "Amiri Quran", serif;
  color: #fff;
  border: 20px solid #10b981;
  z-index: -100; /* طبقة سفلية */
  visibility: visible; /* يجب أن يكون مرئيًا دائمًا */
}

/* باقي التنسيقات الداخلية كما هي... */
.story-decoration-top {
  font-size: 5rem;
  color: #10b981;
  margin-bottom: 50px;
}

.story-basmala {
  font-size: 3rem;
  color: #94a3b8;
  margin-bottom: 80px;
}

.story-ayah {
  font-size: 4.5rem;
  line-height: 2;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  margin-bottom: 100px;
  direction: rtl;
}

.story-footer {
  font-family: "Cairo", sans-serif;
  font-size: 2.5rem;
  color: #10b981;
  background: rgba(255, 255, 255, 0.1);
  padding: 20px 60px;
  border-radius: 50px;
  display: inline-block;
}

.story-branding {
  position: absolute;
  bottom: 50px;
  font-family: "Cairo", sans-serif;
  font-size: 1.8rem;
  opacity: 0.6;
}

/* --- Search Tabs --- */
.search-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
}

.search-tab {
  background: transparent;
  border: 1px solid rgba(128, 128, 128, 0.2);
  color: var(--text-muted);
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-family: "Cairo", sans-serif;
  font-weight: bold;
  transition: 0.3s;
}

.search-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* --- Search Results (Ayahs) --- */
.search-results-grid {
  display: grid;
  gap: 15px;
  margin-top: 20px;
  padding-bottom: 50px;
}
.search-result-card {
  background: var(--bg-card);
  padding: 25px 20px;
  border-radius: 16px;
  border: 1px solid rgba(128, 128, 128, 0.1);
  border-right: 6px solid var(--primary); /* شريط جانبي */
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.search-result-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

/* زخرفة خلفية خفيفة */
.search-result-card::before {
  content: "❖";
  position: absolute;
  right: -10px;
  bottom: -20px;
  font-size: 8rem;
  opacity: 0.03;
  color: var(--text-main);
  pointer-events: none;
}

.bracket {
  color: var(--primary);
  font-family: serif; /* Ensure brackets use a nice serif font */
  font-size: 1.3em;
  vertical-align: middle;
  margin: 0 8px;
}

.result-text {
  font-family: "Amiri Quran", serif;
  font-size: 1.5rem; /* Increase size for readability */
  line-height: 2.6; /* More breathing room for tashkeel */
  color: var(--text-main);
  margin-bottom: 1.5rem;
  padding: 0 10px; /* Prevent text touching edges */
  text-align: center;
}

.result-info {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid rgba(128, 128, 128, 0.1);
  padding-top: 15px;
  position: relative;
  z-index: 2;
}

.info-badge {
  background: rgba(128, 128, 128, 0.05);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
  font-family: "Cairo", sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(128, 128, 128, 0.1);
}

.info-badge i {
  color: var(--primary);
}

html.dark-mode .info-badge {
  background: rgba(16, 185, 129, 0.15);
}

/* --- تحسين الاستجابة للموبايل --- */
@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    padding-bottom: 120px;
  }

  /* إخفاء التحكم الجانبي في الموبايل */
  .player-right {
    display: none !important;
  }

  /* تعديل المشغل السفلي للموبايل */
  .sticky-player {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 12px 20px;
    padding-bottom: 30px; /* من أجل iPhone bar */
    z-index: 9000; /* طبقة عالية لكن تحت المشغل الكامل */
    background: rgba(30, 41, 59, 0.95); /* لون شبه معتم */
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* --- مشغل الشاشة الكاملة (التصحيح النهائي) --- */
@media (max-width: 768px) {
  .full-player-overlay {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 100vh;
    left: 0;
    width: 100%;
    height: 100vh; /* ملء الشاشة */
    background-color: #0f172a; /* خلفية داكنة */
    z-index: 10000;
    padding: 30px 20px 50px 20px; /* هوامش كبيرة */
    transition: top 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    overflow: hidden;
  }

  .full-player-overlay.active {
    top: 0;
  }

  /* 1. الهيدر */
  .fp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
  }

  .fp-header-title {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 1px;
  }

  .fp-icon-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem; /* حجم أيقونة الإغلاق والقلب */
    padding: 10px;
  }

  /* 2. حاوية الصورة (توسيط وتكبير) */
  .fp-art-container {
    flex: 1; /* تأخذ المساحة المتاحة في المنتصف */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 20px 0;
  }

  .fp-art-circle {
    width: 260px; /* حجم ثابت وكبير */
    height: 260px;
    max-width: 70vw; /* لضمان عدم الخروج من الشاشات الصغيرة */
    max-height: 70vw;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    position: relative;
  }

  .fp-art-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* 3. النصوص */
  .fp-info {
    text-align: center;
    width: 100%;
    margin-bottom: 30px;
  }

  #fp-title {
    font-size: 2rem; /* خط كبير للسورة */
    color: #fff;
    margin: 0 0 5px 0;
  }

  #fp-subtitle {
    color: var(--primary);
    font-size: 1.1rem;
    opacity: 0.9;
  }

  /* 4. شريط التقدم */
  .fp-progress {
    width: 100%;
    margin-bottom: 30px;
  }

  .fp-time {
    display: flex;
    justify-content: space-between;
    color: #cbd5e1;
    font-size: 0.85rem;
    direction: ltr;
    margin-bottom: 10px;
  }

  #fp-progress-bar {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    accent-color: var(--primary);
  }

  /* 5. أزرار التحكم (الإصلاح المهم) */
  .fp-controls {
    display: flex;
    justify-content: space-between; /* توزيع بالتساوي */
    align-items: center;
    width: 100%;
    padding: 0 10px;
    margin-bottom: 20px;
  }

  .fp-ctrl-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem; /* تكبير الأيقونات */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
  }

  /* زر التشغيل الكبير */
  .fp-ctrl-btn.play {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 50%;
    font-size: 2.5rem; /* أيقونة ضخمة */
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
  }

  /* الأزرار الجانبية أصغر قليلًا */
  .fp-ctrl-btn.small {
    font-size: 1.4rem;
    color: #94a3b8;
  }

  /* تفعيل الألوان */
  .fp-ctrl-btn.small.active,
  .fp-icon-btn.active {
    color: var(--primary);
  }
}
/* تنسيق خاص للأيقونة بدلًا من الصورة */
.fp-art-circle.icon-mode {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.2),
    rgba(16, 185, 129, 0.05)
  );
  border: 4px solid rgba(16, 185, 129, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fp-art-circle.icon-mode i {
  font-size: 8rem; /* حجم كبير للأيقونة */
  background: -webkit-linear-gradient(#10b981, #059669);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 10px 20px rgba(16, 185, 129, 0.3));
}

/* حركة الدوران */
.fp-art-circle.rotating {
  animation: pulse-glow 3s infinite alternate; /* حركة نبض بدل الدوران للأيقونة */
}

@keyframes pulse-glow {
  0% {
    transform: scale(1);
    box-shadow: 0 0 30px #6c8f3d5e;
  }
  100% {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(16, 185, 129, 0.4);
  }
}

/* =========================================
   تنسيقات صفحة مواقيت الصلاة (Responsive Fixed)
   ========================================= */

/* 1. قسم الهيرو (Hero) */
.prayer-hero {
  text-align: center;
  padding: 40px 20px;
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 30px;
  border-radius: 0 0 30px 30px; /* حواف دائرية من الأسفل */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05); /* Subtle border for definition */
  background: radial-gradient(
    circle at top center,
    #1e293b 0%,
    #0f172a 80%
  ); /* Slightly adjusted gradient */
}

.next-prayer-label {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 5px;
  font-family: "Cairo", sans-serif;
}

.countdown-display {
  font-family: "Cairo", sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary);
  text-shadow: 0 0 25px rgba(16, 185, 129, 0.25);
  margin: 0;
  direction: ltr;
  line-height: 1.2;
  font-variant-numeric: tabular-nums; /* Prevents jitter when numbers change */
}

.hijri-date {
  font-family: "Amiri Quran", serif;
  font-size: 1.1rem;
  color: #fff;
  opacity: 0.7;
  margin-top: 5px;
  margin-bottom: 20px;
}

.location-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: 0.3s;
  cursor: pointer;
}

.location-badge:hover {
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary);
  border-color: var(--primary);
}

/* 2. شبكة الصلوات (Responsive Grid) */
.prayer-grid {
  display: grid;
  gap: 15px;
  padding: 0 20px 100px 20px;
  max-width: 1000px; /* عرض أقصى للكمبيوتر */
  margin: 0 auto;
}

/* التجاوب (Media Queries) */
/* للموبايل: عمودين */
@media (max-width: 768px) {
  .prayer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .countdown-display {
    font-size: 2.5rem; /* تصغير الخط للموبايل */
  }
}

/* للكمبيوتر: 6 أعمدة (كل الصلوات في صف واحد) */
@media (min-width: 769px) {
  .prayer-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .prayer-hero {
    margin: 20px auto 40px auto;
    border-radius: 20px;
    max-width: 90%;
    background: linear-gradient(135deg, #1e293b, #0f172a);
  }
}

/* تصميم البطاقة */
.prayer-card {
  background: var(--bg-card);
  padding: 15px 10px;
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(128, 128, 128, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.prayer-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.prayer-card.active {
  background: rgba(16, 185, 129, 0.08);
  border: 2px solid var(--primary);
  box-shadow: 0 5px 20px rgba(16, 185, 129, 0.15);
}

.prayer-name {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.prayer-card.active .prayer-name {
  color: var(--primary);
  font-weight: bold;
}

.prayer-time {
  font-family: "Cairo", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  direction: ltr;
}

/* =========================================
   TOOLS PAGE STYLES (Khatmah & Tasbih)
   ========================================= */

.tools-main {
  max-width: 600px;
  margin: 20px auto;
  padding: 0 20px 100px 20px;
}

/* Tabs */
.tools-tabs {
  display: flex;
  background: var(--bg-card);
  padding: 5px;
  border-radius: 50px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(128, 128, 128, 0.1);
}

.tab-btn {
  flex: 1;
  padding: 12px;
  border: none;
  background: transparent;
  border-radius: 40px;
  color: var(--text-muted);
  font-family: "Cairo", sans-serif;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px #6c8f3d5e;
}

.tool-content {
  display: none;
  animation: fadeIn 0.4s ease;
}
.tool-content.active {
  display: block;
}

/* --- Khatmah Styles --- */
.setup-card {
  background: var(--bg-card);
  padding: 40px 20px;
  border-radius: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(128, 128, 128, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.setup-icon {
  font-size: 4rem;
  color: var(--primary);
  margin-bottom: 20px;
  background: #6c8f3d5e;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.input-group {
  margin: 25px 0;
  width: 100%;
}
.input-group input {
  width: 120px;
  padding: 10px;
  text-align: center;
  font-size: 1.5rem;
  border: 2px solid rgba(128, 128, 128, 0.2);
  border-radius: 12px;
  background: var(--bg-body);
  color: var(--text-main);
  font-weight: bold;
}
.input-group input:focus {
  border-color: var(--primary);
  outline: none;
}

.create-plan-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
  transition: 0.3s;
}
.create-plan-btn:hover {
  transform: translateY(-3px);
}

/* Active Plan UI */
.progress-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  padding: 20px;
  border-radius: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.circular-progress {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}
.inner-circle {
  width: 85px;
  height: 85px;
  background: var(--bg-card);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}
.inner-circle span {
  font-size: 1.4rem;
  color: var(--primary);
}
.inner-circle small {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.stats-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 20px;
}
.stat-box {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: var(--text-main);
  background: rgba(128, 128, 128, 0.05);
  padding: 10px;
  border-radius: 12px;
}
.stat-box i {
  color: var(--primary);
}

.daily-task-card {
  background: linear-gradient(135deg, var(--bg-card), rgba(16, 185, 129, 0.05));
  border: 1px solid var(--primary);
  padding: 25px;
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
.task-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.badge {
  background: rgba(16, 185, 129, 0.2);
  color: var(--primary);
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
}
.page-range {
  font-size: 1.3rem;
  font-weight: bold;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  color: var(--text-main);
}
.mark-done-btn {
  width: 100%;
  background: var(--primary);
  color: white;
  padding: 15px;
  border-radius: 16px;
  font-size: 1.1rem;
  font-weight: bold;
  border: none;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.3s;
}
.mark-done-btn:active {
  transform: scale(0.98);
}

.reset-plan-link {
  background: none;
  border: none;
  color: #ef4444;
  text-decoration: underline;
  margin-top: 15px;
  cursor: pointer;
  font-size: 0.9rem;
}

/* --- Tasbih Styles (Neumorphism) --- */
.tasbih-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding-top: 20px;
}

.tasbih-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 20px;
}

.tasbih-screen {
  font-family: "Cairo", sans-serif;
  font-size: 4rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  display: flex;
  flex-direction: column;
}
.tasbih-screen small {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: normal;
}

.reset-tasbih {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: 0.3s;
}
.reset-tasbih:hover {
  background: #ef4444;
  color: white;
}

.tasbih-body {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tasbih-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 10px solid var(--bg-card);
  box-shadow:
    15px 15px 30px rgba(0, 0, 0, 0.05),
    -15px -15px 30px rgba(255, 255, 255, 0.05),
    inset 5px 5px 10px rgba(0, 0, 0, 0.05),
    inset -5px -5px 10px rgba(255, 255, 255, 0.05);
}

/* الزر الكبير الواقعي */
.tasbih-btn {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: none;
  background: var(--primary); /* Fallback */
  background: linear-gradient(145deg, var(--primary), var(--primary-hover));
  box-shadow:
    0 20px 50px rgba(16, 185, 129, 0.4),
    inset 0 0 0 5px rgba(255, 255, 255, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 5rem;
  transition: all 0.1s;
  position: relative;
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
}

.tasbih-btn:active {
  transform: scale(0.95);
  box-shadow:
    0 5px 15px rgba(16, 185, 129, 0.4),
    inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.vibration-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 10px 20px;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

/* Switch Style */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--primary);
}
input:checked + .slider:before {
  transform: translateX(18px);
}

/* Dark Mode Adjustments */
html.dark-mode .tasbih-ring {
  border-color: #1e293b;
  box-shadow:
    10px 10px 20px #0f172a,
    -10px -10px 20px #2d3748;
}

/* =========================================
   NEW TOOLS STYLES (Ramadan Edition)
   ========================================= */

/* تحسينات الكروت */
.setup-card,
.daily-task-card {
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
}
.daily-task-card.glow-effect {
  border: 2px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 20px #6c8f3d5e;
}

/* أزرار الأيام السريعة */
.day-btn {
  background: var(--bg-body);
  border: 1px solid rgba(128, 128, 128, 0.2);
  padding: 10px 15px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  color: var(--text-muted);
  transition: 0.2s;
}
.day-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* دائرة الختمة SVG */
.progress-container-khatmah {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.progress-ring__circle {
  transition: stroke-dashoffset 0.5s ease-in-out;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}
.progress-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: bold;
}

/* لوحة تحكم الختمة */
.khatmah-dashboard {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  background: var(--bg-card);
  padding: 20px;
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.khatmah-info h3 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--primary);
}

/* تفاصيل الورد اليومي */
.p-box {
  background: var(--bg-body);
  padding: 10px 20px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(128, 128, 128, 0.1);
}
.p-box b {
  display: block;
  font-size: 1.5rem;
  color: var(--text-main);
}
.p-box small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(128, 128, 128, 0.1);
}
.text-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.text-btn:hover {
  color: var(--primary);
}
.text-btn.danger:hover {
  color: #ef4444;
}

/* ----------------------------------
   تصميم المسبحة الجديد (Modern Tasbih)
   ---------------------------------- */
.adhkar-selector select {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(128, 128, 128, 0.2);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 1.1rem;
  font-family: "Cairo", sans-serif;
  margin-bottom: 20px;
  outline: none;
}

.tasbih-controls-mini {
  display: flex;
  gap: 10px;
}
.mini-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--bg-body);
  color: var(--text-muted);
  cursor: pointer;
}
.mini-btn:hover {
  color: var(--primary);
}

/* دائرة المسبحة والزر */
.tasbih-body {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.tasbih-progress-svg {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.tasbih-progress-svg circle {
  fill: none;
  stroke-width: 4;
}
.tasbih-progress-svg .bg {
  stroke: rgba(128, 128, 128, 0.1);
}
.tasbih-progress-svg .progress {
  stroke: var(--primary);
  transition: stroke-dashoffset 0.1s linear;
}

/* الزر العائم */
.tasbih-btn {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: none;
  background: var(--bg-card);
  box-shadow:
    10px 10px 30px rgba(0, 0, 0, 0.05),
    -10px -10px 30px rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: all 0.1s;
}
.dark-mode .tasbih-btn {
  box-shadow:
    5px 5px 15px rgba(0, 0, 0, 0.3),
    -5px -5px 15px rgba(255, 255, 255, 0.05);
}

.tasbih-btn .finger-print {
  font-size: 4rem;
  color: var(--primary);
  opacity: 0.8;
}

.tasbih-btn:active,
.tasbih-btn.clicked {
  transform: scale(0.95);
  box-shadow:
    inset 5px 5px 10px rgba(0, 0, 0, 0.05),
    inset -5px -5px 10px rgba(255, 255, 255, 0.5);
}
.dark-mode .tasbih-btn:active {
  box-shadow:
    inset 5px 5px 10px rgba(0, 0, 0, 0.3),
    inset -5px -5px 10px rgba(255, 255, 255, 0.02);
}

/* =========================================
   ASMAUL HUSNA STYLES
   ========================================= */

.names-header {
  text-align: center;
  margin-bottom: 30px;
}
.names-header h2 {
  font-family: "Amiri Quran", serif;
  color: var(--primary);
  margin-bottom: 15px;
}
.names-header input {
  width: 100%;
  max-width: 400px;
  padding: 12px 20px;
  border-radius: 50px;
  border: 1px solid rgba(128, 128, 128, 0.2);
  background: var(--bg-card);
  color: var(--text-main);
  text-align: center;
  font-family: "Cairo", sans-serif;
}

.names-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.name-card {
  background: var(--bg-card);
  border: 1px solid rgba(128, 128, 128, 0.1);
  border-radius: 12px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.name-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--bg-card), #6c8f3d5e);
}

.name-text {
  font-family: "Amiri Quran", serif;
  font-size: 1.4rem;
  color: var(--text-main);
  z-index: 2;
}

/* زخرفة خلفية خفيفة */
.name-card::before {
  content: "✵";
  position: absolute;
  font-size: 4rem;
  color: var(--primary);
  opacity: 0.05;
  top: -10px;
  right: -10px;
}

/* Modal Styles specific for Names */
.allah-name-big {
  font-family: "Amiri Quran", serif;
  font-size: 4rem;
  color: var(--primary);
  margin-bottom: 20px;
  text-shadow: 0 5px 20px #6c8f3d5e;
}
.name-desc {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-muted);
}

/* Audio Wave Animation */
.wave-visualizer {
  display: flex;
  justify-content: center;
  gap: 4px;
  height: 25px;
  margin-bottom: 10px;
  opacity: 0;
  transition: 0.3s;
}
.pro-mic-panel:has(.listening) .wave-visualizer {
  opacity: 1;
}
.wave-visualizer .bar {
  width: 4px;
  background: var(--primary);
  border-radius: 2px;
  animation: soundWave 0.5s infinite alternate;
}
.wave-visualizer .bar:nth-child(2) {
  animation-delay: 0.1s;
}
.wave-visualizer .bar:nth-child(3) {
  animation-delay: 0.2s;
}
.wave-visualizer .bar:nth-child(4) {
  animation-delay: 0.3s;
}
.wave-visualizer .bar:nth-child(5) {
  animation-delay: 0.15s;
}

@keyframes soundWave {
  0% {
    height: 5px;
    opacity: 0.5;
  }
  100% {
    height: 25px;
    opacity: 1;
  }
}
@keyframes breathing {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}
