


/* Light theme overrides */
body[data-theme="light"] {
  --bg: #f4f4f5;
  --bg-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.95);
  --accent: #16a34a;
  --accent-soft: rgba(22, 163, 74, 0.12);
  --accent-strong: #16a34a;
  --accent-alt: #0284c7;
  --text: #020617;
  --muted: #6b7280;
  --border-subtle: rgba(148, 163, 184, 0.45);
  --shadow-soft: 0 16px 32px rgba(15, 23, 42, 0.12);
  --blur: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.6), transparent 55%),
    radial-gradient(circle at top right, rgba(147, 51, 234, 0.5), transparent 55%),
    var(--bg);
  color: var(--text);
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

/* App layout */

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(var(--blur));
  padding-top: calc(0.9rem + var(--safe-top));
  background: linear-gradient(
    to right,
    rgba(15, 23, 42, 0.96),
    rgba(15, 23, 42, 0.85)
  );
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: calc(0.9rem + var(--safe-top));
  padding-bottom: 0.9rem;
}


.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #a855f7, #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #020617;
}

.brand-text h1 {
  margin: 0;
  font-size: 1.3rem;
}

.brand-text p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

body[data-theme="light"] .theme-toggle {
  background: rgba(255, 255, 255, 0.9);
}

/* Main layout */

.app-main {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* Sidebar */

.sidebar {
  width: 260px;
  border-right: 1px solid var(--border-subtle);
  padding: 1rem;
  background:
    radial-gradient(circle at bottom, rgba(79, 70, 229, 0.2), transparent 55%),
    rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(var(--blur));
}

body[data-theme="light"] .sidebar {
  background:
    radial-gradient(circle at bottom, rgba(56, 189, 248, 0.16), transparent 55%),
    rgba(255, 255, 255, 0.96);
}

.sidebar-title {
  margin: 0 0 0.4rem 0;
  font-size: 0.95rem;
}

.category-list {
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.category-pill {
  padding: 0.5rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.08s ease,
    box-shadow 0.18s ease;
}

body[data-theme="light"] .category-pill {
  background: rgba(255, 255, 255, 0.96);
}

.category-pill:hover {
  background: rgba(15, 118, 110, 0.6);
  border-color: rgba(45, 212, 191, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.5);
}

body[data-theme="light"] .category-pill:hover {
  background: rgba(234, 254, 255, 0.9);
}

.category-pill.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  border-color: transparent;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.6);
}

.category-name {
  font-weight: 500;
}

.category-count {
  font-size: 0.7rem;
  opacity: 0.9;
}

/* Content */

.content {
  flex: 1;
  padding: 1rem 1.25rem 5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.content-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.category-description {
  margin: 0.2rem 0 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Songs panel */

.songs-panel {
  border-radius: 0.9rem;
  border: 1px solid var(--border-subtle);
  padding: 0.9rem;
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.25), transparent 60%),
    var(--bg-card);
  box-shadow: var(--shadow-soft);
}

.songs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.songs-header-left h3 {
  margin: 0;
  font-size: 0.95rem;
}

.songs-count {
  font-size: 0.75rem;
  color: var(--muted);
}

.song-search {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text);
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  min-width: 180px;
}

body[data-theme="light"] .song-search {
  background: rgba(255, 255, 255, 0.96);
}

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

.songs-list {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 0.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.song-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.8fr) auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.45rem 0.6rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.08s ease,
    box-shadow 0.15s ease;
}

body[data-theme="light"] .song-row {
  background: rgba(255, 255, 255, 0.97);
}

.song-row:hover {
  background: rgba(22, 163, 74, 0.45);
  border-color: rgba(74, 222, 128, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.7);
}

body[data-theme="light"] .song-row:hover {
  background: rgba(220, 252, 231, 0.95);
}

.song-row.active {
  background: var(--accent-soft);
  border-color: var(--accent-strong);
}

.song-title {
  font-size: 0.88rem;
  font-weight: 500;
}

.song-artist {
  font-size: 0.76rem;
  color: var(--muted);
}

.song-meta {
  font-size: 0.7rem;
  text-align: right;
  color: var(--muted);
}

.placeholder-text {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Player bar */

.player-bar {
  position: sticky;
  bottom: 0;
  width: 100%;
  border-top: 1px solid var(--border-subtle);
  padding: 0.55rem 1rem;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.96)
  );
  display: flex;
  align-items: center;
  gap: 1rem;
  backdrop-filter: blur(var(--blur));
}

body[data-theme="light"] .player-bar {
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.98),
    rgba(248, 250, 252, 0.96)
  );
}

.player-info {
  min-width: 0;
  flex: 0 0 200px;
}

