.footer-mantra {
  display: block;
  color: var(--color-divine-gold);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 215, 0, 0.3);
  font-size: 1.05rem;
  font-weight: bold;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: 0.01em;
}
/**
 * Kālabhairava Sahasranāma - Mobile-First Stylesheet
 * Pure CSS, highly optimized, beautiful animations
 */

/* ============================================
   CSS VARIABLES & THEME
   ============================================ */
:root {
  /* Dark Theme (Default) */
  --color-bg: #0a0a0a;
  --color-surface: #1a1a1a;
  --color-surface-elevated: #2a2a2a;
  --color-text-primary: #f5f5f5;
  --color-text-secondary: #b0b0b0;
  --color-text-muted: #808080;
  
  --color-crimson: #dc143c;
  --color-blood-red: #8b0000;
  --color-divine-gold: #ffd700;
  --color-gold: #DAA520;
  --color-smoke: rgba(0, 0, 0, 0.55);
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Z-index */
  --z-base: 1;
  --z-elevated: 10;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 1000;
  --z-tooltip: 2000;
}


/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  overflow-x: hidden;
  background-color: #0a0a0a;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #0a0a0a; /* Fallback color */
  /* Fallback background image on body to ensure visibility across browsers */
  background-image: url('MaaAdyaKali_5.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--color-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  position: relative;
}

/* Background image as pseudo-element - always visible */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('MaaAdyaKali_5.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: -2; /* Behind overlays but still visible */
}

/* Dark overlay pseudo-element */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.28); /* More transparent overlay */
  z-index: -1;
}


/* ============================================
   LANDING PAGE
   ============================================ */
.landing-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
  overflow: hidden;
  
  /* Ensure background shows through */
  background: transparent;
}

/* DARKER OVERLAY - As requested! */
.landing-overlay {
  position: absolute;
  inset: 0;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.58); /* More transparent: 58% opacity */
  pointer-events: none;
  z-index: 1;
}


.landing-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 90%;
  width: 100%;
  animation: fadeSlideUp 1s ease-out;
  padding-top: 60px;
}

@media (min-width: 768px) {
  .landing-content {
    max-width: 800px;
  }
}

/* Om Symbol */
.om-symbol {
  font-size: 3.5rem;
  font-family: 'Noto Sans Devanagari', 'Arial Unicode MS', serif;
  color: var(--color-divine-gold);
  margin-bottom: var(--spacing-lg);
  animation: pulse 3s ease-in-out infinite;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

@media (min-width: 768px) {
  .om-symbol {
    font-size: 6rem;
  }
}

/* Main Title */
.main-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  line-height: 1.1;
  padding: 0 1rem;
  letter-spacing: 0.03em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  animation: titleFadeIn 1.2s ease-out;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.title-line-main {
  display: block;
  font-size: 1em;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(90deg, 
    #ffffff 0%, 
    #ffffff 30%, 
    #ff6b9d 40%, 
    #dc143c 50%, 
    #8b0000 55%, 
    #dc143c 60%, 
    #ff6b9d 70%, 
    #ffffff 80%, 
    #ffffff 100%);
  background-size: 200% 100%;
  background-position: -100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: crimsonSweep 3.5s ease-in-out infinite;
  filter: drop-shadow(0 0 15px rgba(220, 20, 60, 0.9))
          drop-shadow(0 0 30px rgba(220, 20, 60, 0.6))
          drop-shadow(0 0 45px rgba(139, 0, 0, 0.5));
  letter-spacing: 0.08em;
  position: relative;
  text-shadow: 0 0 20px rgba(220, 20, 60, 0.5);
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  hyphens: none;
  padding-top: 0.15em;
}

.title-line-sub {
  display: block;
  font-size: 0.75em;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.12em;
  color: #ffd700;
  background: linear-gradient(90deg, 
    #ffd700 0%, 
    #ffd700 25%, 
    #ffb700 40%, 
    #ff9500 50%, 
    #ffa500 60%, 
    #ffb700 75%, 
    #ffd700 100%);
  background-size: 200% 100%;
  background-position: -100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: goldSweep 3.8s ease-in-out infinite 0.3s;
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8))
          drop-shadow(0 0 25px rgba(255, 165, 0, 0.5))
          drop-shadow(0 0 40px rgba(255, 215, 0, 0.3));
  margin-top: 0.3rem;
  position: relative;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.title-description {
  font-size: 1.1rem;
  color: #e5e5e5;
  margin-bottom: var(--spacing-xl);
  font-weight: 400;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  padding: 0 1rem;
  line-height: 1.6;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

@media (min-width: 480px) {
  .main-title {
    font-size: 3.5rem;
  }
  
  .title-description {
    font-size: 1.2rem;
  }
}

.title-line {
  display: block;
  margin-bottom: 0.5rem;
}

.title-line:first-child {
  color: var(--color-crimson);
  font-family: 'Noto Sans Devanagari', 'Arial Unicode MS', serif;
  font-size: 1.1em;
}

.title-line-mahakali {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-crimson);
  font-family: 'Noto Sans Devanagari', 'Arial Unicode MS', serif;
  font-size: 1.1em;
}

.title-line-sahasranama {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-gold);
}

@media (min-width: 768px) {
  .main-title {
    font-size: 5rem;
    padding: 0;
  }
  
  .title-description {
    font-size: 1.3rem;
  }
}

@media (min-width: 1024px) {
  .main-title {
    font-size: 6rem;
  }
  
  .title-description {
    font-size: 1.4rem;
  }
}

/* Subtitle */

.subtitle {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xl);
  line-height: 1.8;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
  padding: 0 1rem;
}

