

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


body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
}
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-strong, #f8fafc);
}
h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.25;
   font-weight: 600;
    letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  line-height: 1.3;
}

h3 {
  font-size: 1.1rem;
  line-height: 1.35;
}

h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}


/* App layout */

.app {
  height: 100%;
  display: flex;
  flex-direction: column;
}
p {
  line-height: 1.6;
  opacity: 0.88;
}

.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);
}

/* Sidebar */

.sidebar {
  width: 260px;
  background: linear-gradient(
    180deg,
    rgba(20, 24, 36, 0.98),
    rgba(10, 12, 20, 0.98)
  );
  backdrop-filter: blur(12px);
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 18px 14px 24px;
}


.sidebar-header {
  flex-shrink: 0;
}

.sidebar-content,
#categoryList {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 24px;
  -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
}


.sidebar-title {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
  margin: 12px 10px 16px;
}

.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;
}

.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);
}

.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-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;
}

.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;
}

.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);
}

.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 */



body.has-player {
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

.player-info {
  min-width: 0;
}

.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 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.control-btn {
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.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;
}

.control-btn.secondary:disabled {
  opacity: 0.3;
}

.control-btn.primary {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1db954; /* Spotify green */
  color: #000;
  font-size: 1.4rem;
  box-shadow: 0 8px 24px rgba(29,185,84,0.35);
}

.control-btn.secondary {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
}

.control-btn:active {
  transform: scale(0.94);
}

.player-timeline {
  flex: 1;
  min-width: 120px;
}

#seekBar {
  flex: 1 1 auto;
  min-width: 50px;  /* prevent disappearing on Samsung */
  height: 4px;
}

.time-label {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 0.75rem;
}


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

.brand-full-logo {
  height: 44px;          /* was likely ~32px */
  width: auto;
  max-height: 44px;
  transition: height 0.2s ease;
}

/* Keep header vertically aligned */
.app-header {
  display: flex;
  align-items: center;
}



.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%;
}


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: 110px;
}

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

/* --- Mobile layout fixes (iPhone 12 etc.) --- */

:root {
  --safe-bottom: env(safe-area-inset-bottom);
   --app-header-height: 64px;
     --bottom-nav-height: 56px;
     --player-height: 64px;
}

.main-category-label {
  position: sticky;
  top: 0;
  background: var(--sidebar-bg, #0f0f0f);
  z-index: 2;
  padding: 8px 12px;
  font-weight: 600;
}

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


.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 28px;
  padding: 24px;
}

.symbol-card {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.05),
    rgba(255,255,255,0.02)
  );

  border-radius: 16px;
  padding: 18px 16px 16px;
  text-align: center;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.symbol-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(0,0,0,0.35);
}

.symbol-image {
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin-bottom: 14px;
}

.symbol-label {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: capitalize;
  color: rgba(255,255,255,0.85);
}

.symbol-card:hover .symbol-label {
  color: #e6c46b; /* temple gold */
}

@media (min-width: 1200px) {
  .image-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .symbol-image {
    width: 108px;
    height: 108px;
  }
}
.cw-cell.blocked {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.06),
    rgba(0, 0, 0, 0.25)
  );
  border-radius: 8px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 -2px 4px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}




.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-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; }
}

.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;
}

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

.hidden {
  display: none !important;
}

/* Hamburger button (hidden on desktop) */
.menu-toggle-btn {
  display: none;
  font-size: 1.45rem;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
}

/* Premium slide sidebar */
@media (max-width: 820px) {

  .menu-toggle-btn {
    display: block;
  }

  .sidebar.open {
    left: 0;
  }

  /* When menu is open, dark overlay */
  .sidebar-overlay {
    display: none;
  }

  .sidebar-overlay.active {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9998;
  }

  /* Remove sidebar from flow */
  .app-main {
    margin-left: 0 !important;
     margin-top: var(--header-height);
      display: flex;
  }
}

body.audio-visible {
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
}

html, body {
  padding-bottom: env(safe-area-inset-bottom);
  background-color: var(--bg);
  max-width: 100%;
  overflow-x: hidden;
  height: 100%;
    overflow: hidden;
}

@supports (-webkit-touch-callout: none) {
  #seekBar {
    margin-bottom: 6px; /* lifts it slightly so it doesn’t clip */
  }
}


.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Logo icon */
.brand-logo-icon {
  height: 44px;
  width: auto;
  flex-shrink: 0;
}

/* Jainistry text */
/* ===============================
   PREMIUM BRAND TEXT – JAINISTRY
================================ */

.brand-text {
  font-family: "Poppins", "Inter", system-ui, sans-serif;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.12em;      /* premium spacing */
  text-transform: uppercase;
  white-space: nowrap;

  /* Soft gold gradient */
  background: linear-gradient(
    135deg,
    #f6e7b2 0%,
    #e3c76f 35%,
    #c9a44a 65%,
    #f4e1a1 100%
  );

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

  /* Gentle glow */
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.25),
    0 0 8px rgba(227, 199, 111, 0.25);
}



@media (min-width: 821px) {
  .brand-text {
    font-size: 1.75rem;
    letter-spacing: 0.16em;
  }
}

/* ===============================
   SYMBOL DETAILS – PREMIUM
================================ */

.symbol-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #ffffff;
  text-align: center;
}

.symbol-meaning,
.symbol-history {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.symbol-card .symbol-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #cfd8dc;
  margin-top: 6px;

  display: -webkit-box;
  -webkit-line-clamp: 3;     /* preview */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===============================
   SYMBOL GRID CARDS
================================ */

.symbol-card {
  background: linear-gradient(180deg, #0c1f33, #08131f);
  border-radius: 18px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.symbol-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.5);
}

.symbol-card img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin-bottom: 12px;
}

.symbol-title {
  font-size: 16px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 6px;
}

/* Preview text */
.symbol-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #cbd5e1;
  margin-bottom: 8px;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* View details button */
.symbol-more-btn {
  background: none;
  border: none;
  color: #7dd3fc;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.symbol-more-btn:hover {
  text-decoration: underline;
}

/* ===============================
   MODAL
================================ */

.symbol-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.symbol-modal.hidden {
  display: none;
}

.symbol-modal-content {
  position: relative;
  background: linear-gradient(180deg, #0b1f32, #07131f);
  border-radius: 20px;
  padding: 26px;
  width: 90%;
  max-width: 560px;
  max-height: 80vh;
  overflow-y: auto;
  color: #e5e7eb;
  box-shadow: 0 25px 70px rgba(0,0,0,0.7);
}

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

.symbol-modal-content h2 {
  text-align: center;
  margin-bottom: 16px;
}

.modal-section {
  margin-bottom: 14px;
}

.modal-section h4 {
  font-size: 14px;
  color: #93c5fd;
  margin-bottom: 4px;
}

.modal-section p {
  font-size: 14px;
  line-height: 1.6;
  color: #d1d5db;
}

/* Close button */
.close-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 22px;
  cursor: pointer;
}

.close-btn:hover {
  color: #fff;
}


/* ================= SYMBOL GRID ================= */

.symbol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
}

.symbol-card {
  background: var(--panel);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

.symbol-image {
  width: 100%;
  height: 120px;
  object-fit: contain;
  margin-bottom: 10px;
}

.symbol-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.symbol-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

/* ================= MODAL ================= */

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

.symbol-modal.hidden {
  display: none;
}

.symbol-modal-card {
  background: var(--panel);
  max-width: 640px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  border-radius: 18px;
  position: relative;
}

.symbol-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.modal-image {
  width: 100%;
  height: 200px;
  object-fit: contain;
  margin-bottom: 16px;
}

.modal-section {
  margin-top: 16px;
}


/* CLOSE BUTTON – ALWAYS VISIBLE */
.symbol-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;

  width: 36px;
  height: 36px;
  border-radius: 50%;

  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.2);

  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
  line-height: 1;

  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.symbol-close:hover {
  background: rgba(255,255,255,0.15);
}

