/* ========================================
   READER PAGE STYLES
   Professional Quran Reader with landing page
   ======================================== */

/* ========== LANDING PAGE ========== */
.reader-landing {
  min-height: calc(100vh - 200px);
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(10px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reader-toolbar.active {
  display: block;
  animation: slideDown 0.3s ease;
}

.reader-viewer.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

.page-navigation {
  animation: slideUp 0.3s ease;
}

.verse-container {
  animation: fadeIn 0.3s ease;
  animation-fill-mode: both;
}

.verse-container:nth-child(1) { animation-delay: 0.05s; }
.verse-container:nth-child(2) { animation-delay: 0.1s; }
.verse-container:nth-child(3) { animation-delay: 0.15s; }
.verse-container:nth-child(4) { animation-delay: 0.2s; }
.verse-container:nth-child(5) { animation-delay: 0.25s; }
.verse-container:nth-child(n+6) { animation-delay: 0.3s; }

.landing-hero {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}

.hero-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, rgb(16, 80, 32) 100%);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.hero-icon ion-icon {
  font-size: 2.5rem;
  color: white;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.hero-desc {
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0 0 2rem;
  line-height: 1.6;
}

/* ========== BROWSE TABS ========== */
.browse-tabs {
  display: flex;
  gap: 8px;
  margin: 24px auto 32px;
  padding: 6px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  max-width: 500px;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn ion-icon {
  font-size: 20px;
}

.tab-btn:hover {
  background: var(--bg);
  color: var(--text);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
}

/* Browse Content */
.browse-content {
  width: 100%;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.landing-search {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.landing-search ion-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--muted);
  pointer-events: none;
}

.landing-search input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--foreground);
  transition: all 0.2s ease;
}

.landing-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}

.landing-search input::placeholder {
  color: var(--muted);
}

/* ========== SURAH GRID ========== */
.surah-grid-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.surah-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  width: 100%;
}

.surah-card {
  position: relative;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.surah-card[data-hidden="true"] {
  display: none;
}

.surah-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.surah-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.surah-card:hover::before {
  opacity: 1;
}

.surah-card:active {
  transform: translateY(0);
}

.surah-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.surah-number {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), rgb(16, 80, 32));
  color: white;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.surah-card-title {
  flex: 1;
  min-width: 0;
}

.surah-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.25rem;
  line-height: 1.2;
}

.surah-arabic {
  font-size: 1.5rem;
  font-family: 'Amiri Quran', serif;
  color: var(--muted);
  margin: 0;
  line-height: 1.3;
}

.surah-card-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.surah-meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.surah-meta-item ion-icon {
  font-size: 1rem;
}

/* ========== JUZ & HIZB GRIDS ========== */
.juz-grid-container,
.hizb-grid-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.juz-grid,
.hizb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.juz-card,
.hizb-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.juz-card:hover,
.hizb-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.juz-card-header,
.hizb-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.juz-number,
.hizb-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
}

.juz-title,
.hizb-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.juz-info,
.hizb-info {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.juz-card:active,
.hizb-card:active {
  transform: scale(0.97);
}

/* ========== DRAWER SECTIONS ========== */
.drawer-section {
  padding: 1.25rem;
  background: var(--bg);
  border-radius: 10px;
  border: 1.5px solid var(--border);
  margin-bottom: 0;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.drawer-section:hover {
  border-color: rgba(12, 62, 24, 0.2);
  box-shadow: 0 2px 8px rgba(12, 62, 24, 0.04);
}

.drawer-section:last-child {
  margin-bottom: 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.125rem;
  padding-bottom: 0.875rem;
  border-bottom: 1.5px solid var(--border);
  width: 100%;
}

.section-header ion-icon {
  font-size: 1.25rem;
  color: var(--primary);
  flex-shrink: 0;
  opacity: 0.9;
}

.section-header h3 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0 0 1.125rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
  user-select: none;
  width: 100%;
}

.form-group {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
  width: 100%;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group .btn {
  justify-content: flex-start;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  gap: 0.625rem;
  user-select: none;
}

.form-group .btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(12, 62, 24, 0.2);
  transform: translateY(-1px);
}

.form-group .btn ion-icon {
  font-size: 1.125rem;
}

/* Audio control buttons - horizontal layout */
.audio-controls-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.audio-controls-grid .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
  letter-spacing: -0.01em;
  width: 100%;
  box-sizing: border-box;
  border: none;
  cursor: pointer;
}

.audio-controls-grid .btn.small {
  background: white;
  border: 1.5px solid var(--border);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.audio-controls-grid .btn.small:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(12, 62, 24, 0.25);
  transform: translateY(-2px);
}

.audio-controls-grid .btn.small:active {
  transform: translateY(0);
}

.audio-controls-grid .btn.primary {
  width: auto;
  min-width: 64px;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #0c3e18 0%, #105020 100%);
  border: none;
  color: white;
  box-shadow: 0 4px 14px rgba(12, 62, 24, 0.4);
  font-weight: 600;
}