/* Landing Page Description */
.landing-description {
  max-width: 700px;
  margin: var(--spacing-xl) auto;
  padding: 0 1.5rem;
  text-align: center;
}

.description-text {
  color: #f5f5f5;
  font-size: 1.1rem;
  line-height: 1.75;
  margin-bottom: var(--spacing-xl);
  max-width: 65ch;
  margin-left: auto;
  margin-right: auto;
}

.description-text strong {
  color: #ffffff;
  font-weight: 600;
}

.significance-box {
  background: rgba(220, 20, 60, 0.1);
  border: 1px solid rgba(220, 20, 60, 0.25);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  margin: 0 auto;
  max-width: 600px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all var(--transition-normal);
}

.significance-box:hover {
  border-color: rgba(220, 20, 60, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.significance-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: var(--spacing-md);
}

.significance-icon {
  width: 20px;
  height: 20px;
  color: var(--color-crimson);
  flex-shrink: 0;
}

.significance-title {
  color: #dc143c;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0;
}

.significance-text {
  color: #f5f5f5;
  font-size: 1rem;
  line-height: 1.75;
  margin: 0;
  text-align: left;
}

.inspirational-text {
  margin: 2.5rem auto 1.5rem;
  max-width: 700px;
  padding: 0 1.5rem;
}

.inspirational-main {
  font-size: 1.3rem;
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  line-height: 1.5;
}

.inspirational-sub {
  font-size: 1.1rem;
  color: #e5e5e5;
  font-style: italic;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.journey-text {
  margin: 2rem auto;
  max-width: 700px;
  padding: 0 1.5rem;
  font-size: 1rem;
  color: #e5e5e5;
  line-height: 1.7;
}

.journey-text strong {
  color: #ffffff;
  font-weight: 600;
}

.journey-highlights {
  display: block;
  margin-top: 0.5rem;
  color: #dc143c;
  font-weight: 600;
  font-size: 1.1rem;
}

.dedication-section {
  margin: var(--spacing-xl) auto var(--spacing-lg);
  padding: 0 1.5rem;
  max-width: 700px;
  opacity: 1;
}

.dedication-text {
  color: #ffffff;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 215, 0, 0.3);
}

.dedication-text strong {
  color: #ffd700;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(255, 215, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.4);
}

.dedication-mantra {
  color: #ffd700;
  font-size: 1.25rem;
  font-style: italic;
  margin: 0;
  line-height: 1.7;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 215, 0, 0.4);
}

@media (min-width: 768px) {
  .significance-box {
    padding: 2rem;
  }
  
  .landing-description {
    margin: var(--spacing-xl) auto;
  }
  
  .description-text {
    font-size: 1.15rem;
  }
  
  .dedication-text {
    font-size: 1.75rem;
  }
  
  .dedication-mantra {
    font-size: 1.5rem;
  }
}


.subtitle-gold {
  color: #e5e5e5;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  line-height: 1.6;
}

@media (min-width: 768px) {
  .subtitle-gold {
    font-size: 1.5rem;
  }
}


.dedication-crimson {
  margin-top: 1.2em;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  text-align: center;
  font-weight: 400;
  text-shadow: none;
}


.dedication-gold {
  color: #fff;
  font-style: normal;
  font-weight: 400;
  text-shadow: none;
}

@media (min-width: 768px) {
  .subtitle {
    font-size: 1.25rem;
    padding: 0;
  }
}

/* Explore Button */
.explore-button {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 1rem 2rem;
  font-size: 1.1rem;
  min-height: 52px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--color-crimson) 0%, var(--color-blood-red) 100%);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 6px 25px rgba(220, 20, 60, 0.5), 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-normal);
  -webkit-tap-highlight-color: transparent;
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
  position: relative;
  overflow: hidden;
}

