/* Quran Page Styles */

/* Search Form Styles */
.search-box {
  width: 300px;
}

.search-box input {
  border-radius: 4px;
  border: 1px solid #ddd;
}

.search-box .btn {
  padding: 6px 12px;
}

/* Audio Controls Base Styles */
.audio-controls {
  z-index: 1000;
  padding: 10px;
  background: rgba(0, 0, 0, 0.9);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
}

.audio-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 10px;
}

/* Progress Container Styles */
.progress-container {
  margin-bottom: 10px;
}

.time-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.time-display {
  font-size: 0.8rem;
  min-width: 45px;
}

.form-range {
  flex: 1;
}

/* Button Controls Styles */
.button-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.control-btn {
  padding: 8px 12px;
  border-radius: 4px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  min-width: 40px;
  justify-content: center;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.play-btn {
  background: #007bff;
  min-width: 50px;
}

.play-btn:hover {
  background: #0056b3;
}

.repeat-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  min-width: 45px; /* Ensure minimum width for icon + text */
}

.repeat-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.repeat-btn i {
  font-size: 16px;
}

/* Dropdown Styles */
.dropdown-menu {
  background: #343a40;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-item {
  color: white;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Menu icon and dropdown styles */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  padding: 20px;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.menu-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: inherit;
  font-size: 24px;
  cursor: pointer;
  z-index: 1002;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.dropdown {
  position: absolute;
  top: 70px;
  right: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: none;
  flex-direction: column;
  z-index: 1002;
  min-width: 200px;
  padding: 8px 0;
}

/* Dark theme support */
body.dark-theme .fixed-header {
  background-color: #1a1a1a;
}

body.dark-theme .menu-icon {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .dropdown {
  background-color: #1a1a1a;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-theme .dropdown a {
  color: #fff;
}

body.dark-theme .dropdown a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Dropdown Menu Styles */
.dropdown {
  position: absolute;
  top: 70px;
  right: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none;
  flex-direction: column;
  padding: 10px 0;
  min-width: 150px;
}

.dropdown a {
  color: #333;
  text-decoration: none;
  padding: 12px 20px;
  transition: background-color 0.3s;
  font-size: 16px;
}

.dropdown a:hover {
  background-color: #f5f5f5;
}

/* Settings Page Styles */
.settings-section {
  background-color: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.setting-item {
  margin: 20px 0;
}

.switch-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.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: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2196f3;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Dark Theme Styles */
body {
  background-color: #ffffff;
  color: #333333;
  transition: background-color 0.3s, color 0.3s;
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

body.dark-theme {
  background-color: #1a1a2e !important;
  color: #ffffff;
}

body.dark-theme .container {
  background-color: #1a1a2e !important;
}

body.dark-theme .ayat-item {
  background-color: #2d2d44;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.dark-theme .arabic-text {
  color: #ffffff;
}

body.dark-theme .latin-text {
  color: #e1e1e1;
}

body.dark-theme .translation-text {
  color: #cccccc;
}

body.dark-theme .audio-controls {
  background-color: #2d2d44 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .back-absolute {
  color: #ffffff !important;
  background: none;
  padding: 0;
  box-shadow: none;
  text-decoration: none !important;
}

body.dark-theme .back-absolute:hover {
  background: none;
  opacity: 0.8;
  text-decoration: none !important;
}

body.dark-theme .control-btn {
  color: #ffffff;
  background-color: transparent;
}

body.dark-theme .control-btn:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .control-btn:disabled {
  color: rgba(255, 255, 255, 0.3);
}

body.dark-theme .time-display {
  color: #ffffff;
}

body.dark-theme .progress-container {
  background-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .form-range {
  background-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .form-range::-webkit-slider-thumb {
  background-color: #ffffff;
}

body.dark-theme .form-range::-moz-range-thumb {
  background-color: #ffffff;
}

body.dark-theme .surah-card {
  background-color: #2d2d44 !important;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.dark-theme .surah-name-arabic,
body.dark-theme .surah-info,
body.dark-theme .revelation-type,
body.dark-theme .back-absolute,
body.dark-theme .back-absolute i,
body.dark-theme .text-muted,
body.dark-theme small,
body.dark-theme .surah-number {
  color: #ffffff !important;
}

body.dark-theme .revelation-type {
  background-color: #3d3d5c !important;
  padding: 4px 8px;
  border-radius: 4px;
}

body.dark-theme .back-absolute {
  background-color: #2d2d44;
  padding: 8px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.dark-theme .back-absolute:hover {
  background-color: #3d3d5c;
}

body.dark-theme #searchSurah {
  background-color: #2d2d44;
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

body.dark-theme #searchSurah::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

body.dark-theme .menu-icon {
  background-color: #2d2d44;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

body.dark-theme .dropdown {
  background-color: #2d2d44;
  border-color: rgba(255, 255, 255, 0.2);
}

body.dark-theme .dropdown a {
  color: #ffffff;
}

body.dark-theme .dropdown a:hover {
  background-color: #3d3d5c;
}

/* Light Theme Styles (default) */
.ayat-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  transition: all 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.arabic-text {
  color: #333333;
  transition: color 0.3s;
}

.latin-text {
  color: #666666;
  transition: color 0.3s;
}

.translation-text {
  color: #555555;
  transition: color 0.3s;
}

.back-absolute {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1001;
}

.repeat-btn span {
  font-size: 0.8rem;
  min-width: 15px; /* Ensure space for text */
  text-align: center;
}

.back-absolute a {
  text-decoration: none !important;
  color: #000000 !important;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.back-absolute i {
  font-size: 14px;
  color: #000000;
}

.back-absolute a:hover {
  opacity: 0.8;
  text-decoration: none !important;
  color: #000000 !important;
}

/* Dark theme back button */
body.dark-theme .back-absolute a {
  color: #ffffff !important;
  text-decoration: none !important;
}

body.dark-theme .back-absolute a:hover {
  color: #ffffff !important;
  opacity: 0.8;
  text-decoration: none !important;
}

body.dark-theme .back-absolute i {
  color: #ffffff !important;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
  .menu-icon {
    top: 10px;
    right: 10px;
  }

  .dropdown {
    top: 60px;
    right: 10px;
    min-width: 140px;
  }

  .settings-content {
    width: 90%;
    max-width: 350px;
  }
}

/* Mobile Styles */
@media (max-width: 576px) {
  .audio-controls {
    padding: 8px 5px;
  }

  .button-controls {
    gap: 6px;
  }

  .control-btn {
    padding: 6px 8px;
    min-width: 35px;
  }

  .repeat-btn {
    min-width: 40px;
    padding: 6px 8px;
  }

  .repeat-btn span {
    display: inline-block !important; /* Force display on mobile */
    font-size: 0.75rem;
    margin-left: 2px;
  }

  .time-controls {
    gap: 5px;
  }

  .time-display {
    font-size: 0.7rem;
    min-width: 35px;
  }

  .repeat-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    min-width: 45px; /* Ensure minimum width for icon + text */
  }

  .repeat-btn i {
    margin-right: 2px;
    font-size: 16px;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  .button-controls {
    gap: 4px;
  }

  .control-btn {
    padding: 5px 6px;
    min-width: 32px;
  }

  .repeat-btn {
    min-width: 35px;
  }

  .repeat-btn i {
    font-size: 14px;
  }

  .repeat-btn span {
    font-size: 0.7rem;
  }
}

/* Memastikan tidak ada wrapping pada mobile */
@media (max-width: 400px) {
  /* Button Controls Styles */
  .button-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .control-btn {
    padding: 8px 12px;
    border-radius: 4px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    min-width: 40px;
    justify-content: center;
  }

  .repeat-btn span {
    font-size: 0.8rem;
    min-width: 15px; /* Ensure space for text */
    text-align: center;
  }
}

.audio-controls .form-range {
  min-width: 150px;
}

.audio-controls .btn {
  padding: 0.375rem 0.75rem;
}

.audio-controls .btn-sm {
  padding: 0.25rem 0.5rem;
}

.audio-controls .dropdown-menu {
  background-color: #f8f9fa;
}

.audio-controls .dropdown-item {
  color: #333;
  padding: 8px 20px;
}

.audio-controls .dropdown-item:hover {
  background-color: #e9ecef;
}

.audio-controls .dropdown-menu {
  background-color: #2d2d44;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 0;
  min-width: 120px;
}

.audio-controls .dropdown-item {
  color: white;
  padding: 8px 16px;
  font-size: 14px;
}

.audio-controls .dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Dark theme support */
body.dark-theme .audio-controls .dropdown-menu {
  background-color: #1a1a2e;
  border-color: rgba(255, 255, 255, 0.2);
}

body.dark-theme .audio-controls .dropdown-item {
  color: white;
}

body.dark-theme .audio-controls .dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
  .audio-controls .dropdown {
    width: 100%;
    margin: 5px 0;
  }

  .audio-controls .dropdown-toggle {
    width: 100%;
  }
}

@media (max-width: 790px) {
  .search-box {
    width: 100%;
    margin-top: 1rem;
  }

  .audio-controls {
    flex-direction: column; /* Stack controls vertically */
    align-items: center; /* Center align items */
  }

  .d-flex {
    flex-direction: column;
  }
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 0 15px;
  margin: 0 auto;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: background-color 0.3s, box-shadow 0.3s;
  flex: 1;
}

.header-section {
  position: relative;
  margin-bottom: 2rem;
}

.search-form {
  max-width: 500px;
  margin: 0 auto;
}

.search-form .input-group {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-form input[type="search"] {
  border-radius: 4px 0 0 4px;
  border: 1px solid #ddd;
  padding: 10px 15px;
}

.search-form .btn {
  border-radius: 0 4px 4px 0;
  padding: 10px 20px;
  background-color: #1e40af;
  border: none;
}

.search-form .btn:hover {
  background-color: #1e3a8a;
}

.surah-card {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  margin-bottom: 20px; /* Reduced margin for closer spacing */
}

.surah-card:hover {
  transform: translateY(-5px);
}

.surah-number {
  background-color: #1e40af;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
}

.surah-name-arabic {
  font-size: 1.5em;
  color: #1e40af;

  justify-content: center;
}

.surah-info {
  color: #666;
  font-size: 0.9em;
}

.revelation-type {
  background-color: #e2e8f0;
  padding: 4px 8px;
  border-radius: 15px;
  font-size: 0.8em;
}

/* Center title for larger screens */
#surahTitle {
  text-align: center;
  width: 100%;
  display: flex;
  justify-content: center;
}

.btn-link {
  position: absolute; /* Position it absolutely */
  top: 20px; /* Distance from the top */
  left: 20px; /* Distance from the left */
  z-index: 1000; /* Ensure it appears above other content */
}

.back {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  padding: 8px 15px;
  background-color: #f8f9fa;
  border-radius: 20px;
  text-decoration: none;
  color: #333;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

.back i {
  margin-right: 5px;
}

.back:hover {
  background-color: #e9ecef;
  color: #000;
  text-decoration: none;
}

/* Style untuk back button yang absolute (tidak mengikuti scroll) */
.back-absolute {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  padding: 8px 15px;
  background-color: #f8f9fa;
  border-radius: 20px;
  text-decoration: none;
  color: #333;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

.back-absolute i {
  margin-right: 5px;
}

.back-absolute:hover {
  background-color: #e9ecef;
  color: #000;
  text-decoration: none;
}

/* Media query untuk tampilan mobile */
@media (max-width: 768px) {
  .back-absolute {
    top: 10px;
    left: 10px;
    padding: 6px 12px;
    font-size: 14px;
  }
}

/* Surah Title Styles */
.surah-title-container {
  padding: 0 48px; /* Add padding to prevent overlap with back button and dropdown */
  margin: 15px auto;
  max-width: 800px;
}

.surah-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.small-text {
  font-size: 0.9rem;
}

/* Adjust back button position */
.back-absolute {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
}

/* Remove margin from surah info container since we're using the title container */
#surahInfo {
  margin: 0;
}

/* Share Button Styles */
.share-button {
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 50%;
  transition: background-color 0.3s;
}

.share-button i {
  font-size: 1.5rem;
}

.share-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Share Dialog Styles */
.share-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.dialog-content {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 500px; /* Increased max-width for better preview */
  max-height: 90vh;
  overflow-y: auto;
}

.dialog-content h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  text-align: center;
  color: #333;
}

.dialog-content p {
  margin-bottom: 15px;
  font-size: 0.85rem;
  text-align: center;
  color: #666;
}

.dialog-content button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.dialog-content button:last-child {
  margin-bottom: 0;
}

.btn-copy {
  background-color: #4285f4;
  color: white;
}

.btn-whatsapp {
  background-color: #25d366;
  color: white;
}

.btn-facebook {
  background-color: #1877f2;
  color: white;
}

.btn-twitter {
  background-color: #1da1f2;
  color: white;
}

.btn-close {
  background-color: #dc3545;
  color: white;
}

/* Share button styles */
.share-button {
  display: inline-block;
  cursor: pointer;
  margin-top: 10px;
}

.share-button i {
  font-size: 1.5rem;
  color: #666;
}

/* Dark theme adjustments */
.dark-theme .dialog-content {
  background-color: #1a1a2e;
}

.dark-theme .dialog-content h3 {
  color: white;
}

.dark-theme .dialog-content p {
  color: #e0e0e0;
}

.dark-theme .btn-copy {
  background-color: #4285f4;
}

/* Remove any X icons */
.btn-close:before,
.btn-close:after,
.btn-close .fas,
.btn-close .fa-times {
  display: none !important;
}

/* Center share button on all screen sizes */
@media screen and (min-width: 768px) {
  .surah-info-text {
    margin-bottom: 10px;
  }

  .share-button {
    display: block;
    text-align: center;
    margin-top: 10px;
  }
}

/* Al-Quran Page Styles */
#searchForm {
  max-width: 600px;
  margin: 0 auto 30px;
}

#searchForm .input-group {
  background: transparent;
}

#searchSurah {
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 16px;
  border: 1px solid #e0e0e0;
  background-color: #ffffff;
  transition: all 0.3s;
}

body.dark-theme #searchSurah {
  background-color: #2d2d44;
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

body.dark-theme #searchSurah::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Fixed Header and Scrollable Content */
.scrollable-content {
  margin-top: 180px;
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  height: calc(100vh - 180px);
  width: 100%;
  box-sizing: border-box;
}

/* Container adjustments */
.container {
  width: 100%;
  max-width: 100%;
  padding: 0 15px;
  margin: 0 auto;
  box-sizing: border-box;
}

.row {
  margin: 0;
  width: 100%;
}

@media (max-width: 768px) {
  .scrollable-content {
    padding: 10px;
  }

  .container {
    padding: 0 10px;
  }
}

/* Dark Theme Styles */
body.dark-theme {
  background-color: #1a1a2e;
  color: #ffffff;
}

body.dark-theme .card {
  background-color: #2d2d44;
  border-color: #3f3f5f;
}

body.dark-theme .card-body {
  color: #ffffff;
}

body.dark-theme .arabic-text {
  color: #ffffff;
}

body.dark-theme .ayat-text {
  color: #e0e0e0;
}

body.dark-theme .surah-info-text {
  color: #e0e0e0;
}

body.dark-theme .translation-text {
  color: #cccccc !important;
}

/* Light Theme Styles */
body.light-theme {
  background-color: #ffffff;
  color: #000000;
}

body.light-theme .card {
  background-color: #ffffff;
  border-color: #dee2e6;
}

body.light-theme .card-body {
  color: #000000;
}

body.light-theme .arabic-text {
  color: #000000;
}

body.light-theme .ayat-text {
  color: #333333;
}

body.light-theme .surah-info-text {
  color: #333333;
}

body.light-theme .translation-text {
  color: #666666 !important;
}

/* Memastikan dropdown muncul dengan benar */
.dropdown-menu {
  z-index: 1001;
}

/* Mencegah text wrapping pada tombol */
.btn {
  white-space: nowrap;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
  .dropdown {
    top: 10px;
    right: 10px;
  }

  .settings-content {
    width: 90%;
    max-width: 350px;
  }
}

/* Untuk layar mobile */
@media (max-width: 576px) {
  .audio-controls .container {
    padding: 0;
  }

  .audio-controls .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
  }

  .audio-controls .form-range {
    min-width: 120px;
  }

  .audio-controls #currentTime,
  .audio-controls #duration {
    font-size: 0.875rem;
  }

  .gap-2 {
    gap: 0.5rem !important;
  }
}

/* Mobile-specific styles */
@media screen and (max-width: 768px) {
  .back-absolute {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    text-decoration: none;
    color: inherit;
  }

  .surah-title-container {
    padding-top: 40px; /* Add space for the back button */
  }

  .surah-title {
    font-size: 1.5rem;
    margin-top: 10px;
  }
}

/* Ayat styles */
.card {
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  background-color: #fff;
}

.dark-theme .card {
  background-color: #1a1a2e;
  border-color: rgba(255, 255, 255, 0.125);
}

.card-body {
  padding: 1.25rem;
}

.badge {
  padding: 0.5em 1em;
  font-size: 0.875rem;
  border-radius: 0.25rem;
}

.bg-primary {
  background-color: #007bff;
}

.arabic-text {
  font-family: "Traditional Arabic", "Scheherazade", serif;
  font-size: 2em;
  line-height: 2;
  text-align: right;
  margin-bottom: 1rem;
}

.latin-text {
  font-size: 1.1em;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.translation-text {
  font-size: 1em;
  color: #666;
  line-height: 1.6;
}

.dark-theme .translation-text {
  color: #e0e0e0;
}

/* Surah title and arti styles */
.surah-title-container {
  text-align: center;
  margin-bottom: 1.5rem;
}

.surah-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
  text-align: center;
}

.surah-arti {
  display: block;
  font-size: 1.2rem;
  color: #666;
  margin-top: 0.25rem;
  font-weight: normal;
}

.dark-theme .surah-arti {
  color: #e0e0e0;
}

.small-text {
  font-size: 0.9rem;
}

/* Share button styles */
.share-button {
  display: inline-block;
  cursor: pointer;
  margin-top: 10px;
}

.share-button i {
  font-size: 1.5rem;
  color: #666;
}

.dark-theme .share-button i {
  color: #e0e0e0;
}

/* Dark theme adjustments */
body.dark-theme .surah-title {
  color: #ffffff;
}

body.dark-theme .surah-info-text {
  color: #e0e0e0;
}

body.dark-theme .back-absolute {
  background-color: #2a2a3e;
}

body.dark-theme .back-absolute a {
  color: #ffffff;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
  .surah-title-container {
    padding-top: 50px;
  }

  .surah-title {
    font-size: 2rem;
  }

  .surah-info-text {
    font-size: 1rem;
  }

  .back-absolute {
    top: 15px;
    left: 15px;
    padding: 6px 12px;
  }
}

.tafsir-content {
  background-color: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  padding: 20px;
  margin-top: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark-theme .tafsir-content {
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.tafsir-text {
  font-size: 0.95rem;
  line-height: 1.8;
  text-align: justify;
}

.tafsir-text h6 {
  font-weight: 600;
  color: #333;
  margin-bottom: 1rem;
}

.dark-theme .tafsir-text h6 {
  color: #fff;
}

.share-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.dark-theme .share-dialog .dialog-content {
  background-color: #2d2d2d !important;
  color: #fff !important;
}

.dark-theme .share-dialog h3,
.dark-theme .share-dialog p {
  color: #fff !important;
}

.spinner-border {
  width: 1.5rem;
  height: 1.5rem;
  border-width: 0.2em;
}

.alert {
  padding: 0.75rem 1.25rem;
  margin-bottom: 0;
  border: 1px solid transparent;
  border-radius: 0.25rem;
}

.alert-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.dark-theme .alert-warning {
  background-color: rgba(255, 243, 205, 0.1);
  color: #ffeeba;
  border-color: rgba(255, 238, 186, 0.2);
}

.dark-theme .alert-danger {
  background-color: rgba(248, 215, 218, 0.1);
  color: #f5c6cb;
  border-color: rgba(245, 198, 203, 0.2);
}

/* Add Telegram button styles */
.btn-telegram {
  background-color: #0088cc;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dark-theme .btn-telegram:hover {
  background-color: #006699;
}

/* Limit tafsir text length in share preview */
.share-preview {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 15px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.dark-theme .share-preview {
  border-color: #444;
}

/* Share Preview Box Styles */
.share-preview-box {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  margin-bottom: 20px;
  max-height: 300px;
  overflow-y: auto;
}

.dark-theme .share-preview-box {
  background-color: #2d2d44;
  border-color: #3f3f5f;
}

.preview-header {
  padding: 10px 15px;
  border-bottom: 1px solid #dee2e6;
  font-weight: bold;
  background-color: #f1f3f5;
}

.dark-theme .preview-header {
  background-color: #1a1a2e;
  border-color: #3f3f5f;
}

.preview-content {
  padding: 15px;
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.5;
}

.preview-content br {
  margin-bottom: 8px;
}

/* Scrollbar Styles for Preview Box */
.share-preview-box::-webkit-scrollbar {
  width: 8px;
}

.share-preview-box::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.share-preview-box::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.share-preview-box::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.dark-theme .share-preview-box::-webkit-scrollbar-track {
  background: #2d2d44;
}

.dark-theme .share-preview-box::-webkit-scrollbar-thumb {
  background: #4a4a6a;
}

.dark-theme .share-preview-box::-webkit-scrollbar-thumb:hover {
  background: #5a5a7a;
}

/* Share Preview Modal */
.share-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1050;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.share-preview-modal.show {
  opacity: 1;
}

.share-preview-content {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  padding: 20px;
  position: relative;
  transition: all 0.3s ease;
}

.share-preview-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
}

.share-preview-header h5 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
}

.close-preview-btn {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
  transition: opacity 0.3s;
}

.close-preview-btn:hover {
  opacity: 0.7;
}

.share-preview-body {
  padding: 20px;
  background: var(--card-bg);
}

.preview-text {
  background: var(--bg-color);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
  white-space: pre-wrap;
  color: var(--text-color);
  font-size: 15px;
  line-height: 1.6;
}

.share-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  padding: 0 20px 20px 20px;
}

.share-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 15px;
  text-decoration: none;
  color: var(--text-color);
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 14px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
}

/* Efek hover untuk semua share option */
.share-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Khusus untuk Clipboard */
.share-option.clipboard {
  grid-column: 1 / -1;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

.share-option.clipboard:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Dark theme adjustments */
.dark-theme .share-preview-content {
  background: #2d2d44;
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .share-preview-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .preview-text {
  background: #1a1a2e;
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .share-option {
  background: #2d2d44;
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .share-option:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--card-bg);
  color: var(--text-color);
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.dark-theme .toast-notification {
  background: #2d2d44;
  border-color: rgba(255, 255, 255, 0.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .share-preview-content {
    width: 95%;
    margin: 15px;
    max-height: 90vh;
  }

  .share-options {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 15px 15px 15px;
    gap: 10px;
  }

  .share-option {
    padding: 12px;
    font-size: 13px;
    height: auto;
    min-height: 44px;
  }

  .share-option.clipboard {
    grid-column: span 2;
  }

  .preview-text {
    padding: 15px;
    font-size: 14px;
    margin-bottom: 15px;
  }
}

@media (max-width: 480px) {
  .share-preview-header {
    padding: 15px;
  }

  .share-preview-header h5 {
    font-size: 16px;
  }

  .share-preview-body {
    padding: 15px;
  }

  .audio-controls {
    padding: 8px 5px;
  }

  .time-controls {
    gap: 5px;
    margin-bottom: 8px;
  }

  /* Button Controls Styles */
  .button-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .control-btn {
    padding: 5px 8px;
    font-size: 0.8rem;
    min-width: 32px;
  }

  .play-btn {
    min-width: 40px;
  }

  .repeat-btn span {
    font-size: 0.8rem;
    min-width: 15px; /* Ensure space for text */
    text-align: center;
  }

  .time-display {
    font-size: 0.75rem;
  }
}

/* Active state untuk mobile */
@media (hover: none) {
  .share-option:active {
    transform: scale(0.98);
    opacity: 0.9;
  }
}

/* Platform-specific styles with hover effects */
.share-option.whatsapp {
  border-color: #25d366;
  color: #25d366;
  background: transparent;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-option.whatsapp:hover {
  background: #25d366;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.share-option.facebook {
  border-color: #1877f2;
  color: #1877f2;
  background: transparent;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-option.facebook:hover {
  background: #1877f2;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.share-option.twitter {
  border-color: #1da1f2;
  color: #1da1f2;
  background: transparent;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-option.twitter:hover {
  background: #1da1f2;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(29, 161, 242, 0.3);
}

.share-option.telegram {
  border-color: #0088cc;
  color: #0088cc;
  background: transparent;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-option.telegram:hover {
  background: #0088cc;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.share-option.clipboard {
  border-color: #6c757d;
  color: #6c757d;
  background: transparent;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  grid-column: 1 / -1;
}

.share-option.clipboard:hover {
  background: #6c757d;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Dark theme adjustments for share options */
.dark-theme .share-option {
  background: transparent;
}

.dark-theme .share-option.whatsapp {
  border-color: #25d366;
  color: #25d366;
}

.dark-theme .share-option.facebook {
  border-color: #1877f2;
  color: #1877f2;
}

.dark-theme .share-option.twitter {
  border-color: #1da1f2;
  color: #1da1f2;
}

.dark-theme .share-option.telegram {
  border-color: #0088cc;
  color: #0088cc;
}

.dark-theme .share-option.clipboard {
  border-color: #6c757d;
  color: #6c757d;
}

/* Hover effects remain the same in dark theme */
.dark-theme .share-option:hover {
  color: white;
}

/* Base share option styles */
.share-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 12px 20px;
  text-decoration: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s ease;
  background-color: transparent;
  border: 2px solid;
}

.share-option i {
  width: 24px;
  text-align: center;
  margin-right: 8px;
}

/* Default states untuk semua platform */
.share-option.whatsapp {
  background-color: transparent;
  border-color: #25d366;
  color: #25d366;
}

.share-option.facebook {
  background-color: transparent;
  border-color: #1877f2;
  color: #1877f2;
}

.share-option.twitter {
  background-color: transparent;
  border-color: #1da1f2;
  color: #1da1f2;
}

.share-option.telegram {
  background-color: transparent;
  border-color: #0088cc;
  color: #0088cc;
}

.share-option.clipboard {
  background-color: transparent;
  border-color: #6c757d;
  color: #6c757d;
}

.share-option.close-btn {
  background-color: transparent;
  border-color: #dc3545;
  color: #dc3545;
}

/* Desktop hover effects */
@media (hover: hover) and (pointer: fine) {
  .share-option:hover {
    transform: translateY(-2px);
  }

  .share-option.whatsapp:hover {
    background-color: #25d366;
    color: white;
  }

  .share-option.facebook:hover {
    background-color: #1877f2;
    color: white;
  }

  .share-option.twitter:hover {
    background-color: #1da1f2;
    color: white;
  }

  .share-option.telegram:hover {
    background-color: #0088cc;
    color: white;
  }

  .share-option.clipboard:hover {
    background-color: #6c757d;
    color: white;
  }

  .share-option.close-btn:hover {
    background-color: #dc3545;
    color: white;
  }
}

/* Mobile touch states */
@media (hover: none) and (pointer: coarse) {
  .share-option {
    -webkit-tap-highlight-color: transparent;
    background-color: transparent !important;
  }

  .share-option:active {
    transform: scale(0.98);
  }

  .share-option.whatsapp:active {
    background-color: #25d366 !important;
    color: white !important;
    transform: scale(0.98);
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.3);
  }

  .share-option.facebook:active {
    background-color: #1877f2 !important;
    color: white !important;
    transform: scale(0.98);
    box-shadow: 0 4px 8px rgba(24, 119, 242, 0.3);
  }

  .share-option.twitter:active {
    background-color: #1da1f2 !important;
    color: white !important;
    transform: scale(0.98);
    box-shadow: 0 4px 8px rgba(29, 161, 242, 0.3);
  }

  .share-option.telegram:active {
    background-color: #0088cc !important;
    color: white !important;
    transform: scale(0.98);
    box-shadow: 0 4px 8px rgba(0, 136, 204, 0.3);
  }

  .share-option.clipboard:active {
    background-color: #6c757d !important;
    color: white !important;
    transform: scale(0.98);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
  }

  .share-option.close-btn:active {
    background-color: #dc3545 !important;
    color: white !important;
    transform: scale(0.98);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
  }

  /* Memastikan ikon juga berubah warna saat active */
  .share-option:active i {
    color: white !important;
  }

  /* Menghapus background default saat tidak active */
  .share-option {
    background-color: transparent !important;
    -webkit-tap-highlight-color: transparent;
  }

  /* Menghapus hover effects di mobile */
  .share-option:hover {
    background-color: transparent !important;
    transform: none !important;
    box-shadow: none !important;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .share-dialog {
    padding: 15px;
  }

  .share-options {
    gap: 10px;
  }

  .share-option {
    padding: 12px 16px;
    font-size: 14px;
    min-height: 44px;
  }

  .share-option i {
    font-size: 18px;
  }
}

/* Dark theme adjustments */
.dark-theme .share-option {
  background-color: transparent;
}

.dark-theme .share-option:hover,
.dark-theme .share-option:active {
  color: white !important;
}

/* ... existing styles ... */

/* Footer Styles */
footer {
  margin-top: auto;
  padding: 20px;
  color: inherit;
  font-size: 0.9rem;
}

footer p {
  margin: 0;
}

/* Ensure footer stays at bottom with padding for audio controls */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 120px; /* Adjust based on your audio controls height */
}

/* Dark theme support for footer */
body.dark-theme footer {
  color: #ffffff;
}

body.light-theme footer {
  color: #333333;
}

/* Connection Status */
.floating-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 1002;
  opacity: 0;
  transition: all 0.3s ease;
}

.floating-notification.online {
  background-color: rgba(76, 175, 80, 0.9);
}

.floating-notification.offline {
  background-color: rgba(255, 152, 0, 0.9);
}