.audio-controls-grid .btn.primary:hover {
  background: linear-gradient(135deg, #105020 0%, #0f6b29 100%);
  box-shadow: 0 6px 20px rgba(12, 62, 24, 0.5);
  transform: translateY(-2px);
}

.audio-controls-grid .btn.primary:active {
  transform: translateY(0);
}

.audio-controls-grid .btn ion-icon {
  font-size: 1.125rem;
  flex-shrink: 0;
}

.audio-controls-grid .btn.primary ion-icon {
  font-size: 1.5rem;
}

.audio-controls-grid .btn.small span {
  display: none;
}

@media (min-width: 380px) {
  .audio-controls-grid .btn.small span {
    display: inline;
  }
}

/* Page navigation - horizontal layout */
.page-nav-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.625rem;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.page-nav-grid .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 0.875rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
  letter-spacing: -0.02em;
  width: 100%;
  box-sizing: border-box;
}

.page-nav-grid .btn:hover:not(:disabled) {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 3px 10px rgba(12, 62, 24, 0.25);
  transform: translateY(-1px);
}

.page-nav-grid .btn:active:not(:disabled) {
  transform: scale(0.97);
}

.page-nav-grid .btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-nav-grid .btn ion-icon {
  font-size: 1rem;
}

.page-nav-grid .page-info-text {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 600;
  padding: 0.25rem;
  letter-spacing: -0.01em;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  transition: all 0.2s;
  letter-spacing: -0.01em;
  font-weight: 500;
  user-select: none;
}

.form-label:hover {
  background: var(--surface);
}

.form-label input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  accent-color: var(--primary);
  border-radius: 4px;
  border: 1.5px solid var(--border);
  transition: all 0.2s;
}

.form-label input[type="checkbox"]:hover {
  border-color: var(--primary);
}

.form-label input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.form-label[for] {
  padding: 0 0 0.5rem 0;
  margin-bottom: 0;
  background: transparent !important;
  cursor: default;
  font-weight: 500;
  color: var(--text);
}

.form-label[for] ion-icon {
  color: var(--primary);
  font-size: 1rem;
}

.form-textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.5;
  resize: vertical;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.form-textarea:hover {
  border-color: var(--primary);
  background-color: var(--bg);
}

.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(12, 62, 24, 0.1);
  background: var(--bg);
}

.form-select {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.form-select:hover {
  border-color: var(--primary);
  background-color: var(--bg);
  box-shadow: 0 2px 8px rgba(12, 62, 24, 0.08);
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(12, 62, 24, 0.1);
  background: var(--bg);
}

.range-pickers {
  display: grid;
  gap: 1rem;
  width: 100%;
}

.range-picker {
  display: grid;
  gap: 0.5rem;
  width: 100%;
}

.range-picker > .muted {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  user-select: none;
}

.range-picker-row {
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  gap: 0.5rem;
  width: 100%;
}

.range-picker-row select {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.range-picker-row select:hover {
  border-color: var(--primary);
  background-color: var(--bg);
  box-shadow: 0 2px 8px rgba(12, 62, 24, 0.08);
}

.range-picker-row select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(12, 62, 24, 0.1);
  background-color: var(--bg);
}

.bookmark-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border-radius: 8px;
  font-size: 0.875rem;
}

.bookmark-status ion-icon {
  font-size: 1rem;
  color: var(--primary);
}

.inline-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.inline-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ========== READER VIEWER ========== */
.reader-viewer {
  display: none;
}

.reader-viewer.active {
  display: block;
}

/* Toolbar for reader */
.reader-toolbar {
  position: sticky;
  top: 80px; /* Position below the app header */
  z-index: 9; /* Below the app-header which has z-index: 10 */
  background: rgba(var(--surface-rgb, 255, 255, 255), 0.95);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1.5rem;
  display: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(12px);
}

.reader-toolbar.active {
  display: block;
}

.toolbar-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.btn-icon:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(12, 62, 24, 0.2);
}

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

.btn-icon ion-icon {
  font-size: 1.125rem;
}

.context-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
  flex: 1;
}

.context-name {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.context-meta {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Reader content area */
.reader-content {
  max-width: 850px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
  min-height: calc(100vh - 300px);
}

.verse-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.25rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.verse-container:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(12, 62, 24, 0.08);
  transform: translateY(-1px);
}

.verse-container.playing {
  background: linear-gradient(to right, rgba(12, 62, 24, 0.03), transparent);
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(12, 62, 24, 0.12);
  transform: translateY(-2px);
}

.verse-container.active {
  background: linear-gradient(to right, rgba(12, 62, 24, 0.05), rgba(12, 62, 24, 0.02));
  border-color: var(--primary);
  border-left: 4px solid var(--primary);
  box-shadow: 0 4px 16px rgba(12, 62, 24, 0.15);
  transform: translateY(-2px);
}

.verse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.125rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border);
}

.verse-number {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.01em;
}

.verse-number ion-icon {
  font-size: 0.9375rem;
}

.verse-actions {
  display: flex;
  gap: 0.375rem;
}

