@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;800&family=Noto+Serif+Devanagari:wght@400;600;700&family=Lora:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ==========================================================================
   CSS Custom Properties (Theme Design Tokens)
   ========================================================================== */
:root {
  /* Core brand colors */
  --saffron: #f26f22;
  --saffron-hover: #fa8231;
  --saffron-glow: rgba(242, 111, 34, 0.4);
  --saffron-light: rgba(242, 111, 34, 0.08);
  
  --gold: #d4af37;
  --gold-hover: #e5c158;
  --gold-glow: rgba(212, 175, 55, 0.35);
  --gold-light: rgba(212, 175, 55, 0.08);

  /* Cosmic Slate / Void Dark Theme (Default) */
  --bg-app: #0a0c10;
  --bg-surface: rgba(22, 27, 33, 0.8);
  --bg-surface-elevated: rgba(30, 37, 47, 0.9);
  --bg-header: rgba(10, 12, 16, 0.85);
  
  --border-color: rgba(242, 111, 34, 0.15);
  --border-color-active: rgba(212, 175, 55, 0.45);
  
  --text-primary: #f5f2eb;
  --text-secondary: #c5c0b4;
  --text-muted: #8c877a;
  
  --glow-aurora: radial-gradient(circle at 50% 50%, rgba(242, 111, 34, 0.08) 0%, rgba(212, 175, 55, 0.04) 35%, rgba(0, 0, 0, 0) 75%);
  --shadow-color: rgba(0, 0, 0, 0.6);
  
  --scrollbar-bg: #0c0e12;
  --scrollbar-thumb: #232a35;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
  --glass-blur: blur(12px);
}

body.light-theme {
  /* Sattvic Ivory Light Theme */
  --bg-app: #faf7f2;
  --bg-surface: rgba(255, 255, 255, 0.82);
  --bg-surface-elevated: rgba(246, 241, 235, 0.9);
  --bg-header: rgba(250, 247, 242, 0.85);
  
  --border-color: rgba(242, 111, 34, 0.18);
  --border-color-active: rgba(242, 111, 34, 0.5);
  
  --text-primary: #2b2e35;
  --text-secondary: #585d68;
  --text-muted: #888e99;
  
  --glow-aurora: radial-gradient(circle at 50% 50%, rgba(242, 111, 34, 0.05) 0%, rgba(212, 175, 55, 0.03) 40%, rgba(0, 0, 0, 0) 80%);
  --shadow-color: rgba(139, 126, 109, 0.15);
  
  --scrollbar-bg: #f3ece3;
  --scrollbar-thumb: #d7cdbf;
  
  --card-shadow: 0 8px 32px 0 rgba(142, 131, 114, 0.15);
}

/* ==========================================================================
   Global Reset & Base Rules
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  transition: background-color 0.4s ease, color 0.4s ease;
  line-height: 1.65;
}

/* Typography Utility Classes */
.font-cinzel {
  font-family: 'Cinzel', serif;
}

.font-rozha {
  font-family: 'Noto Serif Devanagari', serif;
  font-weight: 600;
}

.font-lora {
  font-family: 'Lora', serif;
}

.font-inter {
  font-family: 'Inter', sans-serif;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
  border: 2px solid var(--scrollbar-bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--saffron);
}

/* Decorative auric background glow */
.sacred-glow-aura {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  background: var(--glow-aurora);
  z-index: 1;
  animation: auraRotate 30s infinite linear;
}

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

/* Visually Hidden Helper (Accessibility) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================================================
   Application Container Layout
   ========================================================================== */
.app-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  z-index: 2;
  position: relative;
}

/* Top Sacred Header Bar */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 2rem;
  height: 72px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  z-index: 10;
  transition: var(--transition-smooth);
}

.header-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle-btn {
  display: none; /* Desktop hidden */
}

.brand-logo {
  height: 42px;
  width: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px var(--gold-glow));
}

.title-group {
  display: flex;
  flex-direction: column;
}

.app-main-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--saffron);
  text-shadow: 0 0 8px var(--saffron-glow);
}

.subtitle {
  font-size: 0.75rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

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

/* Search Trigger Button Styling */
.search-trigger-btn {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 0.5rem 1.2rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 260px;
  text-align: left;
}

.search-trigger-btn:hover {
  border-color: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}

.search-trigger-icon {
  font-size: 0.95rem;
  color: var(--saffron);
}

.search-trigger-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
}

