/* --- 1. Base & Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&display=swap');

body {
  background-color: #121212; /* Dark mode default */
  color: #e0e0e0;
  font-family: 'Atkinson Hyperlegible', sans-serif;
  margin: 0;
  padding-top: 80px; /* space for navbar */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* --- 2. Navbar --- */
.navbar {
  width: 100%;
  background-color: var(--nav-bg, #181818);
  color: var(--nav-text, #f0f0f0);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 40px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-left .brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.4rem;
  color: #a78bfa;
  gap: 8px;
}

.nav-icon {
  width: 26px;
  height: 26px;
}

.nav-right a {
  text-decoration: none;
  color: var(--nav-text, #e0e0e0);
  margin: 0 12px;
  transition: color 0.2s ease;
}

.nav-right a:hover {
  color: #a78bfa;
}

.get-started {
  background-color: #8b5cf6;
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background-color 0.3s;
}

.get-started:hover {
  background-color: #a78bfa;
}

.theme-btn {
  border: none;
  background: none;
  font-size: 1.6rem;
  cursor: pointer;
  margin-left: 18px;
  color: #a78bfa; /* visible purple tone */
  transition: transform 0.3s ease, color 0.3s ease, opacity 0.3s ease;
  opacity: 0.9;
}

.theme-btn:hover {
  transform: rotate(25deg) scale(1.1);
  color: #c4b5fd;
  opacity: 1;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}


.light-mode {
  --nav-bg: #ffffff;
  --nav-text: #111;
  background-color: #f7f7ff;
  color: #111;
}

.light-mode .navbar {
  background-color: #f9f9f9;
  color: #111;
}

/* --- 3. Intro Animation --- */
/* All elements visible by default */
h1, p, .language-selector, .controls, .caption-box, .container, .navbar {
  opacity: 1 !important;
  visibility: visible !important;
}

/* --- 4. Layout --- */
.container {
  max-width: 900px;
  width: 100%;
  text-align: center;
}

/* --- 5. Header & Branding --- */
h1 {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
  margin-bottom: 10px;
}

p {
  color: #9ca3af;
  font-size: 1.1rem;
  margin-bottom: 30px;
}

/* --- Caption Icon beside Heading --- */
.vaani-header {
  font-size: 4rem;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 20px;
  line-height: 1.1;
}

/* --- Perfectly aligned CC Icon --- */
.cc-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;              /* small tweak for font baseline */
  transition: transform 0.3s ease, filter 0.3s ease;
}

.cc-icon svg {
  width: 100%;
  height: 100%;
  stroke: #a78bfa;
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.4));
}

.cc-icon:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 0 12px rgba(167, 139, 250, 0.6));
}


/* --- 6. Language Selector --- */
.language-selector {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
}

.lang-btn {
  font-size: 0.9rem;
  padding: 8px 15px;
  border: 1px solid #555;
  border-radius: 20px;
  background-color: #2a2a2a;
  color: #e0e0e0;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.lang-btn:hover {
  background-color: #3f3f3f;
}

.lang-btn.active {
  background-color: #a78bfa;
  color: #fff;
  border-color: #a78bfa;
}

/* --- 7. Control Buttons --- */
.controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

#toggle-btn {
  font-size: 1.2rem;
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

#toggle-btn:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

#toggle-btn.listening {
  background-color: #ff4d4d;
  color: #fff;
}

.secondary-btn {
  font-size: 0.9rem;
  padding: 8px 14px;
  border: 1px solid #555;
  border-radius: 6px;
  background-color: #2a2a2a;
  color: #e0e0e0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.secondary-btn:hover {
  background-color: #3f3f3f;
}

/* --- 8. Caption Boxes --- */
.caption-box-container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}

.caption-box {
  width: 48%;
  background-color: #1e1e1e;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transition: box-shadow 0.4s ease-out, transform 0.3s ease;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.caption-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.25);
  border-color: rgba(139, 92, 246, 0.3);
}

.caption-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background-color: #2a2a2a;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.caption-header h2 {
  font-size: 1rem;
  margin: 0;
  color: #bbb;
}

.caption-content {
  font-size: 1.35rem;
  line-height: 1.7;
  padding: 24px;
  min-height: 220px;
  text-align: left;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: #f3f4f6;
  font-weight: 400;
}

textarea.caption-content {
  width: 100%;
  box-sizing: border-box;
  background-color: #1e1e1e;
  color: #fff;
  border: none;
  resize: none;
}

textarea.caption-content:focus {
  outline: none;
  box-shadow: 0 0 6px #8b5cf6;
}