/* ===============================
   QUIZ CONTAINER
================================ */
.quiz-container {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

/* ===============================
   QUIZ CARD
================================ */
.quiz-card {
  width: 100%;
  max-width: 738px;
  background: #0b1220;
  border-radius: 20px;
  padding: 20px;
  border: 1px solid rgba(255,215,140,.3);
  box-shadow: 0 20px 50px rgba(0,0,0,.6);
}

/* ===============================
   TOP BAR
================================ */
.quiz-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.quiz-meta {
  font-size: .75rem;
  color: #ffcc66;
}

.quiz-meta.gold {
  color: #ffd86b;
}

/* ===============================
   LADDER (AUTO RESPONSIVE)
================================ */
.quiz-ladder {
  display: grid;
  grid-auto-flow: column;
  gap: 8px;
  margin: 12px 0;
  overflow: hidden;
}

.ladder-item {
  min-width: 70px;
  padding: 8px;
  text-align: center;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: #aaa;
  font-size: .75rem;
}

.ladder-item.active {
  background: linear-gradient(135deg,#ffb703,#ffd166);
  color: #111;
  font-weight: 700;
}

/* ===============================
   QUESTION
================================ */
.quiz-question {
  margin: 16px 0;
  padding: 14px;
  text-align: center;
  background: rgba(255,255,255,.06);
  border-radius: 14px;
}

/* ===============================
   OPTIONS
================================ */
.quiz-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.quiz-option {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  cursor: pointer;
}

/* ===============================
   LIFELINES
================================ */
.quiz-lifelines {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.quiz-lifelines button {
  padding: 10px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffd86b;
  border: 1px solid rgba(255,215,140,.4);
}

/* ===============================
   DESKTOP ENHANCEMENTS
================================ */
/* =====================================================
   QUIZ MODE – DESKTOP FIX (FINAL)
===================================================== */

.quiz-mode {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.quiz-mode #songsList.quiz-container {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: none;
  padding: 40px 24px;
}

/* Center the quiz card */
.quiz-mode .quiz-card {
  margin: 0 auto;
}

/* ---------- DESKTOP ONLY ---------- */
@media (min-width: 900px) {

  /* Kill songs grid influence */
  .quiz-mode {
    grid-template-columns: 1fr !important;
  }

  /* Keep ladder INSIDE card */
  .quiz-mode .quiz-ladder {
    position: static;
    flex-direction: column;
    width: 120px;
    margin-left: 24px;
  }

  /* Two-column layout INSIDE the card */
  .quiz-mode .quiz-card {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 28px;
  }

  /* Question + options stay left */
  .quiz-mode .quiz-question,
  .quiz-mode .quiz-options,
  .quiz-mode .quiz-lifelines,
  .quiz-mode .quiz-feedback,
  .quiz-mode .quiz-divider {
    grid-column: 1;
  }

  /* Ladder stays right */
  .quiz-mode .quiz-ladder {
    grid-column: 2;
    align-self: center;
  }
}

/* =====================================================
   MOBILE QUIZ FIX (FINAL)
===================================================== */

@media (max-width: 899px) {

  /* Kill desktop grid completely */
  .quiz-mode .quiz-card {
    display: block;
  }

  /* Compact vertical spacing */
  .quiz-mode #songsList.quiz-container {
    padding: 16px 12px 24px;
  }

  /* Reduce card height feeling */
  .quiz-card {
    padding: 16px;
  }

  /* Ladder stays horizontal & tight */
  .quiz-ladder {
    margin: 10px 0 14px;
    padding-bottom: 4px;
    gap: 6px;
  }

  .ladder-item {
    min-width: 60px;
    padding: 6px 4px;
    font-size: 0.7rem;
  }

  /* Reduce empty bottom feel */
  .quiz-lifelines {
    margin-top: 14px;
  }

  .quiz-feedback {
    margin-top: 10px;
  }
}
/* ======================================
   QUIZ OPTION RESULT STATES (FINAL)
====================================== */

/* Selected (before answer reveal) */
.quiz-option.selected {
  border: 2px solid #6366f1;
  background: rgba(99, 102, 241, 0.18);
}

/* ✅ Correct answer */
.quiz-option.correct {
  border: 2px solid #22c55e !important;
  background: rgba(34, 197, 94, 0.28) !important;
  color: #ecfdf5;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.55);
}

/* ❌ Wrong answer */
.quiz-option.wrong {
  border: 2px solid #ef4444 !important;
  background: rgba(239, 68, 68, 0.28) !important;
  color: #fee2e2;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.55);
}

/* Lock options after answer */
.quiz-option.disabled {
  pointer-events: none;
  opacity: 0.9;
}

.quiz-option.correct,
.quiz-option.wrong {
  animation: resultPop 0.35s ease;
}

@keyframes resultPop {
  0% { transform: scale(0.98); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
.quiz-lifelines button.used {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.quiz-lifelines button.used::after {
  content: "✖";
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #b91c1c;
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-lifelines button {
  position: relative;
}

@media (max-width: 820px) {
  .quiz-mode,
  .quiz-mode * {
    box-sizing: border-box;
  }

  .quiz-card {
    display: flex !important;
    flex-direction: column !important;
    width: 100%;
    max-width: 100%;
  }
}


@media (max-width: 820px) {
  .quiz-ladder {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;

    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .ladder-item {
    min-width: 64px;
    scroll-snap-align: center;
    font-size: 0.7rem;
  }
}

@media (max-width: 820px) {
  .quiz-option {
    padding: 16px;
    font-size: 0.95rem;
    border-radius: 14px;
    touch-action: manipulation;
  }

  .quiz-option.correct {
    background: rgba(34,197,94,.25);
    border-color: #22c55e;
  }

  .quiz-option.wrong {
    background: rgba(239,68,68,.25);
    border-color: #ef4444;
  }
}

.quiz-mode .songs-list,
.quiz-mode .songs-panel {
  max-width: none !important;
  padding: 0 !important;
}

.quiz-container {
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

@media (min-width: 900px) {
  #songsList.quiz-mode .quiz-card {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 28px;
  }

  #songsList.quiz-mode .quiz-ladder {
    grid-column: 2;
    align-self: center;
  }
}

@media (max-width: 899px) {

  #songsList.quiz-mode {
    padding: 0;
    width: 100%;
  }

  #songsList.quiz-mode .quiz-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    padding: 16px;
  }

  #songsList.quiz-mode .quiz-ladder {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  #songsList.quiz-mode .ladder-item {
    min-width: 64px;
    scroll-snap-align: center;
    font-size: 0.7rem;
  }

  #songsList.quiz-mode .quiz-option {
    padding: 16px;
    font-size: 0.95rem;
    border-radius: 14px;
    touch-action: manipulation;
  }
}

/* =====================================================
   QUIZ – DEVICE SAFE VISIBILITY RULES (FINAL)
===================================================== */

/* Mobile progress hidden by default */
.quiz-progress-mobile {
  display: none;
}

/* -----------------------
   MOBILE (<900px)
----------------------- */
@media (max-width: 899px) {

  /* Hide ladder completely */
  .quiz-ladder {
    display: none !important;
  }

  /* Show mobile progress */
  .quiz-progress-mobile {
    display: block;
    margin: 12px 0 18px;
  }

  .quiz-progress-mobile .progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffd86b;
    margin-bottom: 6px;
  }

  .quiz-progress-mobile .progress-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.15);
    overflow: hidden;
  }

  #quizProgressFill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffb703, #ffd166);
    transition: width 0.45s ease;
  }
}

/* -----------------------
   DESKTOP (≥900px)
----------------------- */
@media (min-width: 900px) {

  /* Hide mobile progress */
  .quiz-progress-mobile {
    display: none !important;
  }

  /* Ladder stays as-is */
  .quiz-ladder {
    display: grid;
  }
}

/* =====================================================
   QUIZ – LIGHT MODE FIX (FINAL)
===================================================== */

/* ---------- DEFAULT (DARK MODE) ---------- */
body[data-theme="dark"] .quiz-card {
  background: #0b1220;
  color: #f8fafc;
  box-shadow: 0 20px 50px rgba(0,0,0,.6);
  border: 1px solid rgba(255,215,140,.3);
}

/* ===============================
   AUDIENCE POLL BAR (FINAL FIX)
================================ */

.quiz-option {
  position: relative;
  overflow: hidden;
}

/* The animated poll bar */
.quiz-option .poll-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 215, 140, 0.25),
    rgba(255, 215, 140, 0.45)
  );
  z-index: 0;
  transition: width 0.6s ease;
}

/* Percentage text */
.quiz-option .poll-bar span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: #ffd86b;
  font-size: 0.85rem;
}

/* Keep option text above bar */
.quiz-option {
  z-index: 1;
}

.quiz-option > * {
  position: relative;
  z-index: 2;
}

.quiz-settings {
  margin: 10px 0;
  display: flex;
  justify-content: flex-end;
}

.quiz-settings.hidden {
  display: none;
}

.quiz-toggle {
  font-size: 0.8rem;
  color: #ffd86b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quiz-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
}

.quiz-explanation {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.quiz-explanation.correct {
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.4);
}

.quiz-explanation.wrong {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.4);
}