.now-playing-title {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-artist {
  font-size: 0.75rem;
  color: var(--muted);
}

.player-controls {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.control-button {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #022c22;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.65);
}

.control-button:disabled {
  opacity: 0.4;
  cursor: default;
  box-shadow: none;
}

.player-timeline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

#seekBar {
  flex: 1;
  accent-color: var(--accent);
}

.time-label {
  font-size: 0.7re
}


.brand-text h1 {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.04em;
}

.brand-full-logo {
  height: 70px;
  width: auto;
  display: block;
}

.now-playing-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.eq-visual {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 18px;
  height: 12px;
}

.eq-bar {
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.75;
  transform-origin: bottom;
  animation: eqBounce 0.7s infinite ease-in-out;
}

/* Bar-specific delays */
.eq-bar:nth-child(1) {
  animation-delay: 0s;
}
.eq-bar:nth-child(2) {
  animation-delay: 0.18s;
}
.eq-bar:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes eqBounce {
  0% {
    height: 20%;
  }
  25% {
    height: 100%;
  }
  50% {
    height: 45%;
  }
  75% {
    height: 80%;
  }
  100% {
    height: 25%;
  }
}

/* When paused, we’ll add a class to stop animation */
.eq-paused .eq-bar {
  animation-play-state: paused;
  height: 25%;
}


:root {
  --bg: #020617;
  --bg-elevated: #020617;
  --bg-card: rgba(3, 7, 18, 0.96);
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.15);
  --accent-strong: #22c55e;
  --accent-alt: #22c55e;
  --text: #f9fafb;
  --muted: #9ca3af;
  --border-subtle: rgba(34, 197, 94, 0.3);
  --shadow-soft: 0 20px 45px rgba(0, 0, 0, 0.75);
  --blur: 18px;
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);
  --safe-right: env(safe-area-inset-right);
  --safe-top: env(safe-area-inset-top);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34,197,94,0.3), transparent 55%),
    radial-gradient(circle at bottom right, rgba(22,163,74,0.35), transparent 55%),
    var(--bg);
  color: var(--text);
  transition:
    background 0.3s ease,
    color 0.3s ease;
    padding-bottom: 100px;
}

/* --- Prevent horizontal overflow on mobile --- */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* --- Mobile layout fixes (iPhone 12 etc.) --- */
@media (max-width: 480px) {
  /* Main layout: stack sidebar above content */
  .app-main {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .content {
    padding: 0.75rem 0.9rem 4.5rem 0.9rem; /* leave room for player bar */
  }

  /* Songs panel: full width */
  .songs-panel {
    width: 100%;
    margin: 0.75rem 0 0 0;
    box-sizing: border-box;
  }

  .songs-list {
    max-height: 50vh; /* keep it from running into the player */
  }

  /* Category chips: stretch nicely */
  .category-pill {
    width: 100%;
    justify-content: space-between;
  }

  /* Player bar: stack vertically so nothing overflows */
  .player-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
  }

  .player-info {
    flex: 0 0 auto;
  }

  .player-controls {
    width: 100%;
  }

  .player-timeline {
    width: 100%;
  }

  /* Optional: slightly smaller time labels on tiny screens */
  .time-label {
    font-size: 0.65rem;
  }
}

:root {
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
}

.main-category-label {
  margin: 0.45rem 0 0.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

/* Optional: indent sub-category chips a bit */
.category-pill {
  margin-left: 0.35rem;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  padding: 12px;
}

.symbol-card {
  background: var(--cardBg);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  text-align: center;
  box-shadow: var(--cardShadow);
  transition: 0.2s;
}

.symbol-card:hover {
  transform: scale(1.03);
}

.symbol-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.symbol-label {
  margin-top: 6px;
  font-size: 0.85rem;
  opacity: 0.8;
}

.symbol-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.symbol-modal.open {
  display: flex;
}

.symbol-modal-content {
  background: #0b1220;
  color: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
}

.symbol-modal-image {
  max-width: 180px;
  display: block;
  margin: 0 auto 16px;
}

.symbol-modal-close {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 20px;
  position: absolute;
  top: 16px;
  right: 20px;
  cursor: pointer;
}

/* -------------------------------------------------
   PREMIUM JAINISTRY PAGINATION BAR (Glass + Glow)
--------------------------------------------------- */

.pager-container {
  margin-top: 18px;
  padding: 16px 22px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;

  background: linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.25),
      rgba(200, 210, 225, 0.08)
    ),
    linear-gradient(135deg, #0f172a, #1e293b);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border-radius: 35px;

  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    0 12px 35px rgba(15, 23, 42, 0.45),
    inset 0 0 12px rgba(255, 255, 255, 0.15);
}