/* Theme Toggle Button styling */
.theme-toggle-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  outline: none;
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  border-color: var(--saffron);
  box-shadow: 0 0 10px var(--saffron-glow);
  transform: rotate(15deg);
}

.theme-icon {
  font-size: 1.15rem;
}

/* ==========================================================================
   Main Workspace Panels
   ========================================================================== */
.workspace {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Left Sidebar Layout */
.sidebar {
  width: 330px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 5;
  transition: var(--transition-smooth);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  overflow: hidden;
}

/* Sidebar Decorative Banner removed to restore selectors layout */

.sidebar-header {
  padding: 1.2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-title {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
  text-shadow: 0 0 4px var(--gold-glow);
}

.sidebar-close-btn {
  display: none; /* Desktop hidden */
}

/* Chapter Selector Container */
.chapter-selector-container {
  padding: 1rem 1.2rem;
}

.chapter-dropdown {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.chapter-dropdown:focus {
  border-color: var(--saffron);
  box-shadow: 0 0 8px var(--saffron-glow);
}

/* Chapter Summary Card styling */
.chapter-summary-card {
  margin: 0.5rem 1.2rem;
  padding: 1.2rem;
  background: var(--saffron-light);
  border: 1px solid rgba(242, 111, 34, 0.12);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.chapter-summary-card::before {
  content: "";
  position: absolute;
  top: -15px;
  right: -15px;
  width: 45px;
  height: 45px;
  background-image: url('assets/sacred_lotus_gold.png');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.15;
  pointer-events: none;
}

.summary-card-title {
  font-size: 0.95rem;
  color: var(--saffron);
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.summary-card-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-height: 130px;
  overflow-y: auto;
}

/* Verse Selector Grid */
.verse-grid-container {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.verse-grid-title {
  font-size: 0.95rem;
  color: var(--gold);
  margin-bottom: 0.8rem;
  letter-spacing: 0.5px;
}

.verse-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  overflow-y: auto;
  padding-right: 0.3rem;
  flex: 1;
}

.verse-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.6rem 0;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: var(--transition-smooth);
  text-align: center;
}

.verse-btn:hover {
  border-color: var(--saffron);
  color: var(--saffron);
  box-shadow: 0 0 8px var(--saffron-glow);
  transform: translateY(-1px);
}

.verse-btn.active {
  background: linear-gradient(135deg, var(--saffron) 0%, #d35400 100%);
  border-color: var(--saffron);
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px var(--saffron-glow);
}

/* ==========================================================================
   Main Content Layout (Scripture Reader)
   ========================================================================== */
.main-content {
  flex: 1;
  background: var(--bg-app);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 4;
}

.main-content-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 2rem 3rem;
}

/* Verse Coordinates Banner */
.verse-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 2rem;
}

.verse-coordinates {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
  text-shadow: 0 0 6px var(--gold-glow);
}

.banner-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.font-size-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: var(--transition-smooth);
}

.font-size-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 6px var(--gold-glow);
}

.share-btn {
  background: var(--saffron-light);
  border: 1px solid var(--saffron);
  color: var(--saffron);
  padding: 0.45rem 1.2rem;
  border-radius: 24px;
  font-size: 0.8rem;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: var(--transition-smooth);
}

.share-btn:hover {
  background: var(--saffron);
  border-color: var(--saffron);
  color: #FFFFFF;
  box-shadow: 0 0 12px var(--saffron-glow);
  transform: translateY(-1px);
}

/* Custom Saffron Toast Notification style */
.gita-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color-active);
  border-left: 5px solid var(--saffron);
  padding: 1.1rem 1.8rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 200;
  animation: slideInRight 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  transition: var(--transition-smooth);
  backdrop-filter: var(--glass-blur);
}

.gita-toast.fade-out {
  opacity: 0;
  transform: translateY(20px);
}

.toast-icon {
  font-size: 1.4rem;
  color: var(--saffron);
}

.toast-message {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Shloka Visual Section */
.shloka-section {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 2.5rem;
}

.sanskrit-card {
  flex: 1;
}

.shloka-illustration-card {
  width: 280px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.shloka-illustration-card::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 12px;
  pointer-events: none;
  z-index: 1;
}

.shloka-illustration-img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 8px var(--gold-glow));
  opacity: 0.8;
  transition: var(--transition-smooth);
}

.shloka-illustration-card:hover .shloka-illustration-img {
  opacity: 1;
  transform: scale(1.03);
}

