.ratil-shell {
  width: 100%;
  background: var(--bg-alt, #f8fafc);
  color: var(--text-main, #334155);
  padding: 16px;
  border-radius: var(--radius-lg, 16px);
  border: 1px solid var(--border-color, #e2e8f0);
  box-shadow: var(--shadow, 0 1px 2px rgba(15, 23, 42, 0.08));
}


.ratil-header h1 {
  margin: 4px 0 0;
  font-size: 24px;
}

.ratil-select {
  background: var(--bg, #ffffff);
  color: var(--text-main, #334155);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
  min-width: 200px;
}

.now-playing {
  margin-top: 12px;
  background: var(--bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 16px;
  padding: 18px;
  display: grid;
  gap: 14px;
}

.np-label {
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 6px;
  font-size: 0.8rem;
}

.np-meta h2 {
  margin: 0;
  font-size: 22px;
}

.np-reciter {
  margin: 4px 0 0;
  color: var(--text-muted, #64748b);
}

.np-progress input[type="range"] {
  width: 100%;
  accent-color: var(--primary, #1d4ed8);
}

.np-time {
  display: flex;
  justify-content: space-between;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted, #64748b);
  font-size: 0.9rem;
}

.np-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.icon-btn,
.play-btn {
  background: var(--bg, #ffffff);
  color: var(--text-main, #334155);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.icon-btn:hover,
.play-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow, 0 1px 2px rgba(15, 23, 42, 0.08));
}

.play-btn {
  padding: 12px 18px;
  background: var(--primary, #1d4ed8);
  border: none;
  color: #ffffff;
  font-weight: 900;
}

.search-filter {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  background: var(--bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 12px;
  color: var(--text-muted, #64748b);
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-main, #334155);
  font-size: 1rem;
  outline: none;
}

.filter-chips {
  display: flex;
  gap: 10px;
}

.chip {
  border: 1px solid var(--border-color, #e2e8f0);
  background: var(--bg, #ffffff);
  color: var(--text-main, #334155);
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}

.chip-active {
  background: var(--primary, #1d4ed8);
  color: #ffffff;
  border-color: var(--primary, #1d4ed8);
}

.playlist {
  margin-top: 10px;
  display: grid;
  gap: 12px;
}

.track-card {
  background: var(--bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

.track-title {
  margin: 0;
  font-size: 1rem;
}

.track-reciter {
  margin: 2px 0 0;
  color: var(--text-muted, #64748b);
  font-size: 0.9rem;
}

.track-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.track-actions button {
  margin-left: 6px;
}

.bookmark-btn.active {
  color: var(--primary, #1d4ed8);
}

.track-card.is-active {
  border-color: var(--primary, #1d4ed8);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

/* Player Options */
.player-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.option-group {
  position: relative;
}

.dropdown-trigger {
  width: 100%;
  background: var(--bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.dropdown-trigger:hover {
  border-color: var(--primary, #1d4ed8);
  background: rgba(29, 78, 216, 0.02);
}

.trigger-content {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.trigger-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-alt, #f8fafc);
}

.globe-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary, #1d4ed8);
}

.globe-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.trigger-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.trigger-label {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.trigger-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main, #334155);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chevron {
  width: 20px;
  height: 20px;
  fill: var(--text-muted, #64748b);
  transition: transform 0.2s ease;
}

.option-group.is-open .chevron {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
  z-index: 100;
  max-height: 320px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideDown 0.2s ease;
}

.option-group.is-open .dropdown-menu {
  display: flex;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-wrap {
  padding: 10px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  background: var(--bg-alt, #f8fafc);
}

.search-wrap input {
  width: 100%;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.9rem;
  outline: none;
}

.menu-list {
  overflow-y: auto;
  flex: 1;
}

.menu-item {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.menu-item:hover {
  background: rgba(29, 78, 216, 0.05);
}

.menu-item.is-selected {
  background: rgba(29, 78, 216, 0.08);
  color: var(--primary, #1d4ed8);
}

.item-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-alt, #f8fafc);
}

.item-info {
  display: flex;
  flex-direction: column;
}

.item-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.item-sub {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
}

/* Ayah Display */
.ayah-display {
  margin-top: 10px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.03), rgba(16, 185, 129, 0.03));
  border-radius: 12px;
  text-align: center;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  border: 1px solid rgba(29, 78, 216, 0.08);
}

.ayah-arabic {
  font-size: 1.6rem;
  font-family: "Amiri", serif;
  line-height: 1.8;
  color: var(--text-main, #334155);
  direction: rtl;
}

.ayah-translation {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-muted, #64748b);
  border-top: 1px solid rgba(29, 78, 216, 0.05);
  padding-top: 12px;
}

@media (max-width: 540px) {
  .track-card {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }

  .track-actions {
    grid-column: span 2;
    display: flex;
    justify-content: flex-end;
  }

}

@media (max-width: 540px) {
  .player-options {
    grid-template-columns: 1fr;
  }

  .ayah-arabic {
    font-size: 1.4rem;
  }
}

/* Skeletons and Utilities */
.skeleton {
  background: linear-gradient(90deg, var(--bg-alt, #f8fafc) 25%, #f1f5f9 50%, var(--bg-alt, #f8fafc) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 4px;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.ayah-arabic.loading,
.ayah-translation.loading {
  height: 24px;
  width: 100%;
  border-radius: 6px;
  margin: 10px 0;
}

.error-msg {
  color: #ef4444;
  padding: 12px;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: 10px;
  font-size: 0.9rem;
  text-align: center;
  margin: 10px 0;
}

#reciterMenu {
  max-height: 300px;       /* or however tall you want */
  overflow-y: auto;        /* makes it scrollable instead of clipped */
  overflow-x: visible;
}