.explore-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.explore-button:hover::before {
  left: 100%;
}

.explore-button:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 35px rgba(220, 20, 60, 0.7), 0 4px 15px rgba(0, 0, 0, 0.4);
}

.explore-button:active {
  transform: translateY(-1px) scale(1.01);
}

.explore-button:focus-visible {
  outline: 3px solid rgba(220, 20, 60, 0.5);
  outline-offset: 3px;
}

.explore-button svg {
  animation: bounce 2s ease-in-out infinite;
  transition: transform var(--transition-fast);
}

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


/* eBook Download Banner */
.ebook-banner {
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
  animation: fadeSlideUp 1s ease-out 0.5s both;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.ebook-banner-content {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.15) 0%, rgba(139, 0, 0, 0.15) 100%);
  border: 2px solid var(--color-crimson);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(220, 20, 60, 0.2);
}

.ebook-banner-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.ebook-icon {
  flex-shrink: 0;
  color: var(--color-divine-gold);
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
  margin-top: 0.25rem;
}

.ebook-text {
  flex: 1;
  position: relative;
  z-index: 1;
}

.ebook-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-crimson);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.ebook-description {
  font-size: 0.9375rem;
  color: var(--color-text-primary);
  margin: 0.5rem 0 0.75rem 0;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ebook-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-crimson) 0%, var(--color-blood-red) 100%);
  border: none;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 15px rgba(220, 20, 60, 0.4);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ebook-link:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 25px rgba(220, 20, 60, 0.6);
}

.ebook-link:active {
  transform: translateY(0) scale(0.98);
}

.ebook-link svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

@media (max-width: 640px) {
  .ebook-banner-content {
    flex-direction: column;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
  }

  .ebook-icon {
    margin-top: 0;
  }

  .ebook-description {
    font-size: 0.875rem;
  }

  .ebook-link {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
  }
  
  .landing-description {
    margin: var(--spacing-lg) auto;
    padding: 0 1rem;
  }
  
  .description-text {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
  }
  
  .significance-box {
    padding: var(--spacing-md);
  }
  
  .explore-button {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    min-height: 48px;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
  }
  
  .dedication-section {
    margin: var(--spacing-lg) auto var(--spacing-md);
  }
  
  .ebook-banner {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
  }
}


/* ============================================
   NAMES SECTION
   ============================================ */
.names-section {
  position: relative;
  min-height: 100vh;
  padding: var(--spacing-xl) var(--spacing-md);
  
  /* Ensure background shows through */
  background: transparent;
}

/* About section article hover effects */
#about-section article {
  transition: all var(--transition-normal);
}

#about-section article:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Darker overlay for names section */
.names-overlay {
  position: absolute;
  inset: 0;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.28); /* Even more transparent: 28% */
  pointer-events: none;
  z-index: 1;
}


.container {
  position: relative;
  z-index: 10;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

@media (min-width: 1200px) {
  .container {
    padding: 0 3rem;
  }
}

/* Header */
.names-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  animation: fadeSlideUp 0.8s ease-out;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9), 
               0 0 20px rgba(0, 0, 0, 0.7),
               0 4px 8px rgba(0, 0, 0, 0.8);
  background: rgba(0, 0, 0, 0.4);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 480px) {
  .section-title {
    font-size: 2rem;
  }
}

