:root {
  --bg-1: #070b14;
  --bg-2: #111a2f;
  --text: #ecf2ff;
  --muted: #adc0e6;
  --panel: rgba(18, 28, 48, 0.65);
  --panel-border: rgba(173, 192, 230, 0.22);
  --accent: #79a9ff;
  --accent-2: #9dcbff;
  --ok: #7ef0b5;

  --danger: #ffb4b4;

  --glow-1: #1f3765;
  --glow-2: #244783;

  --shadow-1: rgba(0, 5, 25, 0.4);
  --shadow-2: rgba(0, 6, 28, 0.28);

  --input-bg: rgba(7, 12, 24, 0.78);
  --surface-1: rgba(16, 24, 43, 0.74);
  --surface-2: rgba(14, 22, 42, 0.62);

  --arabic-font-min: 2.2rem;
  --arabic-font-max: 3.2rem;
  --arabic-font-fluid: 4.5vw;

  /* Premium Bangla typography engine (set by JS + persisted). */
  --bn-font: "Noto Sans Bengali", "Hind Siliguri", "Kalpurush", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  margin: 0;
  min-height: 100vh;
}

body {
  margin: 0;
  min-height: 100vh;
}

body {
  font-family: Inter, "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background: #000000;
  transition: background 0.25s ease-in-out, color 0.25s ease-in-out;
}

.neon-voxel {
  --bg-1: #1b3b2c;
  --bg-2: #0d1e16;
  --text: #ecfff3;
  --muted: rgba(209, 235, 220, 0.72);
  --panel: rgba(10, 26, 18, 0.62);
  --panel-border: rgba(126, 190, 150, 0.18);
  --accent: #39ff14;
  --accent-2: #00ff00;
  --ok: #7ef0b5;
  --danger: #ffb4b4;
  --glow-1: rgba(57, 255, 20, 0.18);
  --glow-2: rgba(0, 255, 0, 0.12);
  --input-bg: rgba(7, 16, 12, 0.78);
  --surface-1: rgba(10, 26, 18, 0.62);
  --surface-2: rgba(10, 26, 18, 0.62);
  --neon-ink: #051005;
}

/* Neon Voxy Green Theme */
.theme-voxy-green {
  --bg-color: #050a05;
  --card-bg: rgba(10, 25, 10, 0.8);
  --accent: #39ff14;
  --accent-glow: rgba(57, 255, 20, 0.4);
  --text-main: #e0ffe0;
  --text-muted: #70a070;
  --border-color: rgba(57, 255, 20, 0.2);
}

.theme-voxy-green .q-word .wbw-ar {
  border-color: var(--accent) !important;
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Dark green gradient backdrop (dark-mode aesthetic) */
.neon-voxel body,
body.neon-voxel {
  background:
    radial-gradient(1200px 700px at 20% 10%, rgba(57, 255, 20, 0.14) 0%, transparent 55%),
    radial-gradient(900px 600px at 85% 20%, rgba(0, 255, 0, 0.1) 0%, transparent 52%),
    linear-gradient(135deg, #1b3b2c 0%, #0d1e16 100%);
}

.neon-voxel .subtitle,
.neon-voxel .status {
  color: rgba(209, 235, 220, 0.8);
}

/* Global fluidity for interactive elements */
button,
select,
input {
  transition: all 0.25s ease-in-out;
}

.sticky-audio,
.result-item,
.browse-verse-panel,
.search-shell {
  transition: all 0.25s ease-in-out;
}

.neon-voxel .sticky-audio {
  box-shadow:
    0 18px 45px rgba(0, 6, 28, 0.22),
    0 0 0 1px rgba(57, 255, 20, 0.28) inset,
    0 0 8px rgba(57, 255, 20, 0.6),
    0 0 16px rgba(0, 255, 0, 0.4),
    0 0 28px rgba(57, 255, 20, 0.22);
  border-color: rgba(57, 255, 20, 0.42);
}

.neon-voxel .icon-btn:hover,
.neon-voxel .hero-action-btn:hover,
.neon-voxel .recite-btn:hover,
.neon-voxel .verse-action-btn:hover,
.neon-voxel .sticky-nav-btn:hover {
  box-shadow:
    0 0 0 3px rgba(57, 255, 20, 0.22),
    0 0 8px rgba(57, 255, 20, 0.6),
    0 0 16px rgba(0, 255, 0, 0.4);
}

.neon-voxel .pagination .page-btn.is-active {
  background: linear-gradient(135deg, rgba(57, 255, 20, 0.92) 0%, rgba(0, 255, 0, 0.92) 100%);
  border-color: rgba(0, 255, 0, 0.55);
  color: var(--neon-ink);
  box-shadow:
    0 0 0 3px rgba(57, 255, 20, 0.22),
    0 0 10px rgba(57, 255, 20, 0.6),
    0 0 18px rgba(0, 255, 0, 0.4);
}

.light-theme {
  --bg-1: #f7f9ff;
  --bg-2: #e9efff;
  --text: #0b1530;
  --muted: rgba(11, 21, 48, 0.72);
  --panel: rgba(255, 255, 255, 0.74);
  --panel-border: rgba(11, 21, 48, 0.12);
  /* --accent and --accent-2 are NOT set here — they are managed by JS setAccentColor() */
  --ok: #0a8a54;

  --danger: #b33a3a;

  /* --glow-1 and --glow-2 are NOT set here — they are managed by JS */
  --shadow-1: rgba(10, 20, 40, 0.12);
  --shadow-2: rgba(10, 20, 40, 0.12);

  --input-bg: rgba(255, 255, 255, 0.88);
  --surface-1: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(255, 255, 255, 0.72);
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.hero {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.8rem;
}

.hero-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 0.35rem;
}

.settings-divider {
  width: 1px;
  height: 32px;
  background: rgba(167, 200, 255, 0.2);
  margin: 0 8px;
}

.hero-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Uniform dropdown and button styling on PC */
.hero-actions .hero-select,
.hero-actions .hero-action-btn,
.hero-actions .wbw-toggle-btn {
  height: 40px;
  border-radius: 8px;
}

.hero-actions .accent-swatches {
  height: 40px;
  border-radius: 8px;
}

.hero-select-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #79a9ff;
  text-shadow: 0 0 8px rgba(121, 169, 255, 0.25);
}

.hero-select {
  appearance: none;
  padding: 0.55rem 2.05rem 0.55rem 0.85rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  background:
    rgba(10, 18, 36, 0.78)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239dcbff' d='M6 8L1 3h10z'/%3E%3C/svg%3E")
    no-repeat right 0.65rem center;
  border: 1px solid rgba(167, 200, 255, 0.32);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 8, 28, 0.12);
}

.hero-select:hover {
  border-color: rgba(186, 214, 255, 0.5);
  background-color: rgba(32, 52, 88, 0.6);
}

.hero-select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(112, 164, 255, 0.28), 0 10px 26px rgba(0, 8, 28, 0.12);
}

.light-theme .hero-select-label {
  color: rgba(11, 21, 48, 0.62);
}

.light-theme .hero-select {
  background:
    rgba(255, 255, 255, 0.88)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231a4be2' d='M6 8L1 3h10z'/%3E%3C/svg%3E")
    no-repeat right 0.65rem center;
  border-color: rgba(11, 21, 48, 0.18);
  color: rgba(11, 21, 48, 0.9);
}

.accent-swatches {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(167, 200, 255, 0.18);
  background: rgba(10, 18, 36, 0.35);
  box-shadow: 0 10px 26px rgba(0, 8, 28, 0.1);
}

.accent-swatch {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.65);
  background: #79a9ff;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.accent-swatch:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 4px rgba(121, 169, 255, 0.18);
}

.accent-swatch--emerald {
  background: #38d18a;
}

.accent-swatch--gold {
  background: #f4c45c;
}

.accent-swatch.is-active {
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 4px rgba(157, 203, 255, 0.18);
}

.light-theme .accent-swatches {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(11, 21, 48, 0.12);
}

.light-theme .accent-swatch {
  border-color: rgba(11, 21, 48, 0.28);
}