.quiz-next-btn {
  margin-top: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  background: linear-gradient(135deg,#ffb703,#ffd166);
  color: #111;
  cursor: pointer;
}

.quiz-restart-btn { margin-top: 20px; padding: 12px 24px; border-radius: 12px; border: none; font-size: 1rem; background: linear-gradient(135deg, #22c55e, #16a34a); color: white; cursor: pointer; }

/* ===============================
   QUIZ EXPLANATION (PREMIUM)
================================ */

.quiz-explanation {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;

  background: linear-gradient(
    145deg,
    rgba(255, 215, 140, 0.08),
    rgba(15, 23, 42, 0.9)
  );

  border: 1px solid rgba(255, 215, 140, 0.35);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 14px 30px rgba(0, 0, 0, 0.45);

  color: #e5e7eb;
  font-size: 0.95rem;
  line-height: 1.55;

  animation: explanationFadeIn 0.35s ease;
}

/* Header */
.explanation-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.explanation-icon {
  font-size: 1.1rem;
}

.explanation-title {
  font-weight: 600;
  color: #ffd86b;
  letter-spacing: 0.3px;
}

/* Text */
.explanation-text {
  color: #e5e7eb;
  opacity: 0.95;
}

/* Hidden state */
.quiz-explanation.hidden {
  display: none;
}


@media (max-width: 820px) {
  .quiz-explanation {
    padding: 14px 14px;
    font-size: 0.92rem;
    border-radius: 14px;
  }
}
/* =========================================
   PREMIUM BOTTOM LIFELINE BAR
========================================= */

.quiz-lifeline-bar {
  position: sticky;
  bottom: calc(56px + env(safe-area-inset-bottom)); /* above player bar */
  z-index: 30;

  display: flex;
  justify-content: space-between;
  gap: 10px;

  padding: 10px 14px;
  margin-top: 18px;

  background: linear-gradient(
    180deg,
    rgba(15,23,42,0.85),
    rgba(2,6,23,0.95)
  );

  backdrop-filter: blur(12px);
  border-radius: 16px;

  border: 1px solid rgba(255,215,140,0.35);
  box-shadow:
    0 12px 28px rgba(0,0,0,0.6),
    inset 0 0 10px rgba(255,215,140,0.15);
}

/* Individual lifeline button */
.lifeline-btn {
  flex: 1;
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 10px 6px;
  border-radius: 999px;

  background: radial-gradient(
    circle at top,
    #1f2937,
    #0f172a
  );

  border: 1px solid rgba(255,215,140,0.4);
  color: #ffd86b;

  font-weight: 700;
  font-size: 0.75rem;

  cursor: pointer;
  transition: all 0.25s ease;
}

/* Icon */
.lifeline-btn .ll-icon {
  font-size: 1.05rem;
  line-height: 1;
}

/* Label (hidden on very small screens) */
.lifeline-btn .ll-label {
  margin-top: 4px;
  font-size: 0.65rem;
  opacity: 0.85;
}

/* Hover (desktop) */
@media (hover: hover) {
  .lifeline-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #ffb703, #ffd166);
    color: #111;
    box-shadow: 0 10px 26px rgba(255,183,3,0.6);
  }
}

/* USED lifeline */
.lifeline-btn.used {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(1);
}

/* Cross mark */
.lifeline-btn.used::after {
  content: "✖";
  position: absolute;
  top: -6px;
  right: -6px;

  width: 18px;
  height: 18px;
  border-radius: 50%;

  background: #b91c1c;
  color: #fff;
  font-size: 11px;

  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 600px) {

  .app-main {
    padding-bottom: 140px; /* space for nav + player */
  }

  .player-bar {
    bottom: 64px; /* sit above bottom nav */
  }
}
@media (max-width: 600px) {

  .app-main {
    background:
      radial-gradient(
        circle at top center,
        rgba(255,255,255,0.05) 0%,
        rgba(0,0,0,0.92) 60%
      );
  }
}


/* ===============================
   QUIZ SETTINGS – SILENT MODE
================================ */


.quiz-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.quiz-toggle input {
  accent-color: #ffd86b;
  cursor: pointer;
}

.quiz-toggle span {
  opacity: 0.85;
}

@media (hover: hover) {
  .quiz-toggle:hover span {
    opacity: 1;
  }
}

.samayik-lang-toggle {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 6px 0 8px;
}

.samayik-lang-toggle button {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  color: #f5e6b0;
  opacity: 0.7;
}

.samayik-lang-toggle button.active {
  opacity: 1;
  background: rgba(255,215,120,0.25);
}


/* Optional global calm mode */
body.silent-mode * {
  animation: none !important;
  transition: none !important;
}

/* ===============================
   VIRTUAL TEMPLE (INLINE MODE)
================================ */

.temple-container {
  padding: 30px;
  height: calc(100vh - 160px);
  scroll-behavior: smooth;
}

.bells {
  position: absolute;
  top: 10px;
  display: flex;
  gap: 18px;
  visibility: hidden;
  pointer-events: none;
}

.bells.active {
  visibility: visible;
}

.temple-actions,
.jainistry-bell-wrapper {
  overflow: visible;
}

.bells.left {
  left: calc(50% - 190px);   /* adjust once and DONE */
}

.bells.right {
  right: calc(50% - 190px);
}

.bell {
  width: 26px;
  height: 34px;
  background: radial-gradient(circle at 30% 30%, #ffd966, #b8860b);
  border-radius: 0 0 50% 50%;
  transform-origin: top center;
  position: relative;
  animation-duration: 1.3s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

.bell::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 24px;
  background: linear-gradient(#9c7a2f, #5e4a1d);
}

.bells.left .bell {
  animation-name: swing-right;
}

.bells.right .bell {
  animation-name: swing-left;
}

@keyframes swing-right {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(12deg); }
  50%  { transform: rotate(0deg); }
  75%  { transform: rotate(-6deg); }
  100% { transform: rotate(0deg); }
}

@keyframes swing-left {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(-12deg); }
  50%  { transform: rotate(0deg); }
  75%  { transform: rotate(6deg); }
  100% { transform: rotate(0deg); }
}

.bell.delay1 { animation-delay: 0.12s; }
.bell.delay2 { animation-delay: 0.25s; }


.temple-card {
  position: relative;
  border-radius: 24px;
  padding: 40px 20px 50px;
  background: radial-gradient(circle at center,
    rgba(255,215,150,0.15),
    rgba(0,0,0,0.85)
  );
  box-shadow: 0 20px 45px rgba(0,0,0,0.6);
  overflow: hidden;
   max-height: 70vh;         /* 👈 mobile safe */
    overflow-y: auto;
    justify-content: space-between;
}

.temple-visual.diya-lit {
  box-shadow:
    0 0 35px rgba(212,175,55,0.45),
    0 0 80px rgba(255,200,120,0.35);
}
.diya-orbit.active {
  opacity: 1;
  visibility: visible;
  animation: diyaOrbit 16s linear infinite;
}

.temple-mandala {
  position: absolute;
  inset: 0;
  background: url("/images/mandala-gold.png") center/520px no-repeat;
  opacity: 0.12;
  pointer-events: none;
    background-size: min(60vh, 420px);
}
.temple-visual {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.temple-mandala-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.temple-idol-img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: 38%;          /* adjust once, then never touch */
  height: auto;

  pointer-events: none;
}

.temple-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle,
    rgba(212,175,55,0.12),
    transparent 65%
  );
  pointer-events: none;
}

.temple-idol {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: 40px;
  z-index: 2;
  margin-bottom: 12px;
}

.idol-silhouette {
  width: 200px;
  height: 340px;
  border-radius: 120px;
  background: linear-gradient(to top,
    rgba(255,255,255,0.2),
    rgba(255,255,255,0.03)
  );
  box-shadow: 0 0 55px rgba(255,215,120,0.45);
}

.temple-actions {           /* 👈 below image */
  padding: 12px 8px 18px;

  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;

  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ===== STORIES ===== */

.stories-home {
  display: grid;
  gap: 20px;
  max-width: 700px;
  margin: auto;
}

.story-card {
  padding: 20px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
}

.story-list .story-row {
  padding: 14px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
}

.story-reader {
  max-width: 720px;
  margin: 24px auto;
  padding: 28px 26px;

  background: rgba(255, 255, 255, 0.03);
  border-radius: 18px;

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);

  animation: fadeInUp 0.35s ease;
}

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


.story-text {
  font-size: 1.05rem;
  margin-top: 20px;
}

.story-moral,
.story-reflection {
  margin-top: 24px;
  font-style: italic;
  opacity: 0.85;
}

.story-lang-toggle {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.story-lang-toggle button {
  opacity: 0.6;
}

.story-lang-toggle button.active {
  opacity: 1;
  font-weight: 600;
  border-bottom: 2px solid currentColor;
}

/* ===== Premium Back Button ===== */

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  background: transparent;
  border: none;
  padding: 6px 10px;

  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);

  cursor: pointer;
  border-radius: 10px;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.15s ease;
}

/* Subtle hover (desktop) */
.back-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(-2px);
}

/* Active / tap feedback */
.back-btn:active {
  transform: translateX(-1px) scale(0.97);
}

/* Optional: add soft arrow icon spacing */
.back-btn::before {
  content: "←";
  font-size: 1rem;
  opacity: 0.8;
}

/* Mobile touch comfort */
@media (max-width: 768px) {
  .back-btn {
    padding: 10px 14px;
    font-size: 1rem;
  }
}
.story-reader .back-btn {
  position: sticky;
  top: 10px;
  z-index: 2;
  backdrop-filter: blur(6px);
}



/* Buttons */
.temple-actions button {
  width: 54px;
  height: 54px;
  font-size: 22px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.28);
}

@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


.temple-bg {
  position: absolute;
  inset: 0;
  background: url("/images/mandala-gold.png") center/600px no-repeat;
  opacity: 0.15;
  animation: slowSpin 120s linear infinite;
}

@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.temple-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-55%);
  text-align: center;
}

.idol-silhouette {
  width: 220px;
  height: 360px;
  background: linear-gradient(to top,
    rgba(255,255,255,0.15),
    rgba(255,255,255,0.02)
  );
  border-radius: 120px;
  box-shadow: 0 0 60px rgba(255,215,120,0.35);
}


/* Diya glow effect */
.idol-silhouette.diya-lit {
  box-shadow:
    0 0 30px rgba(255, 180, 80, 0.7),
    0 0 60px rgba(255, 140, 40, 0.6),
    0 0 90px rgba(255, 100, 20, 0.4);
  transition: box-shadow 0.6s ease;
}


.temple-actions button {
  font-size: 26px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 14px;
  cursor: pointer;
}
/* Temple must NEVER show unless explicitly opened */
#virtualTemple {
  display: none;
}

#virtualTemple:not(.hidden) {
  display: block;
}

/* ===============================
   FLOWER PETAL OFFERING
================================ */

.flower-petal {
  position: fixed;
  top: -40px;
  font-size: 20px;
  pointer-events: none;
  opacity: 0.9;
  animation: petalFall linear forwards;
  z-index: 999;
}

@keyframes petalFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}
/* Dhoop smoke */
.dhoop-smoke {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  opacity: 0.6;
  animation: smokeRise 3.5s ease-out forwards;
  pointer-events: none;
}

@keyframes smokeRise {
  0% {
    transform: translate(-50%, 0) scale(1);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -120px) scale(1.6);
    opacity: 0;
  }
}

/* ===============================
   DUAL CHANWAR SEVA (BOTH SIDES)
================================ */

/* Base */
.chanvar {
  position: absolute;
  top: 34%;
  width: 64px;
  height: 64px;
  pointer-events: none;
  z-index: 4;
}

/* RIGHT → LEFT */
.chanvar.right {
  right: -70px;
  transform-origin: right center;
  animation: chanvarRightToLeft 3.8s ease-in-out infinite;
}

/* LEFT → RIGHT */
.chanvar.left {
  left: -70px;
  transform: scaleX(-1);            /* mirror image */
  transform-origin: left center;
  animation: chanvarLeftToRight 3.8s ease-in-out infinite;
}

/* Animations */
@keyframes chanvarRightToLeft {
  0%   { transform: translateX(0) rotate(-12deg); }
  50%  { transform: translateX(-260px) rotate(14deg); }
  100% { transform: translateX(0) rotate(-12deg); }
}

@keyframes chanvarLeftToRight {
  0%   { transform: translateX(0) rotate(12deg) scaleX(-1); }
  50%  { transform: translateX(260px) rotate(-14deg) scaleX(-1); }
  100% { transform: translateX(0) rotate(12deg) scaleX(-1); }
}

/* Mobile tuning */
@media (max-width: 480px) {
  @keyframes chanvarRightToLeft {
    50% { transform: translateX(-180px) rotate(12deg); }
  }
  @keyframes chanvarLeftToRight {
    50% { transform: translateX(180px) rotate(-12deg) scaleX(-1); }
  }
}

/* ===============================
   CHANT BUTTON ACTIVE GLOW
================================ */