@media (min-width: 768px) {
  .section-title {
    font-size: 3rem;
  }
}

.section-subtitle {
  font-size: 1rem;
  color: #f5f5f5;
  max-width: 600px;
  margin: 1rem auto 0;
  line-height: 1.7;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8),
               0 1px 4px rgba(0, 0, 0, 0.6);
  background: rgba(0, 0, 0, 0.35);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 768px) {
  .section-subtitle {
    font-size: 1.125rem;
  }
}

/* Controls Panel */
.controls-panel {
  background: var(--color-smoke);
  /* Optimized: removed backdrop-filter */
  /* -webkit-backdrop-filter: blur(10px); */
  /* backdrop-filter: blur(10px); */
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  animation: fadeSlideUp 0.6s ease-out 0.2s both;
  border: 1px solid rgba(220, 20, 60, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
  .controls-panel {
    padding: var(--spacing-lg);
  }
}

/* Search Box */
.search-box {
  position: relative;
  margin-bottom: var(--spacing-md);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

#search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  font-size: 1rem;
  background: var(--color-surface);
  border: 2px solid rgba(220, 20, 60, 0.2);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
  min-height: 44px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#search-input:focus {
  outline: none;
  border-color: var(--color-crimson);
  box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
}

#search-input::placeholder {
  color: var(--color-text-muted);
}

/* Filters Row */
.filters-row {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-md);
}

.language-select {
  flex: 1;
  min-width: 150px;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  background: var(--color-surface);
  border: 2px solid rgba(220, 20, 60, 0.2);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 44px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.language-select:focus {
  outline: none;
  border-color: var(--color-crimson);
  box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 2px solid rgba(220, 20, 60, 0.3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
  min-width: 80px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-surface-elevated);
  border-color: var(--color-crimson);
  box-shadow: 0 4px 12px rgba(220, 20, 60, 0.2);
  transform: translateY(-1px);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Stats Display */
.stats-display {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}

.stats-display strong {
  color: var(--color-crimson);
  font-weight: 600;
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: var(--spacing-xl);
}

.loader {
  width: 3rem;
  height: 3rem;
  border: 3px solid var(--color-smoke);
  border-top-color: var(--color-crimson);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
  margin: 0 auto var(--spacing-md);
}

/* Error State */
.error-state {
  text-align: center;
  padding: var(--spacing-xl);
  background: var(--color-smoke);
  border-radius: var(--radius-lg);
  margin: var(--spacing-lg) 0;
}

.error-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
}

.error-state h3 {
  color: var(--color-crimson);
  margin-bottom: var(--spacing-sm);
}

/* ============================================
   NAMES GRID
   ============================================ */
.names-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

@media (min-width: 768px) {
  .names-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .names-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Name Card */
.name-card {
  background: var(--color-smoke);
  /* Optimized: removed backdrop-filter for performance */
  /* -webkit-backdrop-filter: blur(10px); */
  /* backdrop-filter: blur(10px); */
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  transition: all var(--transition-normal);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideUp 0.4s ease-out forwards;
  border: 1px solid rgba(220, 20, 60, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.name-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.name-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(220, 20, 60, 0.2);
  border-color: rgba(220, 20, 60, 0.3);
}

@media (max-width: 767px) {
  .name-card:active {
    transform: scale(0.98);
  }
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.card-index {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  background: #8b0000; /* Blood Red - AAA Contrast (>7:1) */
  border-radius: var(--radius-full);
}

.card-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
  line-height: 1.3;
}

.card-meaning {
  font-size: 0.9375rem;
  color: var(--color-text-primary);
  font-style: italic;
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
}

/* Toggle Button */
.toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  min-height: 48px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-primary);
  background: var(--color-surface);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  margin-bottom: 0.75rem;
}

.toggle-btn:hover {
  background: var(--color-surface-elevated);
}

.toggle-btn:active {
  transform: scale(0.98);
}

.chevron {
  color: var(--color-crimson);
  transition: transform var(--transition-normal);
}

.chevron.rotated {
  transform: rotate(180deg);
}

/* Elaboration */
.elaboration {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal) ease;
}