.hero-action-btn {
  border: 1px solid rgba(167, 200, 255, 0.28);
  background: rgba(10, 18, 36, 0.58);
  color: rgba(235, 245, 255, 0.95);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 8, 28, 0.16), 0 0 15px rgba(121, 169, 255, 0.1);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.hero-select {
  transition: all 0.25s ease-in-out;
}

.hero-action-btn:hover {
  background: rgba(32, 52, 88, 0.72);
  border-color: rgba(180, 210, 255, 0.55);
}

.hero-action-btn:active {
  transform: scale(0.99);
}

.hero-action-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(112, 164, 255, 0.28), 0 10px 26px rgba(0, 8, 28, 0.16);
}

.light-theme .hero-action-btn {
  background: rgba(255, 255, 255, 0.78);
  color: rgba(11, 21, 48, 0.9);
  border-color: rgba(11, 21, 48, 0.18);
}

.light-theme .hero-action-btn:hover {
  background: rgba(245, 248, 255, 0.92);
  border-color: rgba(11, 21, 48, 0.28);
}

.eyebrow {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #00e6b8;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(0, 230, 184, 0.4);
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4.6vw, 3.05rem);
  line-height: 1.15;
  font-weight: 800;
  background: linear-gradient(90deg, #ffffff 0%, #a7c8ff 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: 0px 4px 15px rgba(167, 200, 255, 0.15);
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 700px;
}

.hover-lang-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

.hover-lang-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.hover-lang-wrap[hidden] {
  display: none !important;
}

.wbw-mode {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.wbw-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid rgba(167, 200, 255, 0.22);
  background: rgba(10, 18, 36, 0.42);
  box-shadow: 0 10px 26px rgba(0, 8, 28, 0.1);
}

.wbw-toggle-btn {
  border: 1px solid rgba(121, 169, 255, 0.5);
  background: rgba(20, 25, 35, 0.6);
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}

.wbw-toggle-btn:hover {
  background: rgba(127, 176, 255, 0.14);
}

.wbw-toggle-btn.is-active {
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 65%, white 35%) 0%, color-mix(in oklab, var(--accent-2) 65%, white 35%) 100%);
  color: #051005;
  box-shadow: 0 0 8px color-mix(in oklab, var(--accent) 50%, transparent), 0 0 16px color-mix(in oklab, var(--accent-2) 40%, transparent);
}

.neon-voxel .wbw-toggle-btn.is-active {
  color: #051005;
}

.hover-lang-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #79a9ff;
  text-shadow: 0 0 8px rgba(121, 169, 255, 0.25);
}

.hover-lang-select {
  appearance: none;
  min-width: 11rem;
  padding: 0.55rem 2rem 0.55rem 0.85rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  background:
    rgba(10, 18, 36, 0.82)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239dcbff' d='M6 8L1 3h10z'/%3E%3C/svg%3E")
    no-repeat right 0.65rem center;
  border: 1px solid rgba(167, 200, 255, 0.35);
  border-radius: 0.65rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 8, 28, 0.25);
}

.hover-lang-select:hover {
  border-color: rgba(186, 214, 255, 0.55);
}

.hover-lang-select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(112, 164, 255, 0.3);
}