body.light-theme .shloka-illustration-img {
  opacity: 0.7;
}

body.light-theme .shloka-illustration-card:hover .shloka-illustration-img {
  opacity: 0.95;
}

.sanskrit-card {
  padding: 2.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: var(--transition-smooth);
}

/* Shloka Card Background Watermark removed to relocate on main page background */

/* Overlay dual manuscript-style border lines */
.sanskrit-card::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 12px;
  pointer-events: none;
  z-index: 1;
}

.shloka-heading {
  font-size: 0.95rem;
  color: var(--saffron);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

.sanskrit-text {
  font-size: 1.85rem;
  line-height: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.shloka-divider {
  font-size: 1.1rem;
  color: var(--gold);
  margin: 1rem 0 1.5rem;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.shloka-divider::before,
.shloka-divider::after {
  content: "";
  display: inline-block;
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-glow), transparent);
}

.transliteration-text {
  font-size: 1.05rem;
  line-height: 1.55rem;
  color: var(--text-secondary);
  font-style: italic;
  letter-spacing: 0.6px;
  max-width: 90%;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   Tab Navigation & Content Panels
   ========================================================================== */
.tabs-container {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tab-headers-bar {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
  overflow-x: auto;
}

.tab-header-btn {
  background: transparent;
  border: none;
  outline: none;
  padding: 0.8rem 1.8rem;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  white-space: nowrap;
}

.tab-header-btn:hover {
  color: var(--saffron);
}

.tab-header-btn.active {
  color: var(--saffron);
}

.tab-header-btn.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--saffron);
  box-shadow: 0 0 10px var(--saffron-glow);
}

/* Tab Panels Visibility logic */
.tab-content-panel {
  display: none;
  animation: fadeIn 0.4s ease;
}

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

.panel-section-title {
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 1.2rem;
  letter-spacing: 0.5px;
  border-left: 3px solid var(--saffron);
  padding-left: 0.8rem;
}

/* Translation Selector checkbox grid styling */
.translator-selector-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
  backdrop-filter: var(--glass-blur);
}

.select-label {
  font-size: 0.9rem;
  color: var(--gold);
  letter-spacing: 0.5px;
  font-weight: bold;
}

.translator-checkboxes {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
  background: var(--bg-surface-elevated);
}

.checkbox-label:hover {
  border-color: var(--saffron);
  color: var(--saffron);
  box-shadow: 0 0 5px var(--saffron-glow);
}

.checkbox-label input {
  accent-color: var(--saffron);
  cursor: pointer;
}

/* Translation Grid Comparison Panels */
.translation-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

.translator-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  transition: var(--transition-smooth);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--card-shadow);
}

.translator-card:hover {
  border-color: var(--saffron);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.translator-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}

.translator-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--saffron);
}

.language-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.translator-text {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.65;
}

/* Word Breakdown Grid Panels */
.word-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
}

.word-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.2rem;
  transition: var(--transition-smooth);
  box-shadow: var(--card-shadow);
  backdrop-filter: var(--glass-blur);
}

.word-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.word-header {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 0.8rem;
}

.sanskrit-word {
  font-size: 1.4rem;
  color: var(--saffron);
  margin-bottom: 0.2rem;
}

.english-meaning {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.gram-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-top: 0.3rem;
}

.gram-label {
  color: var(--text-muted);
}

.gram-val {
  color: var(--gold);
  font-weight: 600;
}

/* Commentary Selector & Display Card */
.commentary-selector-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.commentator-dropdown {
  padding: 0.65rem 1.2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.commentator-dropdown:focus {
  border-color: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}

.commentary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
  line-height: 1.8;
  backdrop-filter: var(--glass-blur);
}

.commentary-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.commentary-author-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 4px var(--gold-glow);
}

.commentary-language-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--saffron-light);
  border: 1px solid rgba(242, 111, 34, 0.25);
  color: var(--saffron);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
}

.commentary-body-text {
  font-size: 1.05rem;
  color: var(--text-primary);
  white-space: pre-line;
}

/* FAQ Accordions Layout */
.faqs-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.faq-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
  transition: var(--transition-smooth);
  box-shadow: var(--card-shadow);
  backdrop-filter: var(--glass-blur);
}

.faq-card:hover {
  border-color: var(--saffron);
}

