:root {
  --primary-color: #21c248;
  --secondary-color: #0c5a3d;
  --accent-gradient: linear-gradient(135deg, #21c248 0%, #0c5a3d 100%);
  --text-dark: #2d3748;
  --text-light: #f8fafc;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --highlight-transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@font-face {
  font-family: 'Hafs';
  src: url('/wp-content/uploads/2025/04/UthmanicHafs1Ver09.otf') format('opentype');
}

@font-face {
  font-family: 'bismillah';
  src: url('/wp-content/plugins/surah-display/fonts/arabic/Besmellah.otf') format('opentype');
}

.container {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

h1 {
  text-align: center;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 1.5rem 0;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  letter-spacing: -0.05em;
  position: relative;
}

h1::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

.bismillah-line {
  font-family: "Scheherazade", serif;
  font-size: 2rem;
  text-align: center;
  color: var(--secondary-color);
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(33, 194, 72, 0.05);
  border-radius: 12px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(33, 194, 72, 0.1);
}

/* Bismillah Section Alignment */
.bismillah-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 1.5rem 0;
  width: 100%;
}

.bismillah-image {
  max-width: 220px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;
}

.arabic {
  font-family: 'Hafs', serif;
  font-size: clamp(1.125rem, 1.5vw + 0.75rem, 1.75rem);
  direction: rtl;
  text-align: right;
  line-height: 2;
  margin: 1rem 0;
  position: relative;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.ayah {
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.ayah:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

.ayah-number-frame {
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-light);
  font-family: 'Amiri', serif;
  margin-left: 12px;
  box-shadow: var(--shadow-sm);
}

/* Improved Highlight Transition */
.ayah.highlight-transition {
  transition: var(--highlight-transition);
  will-change: transform, background, box-shadow;
}

.ayah.highlighted {
  background: rgba(33, 194, 72, 0.15);
  border-left: 4px solid var(--primary-color);
  box-shadow: 0 4px 20px rgba(33, 194, 72, 0.15);
  transform: translateY(-1px);
}

/* Smoother highlight animation */
@keyframes highlightPulse {
  0% { 
    background: rgba(33, 194, 72, 0.05);
    box-shadow: 0 4px 15px rgba(33, 194, 72, 0.1);
  }
  50% {
    background: rgba(33, 194, 72, 0.2);
    box-shadow: 0 6px 25px rgba(33, 194, 72, 0.2);
  }
  100% { 
    background: rgba(33, 194, 72, 0.15);
    box-shadow: 0 4px 20px rgba(33, 194, 72, 0.15);
  }
}

/* Audio Player Styles */
.controls {
  display: flex;
  gap: 12px;
  margin-top: 1rem;
  justify-content: flex-end;
}

.icon-btn {
  cursor: pointer;
  transition: transform 0.2s, color 0.2s;
  font-size: 1.2rem;
  padding: 8px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.icon-btn:hover {
  background: rgba(33, 194, 72, 0.1);
  transform: scale(1.1);
}

.icon-btn:active {
  transform: scale(0.95);
}

/* Improved Responsive Controller */
.controller {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 2px solid #21c248;
  padding: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  background: rgba(33, 194, 72, 0.1);
  color: var(--secondary-color);
  transition: var(--transition);
}

.back-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateX(-4px);
}

@media (max-width: 768px) {
  .arabic {
    font-size: 1rem;
    padding: 1rem;
  }
  
  .bismillah-line {
    font-size: 1.75rem;
    padding: 1rem;
  }

  .controls {
    justify-content: center;
  }
}

@media (max-width: 480px) {
    #ayah-list{
        width:100%;
    }
  .ayah {
    padding: 1rem;
  }
  
  .ayah-number-frame {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  
  .bismillah-image {
    max-width: 80%;
  }

  .icon-btn {
    font-size: 1rem;
    width: 32px;
    height: 32px;
    padding: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
  
  .ayah.highlighted {
    background: rgba(33, 194, 72, 0.15);
    border-left: 4px solid var(--primary-color);
  }
}




/*-----------------------------------------------------------------*/




  #audio-control-btn:hover {
        background-color: #45a049;
        transform: scale(1.05);
        transition: all 0.2s ease;
    }

    @media (max-width: 768px) {
        #audio-control-btn {
            bottom: 70px !important;
            right: 10px !important;
            width: 40px !important;
            height: 40px !important;
            font-size: 16px !important;
        }
    }









/*--------------- detail popup start------------------------------- */
#ayah-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  padding: 2rem;
  border-radius: 16px;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 
              0 0 0 1px rgba(33, 194, 72, 0.3);
  z-index: 9999;
  overflow-y: auto;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

#ayah-modal[style*="display: block"] {
  opacity: 1;
  animation: modalEntrance 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

@keyframes modalEntrance {
  0% {
    transform: translate(-50%, -45%);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

#ayah-modal h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  padding-bottom: 0.75rem;
}

#ayah-modal h3::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 3px;
}

#ayah-modal p {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(12, 90, 61, 0.1);
}

#modal-arabic {
  font-family: 'Hafs', serif;
  font-size: 1.75rem;
  line-height: 2;
  text-align: right;
  direction: rtl;
  color: #0c5a3d;
}

#modal-amharic {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-dark);
  background: rgba(33, 194, 72, 0.05);
  border-left: 3px solid var(--primary-color);
}

#ayah-modal button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(33, 194, 72, 0.3);
  width: 100%;
}

#ayah-modal button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(33, 194, 72, 0.4);
}

#ayah-modal button:active {
  transform: translateY(0);
}

/* Backdrop */
#ayah-modal::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#ayah-modal[style*="display: block"]::before {
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  #ayah-modal {
    width: 99%;
    padding: 1.5rem;
  }
  
  #modal-arabic {
    font-size: 1rem;
  }
  
  #modal-amharic {
    font-size: 1.5rem;
  }
}

/* Animation for reduced motion */
@media (prefers-reduced-motion: reduce) {
  #ayah-modal {
    transition: none;
  }
  
  #ayah-modal[style*="display: block"] {
    animation: none;
    opacity: 1;
  }
}
/*--------------- detail popup start------------------------------- */