/* КОРАН РИДЕР — FULLSCREEN FIXED */
.qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  opacity: 0;
  transition: opacity .3s;
}
.qr-overlay.active { opacity: 1; }
.qr-overlay.closing { opacity: 0; }

.qr-bg {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 0;
}

.qr-content {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 16px 100px;
  box-sizing: border-box;
  color: #e8dcc8;
}

.qr-close {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9999;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Блокируем скролл фона когда Коран открыт */
body.qr-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
}

.qr-header { text-align: center; padding: 40px 0 16px; }
.qr-title { font-family: "Amiri", serif; font-size: 28px; color: #e8dcc8; margin-bottom: 4px; }
.qr-subtitle { font-size: 12px; color: rgba(255,255,255,.4); letter-spacing: 1px; }

.qr-search {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 15px;
  margin-top: 16px;
  box-sizing: border-box;
  outline: none;
}
.qr-search::placeholder { color: rgba(255,255,255,.3); }
.qr-search:focus { border-color: rgba(255,255,255,.35); }

.qr-toolbar { display: flex; gap: 8px; padding: 12px 0; justify-content: center; }
.qr-tool-btn {
  padding: 12px 20px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  color: #e8dcc8;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.qr-tool-btn:active { background: rgba(255,255,255,.15); }

.qr-surah-list { display: flex; flex-direction: column; gap: 2px; }
.qr-surah-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: background .15s;
}
.qr-surah-item:active { background: rgba(255,255,255,.08); }

.qr-surah-num {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: rgba(255,255,255,.6); flex-shrink: 0;
}
.qr-surah-info { flex: 1; min-width: 0; }
.qr-surah-name { font-size: 15px; font-weight: 500; color: #e8dcc8; }
.qr-surah-meta { font-size: 11px; color: rgba(255,255,255,.4); margin-top: 2px; }
.qr-surah-arabic { font-family: "Amiri", serif; font-size: 20px; color: rgba(255,255,255,.5); flex-shrink: 0; }

.qr-surah-header { text-align: center; padding: 24px 0 16px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 20px; }
.qr-surah-header-name { font-size: 22px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.qr-surah-header-arabic { font-family: "Amiri", serif; font-size: 26px; color: rgba(255,255,255,.6); margin-bottom: 4px; }
.qr-surah-header-meta { font-size: 12px; color: rgba(255,255,255,.4); }

.qr-bismillah { text-align: center; padding: 24px 0; color: #e8dcc8; direction: rtl; line-height: 1.5; }

.qr-ayahs { direction: rtl; text-align: right; line-height: 2.2; padding: 0 4px; }
.qr-ayah { padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.05); position: relative; }
.qr-ayah-num-label { direction: ltr; text-align: left; font-size: 11px; color: rgba(255,255,255,.3); margin-bottom: 6px; }
.qr-ayah-text { color: #e8dcc8; }

.qr-ayah-circle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.2);
  font-size: 14px; color: rgba(255,255,255,.5);
  vertical-align: middle; margin: 0 6px;
}

.qr-ayah-actions { direction: ltr; text-align: left; margin-top: 8px; }
.qr-ayah-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  padding: 6px 12px;
  color: #e8dcc8;
  transition: background .15s;
}
.qr-ayah-btn:active { background: rgba(255,255,255,.15); }
.qr-ayah-btn.bookmarked { background: rgba(244,208,63,.15); border-color: rgba(244,208,63,.3); }

.qr-nav { display: flex; gap: 8px; padding: 24px 0; justify-content: center; flex-wrap: wrap; }
.qr-nav-btn {
  padding: 12px 18px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  color: #e8dcc8;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.qr-bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: center; gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(transparent, #000 30%);
  z-index: 50;
}
.qr-bar-btn {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  padding: 10px 20px;
  color: #e8dcc8;
}
.qr-bar-btn:active { background: rgba(255,255,255,.2); }

.qr-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; gap: 16px; }
.qr-loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,.1);
  border-top-color: #e8dcc8;
  border-radius: 50%;
  animation: qrSpin 1s linear infinite;
}
@keyframes qrSpin { to { transform: rotate(360deg); } }
.qr-loading-text { font-size: 15px; color: rgba(255,255,255,.5); }

.qr-error { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 50vh; gap: 8px; color: rgba(255,255,255,.6); font-size: 15px; }

.qr-settings-section { padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.qr-settings-label { font-size: 15px; color: rgba(255,255,255,.7); margin-bottom: 12px; font-weight: 500; }
.qr-settings-options { display: flex; gap: 8px; flex-wrap: wrap; }
.qr-settings-opt {
  padding: 10px 18px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.05);
  color: #e8dcc8; font-size: 14px; cursor: pointer;
}
.qr-settings-opt.active { background: rgba(232,220,200,.15); border-color: #e8dcc8; }