.search-shell {
  margin-top: 1rem;
  width: min(780px, 90vw);
  display: flex;
  gap: 0.6rem;
  padding: 0.5rem;
  border-radius: 1.25rem;
  background: var(--surface-1);
  border: 1px solid rgba(167, 200, 255, 0.22);
  box-shadow:
    0 22px 45px var(--shadow-1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 20px rgba(121, 169, 255, 0.08);
  backdrop-filter: blur(9px);
}

/* Quick Jump form inside browse field - constrained sizing */
.browse-field .search-shell {
  margin-top: 0;
  width: 100%;
  padding: 0.35rem;
  border-radius: 0.75rem;
  gap: 0.4rem;
  box-sizing: border-box;
  flex-wrap: nowrap;
}

.browse-field .search-input {
  padding: 0.55rem 0.7rem;
  font-size: 0.88rem;
  border-radius: 0.65rem;
  box-sizing: border-box;
  flex: 1;
  min-width: 0;
}

.browse-field .search-btn {
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  border-radius: 0.65rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  min-width: 0;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  border-radius: 0.95rem;
  border: 1px solid transparent;
  background: var(--input-bg);
  color: var(--text);
  padding: 0.7rem 0.9rem;
  outline: none;
}

.search-input::placeholder {
  color: #8ea4cd;
}

.search-input:focus {
  border-color: #6ca2ff;
  box-shadow: 0 0 0 3px rgba(112, 164, 255, 0.2);
}

.search-btn {
  border: 0;
  border-radius: 0.95rem;
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
  font-weight: 700;
  color: #031127;
  background: linear-gradient(135deg, #80b6ff 0%, #a8d0ff 100%);
  cursor: pointer;
}

.search-btn:hover {
  filter: brightness(1.04);
}

.status {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.results-wrap {
  margin-top: 1rem;
  padding-bottom: 130px;
}

/* Sticky Audio Bar - Glassmorphism Effect */
.sticky-audio-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.sticky-audio {
  background: rgba(18, 28, 48, 0.72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(167, 200, 255, 0.18);
  box-shadow:
    0 -8px 32px rgba(0, 6, 28, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 0.85rem 1.25rem;
}

.sticky-audio-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sticky-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.audio-visualizer {
  flex-shrink: 0;
  border-radius: 0.5rem;
  background: rgba(7, 12, 24, 0.6);
  border: 1px solid rgba(121, 169, 255, 0.18);
}

.sticky-meta {
  min-width: 0;
}

.sticky-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.sticky-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(167, 200, 255, 0.28);
  background: rgba(10, 18, 36, 0.65);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sticky-nav-btn:hover {
  background: rgba(32, 52, 88, 0.75);
  border-color: rgba(180, 210, 255, 0.45);
  transform: scale(1.05);
}

.sticky-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(167, 200, 255, 0.35);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #051005;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
  box-shadow:
    0 4px 14px rgba(121, 169, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.sticky-play-btn:hover {
  transform: scale(1.08);
  box-shadow:
    0 6px 20px rgba(121, 169, 255, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.sticky-play-icon,
.sticky-pause-icon {
  position: absolute;
  transition: opacity 0.15s ease;
}

.sticky-pause-icon {
  display: none;
}

.sticky-settings {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.sticky-volume {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
}

.sticky-volume-range {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(121, 169, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
}

.sticky-volume-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.sticky-volume-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.sticky-speed-select {
  appearance: none;
  padding: 0.4rem 0.65rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(10, 18, 36, 0.7);
  border: 1px solid rgba(167, 200, 255, 0.28);
  border-radius: 0.5rem;
  cursor: pointer;
}

.sticky-speed-select:hover {
  border-color: rgba(186, 214, 255, 0.45);
}

.light-theme .sticky-audio {
  background: rgba(255, 255, 255, 0.78);
  border-top-color: rgba(11, 21, 48, 0.12);
  box-shadow:
    0 -8px 32px rgba(10, 20, 40, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.light-theme .sticky-nav-btn {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(11, 21, 48, 0.15);
  color: rgba(11, 21, 48, 0.9);
}

.light-theme .sticky-speed-select {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(11, 21, 48, 0.15);
  color: rgba(11, 21, 48, 0.9);
}

.result-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

@media (max-width: 700px) {
  .sticky-audio-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .sticky-volume {
    justify-content: flex-start;
    min-width: 0;
  }

  .sticky-volume-range {
    width: 100%;
  }
}

.browse-verse-panel {
  margin-bottom: 1rem;
  padding: 0.85rem 0.9rem 0.9rem;
  border-radius: 0.9rem;
  background: rgba(14, 22, 42, 0.55);
  border: 1px solid rgba(167, 200, 255, 0.2);
  box-shadow:
    0 18px 40px rgba(0, 6, 28, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
}

.browse-verse-panel-head {
  margin-bottom: 1rem;
}

.browse-verse-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(157, 203, 255, 0.9);
}

.browse-verse-hint {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: rgba(173, 192, 230, 0.82);
  line-height: 1.45;
}

.browse-verse-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.1rem;
  align-items: end;
}

.browse-verse-controls--row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: flex-end;
}

.browse-verse-controls--row .browse-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow: hidden;
}

/* Perfect 3-Box Alignment — identical heights and border-radius */
.browse-verse-controls--row .browse-select,
.browse-verse-controls--row .search-input,
.browse-verse-controls--row .search-btn {
  height: 48px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  border-radius: 0.75rem !important;
}

/* Perfect 3-Box Alignment — identical widths */
.browse-verse-controls--row .browse-select,
.browse-verse-controls--row .search-input,
.browse-verse-controls--row .search-btn {
  width: 100% !important;
  min-width: 0 !important;
}

/* Fix 3rd Box Overflow — Quick Jump form wrapper */
.browse-verse-controls--row .browse-field form {
  display: flex;
  gap: 10px;
  width: 100%;
  border-bottom: none !important;
}

/* Quick Jump input — shrink to fit without overflow */
.browse-verse-controls--row .browse-field form .search-input {
  flex: 1;
  min-width: 0;
  height: 48px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

/* Quick Jump button — match height exactly */
.browse-verse-controls--row .browse-field form .search-btn {
  height: 48px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  flex-shrink: 0;
}

.browse-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

/* Ensure form inside browse field behaves like other elements */
.browse-field form {
  margin: 0;
  display: flex;
  flex-direction: row;
  width: 100%;
  gap: 10px;
}

/* Quick Jump input wrapper - ensure proper sizing */
.browse-field form .search-input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.9rem;
  font-size: 0.94rem;
  border-radius: 0.75rem;
}

/* Quick Jump button - match select height */
.browse-field form .search-btn {
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  border-radius: 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.browse-field-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(186, 208, 242, 0.78);
}

.browse-select {
  appearance: none;
  width: 100%;
  padding: 0.65rem 2.15rem 0.65rem 0.9rem;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text);
  background:
    rgba(8, 14, 28, 0.88)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239dcbff' d='M6 8L1 3h10z'/%3E%3C/svg%3E")
    no-repeat right 0.75rem center;
  border: 1px solid rgba(167, 200, 255, 0.32);
  border-radius: 0.75rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 8, 28, 0.22);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.browse-select:hover:not(:disabled) {
  border-color: rgba(186, 214, 255, 0.5);
}

.browse-select:focus-visible {
  outline: none;
  border-color: rgba(124, 178, 255, 0.75);
  box-shadow: 0 0 0 3px rgba(112, 164, 255, 0.28);
}

.browse-select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.browse-select:not(:disabled) {
  opacity: 1;
  cursor: pointer;
  pointer-events: auto;
}

@media (max-width: 640px) {
  .browse-verse-controls {
    grid-template-columns: 1fr;
  }
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.results-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 0.75rem;
  border: 1px solid rgba(167, 200, 255, 0.32);
  background: rgba(10, 18, 36, 0.62);
  color: rgba(235, 245, 255, 0.95);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 8, 28, 0.12);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.icon-btn:hover {
  background: rgba(32, 52, 88, 0.82);
  border-color: rgba(180, 210, 255, 0.55);
}

.icon-btn:active {
  transform: scale(0.98);
}

.icon-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(112, 164, 255, 0.28), 0 10px 30px rgba(0, 8, 28, 0.12);
}

.light-theme .icon-btn {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(11, 21, 48, 0.18);
  color: rgba(11, 21, 48, 0.9);
}

.light-theme .icon-btn:hover {
  background: rgba(245, 248, 255, 0.92);
  border-color: rgba(11, 21, 48, 0.28);
}

.results-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.badge {
  background: rgba(10, 18, 34, 0.82);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  color: var(--ok);
  font-weight: 600;
  font-size: 0.9rem;
}

.results {
  display: grid;
  gap: 0.9rem;
  position: relative;
  z-index: 0;
}

.result-item {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 1rem;
  padding: 1.15rem 1.25rem 1.25rem;
  backdrop-filter: blur(7px);
  position: relative;
  z-index: 0;
  overflow: visible;
}

.meta {
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

.verse-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.verse-block {
  margin: 0;
  padding: 0;
}

.verse-block:not(:first-child) {
  margin-top: 1.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(173, 192, 230, 0.14);
}

.verse-translations {
  margin-top: 1.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(173, 192, 230, 0.14);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  align-items: start;
}

.verse-footer {
  margin-top: 1.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(173, 192, 230, 0.14);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  align-items: start;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(157, 203, 255, 0.75);
  margin-bottom: 0.55rem;
}

.footer-bangla .footer-label {
  letter-spacing: 0.08em;
  text-transform: none;
  font-size: 0.82rem;
  font-family: "Noto Sans Bengali", sans-serif;
  font-weight: 600;
}

.footer-english-text,
.footer-bangla-text {
  margin: 0;
  line-height: 1.65;
  color: #e6edfd;
  font-size: 1.02rem;
}

.footer-bangla-text {
  font-family: var(--bn-font);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #eef5ff;
  line-height: 1.75;
}

@media (max-width: 760px) {
  .verse-translations {
    grid-template-columns: 1fr;
  }

  .verse-footer {
    grid-template-columns: 1fr;
  }
}

.verse-translations .verse-block {
  margin: 0;
  padding: 0;
  border-top: 0;
}

.verse-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(157, 203, 255, 0.75);
  margin-bottom: 0.55rem;
}

.verse-bangla .verse-label {
  letter-spacing: 0.08em;
  text-transform: none;
  font-size: 0.82rem;
  font-family: "Noto Sans Bengali", sans-serif;
  font-weight: 600;
}

.verse-arabic-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.verse-arabic-row .verse-label {
  margin-bottom: 0;
}

.verse-arabic-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.copy-menu {
  position: relative;
  display: inline-flex;
}

.copy-menu-pop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 210px;
  border-radius: 0.9rem;
  background: rgba(10, 18, 36, 0.92);
  border: 1px solid rgba(167, 200, 255, 0.22);
  box-shadow: 0 22px 50px rgba(0, 8, 28, 0.35);
  padding: 0.45rem;
  z-index: 40;
  backdrop-filter: blur(10px);
}

.copy-menu-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(235, 245, 255, 0.95);
  text-align: left;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  cursor: pointer;
}

.copy-menu-item:hover {
  background: rgba(127, 176, 255, 0.14);
}

.copy-menu-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(112, 164, 255, 0.3);
}

.light-theme .copy-menu-pop {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(11, 21, 48, 0.12);
}

.light-theme .copy-menu-item {
  color: rgba(11, 21, 48, 0.92);
}

.light-theme .copy-menu-item:hover {
  background: rgba(36, 92, 255, 0.1);
}

.neon-voxel .copy-menu-pop {
  background: rgba(4, 16, 9, 0.94);
  border-color: rgba(57, 255, 20, 0.22);
  box-shadow:
    0 0 10px rgba(57, 255, 20, 0.35),
    0 0 22px rgba(0, 255, 0, 0.18),
    0 22px 50px rgba(0, 8, 28, 0.35);
}

.neon-voxel .copy-menu-item:hover {
  background: rgba(57, 255, 20, 0.14);
}

.verse-action-btn {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(167, 200, 255, 0.35);
  border-radius: 50%;
  background: rgba(10, 18, 36, 0.75);
  color: rgba(220, 234, 255, 0.95);
  cursor: pointer;
  box-shadow:
    0 4px 14px rgba(0, 8, 28, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.verse-action-btn:hover {
  background: rgba(36, 58, 98, 0.85);
  border-color: rgba(180, 210, 255, 0.55);
  color: #ffffff;
}

.verse-action-btn:active {
  transform: scale(0.96);
}

.verse-action-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(112, 164, 255, 0.35);
}

.verse-action-btn .icon-check {
  display: none;
}

.verse-action-btn.is-copied {
  border-color: rgba(126, 240, 181, 0.55);
  color: rgba(126, 240, 181, 0.95);
}

.verse-action-btn.is-copied .icon-copy {
  display: none;
}

.verse-action-btn.is-copied .icon-check {
  display: block;
}

.light-theme .verse-action-btn {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(11, 21, 48, 0.18);
  color: rgba(11, 21, 48, 0.9);
}

.light-theme .verse-action-btn:hover {
  background: rgba(245, 248, 255, 0.92);
  border-color: rgba(11, 21, 48, 0.28);
}

.recite-surah-btn {
  flex-shrink: 0;
  padding: 0.5rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(167, 200, 255, 0.32);
  background: rgba(12, 20, 40, 0.72);
  color: rgba(230, 240, 255, 0.95);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 8, 28, 0.28);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.recite-surah-btn:hover {
  border-color: rgba(186, 214, 255, 0.5);
  background: rgba(32, 52, 88, 0.82);
}

.recite-surah-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(112, 164, 255, 0.32);
}

.recite-surah-btn.is-playing {
  background: linear-gradient(145deg, rgba(90, 140, 220, 0.35), rgba(28, 44, 78, 0.92));
  border-color: rgba(186, 214, 255, 0.55);
  color: #ffffff;
}

.recite-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(167, 200, 255, 0.35);
  border-radius: 50%;
  background: rgba(10, 18, 36, 0.75);
  color: rgba(220, 234, 255, 0.95);
  cursor: pointer;
  box-shadow:
    0 4px 14px rgba(0, 8, 28, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.recite-btn:hover {
  background: rgba(36, 58, 98, 0.85);
  border-color: rgba(180, 210, 255, 0.55);
  color: #ffffff;
}

.recite-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(112, 164, 255, 0.35);
}

.recite-btn:active {
  transform: scale(0.96);
}

.recite-btn.is-playing {
  background: linear-gradient(145deg, rgba(100, 150, 230, 0.35), rgba(30, 48, 86, 0.9));
  border-color: rgba(180, 214, 255, 0.55);
  color: #ffffff;
}

.recite-icon {
  display: block;
}

.recite-btn .recite-icon-pause {
  display: none;
}

.recite-btn.is-playing .recite-icon-play {
  display: none;
}

.recite-btn.is-playing .recite-icon-pause {
  display: block;
}

.verse-arabic {
  padding: 0.75rem 1rem;
  background: rgba(10, 18, 36, 0.35);
  border-radius: 0.75rem;
  border: 1px solid rgba(167, 200, 255, 0.12);
}

.verse-arabic .arabic {
  margin-top: 0.65rem;
  margin-bottom: 0.75rem;
}

.arabic {
  margin: 0;
  direction: rtl;
  text-align: right;
  font-size: clamp(var(--arabic-font-min), var(--arabic-font-fluid), var(--arabic-font-max));
  line-height: 2.0;
  font-family: var(--ar-font, Amiri, "Traditional Arabic", serif);
  position: relative;
  padding: 0.5rem 0;
  word-spacing: 0.15em;
}

.arabic.arabic-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 0.65rem;
  align-items: flex-start;
  direction: rtl;
  text-align: right;
  line-height: 1.2;
}

.arabic.arabic-inline .q-word {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 12px;
  box-sizing: border-box;
  border-radius: 0.55rem;
  border: 1px solid rgba(173, 192, 230, 0.12);
  background: rgba(10, 18, 36, 0.28);
  cursor: default;
}

.arabic.arabic-inline .q-word:hover {
  background: rgba(127, 176, 255, 0.1);
  border-color: rgba(186, 214, 255, 0.22);
}

.arabic.arabic-inline .q-word:hover .wbw-ar {
  color: var(--accent) !important;
  text-shadow: 0 0 8px var(--glow-1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.arabic.arabic-inline .q-pause-mark {
  background: transparent;
  border-color: transparent;
  gap: 0;
  padding: 0.2rem 0.15rem;
}

.arabic.arabic-inline .q-pause-mark:hover {
  background: transparent;
  border-color: transparent;
}

.arabic.arabic-inline .wbw-ar {
  font-family: var(--ar-font, Amiri, "Traditional Arabic", serif);
  font-size: 1.18em;
  line-height: 1.2;
  color: var(--text);
  border: 2px solid rgba(121, 169, 255, 1) !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  background: rgba(20, 25, 35, 0.6) !important;
  box-shadow: none !important;
}

.arabic.arabic-inline .wbw-meaning {
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  color: color-mix(in oklab, var(--muted) 82%, white 18%);
  max-width: 10rem;
  text-align: center;
}

.arabic.arabic-inline .wbw-meaning.wbw-meaning--bn {
  font-family: var(--bn-font);
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Force split-box inline design — destroy parent box, style children */
.q-word {
  display: inline-flex !important;
  flex-direction: column !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 6px !important;
  gap: 6px !important;
  min-width: max-content !important;
}

/* Top Arabic Box */
.q-word .wbw-ar {
  border: 2px solid rgba(121, 169, 255, 1) !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  background: rgba(20, 25, 35, 0.6) !important;
  text-align: center !important;
  font-size: 1.2em !important;
  line-height: 1.4 !important;
  color: var(--text) !important;
  display: block !important;
}

/* Bottom English/Meaning Box */
.q-word .wbw-meaning {
  border: 2px solid rgba(121, 169, 255, 1) !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  background: rgba(20, 25, 35, 0.6) !important;
  text-align: center !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: color-mix(in oklab, var(--muted) 82%, white 18%) !important;
  white-space: nowrap !important;
  display: block !important;
  min-width: 100% !important;
}

.q-word .wbw-meaning.wbw-meaning--bn {
  font-family: var(--bn-font) !important;
  font-weight: 600 !important;
}

/* Tajweed Pause Marks (Waqf) — delicate superscript */
.q-pause-mark {
  font-size: 0.7em !important;
  color: var(--accent) !important;
  transform: translateY(-20px) !important;
  margin: 0 4px;
  opacity: 0.8;
}

/* Ayah End Symbol — Simple Arabic number */
.ayah-end-symbol {
  display: inline !important;
  font-size: 1.1rem;
  color: var(--accent) !important;
  margin: 0 8px;
  font-family: 'Amiri', 'Traditional Arabic', serif;
}

.q-word .hl {
  border-bottom: none;
}

.wbw-tooltip {
  position: fixed;
  z-index: 2147483646;
  left: 0;
  top: 0;
  max-width: min(320px, calc(100vw - 24px));
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  color: #0d1528;
  background: linear-gradient(165deg, #f3f7ff 0%, #e2ebfb 100%);
  border: 1px solid rgba(110, 150, 220, 0.45);
  border-radius: 0.65rem;
  box-shadow:
    0 16px 40px rgba(5, 15, 45, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

.wbw-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
}

.wbw-tooltip[hidden] {
  display: none !important;
}

.wbw-tooltip.wbw-tooltip--bn {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.92rem;
  line-height: 1.5;
}

.wbw-tip-bn {
  display: block;
  font-family: var(--bn-font);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.55;
  color: #0a1224;
}

.wbw-tip-en-sub {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(20, 35, 62, 0.78);
  padding-top: 0.35rem;
  border-top: 1px solid rgba(110, 150, 200, 0.28);
}

.hl {
  background: rgba(133, 195, 255, 0.26);
  border-radius: 0.4rem;
  padding: 0 0.2rem;
  color: #ffffff;
}

.english {
  margin: 0;
  line-height: 1.65;
  color: #e6edfd;
  font-size: 1.02rem;
}

.bangla {
  margin: 0;
  line-height: 1.75;
  color: #eef5ff;
  font-family: var(--bn-font);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Pagination */
.pagination {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination .page-btn {
  min-width: 40px;
  height: 36px;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(167, 200, 255, 0.22);
  background: rgba(10, 18, 36, 0.52);
  color: var(--text);
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
}

.pagination .page-btn:hover {
  border-color: rgba(180, 210, 255, 0.55);
}

.pagination .page-btn.is-active {
  border-color: color-mix(in oklab, var(--accent-2) 70%, white 30%);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent);
}

.pagination .page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Modal + activity heatmap */
.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 2147483645;
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 6, 18, 0.62);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  width: min(720px, calc(100vw - 24px));
  border-radius: 1.1rem;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: 0 26px 70px rgba(0, 10, 35, 0.45);
  padding: 1.1rem 1.1rem 1.2rem;
}

.neon-voxel .modal-card {
  box-shadow:
    0 26px 70px rgba(0, 10, 35, 0.35),
    0 0 12px rgba(57, 255, 20, 0.35),
    0 0 24px rgba(0, 255, 0, 0.2);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.modal-title {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.modal-subtitle {
  margin: 0.55rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.heatmap {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 12px;
  grid-template-rows: repeat(7, 12px);
  gap: 6px;
  align-items: start;
  justify-content: start;
  overflow-x: auto;
  padding-bottom: 0.35rem;
}

.heatmap-day {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: rgba(120, 160, 140, 0.12);
  border: 1px solid rgba(173, 192, 230, 0.12);
}

.heatmap-day.is-active {
  background: rgba(57, 255, 20, 0.9);
  border-color: rgba(0, 255, 0, 0.55);
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.6), 0 0 16px rgba(0, 255, 0, 0.35);
}

.neon-voxel .heatmap-day {
  background: rgba(8, 28, 14, 0.7);
  border-color: rgba(57, 255, 20, 0.14);
}


.light-theme .english {
  color: rgba(11, 21, 48, 0.86);
}

.light-theme .bangla {
  color: rgba(11, 21, 48, 0.88);
}

.light-theme .footer-english-text {
  color: rgba(11, 21, 48, 0.86);
}

.light-theme .footer-bangla-text {
  color: rgba(11, 21, 48, 0.88);
}

.light-theme .footer-label {
  color: rgba(11, 21, 48, 0.62);
}

.empty {
  color: var(--muted);
  text-align: center;
  border: 1px dashed rgba(173, 192, 230, 0.35);
  border-radius: 1rem;
  padding: 1.25rem;
}


/* Book-style Modal for Full Ayah View */
.book-modal .modal-card {
  width: min(800px, calc(100vw - 24px));
  max-height: 85vh;
  overflow-y: auto;
  background: linear-gradient(135deg, rgba(25, 35, 55, 0.95) 0%, rgba(15, 25, 45, 0.98) 100%);
  border: 2px solid rgba(167, 200, 255, 0.25);
  box-shadow:
    0 30px 80px rgba(0, 10, 35, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 2rem;
}

.book-modal .modal-title {
  font-size: 1.2rem;
  letter-spacing: 0.12em;
  margin-bottom: 1.5rem;
  text-align: center;
}

.book-modal .book-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.book-modal .book-page {
  background: rgba(10, 18, 36, 0.5);
  border: 1px solid rgba(167, 200, 255, 0.15);
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  position: relative;
}

.book-modal .book-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 1px;
}

.book-modal .book-arabic {
  font-family: Amiri, "Traditional Arabic", serif;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  line-height: 2.2;
  direction: rtl;
  text-align: center;
  color: var(--text);
  padding: 1.5rem 1rem;
  word-spacing: 0.2em;
  letter-spacing: 0.02em;
}

.book-modal .book-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167, 200, 255, 0.3), transparent);
  margin: 0.5rem 0;
}

.book-modal .book-translation {
  padding: 1rem 0.5rem;
}

.book-modal .book-translation-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.75rem;
}

.book-modal .book-translation-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
}

.book-modal .book-translation-text.bangla {
  font-family: var(--bn-font);
  font-weight: 500;
}

.book-modal .book-reference {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(167, 200, 255, 0.15);
}

.book-modal .book-reference-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-2);
  letter-spacing: 0.05em;
}

.book-modal .book-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(167, 200, 255, 0.15);
}

.book-modal .book-action-btn {
  padding: 0.7rem 1.2rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(167, 200, 255, 0.3);
  background: rgba(10, 18, 36, 0.6);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.book-modal .book-action-btn:hover {
  background: rgba(32, 52, 88, 0.75);
  border-color: rgba(180, 210, 255, 0.5);
}

.book-modal .book-action-btn.is-playing {
  background: linear-gradient(145deg, rgba(100, 150, 230, 0.4), rgba(30, 48, 86, 0.9));
  border-color: rgba(180, 214, 255, 0.6);
}

/* Book Mode — continuous flowing page for Full Surah */
.results.book-mode {
  gap: 0.35rem;
}

.results.book-mode .result-item {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  padding: 0.95rem 1.25rem;
  backdrop-filter: none;
  box-shadow: none;
}

.results.book-mode .result-item:hover {
  background: rgba(127, 176, 255, 0.06);
  border-color: rgba(167, 200, 255, 0.1);
}

.results.book-mode .verse-arabic {
  background: rgba(10, 18, 36, 0.2);
  border-color: rgba(167, 200, 255, 0.08);
}

.results.book-mode .meta {
  font-size: 0.78rem;
  opacity: 0.7;
}

/* Dynamic Hover Color Fix */
.q-word:hover {
  border-color: var(--accent) !important;
  background: rgba(255, 255, 255, 0.05);
}
.q-word:hover .wbw-ar {
  color: var(--accent) !important;
  text-shadow: 0 0 10px var(--accent) !important;
  transition: all 0.2s ease;
}

/* Book Mode — seamless dark page for Full Surah */
.book-mode .result-item {
  border: none !important;
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  margin-bottom: 0 !important;
  padding: 30px 0 !important;
}

/* Audio Active Verse Highlighting */
.is-playing-audio {
  border-left: 4px solid var(--accent) !important;
  background: rgba(121, 169, 255, 0.05) !important;
}

/* Premium Audio Glow State */
.result-item.active-ayah-glow {
  border: 2px solid var(--accent) !important;
  box-shadow: 0 0 25px rgba(121, 169, 255, 0.15) !important;
  background: rgba(121, 169, 255, 0.05) !important;
  transform: scale(1.01);
  transition: all 0.3s ease;
}

/* Decorative Bismillah Header */
.bismillah-decorative {
  width: 100%;
  text-align: center;
  padding: 30px 20px 40px 20px;
  margin-bottom: 10px;
}
.bismillah-img {
  max-width: 550px !important;
  width: 90%;
  height: auto;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.05));
  margin: 10px auto 30px auto;
  display: block;
}