.chant-btn {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Active chanting */
.chant-btn.chant-active {
  box-shadow:
    0 0 10px rgba(255, 215, 120, 0.8),
    0 0 20px rgba(255, 180, 80, 0.7),
    0 0 35px rgba(255, 140, 40, 0.5);
  transform: scale(1.08);
}

/* Optional subtle pulse */
.chant-btn.chant-active {
  animation: chantPulse 2.4s ease-in-out infinite;
}

@keyframes chantPulse {
  0%   { transform: scale(1.05); }
  50%  { transform: scale(1.12); }
  100% { transform: scale(1.05); }
}

/* ===============================
   LONG PRESS LABEL (MOBILE)
================================ */

.action-tooltip {
  position: fixed;
  padding: 6px 12px;
  font-size: 12px;
  white-space: nowrap;

  background: rgba(20, 20, 20, 0.9);
  color: #f5e6b0;

  border-radius: 999px;
  border: 1px solid rgba(255,215,120,0.4);

  box-shadow:
    0 0 10px rgba(255,215,120,0.35);

  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;

  z-index: 9999;
  pointer-events: none;
}

.action-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}
/* ===============================
   DHOOP – DENSE INCENSE FOG
   Bottom → Top
================================ */

.dhoop-fog {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);

  width: 120px;
  height: 40px;

  background: radial-gradient(
    ellipse at center,
    rgba(220,220,220,0.65) 0%,
    rgba(220,220,220,0.35) 40%,
    rgba(220,220,220,0.15) 65%,
    rgba(220,220,220,0.0) 100%
  );

  filter: blur(6px);
  opacity: 0.9;

  animation: dhoopFogRise 5.5s ease-out forwards;
  pointer-events: none;
  z-index: 2;
}

@keyframes dhoopFogRise {
  0% {
    transform: translate(-50%, 0) scale(1);
    opacity: 0.9;
  }

  40% {
    transform: translate(-50%, -60px) scale(1.2);
    opacity: 0.7;
  }

  70% {
    transform: translate(-50%, -120px) scale(1.4);
    opacity: 0.45;
  }

  100% {
    transform: translate(-50%, -180px) scale(1.6);
    opacity: 0;
  }
}


/* ===============================
   DHOOP AGARBATTI ICON FIX
================================ */

.dhoop-btn {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dhoop-btn {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dhoop-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dhoop-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}


/* ===============================
   SILENT SAMAYIK (INLINE)
================================ */

.samayik-panel {
  margin-top: 18px;
  padding: 18px 12px 22px;
  text-align: center;

  border-top: 1px solid rgba(255,255,255,0.08);
}

.samayik-panel.hidden {
  display: none;
}

.samayik-time {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 1px;
  color: #f5e6b0;
  margin-bottom: 12px;
}

.samayik-options {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}

.samayik-options button {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 13px;
}

/* Jain vow line under timer */
.samayik-vow {
  margin: 8px auto 14px;
  max-width: 280px;

  font-size: 13px;
  line-height: 1.4;
  color: rgba(245, 230, 176, 0.9);
  opacity: 0.85;
}


.samayik-end {
  background: transparent;
  border: none;
  color: #ccc;
  font-size: 13px;
  opacity: 0.8;
}

/* Fade actions during Samayik */
.temple-card.samayik-active .temple-actions {
  opacity: 0.15;
  pointer-events: none;
}

.samayik-reflection {
  margin: 14px auto 6px;
  max-width: 320px;
  text-align: center;

  font-size: 13px;
  color: rgba(245,230,176,0.85);
  opacity: 0;

  animation: reflectionFade 8s ease forwards;
}

@keyframes reflectionFade {
  0%   { opacity: 0; transform: translateY(6px); }
  15%  { opacity: 1; transform: translateY(0); }
  85%  { opacity: 1; }
  100% { opacity: 0; }
}
.story-reader h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}

.story-text p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.88);
}

/* Hindi readability */
.story-text:lang(hi) p {
  font-size: 1.08rem;
  line-height: 1.9;
}
.story-lang-toggle {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.story-lang-toggle button {
  background: transparent;
  border: none;
  padding: 4px 8px;

  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  border-radius: 6px;
}

.story-lang-toggle button.active {
  color: #e6c77b; /* soft gold */
  background: rgba(230, 199, 123, 0.12);
}
.story-moral,
.story-reflection {
  margin-top: 24px;
  padding: 16px 18px;

  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);

  font-size: 0.95rem;
  line-height: 1.6;

  border-left: 3px solid #e6c77b;
}

.story-moral strong,
.story-reflection strong {
  color: #e6c77b;
}
.story-row {
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 10px;

  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.15s ease;
}

.story-row:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.story-row h4 {
  margin: 0 0 4px;
  font-weight: 500;
}
body.reading-mode .sidebar,
body.reading-mode .player-bar {
  opacity: 0.35;
  pointer-events: none;
}
.story-text p + p {
  position: relative;
}

.story-text p + p::before {
  content: "✦";
  display: block;
  text-align: center;
  opacity: 0.25;
  margin: 10px 0;
}



/* ===== Read Aloud Button ===== */

.story-audio-controls {
  margin: 14px 0 6px;
  display: flex;
  justify-content: flex-end;
}

.read-aloud-btn {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  padding: 8px 14px;

  border-radius: 14px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);

  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

.read-aloud-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.read-aloud-btn.active {
  color: #e6c77b;
  background: rgba(230, 199, 123, 0.15);
}
.resume-prompt {
  margin: 12px 0 18px;
  padding: 14px 16px;
  position: sticky;
  background: rgba(255,255,255,0.04);
  border-radius: 14px;

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

  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
}

.resume-prompt button {
  background: transparent;
  border: none;
  color: #e6c77b;
  font-size: 0.85rem;
  cursor: pointer;
}

.resume-prompt.hidden {
  display: none;
}

body.reading-mode .story-reader {
  overflow-y: auto;
  max-height: calc(100vh - 120px);
  padding-bottom: 120px; /* space for prompt */
}


.resume-prompt {
  position: sticky;
  bottom: 12px;
  margin-top: 16px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #1c1f2a, #141720);
  border: 1px solid rgba(255,215,140,.35);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.resume-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.resume-actions button {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  font-weight: 600;
}

/* =========================
   EDUCATION HOME
========================= */

.education-home {
  padding: 20px;
}

.edu-wrapper {
  max-width: 720px;
  margin: 0 auto;
}

.edu-header h2 {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.edu-subtitle {
  font-size: 0.95rem;
  opacity: 0.8;
  line-height: 1.4;
  margin-bottom: 28px;
}

/* LEVEL CARDS */

.edu-levels {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.edu-level-card {
  background: var(--card-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
  border-radius: 18px;
  padding: 22px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.edu-level-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.edu-level-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.edu-level-card h3 {
  font-size: 1.25rem;
  margin: 0 0 6px;
}

.edu-level-desc {
  font-size: 0.95rem;
  line-height: 1.45;
  opacity: 0.85;
  margin-bottom: 10px;
}

.edu-level-meta {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.6;
}

/* SUBTLE LEVEL ACCENTS */

.edu-level-card.beginner {
  border-left: 4px solid #8fd19e;
}

.edu-level-card.intermediate {
  border-left: 4px solid #f3c969;
}

.edu-level-card.expert {
  border-left: 4px solid #caa0ff;
}

/* MOBILE POLISH */

@media (max-width: 600px) {
  .edu-level-card {
    padding: 18px;
  }
}

/* =========================
   EDUCATION LEVEL SCREEN
========================= */

.education-level {
  padding: 20px;
}

.edu-level-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.edu-back-btn {
  background: none;
  border: none;
  font-size: 0.9rem;
  opacity: 0.7;
  cursor: pointer;
  margin-bottom: 16px;
}

.edu-level-header {
  text-align: center;
  margin-bottom: 32px;
}

.edu-level-icon-large {
  font-size: 2.6rem;
  margin-bottom: 6px;
}

.edu-level-header h2 {
  font-size: 1.7rem;
  margin: 6px 0;
}

.edu-level-header p {
  font-size: 0.95rem;
  opacity: 0.75;
}

/* TOPIC GRID */

.edu-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.edu-topic-card {
  background: var(--card-bg, rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 18px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.edu-topic-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.edu-topic-card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.edu-topic-card p {
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 1.4;
}

/* MOBILE */

@media (max-width: 600px) {
  .edu-topic-grid {
    grid-template-columns: 1fr;
  }
}
/* =========================
   LESSON READER
========================= */

.lesson-reader {
  padding: 32px;
  max-width: 860px;
  margin: auto;
}

.lesson-wrapper {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.04),
    rgba(255,255,255,0.015)
  );
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 22px;
  padding: 36px 40px;
}

.lesson-back-btn {
  background: none;
  border: none;
  color: #cfcfcf;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 16px;
}

.lesson-top-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.lesson-level {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.lesson-level.beginner {
  background: rgba(90,200,120,0.2);
  color: #6de3b2;
}

.lesson-level.intermediate {
  background: rgba(255,180,80,0.2);
  color: #ffd27f;
}

.lesson-level.expert {
  background: rgba(255,90,90,0.2);
  color: #ff9f9f;
}

.lesson-duration {
  font-size: 12px;
  color: #d4af37;
}

/* Default (English) */
.lesson-title {
  font-size: 28px;
  color: #f5e6b0;
  margin: 10px 0;
  letter-spacing: 0.2px;
}

/* Hindi / Devanagari safe */
.lesson-title.lang-hi {
  font-family: "Noto Sans Devanagari", "Mangal", "Kalimati", sans-serif;
  letter-spacing: normal !important;
  text-transform: none !important;
}

.song-search-bar {
  padding: 12px 0 16px;
}

.song-search {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(212,175,55,0.25);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  outline: none;
  font-size: 14px;
}

.song-search::placeholder {
  color: rgba(255,255,255,0.45);
}

.song-search-bar .hidden {
  display: none;
}

.lesson-subtitle {
  font-size: 16px;
  color: #b8c1c8;
  margin-bottom: 26px;
}

.lesson-objectives {
  background: rgba(255,255,255,0.03);
  border-left: 3px solid #d4af37;
  padding: 16px 18px;
  border-radius: 10px;
  margin-bottom: 28px;
}

.lesson-objectives ul {
  padding-left: 18px;
}

.lesson-section {
  margin-bottom: 28px;
}

.lesson-section h3 {
  color: #f0d98a;
  margin-bottom: 8px;
}

.lesson-keyterms {
  margin-top: 30px;
}

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

.term-chip {
  background: rgba(212,175,55,0.15);
  color: #d4af37;
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 13px;
}
.lesson-reflection {
  margin-top: 32px;
  padding: 18px;
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  font-style: italic;
  color: #f5e6b0;
}

.lesson-summary {
  margin-top: 28px;
  padding: 18px;
  background: rgba(0,0,0,0.35);
  border-radius: 14px;
}

.lesson-content p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 18px;
  opacity: 0.95;
}

/* ACTIONS */

.lesson-actions {
  display: flex;
  gap: 12px;
  margin: 28px 0;
}

.lesson-audio-btn,
.lesson-focus-btn {
  padding: 10px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
}

/* REFLECTION */

.lesson-reflection {
  margin-top: 34px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border-left: 3px solid rgba(255,215,150,0.6);
}

.reflection-icon {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.lesson-reflection p {
  font-size: 0.95rem;
  opacity: 0.85;
  line-height: 1.6;
}

/* FOCUS MODE */

body.lesson-focus .sidebar,
body.lesson-focus .player-bar {
  display: none;
}

body.lesson-focus {
  background: #0e0e0e;
}

.education-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 24px;
}

/* ---------- CARD ---------- */
.edu-card {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.06),
    rgba(255,255,255,0.02)
  );
  border: 1px solid rgba(212,175,55,0.28);
  border-radius: 20px;
  padding: 22px 22px 24px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
  min-height: 150px;
}

.edu-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212,175,55,0.65);
  box-shadow: 0 22px 45px rgba(0,0,0,0.45);
}

/* ---------- BADGE (FIXED) ---------- */
.edu-level-badge {
  position: absolute;
  top: 14px;
  left: 16px;              /* ✅ FIXED */
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 14px;
  letter-spacing: 0.6px;
  font-weight: 600;
  text-transform: uppercase;
}

/* ---------- HEADER ---------- */
.edu-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 28px; /* space below badge */
}