/* LEFT INFO TEXT */
.pager-info {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;

  background: linear-gradient(to right, #cce0ff, #d8dde8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  user-select: none;
  white-space: nowrap;
}

/* RIGHT CONTROL AREA */
.pager-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* BUTTON BASE STYLE */
.pager-btn {
  border: none;
  outline: none;
  cursor: pointer;

  padding: 10px 14px;
  border-radius: 50px;

  font-size: 0.85rem;
  font-weight: 600;

  background: radial-gradient(circle at 30% 30%, #1f2937, #0f172a);
  color: #e5e7eb;

  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.4),
    inset 0 0 6px rgba(255, 255, 255, 0.05);

  transition: all 0.2s ease;
  min-width: 40px;
}

/* On hover → lift + shine */
.pager-btn:not(:disabled):hover {
  transform: translateY(-2px);
  background: radial-gradient(circle at 20% 20%, #273449, #111827);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.55),
    0 0 10px rgba(255, 255, 255, 0.08);
}

/* Disabled buttons */
.pager-btn:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}

/* PAGE NUMBER BUTTONS */
.pager-page {
  background: radial-gradient(circle at 30% 30%, #1e2532, #0e121a);
}

/* ACTIVE PAGE (Saffron glow Jainistry theme) */
.pager-page.active {
  background: linear-gradient(135deg, #ff9900, #ffcb47);
  color: #111;

  box-shadow:
    0 6px 16px rgba(255, 153, 0, 0.55),
    0 0 12px rgba(255, 184, 51, 0.9);

  border: 1px solid rgba(255, 225, 150, 0.9);
}

/* ARROW BUTTONS */
.pager-arrow {
  font-size: 1rem;
  padding: 10px 14px;
}

/* Ellipsis (…) */
.pager-ellipsis {
  color: #94a3b8;
  font-size: 1.2rem;
  padding: 0 4px;
  user-select: none;
}

/* -------------------------------------------------------
   TIRTHANKAR GRID
-------------------------------------------------------- */

.tirthankar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(140px,1fr));
  gap: 20px;
  padding: 20px;
}

.tirthankar-card {
  background: var(--card-bg);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform .2s;
}

.tirthankar-card:hover {
  transform: translateY(-4px);
}

.tirthankar-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.tirthankar-name {
  padding: 10px;
  font-weight: 600;
  text-align: center;
}

/* -------------------------------------------------------
   FULL PAGE TIRTHANKAR VIEW
-------------------------------------------------------- */

.tirthankar-page {
  padding: 20px;
  animation: fadeIn .3s ease;
}

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

.tp-back {
  font-size: 1rem;
  padding: 8px 16px;
  border-radius: 30px;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  margin-bottom: 20px;
}

.tp-header {
  text-align: center;
}

.tp-portrait {
  width: 60%;
  max-width: 300px;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.tp-name {
  margin-top: 15px;
  font-size: 1.8rem;
  font-weight: 700;
}

/* Lanchan */

.tp-lanchan-box {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 25px 0;
}

.tp-lanchan-img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.tp-lanchan {
  font-size: 1.2rem;
  font-weight: 600;
}

/* Details */

.tp-details {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  gap: 12px;
  background: var(--glass);
  padding: 15px;
  border-radius: 15px;
  box-shadow: var(--shadow-soft);
}

.tp-details label {
  font-weight: 600;
  color: var(--accent);
}

/* Kalyanak */

.tp-k-title {
  margin-top: 30px;
  margin-bottom: 10px;
  font-size: 1.4rem;
  font-weight: 700;
}

.tp-kalyanak {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  gap: 10px;
  background: var(--glass);
  padding: 15px;
  border-radius: 15px;
}

/* Pagination */

.tp-pagination {
  margin-top: 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.tp-pagination button {
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: var(--glass2);
}

.tp-page-btn.active {
  background: var(--accent);
  color: white;
}

/* -------- Tirthankar full page ---------- */

.tirthankar-page {
  padding: 2rem 2.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.tp-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.tp-top-title {
  font-size: 0.9rem;
  opacity: 0.8;
}

.tp-back {
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-size: 0.9rem;
  cursor: pointer;
  background: linear-gradient(135deg, #35c759, #22a84b);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.tp-back:disabled {
  opacity: 0.5;
  cursor: default;
}

.tp-layout {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 2rem;
  align-items: flex-start;
}

/* Generic card */

.tp-card {
  border-radius: 24px;
  padding: 1.5rem 1.75rem;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.75));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(120, 255, 160, 0.25);
}

/* LEFT COLUMN */

.tp-main-card {
  text-align: center;
}

.tp-rank {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.tp-portrait {
  width: 220px;
  height: 220px;
  border-radius: 30px;
  object-fit: cover;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  margin-bottom: 1rem;
}

.tp-name {
  font-size: 1.4rem;
  margin: 0 0 1rem;
}

.tp-emblem-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
}

.tp-lanchan-img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.25rem;
}

.tp-emblem-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.7;
}

.tp-emblem-name {
  font-weight: 600;
}

/* Panch Kalyanak */

.tp-kalyanak-card {
  margin-top: 1.2rem;
}

.tp-section-title {
  margin: 0 0 0.9rem;
  font-size: 1rem;
}

.tp-kalyanak-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
}