/* Word by Word — Force split-box layout for stacked flashcards */
.q-word {
  display: inline-flex !important;
  flex-direction: column !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 6px !important;
  gap: 6px !important;
  vertical-align: top;
  cursor: pointer;
}

/* Top Arabic Box */
.q-word .wbw-ar {
  border: 1px solid rgba(121, 169, 255, 0.3) !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  background: rgba(20, 25, 35, 0.6) !important;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
}

/* Bottom Translation Box */
.q-word .wbw-meaning {
  display: block;
  font-size: 0.7rem;
  line-height: 1.3;
  color: var(--muted);
  font-weight: 500;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(167, 200, 255, 0.15);
  opacity: 0.9;
}

.wbw-full-translation {
  width: 100%;
  display: block;
  clear: both;
  margin-top: 24px;
  padding-top: 18px;
  padding-bottom: 8px;
  border-top: 1px solid rgba(167, 200, 255, 0.18);
  font-family: var(--bn-font);
  font-size: 1.15rem;
  line-height: 1.8;
  color: rgba(200, 220, 255, 0.88);
  text-align: right;
  direction: rtl;
  opacity: 0.95;
  font-weight: 400;
}

/* Ensure Pause Marks don't get the box treatment */
.q-pause-mark {
  background: transparent !important;
  border: none !important;
  font-size: 0.7em !important;
  transform: translateY(-20px) !important;
}

