/* ============================================
   MODERN LANDING PAGE STYLES
   ============================================ */

/* Simple Navbar */
.navbar-landing {
  background: transparent;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-4) 0;
  transition: all 0.3s ease;
}

.navbar-landing.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.navbar-logo-landing {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  /* color: var(--black); */
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  gap: 8px;
}

.navbar-landing.scrolled .navbar-logo-landing {
  color: #000000 !important;
  transition: color 0.3s ease;
}

/* Hero Section */
.hero-landing {
  position: relative;
  background: #03001c;
  padding: 120px 0 80px;
  overflow: hidden;
  min-height: 150vh;
  display: flex-start;
  align-items: center;
}

/* Animated Background Shapes */
.hero-bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 0;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  animation: float 20s ease-in-out infinite;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: #f093fb;
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: #4facfe;
  bottom: -50px;
  right: -50px;
  animation-delay: 7s;
}

.shape-3 {
  width: 250px;
  height: 250px;
  background: #43e97b;
  top: 50%;
  right: 10%;
  animation-delay: 14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, -50px) scale(1.1); }
  66% { transform: translate(-30px, 30px) scale(0.9); }
}

/* Hero Content */
.hero-content-landing {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-title-landing {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: var(--font-bold);
  line-height: 1.1;
  margin-bottom: var(--space-6);
  animation: fadeInUp 0.8s ease-out;
}

.hero-gradient-text {
  background: linear-gradient(to right, #f093fb, #f5576c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle-landing {
  font-size: clamp(1rem, 3vw, 1.25rem);
  line-height: 1.6;
  margin-bottom: var(--space-10);
  opacity: 0.95;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* Hero Stats */
.hero-stats-landing {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-4px);
}

.stat-icon {
  font-size: 2rem;
}

.stat-info {
  text-align: left;
}

.stat-number {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: var(--text-xs);
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* CTA Button */
.hero-cta {
  animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px; 
  font-size: 16px; 
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  color: #ffffff;
  font-weight: 600;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.cta-arrow {
  font-size: var(--text-xl);
  transition: transform 0.3s ease;
}

.cta-button:hover .cta-arrow {
  transform: translateX(5px);
}

/* Second hero button: NEET (same pill, accent fill) */
.cta-button-neet {
  margin-left: 12px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border-color: rgba(255, 255, 255, 0.35);
}
.cta-button-neet:hover {
  box-shadow: 0 15px 40px rgba(37, 99, 235, 0.45);
}
@media (max-width: 520px) {
  .cta-button-neet { margin: 12px 0 0 0; }
}

/* Audience Cards (inside Hero) */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
  max-width: 1100px;
  margin: var(--space-4) auto var(--space-10);
  text-align: left;
  animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

.audience-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.audience-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
}

.audience-card-1::before { background: linear-gradient(135deg, #667eea, #764ba2); }
.audience-card-2::before { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.audience-card-3::before { background: linear-gradient(135deg, #f093fb, #f5576c); }

.audience-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.audience-icon {
  font-size: 2.75rem;
  margin-bottom: var(--space-4);
  position: relative;
  z-index: 1;
}

.audience-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: var(--space-3);
  position: relative;
  z-index: 1;
}

.audience-card-1 .audience-tag { color: #667eea; }
.audience-card-2 .audience-tag { color: #00a8cc; }
.audience-card-3 .audience-tag { color: #f5576c; }

.audience-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--gray-900);
  margin-bottom: var(--space-3);
  position: relative;
  z-index: 1;
}

.audience-text {
  font-size: var(--text-base);
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: var(--space-5);
  position: relative;
  z-index: 1;
}

.audience-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.audience-card-1 .audience-cta { color: #667eea; }
.audience-card-2 .audience-cta { color: #00a8cc; }
.audience-card-3 .audience-cta { color: #f5576c; }

.audience-cta .cta-arrow {
  font-size: var(--text-base);
  transition: transform 0.3s ease;
}

.audience-cta:hover .cta-arrow {
  transform: translateX(5px);
}

/* Learning for Everyone Banner */
.everyone-banner {
  max-width: 1100px;
  margin: 0 auto var(--space-8);
  text-align: center;
  padding: var(--space-10) var(--space-6);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--white);
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.everyone-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-3);
}

.everyone-text {
  font-size: var(--text-base);
  opacity: 0.92;
  max-width: 560px;
  margin: 0 auto var(--space-3);
  line-height: 1.6;
}

.everyone-tagline {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  letter-spacing: 0.4px;
  opacity: 0.85;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .audience-card { padding: var(--space-6); }
  .everyone-banner { padding: var(--space-8) var(--space-5); }
}

/* Classes Section */
.classes-section {
  padding: 100px 0;
  background: linear-gradient(to bottom, #f8fafc, #ffffff);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-title-landing {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: var(--font-bold);
  color: var(--gray-900);
  margin-bottom: var(--space-3);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--gray-600);
}

/* Class Cards Grid */
.class-grid-landing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  max-width: 1200px;
  margin: 0 auto;
}

.class-card-landing {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
}

.class-card-landing.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.class-card-landing:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Class Card Background Gradients */
.class-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  transition: height 0.3s ease;
}

.class-card-landing:hover .class-card-bg {
  height: 100%;
  opacity: 0.1;
}

.class-bg-1 { background: linear-gradient(135deg, #667eea, #764ba2); }
.class-bg-2 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.class-bg-3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.class-bg-4 { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.class-bg-5 { background: linear-gradient(135deg, #fa709a, #fee140); }
.class-bg-6 { background: linear-gradient(135deg, #30cfd0, #330867); }
.class-bg-7 { background: linear-gradient(135deg, #a8edea, #fed6e3); }

.class-card-content {
  position: relative;
  z-index: 1;
}

.class-number {
  font-size: 4rem;
  font-weight: var(--font-bold);
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--space-3);
}

.class-card-landing:nth-child(2) .class-number { background: linear-gradient(135deg, #f093fb, #f5576c); -webkit-background-clip: text; background-clip: text; }
.class-card-landing:nth-child(3) .class-number { background: linear-gradient(135deg, #4facfe, #00f2fe); -webkit-background-clip: text; background-clip: text; }
.class-card-landing:nth-child(4) .class-number { background: linear-gradient(135deg, #43e97b, #38f9d7); -webkit-background-clip: text; background-clip: text; }
.class-card-landing:nth-child(5) .class-number { background: linear-gradient(135deg, #fa709a, #fee140); -webkit-background-clip: text; background-clip: text; }
.class-card-landing:nth-child(6) .class-number { background: linear-gradient(135deg, #30cfd0, #330867); -webkit-background-clip: text; background-clip: text; }
.class-card-landing:nth-child(7) .class-number { background: linear-gradient(135deg, #4ecdc4, #ffb5a7); -webkit-background-clip: text; background-clip: text; }

.class-label {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--gray-900);
  margin-bottom: var(--space-2);
}

.class-meta {
  font-size: var(--text-sm);
  color: var(--gray-600);
}

.lessons-count {
  font-weight: var(--font-medium);
}

.class-card-arrow {
  position: absolute;
  bottom: var(--space-6);
  right: var(--space-6);
  font-size: var(--text-3xl);
  color: var(--gray-300);
  transition: all 0.3s ease;
}

.class-card-landing:hover .class-card-arrow {
  color: var(--primary-blue);
  transform: translateX(5px);
}

/* Features Section */
.features-section {
  padding: 100px 0;
  background: linear-gradient(to bottom, #ffffff, #f8fafc);
}

.features-grid-landing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-10);
}

.feature-item {
  text-align: center;
  padding: var(--space-6);
  transition: transform 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-4px);
}

.feature-icon-box {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, #667eea15, #764ba215);
  border-radius: var(--radius-xl);
  transition: all 0.3s ease;
}

.feature-item:hover .feature-icon-box {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, #667eea25, #764ba225);
}

.feature-title-landing {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--gray-900);
  margin-bottom: var(--space-3);
}

.feature-text {
  font-size: var(--text-base);
  color: var(--gray-600);
  line-height: 1.6;
}

/* Footer */
.footer-landing {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: var(--white);
  padding: var(--space-10) 0;
  text-align: center;
}

.footer-content-landing {
  max-width: 600px;
  margin: 0 auto;
}

.footer-main {
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-2);
  opacity: 0.95;
}

.footer-sub {
  font-size: var(--text-sm);
  opacity: 0.8;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo Styles */
.logo-icon {
  font-size: 22px;
  line-height: 1;
  transform: translateY(4px);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo-text span {
  font-weight: 600;
}

/* ============================================
   CHATBOT STYLES - IMPROVED MODERN DESIGN
   ============================================ */

/* Chat Float Container */
.chat-float-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.5rem;
}

/* Modern Chat Window */
.chat-window-modern {
  width: 420px;
  height: 680px;
  max-height: 85vh;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 
              0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-window-modern.hidden {
  display: none;
}

/* Chat Header */
.chat-header-modern {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(20px);
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-indicator {
  width: 12px;
  height: 12px;
  background: #3b82f6;
  border-radius: 50%;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  box-shadow: 0 0 12px #3b82f6;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.chat-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-title {
  color: white;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  line-height: 1;
}

.chat-status {
  color: #60a5fa;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Chat Messages Area */
.chat-messages-area {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.5) 0%, rgba(15, 23, 42, 0.8) 100%);
}

/* Scrollbar Styling */
.chat-messages-area::-webkit-scrollbar {
  width: 6px;
}

.chat-messages-area::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.chat-messages-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.chat-messages-area::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Message Bubbles */
.ai-msg {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  padding: 14px 18px;
  border-radius: 18px 18px 18px 4px;
  color: #e2e8f0;
  max-width: 85%;
  font-size: 14px;
  line-height: 1.5;
  align-self: flex-start;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-msg {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  padding: 14px 18px;
  border-radius: 18px 18px 4px 18px;
  color: white;
  align-self: flex-end;
  max-width: 85%;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Quick Actions Bar */
.quick-actions-bar {
  padding: 16px 24px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(15, 23, 42, 0.5);
}

.quick-actions-bar::-webkit-scrollbar {
  display: none;
}

.chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.chip:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Chat Input Area */
.chat-input-area {
  padding: 20px 24px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 12px;
  align-items: center;
}

.chat-input-field {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.chat-input-field::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.chat-input-field:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Send Button */
.send-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  border: none;
  border-radius: 14px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.send-btn:active {
  transform: translateY(0);
}

/* Chat Orb Trigger */
.chat-orb-trigger {
  background: transparent;
  border: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  padding: 0;
  outline: none;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-orb-trigger:hover {
  transform: scale(1.05);
}

.chat-orb-trigger:active {
  transform: scale(0.95);
}

/* Bunny Mascot (replaces the old Kimi-style orb) */
.bunny-orb {
  width: 90px;
  position: relative;
  animation: bunnyFloat 4.5s ease-in-out infinite;
  /* No CSS filter/backdrop here: a filter on an animated element with 3D-transformed
     children makes some browsers paint a solid box behind it while scrolling. */
  background: transparent;
  isolation: isolate;
  will-change: transform;
}

.bunny-orb svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Ears: gentle sway + depth twirl, base stays anchored */
.bny-ear-l, .bny-ear-r {
  transform-box: view-box;
  transform-origin: 400px 315px;
}
.bny-ear-l { animation: bnyEarL 3.8s ease-in-out infinite; }
.bny-ear-r { animation: bnyEarR 3.8s ease-in-out infinite; }

.bny-flap-l { transform-box: view-box; transform-origin: 286px 124px; animation: bnyFlapL 2.8s ease-in-out infinite; }
.bny-flap-r { transform-box: view-box; transform-origin: 535px 124px; animation: bnyFlapR 2.8s ease-in-out infinite; }

.bny-eyes  { transform-box: fill-box; transform-origin: center; animation: bnyBlink 4.4s infinite; }
.bny-mouth { transform-box: fill-box; transform-origin: 50% 0%; }

/* Thinking: ears wiggle faster while waiting for the answer */
.bunny-orb[data-state="thinking"] .bny-ear-l { animation-duration: 1.3s; }
.bunny-orb[data-state="thinking"] .bny-ear-r { animation-duration: 1.3s; }
.bunny-orb[data-state="thinking"] .bny-flap-l,
.bunny-orb[data-state="thinking"] .bny-flap-r { animation-duration: 0.9s; }

/* Talking: mouth opens and closes */
.bunny-orb[data-state="talking"] .bny-mouth { animation: bnyTalk 0.32s ease-in-out infinite alternate; }

@keyframes bunnyFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@keyframes bnyFlapL { 0%,100% { transform: rotate(0deg); } 50% { transform: rotate(-7deg); } }
@keyframes bnyFlapR { 0%,100% { transform: rotate(0deg); } 50% { transform: rotate(7deg); } }
@keyframes bnyEarL {
  0%,100% { transform: perspective(700px) rotate(-2deg) rotateX(0deg) translateY(0); }
  22% { transform: perspective(700px) rotate(-17deg) rotateX(20deg) translateY(2px); }
  38% { transform: perspective(700px) rotate(-21deg) rotateX(-12deg) translateY(3px); }
  55% { transform: perspective(700px) rotate(-9deg) rotateX(16deg) translateY(1px); }
  72% { transform: perspective(700px) rotate(-15deg) rotateX(-7deg) translateY(2px); }
}
@keyframes bnyEarR {
  0%,100% { transform: perspective(700px) rotate(2deg) rotateX(0deg) translateY(0); }
  22% { transform: perspective(700px) rotate(17deg) rotateX(-20deg) translateY(2px); }
  38% { transform: perspective(700px) rotate(21deg) rotateX(12deg) translateY(3px); }
  55% { transform: perspective(700px) rotate(9deg) rotateX(-16deg) translateY(1px); }
  72% { transform: perspective(700px) rotate(15deg) rotateX(7deg) translateY(2px); }
}
@keyframes bnyBlink {
  0%, 45%, 48%, 100% { transform: scaleY(1); }
  46.5% { transform: scaleY(0.12); }
}
@keyframes bnyTalk {
  from { transform: scaleY(0.55); }
  to   { transform: scaleY(1.15); }
}

@media (max-width: 640px) {
  .bunny-orb { width: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  .bunny-orb, .bunny-orb * { animation: none !important; }
}

/* Chat message extras: keep line breaks, typing dots, sources */
.ai-msg { white-space: pre-wrap; word-break: break-word; }
.user-msg { word-break: break-word; }

.ai-msg.typing { display: flex; gap: 5px; align-items: center; padding: 16px 18px; }
.ai-msg.typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: #94a3b8;
  animation: typingDot 1.2s ease-in-out infinite;
}
.ai-msg.typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-msg.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.ai-sources {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
}


/* ============================================
   CHAT: header actions, expanded (full page) mode, mobile fit
   ============================================ */
.chat-header-actions { display: flex; align-items: center; gap: 4px; }
.chat-expand-btn .icon-collapse { display: none; }
.chat-window-modern.expanded .chat-expand-btn .icon-expand { display: none; }
.chat-window-modern.expanded .chat-expand-btn .icon-collapse { display: block; }

/* flex children must be allowed to shrink or the message list will not scroll */
.chat-window-modern { min-height: 0; }
.chat-messages-area { min-height: 0; overscroll-behavior: contain; }

/* ---- Expanded: full-page chat (desktop / tablet) ---- */
.chat-float-container .chat-window-modern.expanded {
  position: fixed !important;
  top: var(--chat-top, 0px) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: var(--chat-vh, 100dvh) !important;
  max-height: none !important;
  border-radius: 0 !important;
  z-index: 10001;
  transition: none;
}
.chat-float-container.is-expanded .chat-orb-trigger { display: none; }

/* keep the conversation in a comfortable centred column */
.chat-window-modern.expanded .chat-header-modern,
.chat-window-modern.expanded .chat-messages-area,
.chat-window-modern.expanded .quick-actions-bar,
.chat-window-modern.expanded .chat-input-area {
  padding-left: max(24px, calc((100% - 880px) / 2));
  padding-right: max(24px, calc((100% - 880px) / 2));
}
.chat-window-modern.expanded .ai-msg,
.chat-window-modern.expanded .user-msg { max-width: 78%; font-size: 15px; }

/* ---- Normal (small) window on desktop: always fit above the bunny ---- */
@media (min-width: 641px) {
  .chat-float-container .chat-window-modern:not(.expanded) {
    height: min(680px, calc(100dvh - 220px));
    max-height: none;
  }
}

/* ---- Mobile: chat fills the screen and shrinks above the keyboard ---- */
@media (max-width: 640px) {
  .chat-float-container { bottom: 1rem; right: 1rem; }

  .chat-float-container .chat-window-modern {
    position: fixed !important;
    top: var(--chat-top, 0px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: var(--chat-vh, 100dvh) !important;
    max-height: none !important;
    border-radius: 0 !important;
    z-index: 10001;
    transition: none;
  }
  /* the window is full-screen, so the bunny would sit on top of the input */
  .chat-float-container.is-open .chat-orb-trigger { display: none; }

  /* already full-screen: no expand button needed */
  .chat-expand-btn { display: none; }

  .chat-header-modern { padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .chat-messages-area { padding: 16px; gap: 12px; }
  .ai-msg, .user-msg { max-width: 90%; }
  .quick-actions-bar { padding: 10px 16px; }
  .chip { padding: 8px 14px; font-size: 12px; }
  .chat-input-area {
    padding: 10px 12px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
  }
  /* 16px stops iOS Safari zooming the page when the field is focused */
  .chat-input-field { font-size: 16px; padding: 12px 14px; }
  .send-btn { padding: 12px 16px; }

  /* keyboard is open: give the messages the room */
  .chat-window-modern.kb-open .quick-actions-bar { display: none; }
  .chat-window-modern.kb-open .chat-header-modern { padding-top: 8px; padding-bottom: 8px; }
}

/* Hidden State */
.hidden {
  display: none !important;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}
/* Landing navbar right-side auth */
.navbar-landing .navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#landing-login-btn:hover {
  background: #5a52d5 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(108,99,255,.45) !important;
}

.landing-quick-links {
    margin-top: 40px;
    width: 100%;
    max-width: 500px; /* Limits width to keep it centered and neat */
    margin-left: auto;
    margin-right: auto;
    animation: fadeIn 1.2s ease-in-out;
}

.links-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    text-align: center;
}


.landing-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.landing-link-list li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.landing-link-list li:last-child {
    border-bottom: none;
}

.landing-link-list a {
    display: block;
    padding: 12px 15px;
    color: #b39ddb; /* Light purple to match the "Study Companion" gradient */
    text-decoration: none;
    font-size: 0.95rem;
    text-align: left;
    transition: all 0.3s ease;
}

.landing-link-list a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding-left: 20px; /* Subtle slide effect */
}

/* Container for the Quick Links */
.links-scroll-area {
    background: rgba(255, 255, 255, 0.05); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    max-height: 200px; 
    overflow-y: auto;
    padding: 10px;
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent; /* For Firefox */
}

/* Chrome, Edge, and Safari Scrollbar Styling */
.links-scroll-area::-webkit-scrollbar {
    width: 6px; /* Makes the scrollbar narrow */
}

.links-scroll-area::-webkit-scrollbar-track {
    background: transparent; /* Makes the track invisible */
}

.links-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2); /* Subtle white thumb */
    border-radius: 10px; /* Rounded edges */
}

.links-scroll-area::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4); /* Brighter on hover */
}
/* ── QuickLinks: dark hero overrides ── */
.landing-quick-links {
  margin-top: 36px;
  width: 100%;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.landing-quick-links .ql-section__heading {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-align: center;
  margin-bottom: 12px;
}

.landing-quick-links .ql-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.landing-quick-links .ql-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #e2e8f0;
  backdrop-filter: blur(10px);
  box-shadow: none;
  padding: 10px 14px;
}

.landing-quick-links .ql-card:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.25);
}

.landing-quick-links .ql-card__label {
  color: #e2e8f0;
  font-size: 0.82rem;
}

.landing-quick-links .ql-card__url {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.65rem;
}

.landing-quick-links .ql-card__count {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.65rem;
}

.landing-quick-links .ql-skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.06) 25%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0.06) 75%);
  background-size: 200% 100%;
  height: 50px;
}

.landing-quick-links .ql-empty {
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  font-size: 0.82rem;
}

/* ── Class cards: cleaner hover ── */
.class-card-landing {
  border: 1px solid #e5e7eb;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.class-card-bg {
  height: 4px !important;
  transition: none !important;
}

.class-card-landing:hover .class-card-bg {
  height: 4px !important;
  opacity: 1 !important;
}

.class-card-landing:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.10);
  border-color: #d1d5db;
}

.class-card-arrow {
  transition: transform 0.25s ease, color 0.25s ease;
}

.class-card-landing:hover .class-card-arrow {
  color: #6366f1;
  transform: translateX(6px);
}

/* ── Class cards: per-card accent border on hover ── */
.class-card-landing:nth-child(1):hover { border-color: #667eea; box-shadow: 0 16px 40px rgba(102,126,234,0.15); }
.class-card-landing:nth-child(2):hover { border-color: #f5576c; box-shadow: 0 16px 40px rgba(245,87,108,0.15); }
.class-card-landing:nth-child(3):hover { border-color: #4facfe; box-shadow: 0 16px 40px rgba(79,172,254,0.15); }
.class-card-landing:nth-child(4):hover { border-color: #43e97b; box-shadow: 0 16px 40px rgba(67,233,123,0.15); }
.class-card-landing:nth-child(5):hover { border-color: #fa709a; box-shadow: 0 16px 40px rgba(250,112,154,0.15); }
.class-card-landing:nth-child(6):hover { border-color: #30cfd0; box-shadow: 0 16px 40px rgba(48,207,208,0.15); }
.class-card-landing:nth-child(7):hover { border-color: #4ecdc4; box-shadow: 0 16px 40px rgba(78,205,196,0.15); }

/* ── Class cards: thicker accent border on hover ── */
.class-card-landing:nth-child(1):hover { border: 2px solid #667eea; box-shadow: 0 16px 40px rgba(102,126,234,0.15); }
.class-card-landing:nth-child(2):hover { border: 2px solid #f5576c; box-shadow: 0 16px 40px rgba(245,87,108,0.15); }
.class-card-landing:nth-child(3):hover { border: 2px solid #4facfe; box-shadow: 0 16px 40px rgba(79,172,254,0.15); }
.class-card-landing:nth-child(4):hover { border: 2px solid #43e97b; box-shadow: 0 16px 40px rgba(67,233,123,0.15); }
.class-card-landing:nth-child(5):hover { border: 2px solid #fa709a; box-shadow: 0 16px 40px rgba(250,112,154,0.15); }
.class-card-landing:nth-child(6):hover { border: 2px solid #30cfd0; box-shadow: 0 16px 40px rgba(48,207,208,0.15); }
.class-card-landing:nth-child(7):hover { border: 2px solid #4ecdc4; box-shadow: 0 16px 40px rgba(78,205,196,0.15); }

/* ============================================
   EXTERNAL RESOURCES SECTION
   (replace the previous resources-section block
   in frontend/css/landing.css with this one —
   styled to match the QuickLinks card design)
   ============================================ */

.resources-section {
  background: #03001c;
  padding: 0 0 90px;
}

.resources-heading {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 18px;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  max-width: 900px;
  margin: 0 auto;
}

.resource-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  backdrop-filter: blur(10px);
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.resource-card:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.resource-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.resource-icon-box.link {
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.35), rgba(0, 242, 254, 0.25));
}

.resource-icon-box.file {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.35), rgba(118, 75, 162, 0.25));
}

.resource-text {
  flex: 1;
  min-width: 0;
}

.resource-title {
  color: #e2e8f0;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-meta {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.72rem;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.55);
}

.resource-card.locked {
  cursor: not-allowed;
  opacity: 0.55;
}

.resource-card.locked:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
  transform: none;
}

.resource-badge.locked {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.45);
}

.resources-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  padding: 20px 0 0;
}

/* ── User Count hover tooltip (Teachers / Students) ── */
.stat-card-users {
  position: relative;
  cursor: default;
  outline: none;
}

.stat-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 190px;
  padding: 10px 14px;
  background: #1a1640;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  font-size: 0.85rem;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 20;
}

/* small arrow */
.stat-tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 10px;
  height: 10px;
  background: #1a1640;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  transform: translateX(-50%) rotate(45deg);
}

.stat-tooltip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 3px 0;
}

/* Lift the hovered card above sibling cards (e.g. the "100% Free" card)
   so the tooltip is never covered */
.stat-card-users:hover,
.stat-card-users:focus,
.stat-card-users:focus-within {
  z-index: 50;
}

.stat-card-users:hover .stat-tooltip,
.stat-card-users:focus .stat-tooltip,
.stat-card-users:focus-within .stat-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}