:root {
  --gold: #d4af37;
  --deep-gold: #b8860b;
  --saffron: #ff6b00;
  --saffron-light: #ffb347;
  --crimson: #8b0000;
  --maroon: #4a0e0e;
  --cream: #fff8e7;
  --dark: #1a0a00;
  --text: #2c1810;
  --lotus-pink: #e8748a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--dark);
  color: var(--cream);
  font-family: 'Tiro Devanagari Hindi', serif;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Animated Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%,
      rgba(212, 175, 55, 0.15) 0%,
      transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%,
      rgba(255, 107, 0, 0.1) 0%,
      transparent 50%),
    radial-gradient(ellipse 40% 60% at 10% 60%,
      rgba(139, 0, 0, 0.1) 0%,
      transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% {
    opacity: 0.7;
  }

  100% {
    opacity: 1;
  }
}

/* Mandala decoration */
.mandala-bg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
  animation: rotateSlow 60s linear infinite;
}

@keyframes rotateSlow {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* HEADER */
header {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 40px 20px 30px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  background: linear-gradient(180deg,
      rgba(26, 10, 0, 0.95) 0%,
      rgba(26, 10, 0, 0.7) 100%);
  backdrop-filter: blur(10px);
}

.om-symbol {
  font-size: 3rem;
  color: var(--gold);
  display: block;
  animation: glow 3s ease-in-out infinite alternate;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.8));
}

@keyframes glow {
  from {
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
  }

  to {
    filter: drop-shadow(0 0 30px rgba(212, 175, 55, 1)) drop-shadow(0 0 60px rgba(255, 107, 0, 0.5));
  }
}

header h1 {
  font-family: 'Cinzel Decorative', cursive;
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 900;
  background: linear-gradient(135deg, #d4af37, #ffb347, #d4af37, #ff6b00);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
  letter-spacing: 2px;
}

@keyframes shimmer {
  to {
    background-position: 200% center;
  }
}

header p {
  color: rgba(255, 248, 231, 0.6);
  font-size: 0.95rem;
  margin-top: 8px;
  font-family: 'EB Garamond', serif;
  font-style: italic;
}

.header-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.divider-line {
  height: 1px;
  width: 100px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.divider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--saffron);
  box-shadow: 0 0 10px var(--saffron);
}

/* NAVIGATION (Mobile Friendly & Glassmorphism) */
nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(26, 10, 0, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  display: flex;
  align-items: center;
  padding: 6px 10px;
  gap: 10px;
}

.nav-inner-wrapper {
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
  mask-image: linear-gradient(to right, transparent, black 20px, black calc(100% - 20px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 20px, black calc(100% - 20px), transparent);
}

.nav-inner-wrapper::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.nav-inner {
  display: flex;
  gap: 8px;
  padding: 4px 20px;
  align-items: center;
}

.nav-arrow {
  background: rgba(255, 248, 231, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold);
  font-size: 1.5rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
  z-index: 10;
}

.nav-arrow:hover {
  background: var(--gold);
  color: var(--dark);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.nav-btn {
  background: rgba(255, 248, 231, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: rgba(255, 248, 231, 0.8);
  font-family: 'Tiro Devanagari Hindi', serif;
  font-size: 0.9rem;
  padding: 8px 18px;
  cursor: pointer;
  border-radius: 25px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn.active {
  background: linear-gradient(135deg, var(--saffron), var(--gold));
  color: var(--dark);
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
  transform: translateY(-1px);
}

.nav-btn:hover:not(.active) {
  background: rgba(255, 248, 231, 0.1);
  border-color: var(--gold);
  color: var(--cream);
}

/* MAIN LAYOUT */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
  position: relative;
  z-index: 1;
}

/* PAGE: HOME */
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.deity-card {
  background: linear-gradient(145deg,
      rgba(255, 107, 0, 0.08),
      rgba(212, 175, 55, 0.05));
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.deity-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(255, 107, 0, 0.15),
      rgba(212, 175, 55, 0.1));
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}

.deity-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--gold);
  box-shadow:
    0 20px 40px rgba(212, 175, 55, 0.2),
    0 0 0 1px rgba(255, 107, 0, 0.3);
}

.deity-card:hover::before {
  opacity: 1;
}

.deity-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.deity-card:hover .deity-img {
  transform: scale(1.05);
}

.deity-img-fallback {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  background: linear-gradient(135deg,
      rgba(212, 175, 55, 0.1),
      rgba(255, 107, 0, 0.05));
}

