/* Home Page - Modern Tamil Chatbot Design */

:root {
  --primary: #8b5cf6;
  --primary-light: #a78bfa;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --border-color: #e5e7eb;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] {
  --text-primary: #f3f4f6;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --border-color: #374151;
}

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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  background-color: var(--bg-primary);
  overflow: auto;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* ============================================
   HERO - Bold & Impactful
   ============================================ */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7rem 2rem 5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
  margin-top: 0;
}

/* Gradient orbs background */
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  max-width: 700px;
  z-index: 1;
  width: 100%;
}

.hero-title {
  margin-bottom: 1.5rem;
  overflow: visible;
}

.tamil-text {
  display: block;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: white;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  padding: 0.1em 0;
}

.english-subtext {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 600;
  color: white;
  opacity: 0.9;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-large {
  padding: 1rem 2.2rem;
  font-size: 1.05rem;
}

.btn-primary {
  background: linear-gradient(135deg, #ec4899 0%, #f97316 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 1.5px solid white;
}

.btn-outline:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* ============================================
   FLOATING TAMIL LETTERS ANIMATION
   ============================================ */
.hero-illustration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-letter {
  position: absolute;
  font-size: 8rem;
  font-weight: 700;
  color: white;
  opacity: 0.08;
  animation: floatLetter 12s ease-in-out infinite;
}

.floating-letter:nth-child(1) {
  left: 10%;
  top: 20%;
  animation-delay: 0s;
}

.floating-letter:nth-child(2) {
  right: 15%;
  top: 15%;
  animation-delay: 0.5s;
}

.floating-letter:nth-child(3) {
  left: 5%;
  bottom: 25%;
  animation-delay: 1s;
}

.floating-letter:nth-child(4) {
  right: 10%;
  bottom: 20%;
  animation-delay: 1.5s;
}

.floating-letter:nth-child(5) {
  left: 50%;
  top: 50%;
  animation-delay: 2s;
}

@keyframes floatLetter {
  0% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.04;
  }
  50% {
    transform: translateY(-30px) rotate(5deg);
    opacity: 0.12;
  }
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.04;
  }
}

/* ============================================
   FEATURES - Grid Section
   ============================================ */
.features {
  padding: 5rem 2rem;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  width: 100%;
}

.features-container {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  padding: 2.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.feature-card:hover {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(139, 92, 246, 0.03) 100%);
  box-shadow: var(--shadow-lg);
  transform: translateY(-8px);
}

.feature-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  display: block;
}

.feature-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.feature-desc {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}

/* ============================================
   AGE GROUPS SECTION
   ============================================ */
.age-groups {
  padding: 5rem 2rem;
  background: var(--bg-secondary);
}

.age-groups .section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.age-groups .section-header h2 {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.age-groups .section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.age-groups-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.age-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.age-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.age-card.age-children {
  border-color: #22c55e;
}

.age-card.age-children:hover {
  border-color: #22c55e;
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.2);
}

.age-card.age-teens {
  border-color: #3b82f6;
}