.tp-k-card {
  padding: 0.6rem 0.7rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.55);
}

.tp-k-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.75;
}

.tp-k-value {
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* RIGHT COLUMN – facts table */

.tp-facts-card {
  width: 100%;
}

.tp-facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1.2rem;
}

.tp-fact-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 0.4rem;
  align-items: flex-start;
}

.tp-fact-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.7;
}

.tp-fact-value {
  font-size: 0.9rem;
}

/* Pagination */

.tp-pagination-card {
  margin-top: 1.25rem;
}

.tp-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tp-pagination > button {
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  background: rgba(80, 255, 150, 0.16);
}

.tp-pagination > button:disabled {
  opacity: 0.4;
  cursor: default;
}

.tp-page-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  flex: 1;
}

.tp-page-btn {
  border-radius: 999px;
  border: none;
  padding: 0.25rem 0.55rem;
  font-size: 0.8rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
}

.tp-page-btn.active {
  background: linear-gradient(135deg, #34c759, #2ecc71);
  color: #000;
}

#audioPlayerBar {
  display: none !important;
}

/* Responsive */

@media (max-width: 900px) {
  .tirthankar-page {
    padding: 1.2rem 1rem 2rem;
  }

  .tp-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .tp-facts-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tp-kalyanak-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------------------------------------------------
   PREMIUM DEVOTIONAL PLAYER (Glass + Glow + Waves)
--------------------------------------------------- */

.dev-player {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 96%);
  padding: 14px 20px;
  border-radius: 22px 22px 0 0;
  background: rgba(20, 20, 30, 0.65);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 -8px 35px rgba(0,0,0,0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  z-index: 99999;
}

/* Hide by default */
.dev-player.hidden {
  display: none !important;
}

/* LEFT SIDE: Thumbnail + Title */
.dev-player-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 160px;
}

.dev-thumb {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.dev-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.glow-circle {
  box-shadow:
    0 0 14px rgba(255,220,120,0.35),
    0 0 28px rgba(255,150,60,0.25);
}

.dev-meta {
  display: flex;
  flex-direction: column;
}

.dev-title {
  font-size: 15px;
  font-weight: 600;
}

.dev-subtitle {
  font-size: 12px;
  opacity: 0.75;
}

/* CENTER: Controls + Seek */
.dev-player-center {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.dev-btn {
  border: none;
  background: radial-gradient(circle, #ffd77a, #d39b22);
  color: #000;
  font-size: 15px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(255,215,0,0.5);
}

.dev-seek {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  cursor: pointer;
  background: rgba(255,255,255,0.25);
}

.dev-time {
  display: flex;
  gap: 6px;
  font-size: 11px;
  opacity: 0.8;
}

/* RIGHT SIDE: Animated Sound Waves */
.soundwaves {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 20px;
}

.soundwaves span {
  width: 3px;
  height: 6px;
  background: #ffd87f;
  border-radius: 2px;
  animation: wave 1.2s infinite ease-in-out;
  opacity: 0.9;
}

.soundwaves span:nth-child(2) { animation-delay: .2s; }
.soundwaves span:nth-child(3) { animation-delay: .4s; }
.soundwaves span:nth-child(4) { animation-delay: .6s; }

@keyframes wave {
  0% { height: 4px; }
  50% { height: 18px; }
  100% { height: 4px; }
}

/* LIGHT THEME */
body[data-theme="light"] .dev-player {
  background: rgba(255,255,255,0.75);
  color: #222;
}

body[data-theme="light"] .dev-btn {
  background: radial-gradient(circle, #ffe38f, #e3b125);
  color: #000;
}

.pagination-controls {
  margin: 20px auto;
  display: flex;
  justify-content: center;
  gap: 20px;
  align-items: center;
  padding: 10px 0;
}

.page-btn {
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: 0.2s;
}

.page-btn:hover:not([disabled]) {
  background: rgba(255,255,255,0.25);
}

.page-btn[disabled] {
  opacity: 0.35;
  cursor: default;
}

.page-indicator {
  color: #ffd77b;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

body[data-theme="light"] .page-btn {
  background: #f0f0f0;
  color: #222;
  border-color: #ccc;
}

body[data-theme="light"] .page-indicator {
  color: #aa7b00;
}

input[type="range"] {
  touch-action: pan-y;
}