/* Hide meaning span if Word by Word mode is toggled OFF */
.wbw-hidden .wbw-meaning {
  display: none !important;
}

/* Hamburger Menu - Hidden on PC */
#mobile-settings-toggle {
  display: none !important;
}

/* Audio Player Toggle - Hidden on PC */
#audio-toggle {
  display: none !important;
}

/* Mobile Responsive Layout - Premium iOS Glassmorphism Design */
@media (max-width: 768px) {
  /* ===== HIDE AUDIO VISUALIZER ON MOBILE ===== */
  .audio-visualizer {
    display: none !important;
  }
  
  /* ===== HIDE QUICK JUMP ON MOBILE ===== */
  .controls-container .control-item:nth-child(3) {
    display: none !important;
  }

  /* ===== HAMBURGER MENU - Very Top Left on Mobile ===== */
  #mobile-settings-toggle {
    display: flex !important;
    position: fixed !important;
    top: 10px !important;
    left: 10px !important;
    z-index: 1000 !important;
    margin: 0 !important;
  }

  /* Position hero section relatively for absolute hamburger */
  .hero {
    position: relative !important;
  }

  /* ===== HIDE SETTINGS BY DEFAULT ON MOBILE ===== */
  .hero-actions {
    display: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 15px !important;
    padding: 20px !important;
    background: rgba(10, 18, 36, 0.95) !important;
    border: 1px solid rgba(167, 200, 255, 0.15) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
    margin-top: 15px !important;
  }

  /* Show settings when active */
  .hero-actions.mobile-drawer-active {
    display: flex !important;
  }

  /* Stack settings vertically with nice gaps */
  .hero-actions > * {
    width: 100% !important;
  }

  /* Labels left-aligned for mobile drawer */
  .hero-select-label {
    text-align: left !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.08em !important;
    margin-bottom: 5px !important;
  }

  /* Controls full width */
  .hero-select,
  .accent-swatches,
  .wbw-mode,
  .hover-lang-wrap {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Theme row - dropdown and color circles side by side */
  .hero-actions > .hero-select-label[for="theme-select"] + .hero-select,
  .hero-actions > .accent-swatches {
    display: inline-flex !important;
  }

  /* Wrap theme dropdown and swatches together */
  .hero-actions > :nth-child(2),
  .hero-actions > :nth-child(3) {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
  }

  /* ===== STANDARDIZE SHAPES - Consistent 12px border-radius ===== */
  .hero-select,
  .browse-select,
  .search-shell .search-input,
  .search-shell .search-btn,
  .wbw-toggle-btn,
  .hover-lang-select {
    border-radius: 12px !important;
  }

  /* ===== KILL RADIOACTIVE GLOWS - Premium Subtle Shadows ===== */
  .wbw-toggle-btn,
  .wbw-toggle-btn.is-active,
  .sticky-play-btn {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    filter: none !important;
  }

  .wbw-toggle-btn.is-active {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%) !important;
  }

  /* ===== MODERNIZE SEARCH CONTAINER - iOS Glassmorphism ===== */
  .search-shell {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-radius: 16px !important;
    padding: 12px !important;
    max-width: 100% !important;
    width: 100% !important;
    margin-bottom: 30px !important;
    flex-direction: column !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
  }

  .search-shell .search-input {
    padding: 14px 16px !important;
    font-size: 1rem !important;
    min-height: 50px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.08) !important;
  }

  .search-shell .search-btn {
    padding: 14px 20px !important;
    font-size: 1rem !important;
    min-height: 50px !important;
    border-radius: 12px !important;
    width: 100% !important;
    margin-top: 10px !important;
  }

  /* ===== HIDE QUICK JUMP ON MOBILE ===== */
  .browse-verse-controls--row .browse-field:nth-child(3) {
    display: none !important;
  }

  /* Controls stack vertically */
  .browse-verse-controls--row {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    padding: 20px !important;
  }

  .browse-verse-controls--row .browse-field {
    width: 100% !important;
  }

  .browse-select {
    padding: 14px 2.15rem 14px 1rem !important;
    font-size: 1rem !important;
    min-height: 50px !important;
    border-radius: 12px !important;
  }

  /* ===== AUDIO CONTROLS SPACING - Even Distribution ===== */
  .sticky-audio-inner {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 16px !important;
    gap: 12px !important;
  }

  .sticky-controls {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .sticky-settings {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 12px !important;
  }

  /* Premium button styling */
  .sticky-nav-btn,
  .sticky-play-btn {
    border-radius: 12px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
  }

  /* ===== COLLAPSIBLE AUDIO PLAYER ===== */
  .sticky-audio-wrap {
    transition: transform 0.3s ease !important;
  }

  .sticky-audio-wrap.collapsed {
    transform: translateY(calc(100% - 30px)) !important;
  }

  /* Audio toggle button */
  #audio-toggle {
    display: flex !important;
    position: absolute !important;
    top: -30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 50px !important;
    height: 30px !important;
    background: rgba(18, 28, 48, 0.9) !important;
    border: 1px solid rgba(167, 200, 255, 0.2) !important;
    border-bottom: none !important;
    border-radius: 8px 8px 0 0 !important;
    cursor: pointer !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 101 !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
  }

  #audio-toggle svg {
    transition: transform 0.3s ease !important;
    color: var(--text) !important;
  }

  /* Flip arrow when collapsed */
  .sticky-audio-wrap.collapsed #audio-toggle svg {
    transform: rotate(180deg) !important;
  }

  /* Modal adjustments */
  .book-modal .modal-card {
    padding: 1.25rem !important;
  }

  .book-modal .book-page {
    padding: 1rem 1.25rem !important;
  }

  .book-modal .book-arabic {
    font-size: 1.5rem !important;
    line-height: 2 !important;
  }
}