.elaboration.expanded {
  max-height: 2000px; /* Large enough for any content */
  margin-top: var(--spacing-md);
}

.elaboration-content {
  padding: var(--spacing-md);
  background: var(--color-surface-elevated);
  border-left: 4px solid var(--color-crimson);
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
  font-size: 0.9375rem;
  line-height: 1.7;
  white-space: pre-wrap;
  max-height: 500px;
  overflow-y: auto;
  overflow-x: hidden;
  word-wrap: break-word;
}

/* Scrollbar styling for elaboration content */
.elaboration-content::-webkit-scrollbar {
  width: 8px;
}

.elaboration-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.elaboration-content::-webkit-scrollbar-thumb {
  background: var(--color-crimson);
  border-radius: 4px;
}

.elaboration-content::-webkit-scrollbar-thumb:hover {
  background: var(--color-blood-red);
}


/* Load More */
.load-more-container {
  text-align: center;
  margin-top: var(--spacing-lg);
  padding: 1rem;
}

.btn-primary {
  padding: 1rem 2.5rem;
  min-height: 48px;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--color-crimson) 0%, var(--color-blood-red) 100%);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(220, 20, 60, 0.4);
  transition: all var(--transition-normal);
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(220, 20, 60, 0.6);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

/* ============================================
   eBOOK PROMO SECTION
   ============================================ */
.ebook-promo-section {
  position: relative;
  margin-top: var(--spacing-xl);
  padding: var(--spacing-xl) 0;
  background: transparent;
  z-index: 10;
}

.ebook-promo-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.ebook-promo-card {
  background: var(--color-smoke);
  border: 2px solid var(--color-crimson);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  animation: fadeSlideUp 0.8s ease-out 0.3s both;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.ebook-promo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-crimson), transparent);
  animation: glow 3s ease-in-out infinite;
}

.ebook-promo-header {
  margin-bottom: var(--spacing-md);
}

.ebook-promo-badge {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-crimson);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.ebook-promo-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0.5rem 0 0 0;
}

@media (max-width: 640px) {
  .ebook-promo-title {
    font-size: 1.5rem;
  }
}

.ebook-promo-text {
  font-size: 0.9375rem;
  color: var(--color-text-primary);
  line-height: 1.7;
  margin-bottom: var(--spacing-md);
}

.ebook-promo-text strong {
  color: var(--color-crimson);
  font-weight: 600;
}

/* eBook Features List */
.ebook-features {
  list-style: none;
  padding: 0;
  margin: var(--spacing-lg) 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-sm);
}

@media (min-width: 768px) {
  .ebook-features {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ebook-features li {
  font-size: 0.9375rem;
  color: var(--color-text-primary);
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ebook-features strong {
  color: var(--color-crimson);
  font-weight: 600;
}

/* eBook CTA Button */
.ebook-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-crimson) 0%, var(--color-blood-red) 100%);
  border: none;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 20px rgba(220, 20, 60, 0.4);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  margin-bottom: var(--spacing-md);
}

.ebook-cta-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 30px rgba(220, 20, 60, 0.6);
}

.ebook-cta-btn:active {
  transform: translateY(-1px) scale(0.98);
}

.ebook-cta-btn svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 640px) {
  .ebook-cta-btn {
    width: 100%;
    justify-content: center;
  }

  .ebook-promo-card {
    padding: var(--spacing-md);
  }

  .ebook-promo-title {
    font-size: 1.25rem;
  }

  .ebook-promo-text {
    font-size: 0.875rem;
  }
}

.ebook-promo-footer {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-align: center;
  margin: 0;
  font-style: italic;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  text-align: center;
  margin-top: var(--spacing-xl);
  padding: var(--spacing-xl) 1rem;
  border-top: 1px solid rgba(255, 215, 0, 0.2);
  position: relative;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.95);
}

@media (min-width: 768px) {
  .site-footer {
    padding: var(--spacing-xl) 2rem;
  }
}

.om-symbol-small {
  font-size: 1.5rem;
  font-family: 'Noto Sans Devanagari', serif;
  color: var(--color-divine-gold);
  margin-bottom: var(--spacing-sm);
}