.verse-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.verse-btn:hover {
  background: var(--bg);
  color: var(--primary);
  border-color: var(--border);
}

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

.verse-btn ion-icon {
  font-size: 1rem;
}

.verse-text {
  font-family: 'Amiri Quran', serif;
  font-size: 1.875rem;
  line-height: 2.1;
  color: var(--text);
  text-align: right;
  direction: rtl;
  margin: 0;
  letter-spacing: 0.01em;
}

/* Empty state */
.reader-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  text-align: center;
  padding: 3rem 1.5rem;
}

.reader-empty ion-icon {
  font-size: 4rem;
  color: var(--muted);
  margin-bottom: 1rem;
  opacity: 0.5;
}

.reader-empty h3 {
  font-size: 1.5rem;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.reader-empty p {
  color: var(--muted);
  margin: 0;
}

/* Page navigation */
.page-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: rgba(var(--surface-rgb, 255, 255, 255), 0.95);
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  z-index: 40;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(12px);
}

.page-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-nav-btn:hover:not(:disabled) {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(12, 62, 24, 0.2);
}

.page-nav-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.page-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-nav-btn ion-icon {
  font-size: 1.125rem;
}

.page-indicator {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0 0.5rem;
  min-width: 80px;
  text-align: center;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
  .reader-landing {
    padding: 2rem 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .hero-icon {
    width: 64px;
    height: 64px;
  }

  .hero-icon ion-icon {
    font-size: 2rem;
  }

  .surah-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
  }

  .surah-card {
    padding: 1.25rem;
  }

  /* Tabs responsive */
  .browse-tabs {
    flex-direction: row;
    max-width: 100%;
  }
  
  .tab-btn span {
    display: none;
  }
  
  .tab-btn {
    padding: 12px;
  }
  
  .tab-btn ion-icon {
    font-size: 22px;
  }

  .juz-grid,
  .hizb-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
  }
  
  .juz-grid-container,
  .hizb-grid-container {
    padding: 0 16px 32px;
  }

  .toolbar-content {
    gap: 0.75rem;
  }

  .context-name {
    font-size: 1rem;
  }

  .context-meta {
    font-size: 0.8125rem;
  }

  .verse-text {
    font-size: 1.75rem;
    line-height: 2;
  }

  .reader-content {
    padding: 1.5rem 1rem 3rem;
  }

  .page-navigation {
    padding: 1rem;
    gap: 0.75rem;
  }

  .page-nav-btn span {
    display: none;
  }

  .page-nav-btn {
    padding: 0.75rem 1rem;
  }

  .page-indicator {
    font-size: 0.8125rem;
    min-width: 80px;
  }

  /* Drawer controls on mobile */
  .audio-controls-grid {
    gap: 0.375rem;
  }

  .audio-controls-grid .btn {
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
  }

  .audio-controls-grid .btn.primary {
    padding: 0.875rem 1rem;
  }

  .audio-controls-grid .btn ion-icon {
    font-size: 1.125rem;
  }

  .audio-controls-grid .btn span {
    font-size: 0.8125rem;
  }

  .page-nav-grid {
    gap: 0.375rem;
  }

  .page-nav-grid .btn {
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
  }

  .page-nav-grid .page-info-text {
    font-size: 0.8125rem;
  }

  .drawer-section {
    padding: 1.25rem;
  }

  .section-header {
    gap: 0.5rem;
  }

  .section-header h3 {
    font-size: 1rem;
  }

  .section-header ion-icon {
    font-size: 1.25rem;
  }
}

@media (max-width: 640px) {
  .surah-grid {
    grid-template-columns: 1fr;
  }

  .juz-grid,
  .hizb-grid {
    grid-template-columns: 1fr;
  }

  .surah-card-header {
    gap: 0.75rem;
  }

  .surah-number {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .surah-name {
    font-size: 1.125rem;
  }

  .surah-arabic {
    font-size: 1.25rem;
  }

  .verse-text {
    font-size: 1.5rem;
    line-height: 1.9;
  }

  .verse-container {
    padding: 1rem;
  }

  .verse-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .verse-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .toolbar-left {
    gap: 0.75rem;
  }

  .btn-icon {
    width: 40px;
    height: 40px;
  }

  .btn-icon ion-icon {
    font-size: 1.125rem;
  }

  .reader-toolbar {
    padding: 0.875rem 1rem;
  }

  .audio-controls-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .audio-controls-grid .btn:nth-child(2) {
    order: -1;
  }

  .audio-controls-grid .btn {
    justify-content: center;
  }

  .page-nav-grid .btn span,
  .audio-controls-grid .btn span {
    display: inline;
  }
}

@media (max-width: 480px) {
  .reader-content {
    padding: 1rem 0.75rem 2.5rem;
  }

  .verse-container {
    border-radius: 8px;
    padding: 0.875rem;
  }

  .verse-text {
    font-size: 1.375rem;
    line-height: 1.85;
  }

  .page-navigation {
    padding: 0.875rem 0.75rem;
  }

  .page-indicator {
    min-width: 70px;
    padding: 0.375rem 0.75rem;
  }
}