/* Mobile Quran Course Button Border */
@media (max-width: 768px) {
    .m-btn-text {
        border: 1px solid rgba(0, 229, 255, 0.4) !important;
        box-shadow: 0 0 10px rgba(0, 229, 255, 0.1) !important;
        border-radius: 8px !important;
    }
}

/* Arabic Search Word Highlight Color - Mark.js */
mark {
    background-color: rgba(0, 229, 255, 0.2) !important;
    color: #00e5ff !important;
    font-weight: 800 !important;
    border-radius: 4px;
    padding: 0 2px;
}

/* Nuclear CSS Fix for Alignment - Mimo's Alignment Fix */
.controls-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    align-items: flex-end !important;
    padding: 10px 0 !important;
}

@media (max-width: 768px) {
    .controls-container {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    .controls-container .control-item {
        width: 100% !important;
    }
}

/* Default PC Position (Top Left) */
#home-nav-button {
    top: 25px !important;
    left: 25px !important;
}

/* STRICT Mobile Position - Perfectly Mirrors Hamburger */
@media (max-width: 768px) {
    #home-nav-button {
        position: fixed !important; /* Mirrors hamburger's fixed positioning */
        top: 10px !important; /* Exact same vertical alignment as hamburger */
        left: auto !important; /* Releases the left side */
        right: 10px !important; /* Mirrors hamburger's left: 10px but on right side */
        z-index: 1000 !important; /* Same z-index as hamburger */
        margin: 0 !important; /* Same margin as hamburger */
        transform: none !important;
    }
}