.edu-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  color: #f5e6b0;
  line-height: 1.3;
}

/* ---------- DURATION ---------- */
.edu-duration {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 14px;
  background: rgba(212,175,55,0.18);
  color: #d4af37;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- SUBTITLE ---------- */
.edu-subtitle {
  margin-top: 12px;
  font-size: 14px;
  color: #b8c1c8;
  line-height: 1.5;

  /* keeps cards equal height */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- LEVEL COLORS ---------- */
.edu-level-badge.beginner {
  background: rgba(90,200,120,0.18);
  color: #6de3b2;
}

.edu-level-badge.intermediate {
  background: rgba(255,180,80,0.18);
  color: #ffd27f;
}

.edu-level-badge.expert {
  background: rgba(255,90,90,0.18);
  color: #ff9f9f;
}

/* Mandala glow */
.temple-visual.diya-lit {
  filter: drop-shadow(0 0 24px rgba(212,175,55,0.55));
  transition: filter 0.8s ease;
}

/* Idol glow (subtle halo) */
.temple-visual.diya-lit {
  filter:
    drop-shadow(0 0 18px rgba(255,220,140,0.45))
    drop-shadow(0 0 36px rgba(212,175,55,0.25));
  transition: filter 0.8s ease;
}

@keyframes divinePulse {
  0%   { filter: drop-shadow(0 0 14px rgba(212,175,55,0.4)); }
  50%  { filter: drop-shadow(0 0 26px rgba(212,175,55,0.7)); }
  100% { filter: drop-shadow(0 0 14px rgba(212,175,55,0.4)); }
}

.temple-visual.diya-lit .temple-idol-img {
  animation: divinePulse 4s ease-in-out infinite;
}

.diya-flame {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);

  width: 14px;
  height: 22px;

  background: radial-gradient(
    ellipse at center,
    #fff2c6 0%,
    #ffd36b 35%,
    #ff9f1c 65%,
    transparent 75%
  );

  border-radius: 50% 50% 50% 50%;
  opacity: 0;
  pointer-events: none;
}
@keyframes flameFlicker {
  0% {
    transform: translateX(-50%) scale(1) rotate(-1deg);
    opacity: 0.75;
  }
  25% {
    transform: translateX(-50%) scale(1.05) rotate(1deg);
    opacity: 0.9;
  }
  50% {
    transform: translateX(-50%) scale(0.95) rotate(-0.5deg);
    opacity: 0.7;
  }
  75% {
    transform: translateX(-50%) scale(1.08) rotate(0.8deg);
    opacity: 0.95;
  }
  100% {
    transform: translateX(-50%) scale(1) rotate(-1deg);
    opacity: 0.75;
  }
}
/* Flame ON */
.temple-visual.diya-lit .diya-flame {
  opacity: 1;
  animation: flameFlicker 1.6s ease-in-out infinite;
}

/* Mandala glow synced */
.temple-visual.diya-lit .temple-mandala-img {
  filter: drop-shadow(0 0 28px rgba(212,175,55,0.6));
}

/* Idol glow synced */
.temple-visual.diya-lit .temple-idol-img {
  filter:
    drop-shadow(0 0 20px rgba(255,220,150,0.45))
    drop-shadow(0 0 42px rgba(212,175,55,0.25));
}

@keyframes glowPulse {
  0%   { filter: drop-shadow(0 0 18px rgba(212,175,55,0.4)); }
  50%  { filter: drop-shadow(0 0 32px rgba(212,175,55,0.75)); }
  100% { filter: drop-shadow(0 0 18px rgba(212,175,55,0.4)); }
}

.temple-visual.diya-lit .temple-idol-img {
  animation: glowPulse 3.8s ease-in-out infinite;
}


.diya-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  animation: diyaOrbit 16s linear infinite;
}

.diya-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform:
    rotate(0deg)
    translateX(180px)
    translateY(-10px);
}
.diya-svg {
  width: 54px;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(255,190,90,0.7));
}
.diya-orbit.hidden,
.diya-orbit.hidden .diya-holder {
  animation: none;
}
.diya-orbit.active {
  animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
}



@keyframes diyaOrbit {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.diya-svg path:last-child {
  animation: flamePulse 1.8s ease-in-out infinite;
  transform-origin: center;
}

@keyframes flamePulse {
  0%   { opacity: 0.8; }
  50%  { opacity: 1; }
  100% { opacity: 0.85; }
}
.temple-visual.diya-lit .idol-silhouette {
  box-shadow:
    0 0 35px rgba(212,175,55,0.45),
    0 0 80px rgba(255,200,120,0.35);
}

.diya-orbit {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.diya-orbit.active {
  animation: diyaOrbit 18s linear infinite;
}

@keyframes diyaOrbit {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.diya-holder {
  transform: translateY(-160px); /* orbit radius */
  animation: diyaCounterRotate 18s linear infinite;
}

@keyframes diyaCounterRotate {
  from { transform: translateY(-160px) rotate(0deg); }
  to   { transform: translateY(-160px) rotate(-360deg); }
}

.parikrama-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#parikramaMan {
  position: absolute;
  bottom: 14%;
  left: 50%;
  width: 90px;
  opacity: 0;

  animation: parikrama-path 22s linear infinite;
}

@keyframes parikrama-path {

  /* FRONT */
  0% {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
    z-index: 6;
  }

  /* LEFT */
  25% {
    transform: translate(-320px, -60px) scale(0.85);
    opacity: 1;
    z-index: 5;
  }

  /* BEHIND (hidden) */
  50% {
    transform: translate(-50%, -180px) scale(0.65);
    opacity: 0;
    z-index: 1;
  }

  /* RIGHT */
  75% {
    transform: translate(220px, -60px) scale(0.85);
    opacity: 1;
    z-index: 5;
  }

  /* FRONT */
  100% {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
    z-index: 6;
  }
}

.jainistry-bell-wrapper {
  position: relative;
  text-align: center;
}
#mainBell {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffd966, #c89b3c);
  border: none;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 24px;
  color: #3b2a0a;

  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.35);

  transition: box-shadow 0.25s ease, transform 0.15s ease;
}

#mainBell.ringing {
  box-shadow:
    0 0 0 4px rgba(255, 215, 120, 0.55),
    0 0 24px rgba(255, 215, 120, 0.85),
    0 10px 22px rgba(0, 0, 0, 0.45);

  transform: translateY(-1px);
}


#mainBell:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 4px rgba(255, 215, 120, 0.5),
    0 8px 18px rgba(0, 0, 0, 0.4);
}

#mainBell:active {
  transform: translateY(1px);
  box-shadow:
    0 0 0 2px rgba(255, 215, 120, 0.25),
    0 4px 10px rgba(0, 0, 0, 0.35);
}


.hanging-bells {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
}

.bell {
  width: 24px;
  height: 30px;
  margin: 0 10px;
  display: inline-block;
  background: radial-gradient(circle, gold, #b8860b);
  border-radius: 0 0 50% 50%;
  transform-origin: top center;
  animation: swing 1.2s ease-in-out infinite;
}

.bell::before {
  content: "";
  width: 2px;
  height: 20px;
  background: #8b6f2f;
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
}

.delay1 { animation-delay: 0.15s; }
.delay2 { animation-delay: 0.3s; }

@keyframes swing {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(12deg); }
  50%  { transform: rotate(0deg); }
  75%  { transform: rotate(-12deg); }
  100% { transform: rotate(0deg); }
}

.autoplay-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 0.85rem;
  color: var(--text);
  opacity: 0.9;
}

.autoplay-toggle input {
  display: none;
}

.toggle-ui {
  width: 36px;
  height: 18px;
  background: #374151;
  border-radius: 20px;
  position: relative;
  transition: background 0.25s ease;
}

.toggle-ui::after {
  content: "";
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.25s ease;
}

.autoplay-toggle input:checked + .toggle-ui {
  background: #d4af37; /* Jain gold */
}

.autoplay-toggle input:checked + .toggle-ui::after {
  transform: translateX(18px);
}
.toggle-label-text {
  display: inline;
  font-size: 0.8rem;
  opacity: 0.9;
  color: var(--text);
}
@media (min-width: 900px) {
  .toggle-label-text {
    display: inline;
  }
}