/* --- 9. CC Pulse Animation --- */
@keyframes ccPulse {
  0%, 100% {
    filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(167, 139, 250, 0.9));
  }
}

.cc-icon svg.listening {
  animation: ccPulse 1.5s infinite ease-in-out;
}

/* --- 10. Light Mode Overrides --- */
.light-mode {
  --nav-bg: #ffffff;
  --nav-text: #222;
  background-color: #f7f7ff;
  color: #111;
}

.light-mode .navbar {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.light-mode .caption-box {
  background-color: #ffffff;
  border: 1px solid #ddd;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.light-mode .lang-btn {
  background-color: #f0f0f0;
  color: #333;
  border-color: #ccc;
}

.light-mode .lang-btn.active {
  background-color: #8b5cf6;
  color: #fff;
}

.light-mode #toggle-btn {
  background-color: #8b5cf6;
  color: #fff;
}

.light-mode .caption-header {
  background-color: #f8f8f8;
  color: #222;
}

/* --- 11. Responsive --- */
@media (max-width: 768px) {
  .caption-box-container {
    flex-direction: column;
  }
  .caption-box {
    width: 100%;
  }
  .controls {
    flex-direction: column;
    gap: 10px;
  }
  #toggle-btn, .secondary-btn {
    width: 100%;
  }
}

.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.theme-btn {
  border: none;
  background: none;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 5px 10px;
  color: #c4b5fd; /* visible purple */
  transition: transform 0.3s ease, color 0.3s ease;
}

.theme-btn:hover {
  transform: rotate(20deg) scale(1.2);
  color: #a78bfa;
}
/* --- About & Features Pages --- */
.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-title {
  font-size: 3.5rem;
  background: linear-gradient(135deg, #a78bfa 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin-bottom: 3rem;
  font-weight: 700;
  letter-spacing: -1px;
}

.content-section {
  background: #252540;
  border: 2px solid #5b4fc7;
  padding: 2.5rem;
  border-radius: 20px;
  margin-bottom: 2.5rem;
  box-shadow: 0 8px 32px rgba(91, 79, 199, 0.3);
  transition: all 0.3s ease;
}

.content-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(167, 139, 250, 0.3);
  border-color: rgba(167, 139, 250, 0.4);
}

.content-section h2 {
  color: #c4b5fd;
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 0 10px rgba(196, 181, 253, 0.3);
}

.content-section p {
  line-height: 1.9;
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.tech-list {
  list-style: none;
  padding-left: 0;
}

.tech-list li {
  padding: 0.8rem 0;
  padding-left: 1.5rem;
  line-height: 1.9;
  color: #ffffff;
  position: relative;
  font-size: 1.05rem;
}

.tech-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: #a78bfa;
  font-size: 1.2rem;
}

.tech-list li strong {
  color: #c4b5fd;
  font-weight: 700;
}

.content-section a {
  color: #a78bfa;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.content-section a:hover {
  color: #ec4899;
  text-decoration: underline;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.feature-card {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.08) 0%, rgba(236, 72, 153, 0.08) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(167, 139, 250, 0.2);
  padding: 2.5rem;
  border-radius: 20px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #a78bfa 0%, #ec4899 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(167, 139, 250, 0.4);
  border-color: rgba(167, 139, 250, 0.5);
}

.feature-icon {
  font-size: 3.5rem;
  margin-bottom: 1.2rem;
  filter: drop-shadow(0 4px 8px rgba(167, 139, 250, 0.3));
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.2) rotate(5deg);
}

.feature-card h3 {
  background: linear-gradient(135deg, #a78bfa 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.feature-card p {
  line-height: 1.7;
  color: #c0c0c0;
  font-size: 1rem;
}

/* Active nav link */
.nav-right a.active {
  color: #a78bfa;
  font-weight: 700;
  position: relative;
}

.nav-right a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #a78bfa 0%, #ec4899 100%);
}

/* Hero section styling */
.hero-section {
  text-align: center;
  padding: 3rem 0;
  margin-bottom: 3rem;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: #c0c0c0;
  margin-top: 1rem;
}

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

/* Light theme overrides for new pages */
.light-theme .content-section,
.light-theme .feature-card {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
  border: 1px solid rgba(167, 139, 250, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.light-theme .content-section:hover,
.light-theme .feature-card:hover {
  box-shadow: 0 12px 40px rgba(167, 139, 250, 0.3);
}

.light-theme .content-section p,
.light-theme .feature-card p,
.light-theme .tech-list li {
  color: #333333;
}

.light-theme .hero-subtitle {
  color: #666666;
}