.deity-info {
  padding: 15px;
  position: relative;
  z-index: 2;
  background: linear-gradient(0deg, rgba(26, 10, 0, 0.9), transparent);
}

.deity-name {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--gold);
  display: block;
  margin-bottom: 4px;
}

.deity-meta {
  font-size: 0.75rem;
  color: rgba(255, 248, 231, 0.5);
}

.deity-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.tag {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid;
}

.tag-aarti {
  border-color: var(--saffron);
  color: var(--saffron);
}

.tag-chalisa {
  border-color: var(--lotus-pink);
  color: var(--lotus-pink);
}

.tag-mantra {
  border-color: #7df9ff;
  color: #7df9ff;
}

/* Mantra styles */
.mantra-grid {
  display: grid;
  gap: 20px;
}

.mantra-card {
  background: linear-gradient(135deg,
      rgba(125, 249, 255, 0.05),
      rgba(212, 175, 55, 0.06));
  border: 1px solid rgba(125, 249, 255, 0.2);
  border-radius: 16px;
  padding: 25px 30px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.mantra-card:hover {
  border-color: rgba(125, 249, 255, 0.5);
  box-shadow: 0 8px 30px rgba(125, 249, 255, 0.1);
  transform: translateY(-2px);
}

.mantra-card::before {
  content: 'ॐ';
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 80px;
  color: rgba(125, 249, 255, 0.04);
  pointer-events: none;
  font-family: serif;
}

.mantra-type {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #7df9ff;
  margin-bottom: 10px;
  font-family: 'EB Garamond', serif;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mantra-type::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(125, 249, 255, 0.3), transparent);
}

.mantra-text {
  font-size: 1.25rem;
  line-height: 2;
  color: #fff8e7;
  font-weight: bold;
  text-shadow: 0 0 20px rgba(125, 249, 255, 0.2);
  margin-bottom: 12px;
}

.mantra-meaning {
  font-size: 0.9rem;
  color: rgba(255, 248, 231, 0.55);
  font-family: 'EB Garamond', serif;
  font-style: italic;
  line-height: 1.7;
  border-top: 1px dashed rgba(125, 249, 255, 0.15);
  padding-top: 10px;
}

.mantra-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.75rem;
  color: rgba(255, 248, 231, 0.4);
  font-family: 'EB Garamond', serif;
}

.copy-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(125, 249, 255, 0.1);
  border: 1px solid rgba(125, 249, 255, 0.3);
  color: #7df9ff;
  font-size: 0.7rem;
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'EB Garamond', serif;
}

.copy-btn:hover {
  background: rgba(125, 249, 255, 0.2);
  transform: scale(1.05);
}

.copy-btn.copied {
  background: rgba(0, 200, 100, 0.2);
  border-color: rgba(0, 200, 100, 0.5);
  color: #00c864;
}

/* PAGE: CONTENT */
.page {
  display: none;
}

.page.active {
  display: block;
}

.content-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding: 25px;
  background: linear-gradient(135deg,
      rgba(212, 175, 55, 0.08),
      rgba(255, 107, 0, 0.05));
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 20px;
}

.deity-portrait {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.4);
  flex-shrink: 0;
}

.deity-portrait-emoji {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: rgba(212, 175, 55, 0.1);
  flex-shrink: 0;
}

.content-header-text h2 {
  font-size: 2rem;
  color: var(--gold);
  font-family: 'Cinzel Decorative', cursive;
}