.age-card.age-teens:hover {
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.age-card.age-adults {
  border-color: #8b5cf6;
}

.age-card.age-adults:hover {
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.age-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.age-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.age-range {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.age-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================
   CTA - Call To Action
   ============================================ */
.cta-section {
  padding: 5rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

.cta-content {
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.cta-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.cta-description {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 900px) {
  .hero {
    padding: 6rem 1.5rem 4rem;
  }
  
  .features-grid {
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .floating-letter {
    font-size: 4rem;
  }
  
  .features {
    padding: 3rem 1.5rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .feature-card {
    padding: 2rem;
  }
  
  .age-groups {
    padding: 3rem 1.5rem;
  }
  
  .age-groups-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .age-groups .section-header h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 640px) {
  .hero-buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
}

@media (max-width: 400px) {
  .tamil-text {
    font-size: 1.8rem;
  }
  
  .english-subtext {
    font-size: 1.1rem;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
  
  .feature-icon {
    font-size: 2.5rem;
  }
  
  .feature-title {
    font-size: 1.1rem;
  }
}

/* About Page Styles */
.about-container {
  max-width: 900px;
  margin: 3rem auto;
  padding: 2rem;
}

.about-container h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 3rem;
  margin-top: 0;
  padding: 2rem 1rem;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.4;
  letter-spacing: -0.5px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.about-section {
  margin: 3rem 0;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
}

.about-section:last-of-type {
  border-bottom: none;
}

.about-section h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary);
}

.about-section p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.about-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.about-list li {
  padding: 0.75rem 0;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.about-list li::before {
  content: '✓ ';
  color: var(--primary);
  font-weight: bold;
  margin-right: 0.5rem;
}

.about-divider {
  margin: 3rem 0;
  border: none;
  height: 1px;
  background-color: var(--border-color);
}

.about-container > a {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.75rem 2rem;
  background-color: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

/* Text alignment utilities */
.text-center {
  text-align: center;
}
/* ============================================
   DEMO SECTION - Interactive Showcase
   ============================================ */
.demo-section {
  padding: 8rem 2rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(236, 72, 153, 0.05) 100%);
  position: relative;
  overflow: hidden;
}

.demo-section::before {
  content: '';
  position: absolute;
  top: -300px;
  right: -300px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
  z-index: 1;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.demo-container {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .demo-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Chat Box */
.demo-chat-box {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.3s ease;
}

[data-theme="dark"] .demo-chat-box {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.demo-chat-box:hover {
  box-shadow: 0 25px 80px rgba(102, 126, 234, 0.2);
  transform: translateY(-4px);
}

.demo-messages {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  overflow-y: auto;
  max-height: 600px;
  scroll-behavior: smooth;
}

.demo-message {
  display: flex;
  animation: fadeInSlide 0.6s ease-out forwards;
  opacity: 0;
}

.demo-message:nth-child(1) {
  animation-delay: 0.1s;
}

.demo-message:nth-child(2) {
  animation-delay: 0.4s;
}

.demo-message:nth-child(3) {
  animation-delay: 0.7s;
}

.demo-message:nth-child(4) {
  animation-delay: 1s;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.user-message {
  justify-content: flex-end;
}

.user-message .message-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 18px;
  padding: 1rem 1.5rem;
  max-width: 75%;
  word-wrap: break-word;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.user-message .message-content:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(102, 126, 234, 0.4);
}

.user-message .message-content p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.bot-message {
  justify-content: flex-start;
  gap: 1rem;
}

.message-avatar {
  font-size: 2rem;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.bot-message .message-content {
  background: rgba(139, 92, 246, 0.08);
  border: 1.5px solid rgba(139, 92, 246, 0.3);
  border-radius: 18px;
  padding: 1.25rem;
  max-width: 75%;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

[data-theme="dark"] .bot-message .message-content {
  background: rgba(139, 92, 246, 0.12);
  border: 1.5px solid rgba(139, 92, 246, 0.4);
}

.bot-message .message-content:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.5);
}

.bot-message .message-content p {
  margin: 0.6rem 0;
  line-height: 1.6;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.bot-message .message-content p:first-child {
  margin-top: 0;
}

.demo-example {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(139, 92, 246, 0.06) 100%);
  border-left: 4px solid var(--primary);
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.demo-example:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18) 0%, rgba(139, 92, 246, 0.12) 100%);
  transform: translateX(4px);
}

.demo-example code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.demo-greetings {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.greeting-item {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1rem;
  padding: 0.95rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(139, 92, 246, 0.04) 100%);
  border-radius: 10px;
  border-left: 4px solid var(--primary);
  font-size: 0.9rem;
  transition: all 0.3s ease;
  cursor: default;
}

.greeting-item:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.08) 100%);
  transform: translateX(4px);
}

.greeting-tamil {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.15rem;
  letter-spacing: 0.5px;
}

.greeting-english {
  color: var(--text-secondary);
  font-style: italic;
  font-weight: 500;
}

.greeting-meaning {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Demo Features */
.demo-features {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  height: 100%;
  transition: all 0.3s ease;
}

[data-theme="dark"] .demo-features {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.demo-features:hover {
  box-shadow: 0 25px 80px rgba(102, 126, 234, 0.15);
  transform: translateY(-4px);
}

.demo-features h3 {
  font-size: 1.6rem;
  margin: 0;
  color: var(--text-primary);
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.demo-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.demo-features-list li {
  display: flex;
  gap: 1.25rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.06);
  transition: all 0.3s ease;
  cursor: default;
}

.demo-features-list li:hover {
  background: rgba(139, 92, 246, 0.12);
  transform: translateX(6px);
}

.feature-icon {
  font-size: 2rem;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.demo-features-list h4 {
  margin: 0 0 0.35rem 0;
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 700;
}

.demo-features-list p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}