@media (max-width: 520px) {
  .app-header {
    padding: 8px 12px;
  }

  .header-actions {
    gap: 6px;
  }
   .toggle-label-text {
      font-size: 0.7rem;
      opacity: 0.8;
    }

  .brand-text {
    font-size: 0.95rem;
  }
}
@media (max-width: 520px) {

  .toggle-label-text {
    font-size: 0.65rem;
    opacity: 0.85;
    white-space: nowrap;
  }
  .player-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px;
    gap: 6px;
  }

  .player-info {
    width: 100%;
  }

  .player-controls {
    width: 100%;
  }

  .player-timeline {
    width: 100%;
  }

  .player-toggles {
    margin-left: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .control-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }
}


@media (max-width: 820px) {
  .player-bar,
  .player-bar * {
    opacity: 1 !important;
    color: #f9fafb;
  }
}

@media (max-width: 820px) {
  .song-row,
  .song-row * {
    opacity: 1 !important;
    color: var(--text) !important;
  }
}


.legal-footer {
  text-align: center;
  padding: 8px 0 12px;
  font-size: 0.75rem;
  opacity: 0.7;
}

.legal-footer a {
  color: var(--text);
  text-decoration: none;
}

.legal-footer a:hover {
  text-decoration: underline;
}

/* ===============================
   MOBILE BOTTOM NAV
================================ */

.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;


  height: 64px;
  padding-bottom: env(safe-area-inset-bottom);

  display: flex;
  justify-content: space-around;
  align-items: center;

  background: rgba(10, 16, 22, 0.98);
  backdrop-filter: blur(14px);

  border-top: 1px solid rgba(255,255,255,0.08);
  z-index: 8000;
}

.mobile-bottom-nav button {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text);
  opacity: 0.85;
}

.mobile-bottom-nav button:active {
  transform: scale(0.9);
}

/* Hide bottom nav on desktop */
@media (min-width: 821px) {
  .mobile-bottom-nav {
    display: none;
  }
}

/* Show only on mobile */
@media (max-width: 820px) {
  .mobile-bottom-nav {
    display: flex;
  }
}

@media (max-width: 820px) {
  .player-bar {
    bottom: 64px; /* sits ABOVE mobile nav */
  }
}

@media (max-width: 820px) {
  .player-bar.mini-player {
    bottom: calc(64px + 8px);
  }
}

@media (max-width: 820px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  body.has-player {
    padding-bottom: calc(64px + 72px + env(safe-area-inset-bottom));
  }
}


/* ===============================
   PREMIUM HOME SCREEN
================================ */


.hero-aura {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(
      circle at 50% 30%,
      rgba(255, 215, 160, 0.12),
      transparent 60%
    );
  filter: blur(60px);
  opacity: 0.6;
  animation: auraBreath 12s ease-in-out infinite;
  pointer-events: none;
}

@keyframes auraBreath {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.05);
  }
}

.hero-glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(
    circle,
    rgba(255,215,140,0.18),
    transparent 70%
  );
  filter: blur(22px);
  z-index: -1;
}

@keyframes gentleFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
.hero-mantra {
  font-family: "Noto Sans Devanagari", serif;
  font-size: 2.4rem;
  font-weight: 600;
  margin: 16px 0 10px;
  line-height: 1.25;
}


.hero-subtext {
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  opacity: 0.7;
}

/* PRIMARY CTA */
.home-primary-cta {
  position: relative;
  width: min(92%, 520px); /* 🔥 desktop friendly */
  margin: clamp(32px, 5vh, 56px) auto;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;

  padding: clamp(18px, 2.2vw, 26px) clamp(22px, 3vw, 34px);
  border-radius: 20px;

  background: linear-gradient(
    135deg,
    #f3d9a4,
    #e6c98c,
    #d6b46a
  );

  color: #1a1a1a;
  font-weight: 600;
  letter-spacing: 0.35px;

  font-size: clamp(1.05rem, 1.3vw, 1.35rem); /* 🔥 scales naturally */

  border: none;
  cursor: pointer;

  box-shadow:
    0 20px 46px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);

  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

body[data-theme="dark"] {
  background:
    radial-gradient(
      circle at top center,
      rgba(255, 255, 255, 0.03),
      transparent 45%
    ),
    #0b1020;
}

.home-primary-cta span {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.8;
}
.home-primary-cta:hover {
  transform: translateY(-3px);
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.home-primary-cta:active {
  transform: translateY(0);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.4);
}
.home-primary-cta::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  background: radial-gradient(
    circle,
    rgba(255, 215, 160, 0.35),
    transparent 70%
  );
  opacity: 0.35;
  animation: samayikPulse 5.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes samayikPulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.45; }
}


.home-primary-cta:active {
  transform: scale(0.97);
}

/* QUICK ACTIONS */
.home-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.home-actions button {
  padding: 14px 10px;
  border-radius: 14px;

  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);

  color: var(--text);
  font-size: 0.95rem;
}

/* TODAY CARD */
.home-today {
  padding: 16px;
  border-radius: 16px;

  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);

  font-size: 0.9rem;
  opacity: 0.85;
}


.home-today h4 {
  margin-bottom: 6px;
  font-weight: 600;
}


.home-symbol {
  display: block;
  margin: 0 auto 22px;

  width: 120px;
  height: auto;

  aspect-ratio: 1 / 1;
  object-fit: contain;

  opacity: 0.96;

  /* premium motion */
  animation: breathScale 9s ease-in-out infinite;
  will-change: transform, filter;
}

@media (min-width: 821px) {
  .home-symbol {
    width: 190px;     /* premium desktop size */
    max-width: 220px;
    margin-bottom: 28px;
  }
}

@keyframes breathScale {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.045);
  }
}

.home-symbol {
  filter:
    drop-shadow(0 0 18px rgba(255, 210, 140, 0.35))
    drop-shadow(0 0 42px rgba(255, 200, 120, 0.18));
}

@keyframes auraGlow {
  0%, 100% {
    filter:
      drop-shadow(0 0 16px rgba(255,210,140,0.30))
      drop-shadow(0 0 36px rgba(255,200,120,0.16));
  }
  50% {
    filter:
      drop-shadow(0 0 30px rgba(255,215,150,0.55))
      drop-shadow(0 0 70px rgba(255,210,140,0.35));
  }
}

.home-symbol {
  animation:
    sacredFloat 12s ease-in-out infinite,
    auraGlow 9s ease-in-out infinite;
}


@keyframes sacredFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.045);
  }
}

.brand.clickable {
  cursor: pointer;
}

.brand.clickable:hover .brand-text {
  opacity: 0.85;
}

.brand.clickable:active {
  transform: scale(0.98);
}
/* HOME ROOT */
.home-premium {
  padding: 28px 20px 120px;
  max-width: 900px;
  margin: auto;
}

/* HERO */
.home-hero {
  position: relative;
  text-align: center;
  margin-bottom: 36px;
}

.hero-symbol {
  width: 160px;
  max-width: 60vw;
  margin-bottom: 16px;
}

.hero-mantra {
  font-size: 1.8rem;
  letter-spacing: 0.08em;
}

.hero-subtext {
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

/* BREATHING ANIMATION */
.breathing {
  animation: breathe 6s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 1; }
}

/* CARDS */
.home-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 32px;
}

.home-card {
  padding: var(--space-md);
  border-radius: var(--radius-soft);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.home-card,
.explore-card {
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    background 0.35s ease;
}
@media (hover: hover) {
  .home-card:hover,
  .explore-card:hover {
    transform: translateY(-4px);
    box-shadow:
      0 26px 60px rgba(0, 0, 0, 0.55);
  }
}
.home-card:active,
.explore-card:active {
  transform: scale(0.98);
}

.explore-card span {
  font-size: 1.4rem;
  transition: transform 0.35s ease;
}

@media (hover: hover) {
  .explore-card:hover span {
    transform: scale(1.15);
  }
}
.home-premium > section {
  animation: fadeUp 0.8s ease both;
}

.home-premium > section:nth-child(2) { animation-delay: 0.1s; }
.home-premium > section:nth-child(3) { animation-delay: 0.2s; }
.home-premium > section:nth-child(4) { animation-delay: 0.3s; }

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
button {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.story-text p,
.lesson-content p {
  max-width: 68ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.home-guidance {
  margin-top: var(--space-xl);
  display: grid;
  gap: var(--space-md);
}

.guidance-card {
  padding: 18px 20px;
  border-radius: 16px;

  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border: 1px solid rgba(255, 255, 255, 0.08);

  cursor: pointer;

  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    transform 0.35s ease;
}

.guidance-card strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.guidance-card p {
  font-size: 0.85rem;
  opacity: 0.65;
  line-height: 1.6;
}

@media (hover: hover) {
  .guidance-card:hover {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.14);
  }
}
.guidance-card:active {
  transform: scale(0.98);
}
@media (min-width: 900px) {
  .home-guidance {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }
}
/* ===============================
   MOBILE BOTTOM NAV — PREMIUM
================================ */

.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;

  display: grid;
  grid-template-columns: repeat(4, 1fr);

  padding: 8px 6px env(safe-area-inset-bottom);

  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 999;
}

.mobile-bottom-nav .menu-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;

  padding: 6px 0;

  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.65);

  font-size: 0.7rem;
}

.mobile-bottom-nav .menu-icon {
  font-size: 1.2rem;
}

.mobile-bottom-nav .menu-btn.active {
  color: #f5deb3;
}
/* -------------------------
   DID YOU KNOW – PREMIUM
-------------------------- */

.home-did-you-know {
  margin-top: 28px;
}

.dyk-card {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.06),
    rgba(255,255,255,0.02)
  );
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 18px 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.dyk-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.dyk-icon {
  font-size: 1.2rem;
}

.dyk-title {
  font-weight: 600;
  letter-spacing: 0.3px;
  opacity: 0.85;
}

.dyk-refresh {
  margin-left: auto;
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  font-size: 1rem;
}

.dyk-refresh:hover {
  opacity: 1;
}

.dyk-question {
  font-size: 1rem;
  line-height: 1.55;
  opacity: 0.9;
  margin-bottom: 10px;
}

.dyk-source {
  font-size: 0.75rem;
  opacity: 0.5;
  text-decoration: none;
}

.dyk-source:hover {
  opacity: 0.8;
}



button:active {
  transform: scale(0.97);
}

.home-card h4 {
  margin-bottom: 6px;
}

/* PRACTICE */
.home-primary-cta {
  width: 100%;
  margin: 12px 0 28px;
  padding: 16px;
  border-radius: 18px;
  font-size: 1.05rem;
}