.faq-question {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.faq-answer {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Sacred Footer Styles
   ========================================================================== */
.app-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem;
  text-align: center;
  z-index: 10;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.footer-blurb {
  font-size: 0.8rem;
  color: var(--saffron);
  margin-bottom: 0.4rem;
  letter-spacing: 0.5px;
}

.copyright-info {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Search Overlay Modal Styles
   ========================================================================== */
.search-overlay {
  display: none; /* Controlled by js */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 12, 16, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.search-overlay.active {
  display: flex;
}

.search-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color-active);
  border-radius: 16px;
  width: 90%;
  max-width: 650px;
  max-height: 85%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  animation: slideUp 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  backdrop-filter: var(--glass-blur);
}

.search-modal-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.search-modal-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 0.5rem 1.2rem;
  flex: 1;
}

.search-modal-icon {
  font-size: 1rem;
  color: var(--saffron);
}

.search-modal-input-wrapper input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  width: 100%;
}

.search-modal-input-wrapper input::placeholder {
  color: var(--text-muted);
}

.search-btn-inside-modal {
  background: var(--saffron-light);
  border: 1px solid var(--saffron);
  color: var(--saffron);
  padding: 0.4rem 1rem;
  border-radius: 16px;
  font-size: 0.8rem;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.search-btn-inside-modal:hover {
  background: var(--saffron);
  color: #fff;
}

.close-modal-btn {
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.4rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.close-modal-btn:hover {
  color: var(--saffron);
  transform: scale(1.1);
}

.search-results-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.search-result-item {
  padding: 1.2rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-smooth);
  border-radius: 8px;
}

.search-result-item:hover {
  background: var(--saffron-light);
  transform: translateX(3px);
}

.search-result-coords {
  font-size: 0.8rem;
  color: var(--saffron);
  font-weight: bold;
}

.search-result-text {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-top: 0.4rem;
  line-height: 1.5;
}

/* ==========================================================================
   Animations & Responsive Grid Rules
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Sidebar overlay fade in */
.sidebar-overlay {
  display: none;
}

/* Responsive Styles for Mobile / Tablet */
@media (max-width: 960px) {
  /* Header styling adjustments */
  .app-header {
    padding: 0.8rem 1.2rem;
  }
  
  .menu-toggle-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--saffron);
    cursor: pointer;
    margin-right: 0.5rem;
    outline: none;
    transition: var(--transition-smooth);
  }
  
  .menu-toggle-btn:hover {
    color: var(--saffron-hover);
  }

  .brand-logo {
    height: 36px;
    width: 36px;
  }
  
  .app-main-title {
    font-size: 1.35rem;
  }
  
  .subtitle {
    font-size: 0.65rem;
    letter-spacing: 1.5px;
  }

  .search-trigger-btn {
    width: auto;
    padding: 0.5rem;
    border-radius: 50%;
  }

  .search-trigger-text {
    display: none; /* Icon only on mobile */
  }

  /* Slide out drawer layout for sidebar */
  .workspace {
    flex-direction: column;
  }
  
  .sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    z-index: 100;
    border-right: 1px solid var(--border-color);
    border-bottom: none;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    background-color: var(--bg-app);
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-close-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
  }

  .sidebar-close-btn:hover {
    color: var(--saffron);
  }

  /* Drawer Overlay backdrop active state */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 12, 16, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .sidebar-overlay.active {
    display: block;
    opacity: 1;
  }
  
  /* Main Content Area adjustments */
  .main-content {
    padding: 0;
  }
  
  .main-content-inner {
    padding: 1.5rem 1.2rem;
  }
  
  .shloka-section {
    flex-direction: column;
    align-items: stretch;
    gap: 1.2rem;
  }
  
  .shloka-illustration-card {
    width: 100%;
    height: auto;
    max-height: 130px;
    aspect-ratio: 2.8 / 1;
    padding: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .sanskrit-card {
    padding: 1.8rem 1.2rem;
  }

  .sanskrit-text {
    font-size: 1.45rem;
    line-height: 2.1rem;
  }
  
  .verse-coordinates {
    font-size: 1.25rem;
  }

  .translation-comparison-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .commentary-card {
    padding: 1.5rem;
  }
}

@media (max-width: 600px) {
  .app-header {
    padding: 0.8rem 1rem;
  }

  .app-main-title {
    font-size: 1.2rem;
  }

  .subtitle {
    display: none; /* Hide subtitle on very small viewports */
  }

  .verse-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .banner-actions {
    width: 100%;
    justify-content: space-between;
  }

  .tab-header-btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
}