.legal-footer { margin-top: auto; padding: 20px; text-align: center; font-size: 0.85rem; color: #64748b; width: 100%; }
.legal-footer a { color: #94a3b8; text-decoration: none; transition: color 0.2s; }
.legal-footer a:hover { color: #ffffff; text-decoration: underline; }

/* Attribution Footer */
.attribution-footer {
  text-align: center;
  margin-top: 2rem;
  padding: 1.5rem 1rem;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.5;
}

.attribution-footer a {
  color: #94a3b8;
  text-decoration: none;
  transition: text-decoration 0.2s ease;
}

.attribution-footer a:hover {
  text-decoration: underline;
}

/* Ensure footer respects theme variations */
.light-theme .attribution-footer {
  color: #64748b;
}

.light-theme .attribution-footer a {
  color: #64748b;
}

.light-theme .attribution-footer a:hover {
  color: #475569;
}

.neon-voxel .attribution-footer {
  color: rgba(100, 116, 139, 0.8);
}

.neon-voxel .attribution-footer a {
  color: rgba(148, 163, 184, 0.9);
}

.neon-voxel .attribution-footer a:hover {
  color: rgba(148, 163, 184, 1);
  text-decoration: underline;
}
body {
  background: linear-gradient(135deg, #0a1224 0%, #0d1a35 25%, #0f1d3a 50%, #0d1a35 75%, #0a1224 100%);
  background-size: 400% 400%;
  animation: breathe 20s ease-in-out infinite;
  margin: 0;
  font-family: sans-serif;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 80%, rgba(121, 169, 255, 0.12) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(0, 229, 255, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 40% 40%, rgba(157, 203, 255, 0.05) 0%, transparent 40%),
              radial-gradient(circle at 60% 70%, rgba(121, 169, 255, 0.06) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
  animation: glowPulse 10s ease-in-out infinite;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 10% 90%, rgba(0, 229, 255, 0.03) 0%, transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(121, 169, 255, 0.04) 0%, transparent 35%);
  pointer-events: none;
  z-index: 0;
  animation: floatGlow 15s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes floatGlow {
  0%, 100% {
    opacity: 0.5;
    transform: translate(0, 0);
  }
  33% {
    opacity: 0.8;
    transform: translate(10px, -10px);
  }
  66% {
    opacity: 0.6;
    transform: translate(-10px, 10px);
  }
}

/* Premium Navbar Styling */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 50px; background: rgba(10, 18, 36, 0.9);
    backdrop-filter: blur(10px); border-bottom: 1px solid rgba(0, 229, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 30px rgba(121, 169, 255, 0.05);
}
.navbar .logo { font-size: 1.5rem; font-weight: 800; color: white; text-shadow: 0 0 10px rgba(121, 169, 255, 0.3); }
.navbar .links a {
    color: white; text-decoration: none; margin-left: 30px;
    font-weight: 500; font-size: 1.1rem; transition: color 0.3s ease, text-shadow 0.3s ease;
}
.navbar .links a:hover { color: #00e5ff; text-shadow: 0 0 8px rgba(0, 229, 255, 0.5); }

/* --- Crazy Keyframes --- */
@keyframes cardEntrance {
    0% { opacity: 0; transform: translateY(60px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes backgroundBreathe {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes sweep {
    0% { left: -100%; }
    100% { left: 200%; }
}
@keyframes pulseGlowBtn {
    0%, 100% { box-shadow: 0 0 15px rgba(0, 229, 255, 0.4); transform: scale(1); }
    50% { box-shadow: 0 0 25px rgba(0, 229, 255, 0.7); transform: scale(1.02); }
}
@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    50% { transform: translate(30px, -40px) scale(1.2); opacity: 0.8; }
    100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
}

/* --- The Breathing Premium Background --- */
.shop-page body {
    background: linear-gradient(-45deg, #050a14, #0a1224, #0d1b33, #0a1224);
    background-size: 400% 400%;
    animation: backgroundBreathe 20s ease infinite;
    color: white;
}

/* --- Layout & Hero --- */
.shop-hero { position: relative; text-align: center; padding: 100px 20px; overflow: hidden; }
.shop-container { max-width: 1400px; margin: 0 auto; padding: 0 20px 80px 20px; position: relative; z-index: 5; }
.shop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 35px; }

/* --- Floating Neon Orbs --- */
.glow-orb {
    position: absolute; border-radius: 50%; filter: blur(60px); z-index: 0; pointer-events: none;
}
.orb-1 { width: 300px; height: 300px; background: rgba(0, 229, 255, 0.15); top: -50px; left: 20%; animation: floatOrb 8s ease-in-out infinite; }
.orb-2 { width: 250px; height: 250px; background: rgba(229, 179, 64, 0.1); bottom: 0; right: 20%; animation: floatOrb 10s ease-in-out infinite reverse; }

/* --- Elegant Animated Cards --- */
.product-card {
    position: relative;
    background: linear-gradient(180deg, rgba(17, 34, 64, 0.5) 0%, rgba(10, 18, 36, 0.8) 100%);
    border: 1px solid rgba(0, 229, 255, 0.1); 
    border-radius: 16px; 
    overflow: hidden; 
    text-decoration: none; 
    color: white;
    display: flex; 
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    opacity: 0; 
    animation: cardEntrance 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1;
    backdrop-filter: blur(10px);
}

.product-card::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.08), transparent);
    transform: skewX(-20deg); z-index: 5; pointer-events: none;
}

.product-card:hover {
    transform: translateY(-15px) scale(1.02); 
    border-color: #00e5ff; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.9), 0 0 25px rgba(0, 229, 255, 0.2); 
    z-index: 10;
}
.product-card:hover::before { animation: sweep 1s ease-in-out; }

/* --- Floating Book Image Container (NO MORE BLACK BOX) --- */
.image-wrapper {
    width: 100%; height: 360px;
    position: relative;
    /* Soft glowing aura instead of a harsh black box */
    background: radial-gradient(circle at center, rgba(0, 229, 255, 0.05) 0%, transparent 70%);
    display: flex; align-items: center; justify-content: center;
    border-bottom: 1px solid rgba(0, 229, 255, 0.05);
}

.product-card img { 
    height: 85%; width: auto; max-width: 85%; object-fit: contain; 
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    /* Casts a realistic 3D shadow directly from the book cover */
    filter: drop-shadow(0 15px 20px rgba(0,0,0,0.8)); 
}

.product-card:hover img {
    transform: translateY(-10px) scale(1.06); /* Floats up out of the aura */
    filter: drop-shadow(0 25px 30px rgba(0,0,0,0.9));
}

/* --- Text Container --- */
.product-info { 
    display: flex; flex-direction: column; flex-grow: 1; 
    padding: 25px 20px; text-align: center; z-index: 2; 
}
.product-info h3 { margin: 0 0 8px 0; font-size: 1.3rem; transition: color 0.3s ease;}
.product-card:hover .product-info h3 { color: #00e5ff; }
.product-info .author { color: #a0aec0; font-size: 0.85rem; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; }
.product-info .price { color: #e5b340; font-size: 1.6rem; font-weight: 900; margin-bottom: 25px; }

/* --- The Upgraded Premium Button --- */
.buy-btn {
    margin-top: auto; 
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.05), rgba(0, 184, 204, 0.1));
    border: 1px solid #00e5ff; color: #00e5ff; 
    padding: 12px 20px; border-radius: 12px; font-weight: 800; cursor: pointer; 
    transition: all 0.3s ease; width: 100%; font-size: 1.05rem; text-transform: uppercase;
    letter-spacing: 1px; text-decoration: none; text-align: center;
}

.product-card:hover .buy-btn { 
    background: linear-gradient(135deg, #00e5ff, #00b8cc);
    color: #0a1224; border-color: transparent;
    box-shadow: 0 5px 20px rgba(0, 229, 255, 0.5);
}

.product-layout .buy-btn:hover { animation: pulseGlowBtn 2s infinite; }

/* Product Detail Page */
.product-detail-container { max-width: 1200px; margin: 40px auto; padding: 0 20px; color: white; position: relative; z-index: 5; }
.back-link { display: inline-block; color: #e5b340; text-decoration: none; margin-bottom: 30px; font-weight: bold; font-size: 1.2rem; transition: transform 0.3s ease; }
.back-link:hover { transform: translateX(-10px); text-shadow: 0 0 10px #e5b340; }

.product-layout {
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px;
    background: linear-gradient(145deg, rgba(13,27,51,0.6), rgba(10,18,36,0.9));
    padding: 50px; border-radius: 20px; 
    border: 1px solid rgba(0, 229, 255, 0.15);
    box-shadow: 0 25px 50px rgba(0,0,0,0.8);
    backdrop-filter: blur(15px);
}

/* Mobile Responsiveness */
@media (max-width: 1024px) { .shop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
    .shop-grid { grid-template-columns: 1fr; }
    .product-layout { grid-template-columns: 1fr; padding: 30px; gap: 40px; }
    .image-wrapper { height: auto; padding: 20px 0; }
}
/* =========================================
   THE V4 "GOD MODE" UNIVERSAL MOBILE FIX 
   (Fluid Scaling for ALL Phone Sizes)
   ========================================= */
@media (max-width: 768px) {
    /* 1. Fluid Navbar */
    .navbar {
        flex-direction: column !important;
        /* Uses percentages so it never pushes off-screen */
        padding: 15px 5% 20px 5% !important; 
        gap: 12px !important;
        background: rgba(10, 18, 36, 0.85) !important;
        backdrop-filter: blur(15px) !important;
        border-bottom: 1px solid rgba(0, 229, 255, 0.1) !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }
    
    .navbar .logo {
        /* Rubber band: Never smaller than 1.4rem, never bigger than 1.9rem */
        font-size: clamp(1.4rem, 6vw, 1.9rem) !important; 
        letter-spacing: -0.5px !important;
    }

    .navbar .links {
        /* Gap shrinks on tiny phones, expands on big phones */
        gap: clamp(10px, 4vw, 25px) !important; 
        width: 100% !important;
    }
    
    .navbar .links a {
        font-size: clamp(0.85rem, 3.5vw, 0.95rem) !important;
        letter-spacing: 0.5px !important;
        color: rgba(255, 255, 255, 0.7) !important;
        transition: 0.3s;
    }
    
    .navbar .links a[href="shop.html"] {
        color: #00e5ff !important;
        font-weight: 800 !important;
        text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
    }

    /* 2. Fluid Hero Section */
    .shop-hero {
        /* Padding scales vertically based on screen height (vh) */
        padding: clamp(30px, 8vh, 55px) 5% !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }

    .shop-hero h1 {
        /* THE MAGIC: Text smoothly scales from 2.2rem to 3.4rem */
        font-size: clamp(2.2rem, 10vw, 3.4rem) !important; 
        line-height: 1.1 !important;
        letter-spacing: -1.5px !important;
        margin-bottom: clamp(10px, 3vh, 18px) !important;
    }
    
    .shop-hero h1 span {
        text-shadow: 0 0 10px rgba(0, 229, 255, 0.6), 
                     0 0 25px rgba(0, 229, 255, 0.3), 
                     0 0 50px rgba(0, 229, 255, 0.1) !important;
    }
    
    .shop-hero p {
        font-size: clamp(0.95rem, 4vw, 1.1rem) !important;
        line-height: 1.6 !important;
        color: #94a3b8 !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
}
/* =========================================
   THE ULTIMATE WORD-BY-WORD FIX (RTL + WRAPPING)
   ========================================= */

/* 1. Force the main container to flow Right-to-Left naturally */
.arabic.arabic-inline {
    direction: rtl !important;
    text-align: right !important;
    display: flex !important; /* Flexbox for proper word-by-word layout */
    flex-wrap: wrap !important;
    gap: 0.85rem 0.65rem !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
}

/* 2. The Arabic + Translation Flashcard */
.q-word {
    display: inline-flex !important; /* flex for proper vertical stacking */
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    vertical-align: top !important;
    margin: 8px 6px !important;
    gap: 6px !important;
}

/* Arabic word box styling - Rounded like circley thingy */
.q-word .wbw-ar {
    display: block !important;
    border: 2px solid rgba(229, 179, 64, 0.8) !important;
    border-radius: 16px !important;
    padding: 12px 16px !important;
    background: rgba(20, 25, 35, 0.7) !important;
    text-align: center !important;
    font-size: 1.7em !important;
    line-height: 1.4 !important;
    color: var(--text) !important;
    min-width: 60px !important;
    font-family: var(--ar-font, Amiri, "Traditional Arabic", serif) !important;
    animation: wbwArabicGlow 3s ease-in-out infinite;
    transition: all 0.3s ease;
    white-space: nowrap !important;
}

@keyframes wbwArabicGlow {
    0%, 100% {
        border-color: rgba(121, 169, 255, 0.6);
        box-shadow: 0 0 0 0 rgba(121, 169, 255, 0.2);
    }
    50% {
        border-color: rgba(121, 169, 255, 1);
        box-shadow: 0 0 15px 3px rgba(121, 169, 255, 0.15);
    }
}

.q-word:hover .wbw-ar {
    transform: scale(1.02);
    background: rgba(30, 40, 55, 0.8) !important;
}

/* 3. The English/Bangla Meaning Box */
.q-word .wbw-meaning {
    direction: ltr !important; /* Keeps English punctuation on the correct side */
    display: block !important;
    white-space: normal !important; /* Forces long sentences to drop to the next line */
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    text-align: center !important;
    max-width: 120px !important; /* The exact width before it forces a wrap */
    min-width: 60px !important;
    height: auto !important; /* Lets the box grow taller if there's lots of text */
    min-height: 30px !important;
    padding: 5px 8px !important;
    background: rgba(20, 25, 35, 0.6) !important;
    border: 2px solid rgba(121, 169, 255, 0.5) !important;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: color-mix(in oklab, var(--muted) 82%, white 18%) !important;
    animation: wbwMeaningGlow 4s ease-in-out infinite;
    transition: all 0.3s ease;
    overflow: hidden !important;
}

@keyframes wbwMeaningGlow {
    0%, 100% {
        border-color: rgba(121, 169, 255, 0.4);
        box-shadow: 0 0 0 0 rgba(121, 169, 255, 0.1);
    }
    50% {
        border-color: rgba(121, 169, 255, 0.7);
        box-shadow: 0 0 10px 2px rgba(121, 169, 255, 0.1);
    }
}

.q-word:hover .wbw-meaning {
    background: rgba(30, 40, 55, 0.8) !important;
    transform: scale(1.02);
}

/* Grammar Mode Color Coding */
.arabic.arabic-inline .q-word.grammar-verb .wbw-ar {
    color: #ff4757 !important;
}

.arabic.arabic-inline .q-word.grammar-particle .wbw-ar {
    color: #ffd700 !important;
    font-weight: 600 !important;
}

.arabic.arabic-inline .q-word.grammar-particle {
    color: #ffd700 !important;
}

.arabic.arabic-inline .q-word.grammar-noun .wbw-ar {
    color: #00e5ff !important;
    font-weight: 600 !important;
}

.arabic.arabic-inline .q-word.grammar-noun {
    color: #00e5ff !important;
}

/* Tajweed Mode Color Coding */
.tajweed-nun-sakinah {
  color: #00e5ff !important;
}

.tajweed-madd {
  color: #ff4757 !important;
}

.tajweed-qalqalah {
  color: #ffd700 !important;
}

.tajweed-ghunnah {
  color: #ff6b9d !important;
}

.tajweed-sukun {
  color: #9b59b6 !important;
}

/* Grammar Mode Help Button */
.grammar-help-btn {
  margin-left: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(167, 200, 255, 0.35);
  background: rgba(10, 18, 36, 0.75);
  color: rgba(220, 234, 255, 0.95);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.grammar-help-btn:hover {
  background: rgba(36, 58, 98, 0.85);
  border-color: rgba(180, 210, 255, 0.55);
  color: #ffffff;
}

/* Grammar Legend */
.grammar-legend {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(10, 18, 36, 0.85);
  border: 1px solid rgba(167, 200, 255, 0.22);
  border-radius: 8px;
  display: none;
  gap: 16px;
  align-items: center;
}

.grammar-legend.visible {
  display: flex;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-color {
  font-size: 12px;
  font-weight: 700;
}

.legend-text {
  font-size: 12px;
  color: rgba(220, 234, 255, 0.95);
  font-weight: 500;
}

/* Daily Verse Modal */
.daily-verse-reference {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.daily-verse-arabic {
  font-family: var(--ar-font, Amiri, "Traditional Arabic", serif);
  font-size: 2rem;
  line-height: 2;
  text-align: center;
  direction: rtl;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.daily-verse-english {
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--muted);
}

.daily-verse-bangla {
  font-family: var(--bn-font);
  font-size: 1.05rem;
  line-height: 1.75;
  text-align: center;
  color: var(--muted);
}