.home-primary-cta span {
  display: block;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* EXPLORE */
.home-explore {
  display: grid;
  gap: 14px;
}

.explore-card {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-md);
  border-radius: var(--radius-soft);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
}
.hero-symbol {
  filter:
    drop-shadow(0 0 22px rgba(255, 215, 160, 0.18));
}

.explore-card:hover {
  transform: translateY(-2px);
}

.explore-card span {
  font-size: 1.6rem;
}

.samiyik-panel,
.samayik-panel {
  scroll-margin-top: 120px; /* accounts for header */
}
.temple-card.samayik-active .samayik-panel {
  animation: samayik-focus 0.6s ease-out;
}

@keyframes samayik-focus {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.temple-container {
  padding: 30px;
  height: auto;
  overflow: visible;
}
#songsList {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.samayik-time {
  display: block;
  width: 100%;
  text-align: center;
}
.menu-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.menu-icon {
  font-size: 20px;
}

.menu-label {
  font-size: 11px;
  font-weight: 500;
}

.menu-btn.active {
  color: var(--gold);
}
/* -------------------------
   HOME – CALM ENHANCEMENTS
-------------------------- */

.home-reflection {
  margin: 28px auto;
  max-width: 520px;
  text-align: center;
  opacity: 0.9;
}

.reflection-text {
  font-style: italic;
  line-height: 1.6;
}

.reflection-source {
  font-size: 0.75rem;
  opacity: 0.6;
}

.home-continue {
  margin: 24px auto;
  max-width: 520px;
}

.continue-card {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  cursor: pointer;
}

.home-footer {
  margin: 48px auto 32px;
  text-align: center;
  font-size: 0.75rem;
  opacity: 0.4;
}
:root {
  /* Core */
  --bg: #020617;
  --text: #f9fafb;

  /* Spacing */
  --space-sm: 12px;
  --space-md: 20px;

  /* Radius */
  --radius-soft: 16px;
}

.hero-mantra {
  color: var(--text-primary);
  font-weight: 500;
  letter-spacing: 0.08em;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.hero-subtext {
  margin-top: var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.home-premium > section {
  margin-bottom: var(--space-xl);
}
.home-reflection {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.reflection-text {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
  font-style: italic;
}

.reflection-source {
  margin-top: var(--space-xs);
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.home-card h4 {
  margin-bottom: var(--space-xs);
  font-weight: 500;
  color: var(--text-primary);
}

.home-card p {
  font-size: 0.95rem;
  opacity: 0.8;
  line-height: 1.6;
}

.explore-card strong {
  font-size: 1rem;
  font-weight: 600;
}

.explore-card p {
  font-size: 0.85rem;
  opacity: 0.65;
}

.card-note {
  font-size: 0.7rem;
  color: var(--text-muted);
}
/* ===============================
   GLASS SURFACE
================================ */

.glass-surface {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.02)
  );
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-soft);
}

/* FORCE: hide bottom nav on desktop */
.mobile-bottom-nav {
  display: none !important;
}

/* FORCE: show only on mobile */
@media (max-width: 820px) {
  .mobile-bottom-nav {
    display: flex !important;
  }
}

/* ---------------------------
   PERSONAL JOURNAL
---------------------------- */

.home-journal {
  margin-top: 22px;
}

.journal-card {
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.journal-card:hover {
  background: rgba(255,255,255,0.07);
  transform: translateY(-1px);
}

.journal-card h4 {
  margin: 0 0 4px;
}

.journal-note {
  font-size: 0.75rem;
  opacity: 0.6;
}

/* JOURNAL SCREEN */
.journal-screen {
  padding: 20px;
  max-width: 680px;
  margin: 0 auto;
}

.journal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.back-btn {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
}

.journal-date {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-bottom: 8px;
}

.journal-prompt {
  font-size: 0.95rem;
  opacity: 0.75;
  margin-bottom: 12px;
}

.journal-textarea {
  width: 100%;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  resize: vertical;
}

.journal-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.journal-save {
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  background: #4ade80;
  color: #022c22;
  font-weight: 600;
  cursor: pointer;
}

.journal-clear {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.journal-footer {
  margin-top: 18px;
  font-size: 0.75rem;
  opacity: 0.5;
  text-align: center;
}
/* ---------------------------
   JOURNAL HISTORY
---------------------------- */

.journal-history-toggle {
  margin-bottom: 14px;
}

.journal-history-toggle button {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  cursor: pointer;
  opacity: 0.7;
}

.journal-history-toggle button:hover {
  opacity: 1;
}

.journal-history {
  margin-top: 28px;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 18px;
}

.journal-history h3 {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 12px;
}

.journal-history ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.journal-history li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0.85;
}

.journal-history li:hover {
  opacity: 1;
}

.journal-history-date {
  font-size: 0.75rem;
  opacity: 0.6;
}
/* ===========================
   FANCY MOBILE ALERT
=========================== */

.fancy-alert {
  position: fixed;
  inset: 0;
  z-index: 20000;
}

.fancy-alert.hidden {
  display: none;
}

/* Backdrop */
.fancy-alert-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
}

/* Sheet */
.fancy-alert-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(18, 23, 38, 0.96);
  backdrop-filter: blur(22px);
  border-radius: 22px 22px 0 0;
  padding: 10px 18px 22px;
  animation: slideUp 0.35s cubic-bezier(0.25,1,0.5,1);
}

/* Handle */
.fancy-alert-handle {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  margin: 6px auto 14px;
}

/* Content */
.fancy-alert-content {
  text-align: center;
  padding: 6px 8px 14px;
}

.fancy-alert-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.fancy-alert-text {
  font-size: 1rem;
  line-height: 1.5;
  opacity: 0.92;
}

/* Actions */
.fancy-alert-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.fancy-btn {
  flex: 1;
  padding: 12px;
  border-radius: 14px;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
}

.fancy-btn.primary {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  color: #022c22;
  font-weight: 600;
}

.fancy-btn.secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

/* Animations */
@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.live-tv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.video-frame iframe,
.pravachan-player iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
}

.pravachan-card {
  padding: 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  transition: transform 0.2s;
}

.pravachan-card:hover {
  transform: scale(1.02);
}

.live-tv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.live-tv-card {
  background: rgba(255,255,255,0.04);
  border-radius: 16px;
  overflow: hidden;
}

.live-tv-thumb iframe {
  width: 100%;
  height: 200px;
  border: 0;
}

.live-tv-info {
  padding: 12px;
}

.pravachan-card {
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
}

.pravachan-card iframe {
  width: 100%;
  height: 220px;
  border: 0;
}

.pravachan-info {
  padding: 12px;
}

.pravachan-embed-wrapper iframe {
  width: 100%;
  height: 75vh;
  border-radius: 14px;
  border: none;
  background: #000;
}

.pravachan-grid {
  padding: 16px;
}

.pravachan-player {
  background: #000;
  border-radius: 16px;
  margin: 16px;
  overflow: hidden;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 0.9rem;
}

.player-header button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.player-frame-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ===============================
   PRAVACHAN PLAYER (FIX)
================================ */

.pravachan-player {
  margin-bottom: 24px;
  background: linear-gradient(180deg, #0f172a, #020617);
  border-radius: 16px;
  padding: 14px;
}

/* Header */
.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #e5e7eb;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.player-header button {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 1.2rem;
  cursor: pointer;
}

/* 👇 THIS IS THE KEY FIX */
.player-frame-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
  border-radius: 12px;
  overflow: hidden;
}

/* iframe must fill wrapper */
.player-frame-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;

}


/* Scroll fix */
#songsList {
  min-height: 100vh;
  overflow-y: auto;
  padding-bottom: 120px;
}

/* Player */
.pravachan-player {
  background: #0f172a;
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 20px;
}

.pravachan-player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
}

.pravachan-player-header button {
  background: none;
  border: none;
  font-size: 20px;
  color: #fff;
  cursor: pointer;
}

.pravachan-video-wrapper {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  margin-top: 10px;
}

.pravachan-video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

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

.pravachan-card {
  background: #0f172a;
  border-radius: 16px;
  overflow: hidden;
}

.pravachan-thumb {
  position: relative;
}

.pravachan-thumb img {
  width: 100%;
  display: block;
}

.pravachan-play-btn {
  position: absolute;
  inset: 0;
  font-size: 48px;
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  cursor: pointer;
}

.pravachan-player-slot {
  padding: 10px;
}

.pravachan-video-wrapper {
  position: relative;
  padding-top: 56.25%;
}

.pravachan-video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

.pravachan-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: black;
  border-radius: 14px;
  overflow: hidden;
}

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

.pravachan-play-btn {
  position: absolute;
  inset: 0;
  font-size: 48px;
  color: white;
  background: rgba(0,0,0,0.35);
  border: none;
  cursor: pointer;
}

.pravachan-media iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.pravachan-media.playing .pravachan-play-btn,
.pravachan-media.playing .pravachan-thumb {
  display: none;
}

@media (max-width: 600px) {

  /* Remove desktop centering logic */
  .home-premium {
    min-height: auto;
    justify-content: flex-start;
    padding: 24px 16px 32px;
  }

  /* Center hero properly */
  .home-hero {
    max-width: 100%;
    margin: 0 auto;
    padding-top: 12px;
  }

  /* Fix image distortion */
  .hero-symbol {
    width: 140px;
    max-width: 80vw;
    margin: 0 auto 20px;
    display: block;
  }

  /* Fix mantra overflow */
  .hero-mantra {
    font-size: 1.6rem;
    text-align: center;
    margin: 8px auto;
    line-height: 1.3;
  }

  .hero-subtext {
    font-size: 0.85rem;
    text-align: center;
  }
}

:root {
  --header-height: 64px;
  --sidebar-width: 260px;
  --player-height: 72px;
  --mobile-nav-height: 64px;
}


.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
}

.app-main {
  display: flex;
  margin-top: var(--header-height);
  width: 100%;
  min-height: calc(100vh - var(--header-height));
  padding-bottom: var(--player-height);
}

.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  z-index: 900;
}

.content {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  max-width: 100%;
  overflow-x: hidden;
}