.footer-text {
  font-size: 0.875rem;
  color: var(--color-divine-gold);
  line-height: 1.8;
}

.footer-text strong {
  color: var(--color-divine-gold);
  font-weight: 600;
}

.footer-text em {
  color: var(--color-divine-gold);
  opacity: 0.9;
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden {
  display: none !important;
}

/* Prevent CLS - Reserve space for dynamic content */
.names-grid {
  min-height: 400px; /* Reserve minimum space to prevent layout shift */
}

.name-card {
  content-visibility: auto; /* Performance optimization for off-screen cards */
}

.loading-state,
.error-state {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Glow effect */
.animate-glow {
  animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  }
  50% {
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
  }
}

/* Title animations */
@keyframes titleFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Crimson red sweep animation - red moving from left to right */
@keyframes crimsonSweep {
  0% {
    background-position: -100% 0;
  }
  50% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

/* Gold sweep animation for Sahasranama subtitle */
@keyframes goldSweep {
  0% {
    background-position: -100% 0;
  }
  50% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@keyframes bloodGlow {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(220, 20, 60, 0.7))
            drop-shadow(0 0 15px rgba(139, 0, 0, 0.5));
    text-shadow: 
      /* Black outline */
      -2px -2px 0 #000,
      2px -2px 0 #000,
      -2px 2px 0 #000,
      2px 2px 0 #000,
      -1px -2px 0 #000,
      1px -2px 0 #000,
      -2px -1px 0 #000,
      2px -1px 0 #000,
      -1px 2px 0 #000,
      1px 2px 0 #000,
      -2px 1px 0 #000,
      2px 1px 0 #000,
      /* Crimson glow */
      0 0 20px rgba(220, 20, 60, 0.6),
      0 0 40px rgba(139, 0, 0, 0.5),
      0 4px 15px rgba(0, 0, 0, 0.8);
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(220, 20, 60, 0.9))
            drop-shadow(0 0 25px rgba(139, 0, 0, 0.7))
            drop-shadow(0 0 35px rgba(178, 34, 34, 0.5));
    text-shadow: 
      /* Black outline */
      -2px -2px 0 #000,
      2px -2px 0 #000,
      -2px 2px 0 #000,
      2px 2px 0 #000,
      -1px -2px 0 #000,
      1px -2px 0 #000,
      -2px -1px 0 #000,
      2px -1px 0 #000,
      -1px 2px 0 #000,
      1px 2px 0 #000,
      -2px 1px 0 #000,
      2px 1px 0 #000,
      /* Intense crimson glow */
      0 0 30px rgba(220, 20, 60, 0.8),
      0 0 60px rgba(139, 0, 0, 0.7),
      0 0 90px rgba(178, 34, 34, 0.5),
      0 4px 20px rgba(0, 0, 0, 0.9);
  }
}

@keyframes bloodSubGlow {
  0%, 100% {
    filter: drop-shadow(0 0 6px rgba(220, 20, 60, 0.6))
            drop-shadow(0 0 12px rgba(139, 0, 0, 0.4));
    text-shadow: 
      /* Black outline */
      -1.5px -1.5px 0 #000,
      1.5px -1.5px 0 #000,
      -1.5px 1.5px 0 #000,
      1.5px 1.5px 0 #000,
      -1px -1.5px 0 #000,
      1px -1.5px 0 #000,
      -1.5px -1px 0 #000,
      1.5px -1px 0 #000,
      -1px 1.5px 0 #000,
      1px 1.5px 0 #000,
      -1.5px 1px 0 #000,
      1.5px 1px 0 #000,
      /* Crimson glow */
      0 0 15px rgba(220, 20, 60, 0.5),
      0 0 30px rgba(139, 0, 0, 0.4),
      0 2px 12px rgba(0, 0, 0, 0.7);
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(220, 20, 60, 0.8))
            drop-shadow(0 0 20px rgba(139, 0, 0, 0.6));
    text-shadow: 
      /* Black outline */
      -1.5px -1.5px 0 #000,
      1.5px -1.5px 0 #000,
      -1.5px 1.5px 0 #000,
      1.5px 1.5px 0 #000,
      -1px -1.5px 0 #000,
      1px -1.5px 0 #000,
      -1.5px -1px 0 #000,
      1.5px -1px 0 #000,
      -1px 1.5px 0 #000,
      1px 1.5px 0 #000,
      -1.5px 1px 0 #000,
      1.5px 1px 0 #000,
      /* Intense crimson glow */
      0 0 25px rgba(220, 20, 60, 0.7),
      0 0 50px rgba(139, 0, 0, 0.6),
      0 2px 18px rgba(0, 0, 0, 0.8);
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .main-title,
  .title-line-main,
  .title-line-sub {
    animation: titleFadeIn 0.5s ease-out !important;
  }
  
  .title-line-main,
  .title-line-sub {
    background-position: 0% 0% !important;
    animation: none !important;
  }
  
  .explore-button svg {
    animation: none !important;
  }
}

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--color-crimson);
  outline-offset: 2px;
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */
@media (max-width: 768px) {
  body { font-size: 14px; }
  /* Adjust layouts for mobile */
}