.content-header-text p {
  color: rgba(255, 248, 231, 0.6);
  margin-top: 5px;
  font-style: italic;
  font-family: 'EB Garamond', serif;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.tab-btn {
  background: rgba(255, 248, 231, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: rgba(255, 248, 231, 0.7);
  padding: 10px 25px;
  border-radius: 30px;
  cursor: pointer;
  font-family: 'Tiro Devanagari Hindi', serif;
  font-size: 1rem;
  transition: all 0.3s;
}

.tab-btn.active,
.tab-btn:hover {
  background: linear-gradient(135deg, var(--saffron), var(--gold));
  color: var(--dark);
  border-color: transparent;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.text-content {
  display: none;
}

.text-content.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lyrics-box {
  background: linear-gradient(145deg,
      rgba(212, 175, 55, 0.06),
      rgba(255, 107, 0, 0.03));
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 16px;
  padding: 35px 40px;
  line-height: 2.2;
  font-size: 1.15rem;
  color: var(--cream);
  position: relative;
  overflow: hidden;
}

.lyrics-box::before {
  content: 'ॐ';
  position: absolute;
  top: -20px;
  right: 20px;
  font-size: 120px;
  color: rgba(212, 175, 55, 0.04);
  pointer-events: none;
  font-family: serif;
}

.lyrics-box .stanza {
  margin-bottom: 25px;
}

.lyrics-box .refrain {
  color: var(--saffron-light);
  font-weight: bold;
  text-align: center;
  padding: 10px 0;
  border-top: 1px dashed rgba(212, 175, 55, 0.3);
  border-bottom: 1px dashed rgba(212, 175, 55, 0.3);
  margin: 20px 0;
}

.lyrics-box .title-line {
  text-align: center;
  color: var(--gold);
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

/* ABOUT SECTION ENHANCEMENTS */
.about-content {
  border: 2px solid rgba(212, 175, 55, 0.3);
  position: relative;
  background: linear-gradient(165deg,
      rgba(26, 10, 0, 0.9) 0%,
      rgba(42, 20, 0, 0.8) 100%);
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
}

.about-content h3 {
  color: var(--saffron-light);
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.35rem;
  margin: 30px 0 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 107, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 12px;
}

.about-content h3::before {
  content: '🚩';
  font-size: 1.1rem;
}

.about-content p {
  margin-bottom: 20px;
  color: rgba(255, 248, 231, 0.9);
  text-align: justify;
}

.about-content ul {
  list-style: none;
  margin: 20px 0;
  display: grid;
  gap: 15px;
}

.about-content li {
  background: rgba(255, 248, 231, 0.03);
  padding: 15px 20px;
  border-radius: 12px;
  border-left: 3px solid var(--gold);
  transition: transform 0.3s ease;
}

.about-content li:hover {
  transform: translateX(5px);
  background: rgba(255, 248, 231, 0.06);
}

.about-content strong {
  color: var(--gold);
  font-weight: bold;
  font-size: 1.05rem;
}

.about-content .info-section {
  background: rgba(212, 175, 55, 0.04);
  padding: 25px;
  border-radius: 15px;
  border: 1px solid rgba(212, 175, 55, 0.1);
  margin-bottom: 30px;
}

.back-btn {
  background: none;
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold);
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  font-family: 'Tiro Devanagari Hindi', serif;
  font-size: 0.9rem;
  margin-bottom: 20px;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.back-btn:hover {
  background: rgba(212, 175, 55, 0.1);
  transform: translateX(-3px);
}

/* Section title */
.section-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.5), transparent);
}

.section-subtitle {
  color: rgba(255, 248, 231, 0.5);
  font-size: 0.9rem;
  margin-bottom: 25px;
  font-style: italic;
  font-family: 'EB Garamond', serif;
}

/* Diya decoration */
.diya {
  display: inline-block;
  animation: flicker 2s ease-in-out infinite alternate;
}

@keyframes flicker {

  0%,
  100% {
    text-shadow:
      0 0 10px #ff6b00,
      0 0 20px #ffb347;
  }

  50% {
    text-shadow:
      0 0 5px #ff6b00,
      0 0 10px #ffb347;
  }
}

/* FOOTER */
footer {
  text-align: center;
  padding: 30px 20px;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  color: rgba(255, 248, 231, 0.4);
  font-size: 0.85rem;
  font-family: 'EB Garamond', serif;
  font-style: italic;
  position: relative;
  z-index: 1;
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(26, 10, 0, 0.5);
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 3px;
}

/* Responsive */
@media (max-width: 600px) {
  .home-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .deity-img,
  .deity-img-fallback {
    height: 140px;
  }

  .lyrics-box {
    padding: 20px;
    font-size: 1rem;
  }

  .content-header {
    flex-direction: column;
    text-align: center;
  }
}

.loader {
  position: fixed;
  inset: 0;
  background: var(--dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition:
    opacity 0.5s,
    visibility 0.5s;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-om {
  font-size: 5rem;
  animation: glow 1s ease-in-out infinite alternate;
  color: var(--gold);
}

.loader-text {
  margin-top: 20px;
  color: rgba(255, 248, 231, 0.6);
  font-family: 'EB Garamond', serif;
  font-style: italic;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

.particle {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  animation: floatUp linear infinite;
  opacity: 0;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.7;
  }

  90% {
    opacity: 0.3;
  }

  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}