.home-premium {
  min-height: calc(100vh - var(--header-height) - var(--player-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.home-hero {
  max-width: 520px;
  margin: 0 auto;
}

.hero-symbol {
  width: 180px;
  margin: 0 auto 24px;
  display: block;
}

.hero-mantra {
  font-size: 2.4rem;
  line-height: 1.25;
}

.hero-subtext {
  font-size: 1rem;
  opacity: 0.75;
}

@media (max-width: 820px) {

  /* MAIN LAYOUT */
  .app-main {
    flex-direction: column;
    padding-bottom: calc(
      var(--player-height) + var(--mobile-nav-height) + 16px
    );
  }

  /* SIDEBAR (OFF-CANVAS) */
.sidebar {
  background: linear-gradient(
    180deg,
    rgba(18, 22, 34, 0.98),
    rgba(10, 12, 20, 0.98)
  );
  backdrop-filter: blur(14px);
}
@media (max-width: 820px) {
  .sidebar.open {
    box-shadow: 10px 0 40px rgba(0,0,0,0.75);
  }
}

.sidebar .category-item.active {
  background: rgba(201, 169, 74, 0.22);
  color: #f6e6b6;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.05);
}


@media (max-width: 820px) {
  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100%;
    z-index: 9999;
    transition: left 0.3s ease;
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-overlay.active {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9998;
  }
}


  .sidebar.open {
    left: 0;
  }

  /* CONTENT FULL WIDTH */
  .content {
    margin-left: 0;
    width: 100%;
  }

  /* HOME STACKS VERTICALLY */
  .home-premium {
    min-height: auto;
    justify-content: flex-start;
    padding: 24px 16px;
  }

  .home-hero {
    width: 100%;
    max-width: 100%;
  }

  .hero-symbol {
    width: 140px;
    max-width: 80vw;
    margin: 0 auto 20px;
  }

  .hero-mantra {
    font-size: 1.6rem;
    text-align: center;
  }

  .hero-subtext {
    font-size: 0.85rem;
    text-align: center;
  }

  /* PLAYER ABOVE MOBILE NAV */
  .player-bar {
    bottom: var(--mobile-nav-height);
  }

  /* SAFETY */
  html, body {
    overflow-x: hidden;
  }
}

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

/* ==============================
   MINI PLAYER (SIDEBAR MODE)
============================== */

.mini-player {
  position: fixed;
  bottom: env(safe-area-inset-bottom, 16px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(25, 25, 25, 0.95);
  backdrop-filter: blur(14px);
  border-radius: 999px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  z-index: 10002;
}

.mini-player.hidden {
  display: none;
}

.mini-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #e5d7a3;
  cursor: pointer;
}

.mini-btn.primary {
  font-size: 1.6rem;
}

/* ==============================
   FULL PLAYER HIDES WHEN SIDEBAR OPEN
============================== */

body.sidebar-open .player-bar {
  display: none;
}

/* Mobile fine-tuning */
@media (max-width: 820px) {
  .mini-player {
    bottom: calc(env(safe-area-inset-bottom, 12px) + 6px);
  }
}


.player-bar {
  position: fixed;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.6);
  left: 0;
  right: 0;
  bottom: 56px; /* above bottom nav */
  background: linear-gradient(180deg, #121212, #0b0b0b);
  border-top: 1px solid rgba(255,255,255,0.08);
  z-index: 9999;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.player-wrapper {
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}


.player-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
}
.player-cover img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}
.player-meta {
  flex: 1;
  min-width: 0;
}

.player-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  text-align: center;
}

.player-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-progress span {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  width: 36px;
  text-align: center;
}

.player-progress input[type="range"] {
  flex: 1;
  height: 3px;
  appearance: none;
  background: rgba(255,255,255,0.25);
  border-radius: 3px;
  outline: none;
}

.player-progress input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 10px;
  height: 10px;
  background: #4da3ff;
  border-radius: 50%;
}
@media (max-width: 820px) {
 .player-bar.sidebar-open {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
  }
}
@media (min-width: 900px) {
  .player-wrapper {
    max-width: 680px;
  }
}

.player-play {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: #000;
  font-size: 1rem;
  cursor: pointer;
}
@media (max-width: 820px) {
  .player-bar {
    bottom: 56px;
  }

  .player-inner {
    padding: 12px;
  }

  .player-cover img {
    width: 48px;
    height: 48px;
  }

  .player-play {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
}
@media (min-width: 821px) {
  .player-bar {
    bottom: 0;
  }

  .player-inner {
    max-width: 1100px;
    margin: 0 auto;
  }
}



.player-progress input[type="range"] {
  flex: 1;
  height: 4px;
  appearance: none;
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
}

.player-progress input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Thumb appears only on interaction */
.player-progress input[type="range"]:active::-webkit-slider-thumb,
.player-progress input[type="range"]:hover::-webkit-slider-thumb {
  opacity: 1;
}
/* ================================
   COLLAPSIBLE SIDEBAR GROUPS
================================ */

.sidebar-group {
  margin-bottom: 8px;
}

.sidebar-group-header {
  width: 100%;
  background: none;
  border: none;
  color: #e8c97a;
  font-weight: 700;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.sidebar-group-header .chevron {
  transition: transform .25s ease;
}

.sidebar-group-items {
  display: none;
  padding-left: 8px;
}

.sidebar-group.open .sidebar-group-items {
  display: block;
}

.sidebar-group.open .chevron {
  transform: rotate(90deg);
}
.menu-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}
.menu-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}
.menu-icon-svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}
/* ================================
   MENU ACTIVE STATE – PREMIUM
================================ */

/* Base menu pill */
.category-pill,
.menu-btn {
  position: relative;
  transition: background 0.25s ease, color 0.25s ease;
}

/* Active state */
.category-pill.active,
.menu-btn.active {
  background: linear-gradient(
    180deg,
    rgba(124,92,255,0.18),
    rgba(255,255,255,0.04)
  );
  color: #fff;
}

/* ICON glow */
.category-pill.active .menu-icon-svg,
.menu-btn.active .menu-icon-svg {
  animation: iconGlow 1.6s ease-in-out infinite;
  opacity: 1;
}

/* Text emphasis */
.category-pill.active span,
.menu-btn.active .menu-label {
  font-weight: 700;
}

/* Soft left indicator (sidebar only) */
.category-pill.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(
    180deg,
    #cfa44a,
    #e8c97a
  );
  box-shadow: 0 0 12px rgba(232,201,122,0.6);
}
/* ================================
   MENU ACTIVE STATE – PREMIUM
================================ */

/* Base menu pill */
.category-pill,
.menu-btn {
  position: relative;
  transition: background 0.25s ease, color 0.25s ease;
}

/* Active state */
.category-pill.active,
.menu-btn.active {
  background: linear-gradient(
    180deg,
    rgba(124,92,255,0.18),
    rgba(255,255,255,0.04)
  );
  color: #fff;
}

/* ICON glow */
.category-pill.active .menu-icon-svg,
.menu-btn.active .menu-icon-svg {
  animation: iconGlow 1.6s ease-in-out infinite;
  opacity: 1;
}

/* Text emphasis */
.category-pill.active span,
.menu-btn.active .menu-label {
  font-weight: 700;
}

/* Soft left indicator (sidebar only) */
.category-pill.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(
    180deg,
    #cfa44a,
    #e8c97a
  );
  box-shadow: 0 0 12px rgba(232,201,122,0.6);
}

/* ================================
   APPLE-LEVEL ACTIVE STATE
================================ */

.category-pill,
.menu-btn {
  position: relative;
  transition:
    background 220ms cubic-bezier(.4,0,.2,1),
    transform 180ms cubic-bezier(.4,0,.2,1),
    color 180ms ease;
}

/* Active surface */
.category-pill.active,
.menu-btn.active {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
}

/* Subtle elevation */
.category-pill.active {
  transform: translateX(2px);
}

/* ICON — calm emphasis */
.category-pill.active .menu-icon-svg,
.menu-btn.active .menu-icon-svg {
  opacity: 1;
  filter: drop-shadow(0 0 0 rgba(0,0,0,0));
}

/* Text clarity */
.category-pill.active span,
.menu-btn.active .menu-label {
  font-weight: 600;
  letter-spacing: 0.01em;
}

@keyframes appleSelect {
  from {
    box-shadow: 0 0 0 0 rgba(232,201,122,0.0);
  }
  to {
    box-shadow: 0 0 0 6px rgba(232,201,122,0.18);
  }
}

.category-pill.just-selected,
.menu-btn.just-selected {
  animation: appleSelect 420ms cubic-bezier(.2,.8,.2,1);
}
.category-pill:active,
.menu-btn:active {
  transform: scale(0.985);
}
.category-pill:not(.active)::after {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 0;
}
/* ================================
   iOS-STYLE FOCUS GLOW (SEARCH)
================================ */

.song-search-bar {
  position: relative;
}

.song-search {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;

  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);

  color: #fff;
  font-size: 15px;

  transition:
    box-shadow 240ms cubic-bezier(.4,0,.2,1),
    border-color 200ms ease,
    transform 200ms ease,
    background 200ms ease;
}

/* iOS Focus */
.song-search:focus {
  outline: none;

  background: rgba(255,255,255,0.10);
  border-color: rgba(124,92,255,0.55);

  box-shadow:
    0 0 0 3px rgba(124,92,255,0.18),
    0 8px 22px rgba(0,0,0,0.45);

  transform: translateY(-1px);
}
.song-search:focus::placeholder {
  color: rgba(255,255,255,0.55);
}
.song-search {
  -webkit-tap-highlight-color: transparent;
}
@keyframes iosFocusIn {
  from {
    box-shadow: 0 0 0 0 rgba(124,92,255,0);
  }
  to {
    box-shadow:
      0 0 0 3px rgba(124,92,255,0.18),
      0 8px 22px rgba(0,0,0,0.45);
  }
}

.song-search:focus {
  animation: iosFocusIn 220ms cubic-bezier(.2,.8,.2,1);
}
body[data-mode="meditation"] .song-search:focus {
  box-shadow: none;
  transform: none;
}


.menu-icon-breath {
  transform-origin: center;
  transition: transform 1.2s cubic-bezier(.4,0,.2,1),
              opacity 1.2s cubic-bezier(.4,0,.2,1);
}