/* Very small phones: Improve wrapping and reduce padding for <= 400px widths */
@media (max-width: 400px) {
  .main-title { font-size: 1.75rem; padding: 0 0.5rem; margin-bottom: var(--spacing-sm); line-height: 1.2; }
  .om-symbol { font-size: 3rem; }
  .subtitle-gold { font-size: 1rem; }
  .title-description { font-size: 0.9rem; margin-bottom: var(--spacing-lg); line-height: 1.5; padding: 0 0.75rem; }
  .explore-button { padding: 0.75rem 1.5rem; font-size: 0.95rem; min-height: 44px; }
  .landing-content { padding: 0 0.5rem; }
  .container { padding: 0 0.5rem; }
  #search-input { padding-left: 2.5rem; }
  .search-icon { left: 0.75rem; }
  .name-card { padding: 0.75rem; }
  .nav-button { width: 48px; height: 48px; bottom: 16px; right: 16px; }
  .landing-description { padding: 0 0.75rem; }
  .description-text { font-size: 0.9375rem; }
  .significance-box { padding: var(--spacing-sm); }
  .significance-title { font-size: 1.1rem; }
  .significance-text { font-size: 0.9375rem; }
  .dedication-text { font-size: 1.1rem; }
  .dedication-mantra { font-size: 1rem; }
  .title-line-main { letter-spacing: 0.04em; }
  .title-line-sub { letter-spacing: 0.06em; font-size: 0.7em; }

  /* Prevent long names or Sanskrit compounds from overflowing */
  .card-name,
  .card-meaning,
  .section-title,
  .subtitle,
  .footer-text,
  .elaboration-content,
  .main-title,
  .title-line-main,
  .title-line-sub,
  .title-description {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }
}

/* Small phones: 401px to 640px */
@media (min-width: 401px) and (max-width: 640px) {
  .main-title { 
    font-size: 2.25rem; 
    padding: 0 0.75rem; 
    line-height: 1.15;
  }
  .title-line-main { 
    letter-spacing: 0.05em; 
  }
  .title-line-sub { 
    letter-spacing: 0.08em; 
    font-size: 0.72em; 
  }
  .title-description { 
    font-size: 1rem; 
    line-height: 1.6; 
    padding: 0 1rem; 
  }
  .landing-content { 
    padding: 0 0.75rem; 
  }
  .explore-button { 
    min-height: 48px; 
    padding: 0.875rem 1.75rem; 
  }
}

/* ============================================
   ABOUT SECTION RESPONSIVE STYLES
   ============================================ */
@media (max-width: 640px) {
  #about-section {
    padding: 2.5rem 1rem !important;
  }
  
  #about-section h2 {
    font-size: 1.5rem !important;
  }
  
  #about-section article {
    padding: 1.5rem !important;
  }
  
  #about-section h3 {
    font-size: 1.25rem !important;
  }
  
  #about-section .landing-description {
    padding: 0 1rem !important;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  #about-section {
    padding: 3rem 1.25rem !important;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .nav-button,
  .explore-button,
  .scroll-hint {
    display: none;
  }
}
