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

body {
  font-family: "Fredoka", sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  overflow-x: hidden;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.app-container {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

/* Logout Button */
.logout-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
}

.logout-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 1rem;
  padding: 0.75rem 1.5rem;
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.logout-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.5s ease;
}

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

.logout-button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.logout-button i {
  font-size: 1rem;
}

/* Back to Topics Button */
.back-to-topics-container {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 1000;
}

.back-to-topics-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 1rem;
  padding: 0.75rem 1.5rem;
  color: #667eea;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  font-family: "Fredoka", sans-serif;
}

.back-to-topics-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.5s ease;
}

.back-to-topics-button:hover::before {
  left: 100%;
}

.back-to-topics-button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.back-to-topics-button i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.back-to-topics-button:hover i {
  transform: translateX(-3px);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .back-to-topics-container {
    top: 1rem;
    left: 1rem;
  }

  .logout-container {
    top: 1rem;
    right: 1rem;
  }

  .back-to-topics-button {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }

  .back-to-topics-button span {
    display: none; /* Hide text on mobile, show only icon */
  }
}

/* Enhanced Floating Icons Background with More Movement */
.floating-icons-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.floating-icon {
  position: absolute;
  color: rgba(255, 255, 255, 0.6);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1)) blur(0.5px);
  animation: floatingBounce 4s infinite ease-in-out;
}

.floating-icon.small {
  animation: floatingPulse 3s infinite ease-in-out;
}

/* Enhanced floating animations with more movement */
@keyframes floatingBounce {
  0% {
    transform: translateY(0) translateX(0) rotate(var(--rotation)) scale(1);
  }
  25% {
    transform: translateY(-15px) translateX(5px) rotate(calc(var(--rotation) + 45deg)) scale(1.1);
  }
  50% {
    transform: translateY(-8px) translateX(-3px) rotate(calc(var(--rotation) + 90deg)) scale(0.95);
  }
  75% {
    transform: translateY(-20px) translateX(8px) rotate(calc(var(--rotation) + 135deg)) scale(1.05);
  }
  100% {
    transform: translateY(0) translateX(0) rotate(calc(var(--rotation) + 180deg)) scale(1);
  }
}

@keyframes floatingPulse {
  0% {
    opacity: 0.3;
    transform: scale(1) rotate(var(--rotation)) translateY(0) translateX(0);
  }
  33% {
    opacity: 0.7;
    transform: scale(1.2) rotate(calc(var(--rotation) + 60deg)) translateY(-10px) translateX(5px);
  }
  66% {
    opacity: 0.5;
    transform: scale(0.8) rotate(calc(var(--rotation) + 120deg)) translateY(-5px) translateX(-3px);
  }
  100% {
    opacity: 0.3;
    transform: scale(1) rotate(calc(var(--rotation) + 180deg)) translateY(0) translateX(0);
  }
}

/* Math symbol specific animations */
.floating-icon.math-symbol {
  animation: mathSymbolFloat 5s infinite ease-in-out;
}

@keyframes mathSymbolFloat {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg) scale(1);
  }
  20% {
    transform: translateY(-12px) translateX(8px) rotate(72deg) scale(1.15);
  }
  40% {
    transform: translateY(-5px) translateX(-6px) rotate(144deg) scale(0.9);
  }
  60% {
    transform: translateY(-18px) translateX(10px) rotate(216deg) scale(1.1);
  }
  80% {
    transform: translateY(-8px) translateX(-4px) rotate(288deg) scale(0.95);
  }
  100% {
    transform: translateY(0) translateX(0) rotate(360deg) scale(1);
  }
}

/* Main Container */
.container {
  position: relative;
  z-index: 10;
  max-width: 1400px; /* Increased from 1200px */
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Enhanced Header */
.header {
  text-align: center;
  margin-bottom: 2rem;
}

.header-content {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 2rem;
  padding: 1.5rem 3rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.3), inset 0 1px 0
    rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  animation: headerFloat 4s ease-in-out infinite;
}

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

.header-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 3s infinite;
}

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

/* Enhanced Logo */
.logo-container {
  position: relative;
}

.logo-main {
  position: relative;
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
  animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  25% {
    transform: translateY(-8px) rotate(5deg) scale(1.05);
  }
  50% {
    transform: translateY(-5px) rotate(-3deg) scale(1.1);
  }
  75% {
    transform: translateY(-10px) rotate(8deg) scale(1.05);
  }
}

.brain-icon {
  font-size: 2rem;
  color: white;
  z-index: 2;
  position: relative;
  animation: brainPulse 2s ease-in-out infinite;
}

@keyframes brainPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.logo-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.3;
  animation: overlayRotate 4s linear infinite;
}

@keyframes overlayRotate {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.calc-overlay {
  font-size: 1rem;
  color: white;
}

.sparkle-effects {
  position: absolute;
  top: -10px;
  right: -10px;
}

.sparkle-effects i {
  position: absolute;
  color: #ffd700;
  animation: sparkleRotate 2s linear infinite;
}

.sparkle-1 {
  font-size: 0.8rem;
  animation-delay: 0s;
  animation: sparkleFloat1 3s ease-in-out infinite;
}

.sparkle-2 {
  font-size: 0.6rem;
  top: 10px;
  right: 15px;
  animation-delay: 0.7s;
  animation: sparkleFloat2 2.5s ease-in-out infinite;
}

.sparkle-3 {
  font-size: 0.7rem;
  top: -5px;
  right: 20px;
  animation-delay: 1.4s;
  animation: sparkleFloat3 3.5s ease-in-out infinite;
}

@keyframes sparkleFloat1 {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  33% {
    transform: translateY(-15px) rotate(120deg) scale(1.3);
    opacity: 0.8;
  }
  66% {
    transform: translateY(-8px) rotate(240deg) scale(0.9);
    opacity: 0.6;
  }
}

@keyframes sparkleFloat2 {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0.9;
  }
  50% {
    transform: translateY(-12px) rotate(180deg) scale(1.4);
    opacity: 1;
  }
}

@keyframes sparkleFloat3 {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0.8;
  }
  25% {
    transform: translateY(-10px) rotate(90deg) scale(1.2);
    opacity: 1;
  }
  75% {
    transform: translateY(-5px) rotate(270deg) scale(0.8);
    opacity: 0.9;
  }
}

/* Enhanced Title */
.title-container {
  position: relative;
}

.title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-bottom: 0.5rem;
}

.title-part {
  display: inline-block;
  animation: titleBounce 2s ease-in-out infinite;
}

.math {
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: mathWave 3s ease-in-out infinite;
}

@keyframes mathWave {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  25% {
    transform: translateY(-8px) rotate(2deg) scale(1.05);
  }
  50% {
    transform: translateY(-4px) rotate(-1deg) scale(1.1);
  }
  75% {
    transform: translateY(-6px) rotate(3deg) scale(1.05);
  }
}

.genius {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: geniusBounce 2.5s ease-in-out infinite;
  animation-delay: 0.3s;
}

@keyframes geniusBounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  30% {
    transform: translateY(-12px) scale(1.08);
  }
  60% {
    transform: translateY(-6px) scale(1.12);
  }
  80% {
    transform: translateY(-9px) scale(1.06);
  }
}

.title-underline {
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe);
  background-size: 300% 100%;
  border-radius: 2px;
  animation: underlineFlow 3s linear infinite;
}

@keyframes underlineFlow {
  0% {
    background-position: 0% 50%;
    transform: scaleX(0.8);
  }
  50% {
    background-position: 150% 50%;
    transform: scaleX(1.1);
  }
  100% {
    background-position: 300% 50%;
    transform: scaleX(0.8);
  }
}

/* Rotating Star beside title */
.title-star {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
  animation: titleStarRotate 3s linear infinite;
}

@keyframes titleStarRotate {
  0% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(90deg) scale(1.1);
  }
  50% {
    transform: rotate(180deg) scale(1);
  }
  75% {
    transform: rotate(270deg) scale(1.1);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

.title-star i {
  font-size: 1.2rem;
  color: #b45309;
  animation: starIconFloat 2s ease-in-out infinite;
}

@keyframes starIconFloat {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

/* Enhanced Subtitle */
.subtitle {
  color: white;
  font-size: 1.4rem;
  font-weight: 500;
  margin-top: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  animation: subtitleFloat 4s ease-in-out infinite;
}
.subtitle-dev {
  color: rgb(250, 255, 209);
  font-weight: 800;             /* bolder developer credit */
  letter-spacing: .2px;
}

@keyframes subtitleFloat {
  0%,
  100% {
    transform: translateY(0);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  50% {
    transform: translateY(-3px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 20px rgba(255, 255, 255, 0.3);
  }
}

.subtitle-icon {
  font-size: 1.2rem;
  animation: iconFloat 2s ease-in-out infinite;
}

.subtitle-icon:first-child {
  animation: rocketLaunch 3s ease-in-out infinite;
}

.subtitle-icon:last-child {
  animation: starRotate 2s linear infinite;
}

@keyframes rocketLaunch {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-8px) rotate(15deg);
  }
  50% {
    transform: translateY(-12px) rotate(-10deg);
  }
  75% {
    transform: translateY(-6px) rotate(20deg);
  }
}

/* Enhanced star rotation animation */
@keyframes starRotate {
  0% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(90deg) scale(1.2);
  }
  50% {
    transform: rotate(180deg) scale(1);
  }
  75% {
    transform: rotate(270deg) scale(1.1);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

/* Login Container */
.login-container {
  max-width: 32rem;
  margin: 0 auto;
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  padding: 3rem;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-mascot {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.login-title {
  font-size: 2rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.login-subtitle {
  color: #6b7280;
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 28rem;
  margin: 0 auto;
}

.error-message {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border: 2px solid #fca5a5;
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #dc2626;
  font-weight: 500;
}

.error-message i {
  font-size: 1.2rem;
}

.login-form {
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-input {
  width: 100%;
  border: 2px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  padding-right: 3rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  font-family: "Fredoka", sans-serif;
}

.form-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  background: white;
}

.form-group .input-decoration {
  position: absolute;
  right: 1rem;
  top: 2.2rem;
  color: #9ca3af;
}

.login-button {
  width: 100%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  border-radius: 1rem;
  padding: 1rem 2rem;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: "Fredoka", sans-serif;
}

.login-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;
}

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

.login-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}
.signup-container {
    width: 100%;
    display: flex;
    justify-content: center;    /* center horizontally */
    margin-top: 50px;           /* space below login button */
    z-index: 5;                 /* ensure it sits above floating icons if needed */
}

/* Styled full-width-like signup button (harmonize with your design) */
.signup-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;                /* full width of card/form area */
    max-width: 450px;           /* keeps it tidy on wide screens */
    padding: 12px 18px;
    border-radius: 12px;
    border: 1.5px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    color: #92336f;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
    box-shadow: none;
    margin-top: 20px;
}

/* Hover / focus states */
.signup-button:hover,
.signup-button:focus {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    outline: none;
}

/* Ensure icon inside button lines up */
.signup-button .fas {
    font-size: 18px;
}


.demo-credentials {
  background: linear-gradient(135deg, rgba(249, 250, 251, 0.8), rgba(243, 244, 246, 0.8));
  border-radius: 1.5rem;
  padding: 1.5rem;
  border: 1px solid rgba(229, 231, 235, 0.5);
}

.demo-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 1rem;
}

.demo-grid {
  display: grid;
  gap: 0.75rem;
}

.demo-item {
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.5;
}

.demo-item code {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  padding: 0.2rem 0.5rem;
  border-radius: 0.5rem;
  font-family: "Monaco", "Menlo", monospace;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Chat Container - MADE WIDER */
.chat-container {
  max-width: 80rem; /* Increased from 64rem to 80rem */
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

/* Enhanced Welcome Screen */
.welcome-screen {
  padding: 3rem;
  text-align: center;
}

.mascot-container {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.mascot-circle {
  width: 6rem;
  height: 6rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
  position: relative;
  animation: mascotPulse 3s ease-in-out infinite;
}

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

.mascot-circle i {
  font-size: 3rem;
  color: white;
}

.mascot-glow {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  opacity: 0.3;
  animation: glowPulse 2s ease-in-out infinite;
  z-index: -1;
}

@keyframes glowPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.1;
  }
}

.mascot-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, #f093fb, #f5576c);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
}

.mascot-badge i {
  font-size: 1rem;
  color: white;
}

.floating-symbols {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.symbol {
  position: absolute;
  font-size: 1.5rem;
  font-weight: bold;
  color: #4facfe;
  animation: symbolFloat 4s ease-in-out infinite;
}

.symbol-1 {
  top: -20px;
  left: -30px;
  animation-delay: 0s;
}

.symbol-2 {
  top: 10px;
  right: -35px;
  animation-delay: 1.3s;
}

.symbol-3 {
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  animation-delay: 2.6s;
}

@keyframes symbolFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-10px) rotate(10deg);
    opacity: 1;
  }
}

.welcome-title {
  font-size: 2.2rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.welcome-wave {
  font-size: 2.5rem;
  animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(20deg);
  }
  75% {
    transform: rotate(-10deg);
  }
}

.title-badge {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
  animation: badgeSpin 3s linear infinite;
}

@keyframes badgeSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.title-badge i {
  font-size: 1.2rem;
  color: #b45309;
}

.welcome-text {
  color: #6b7280;
  font-size: 1.2rem;
  line-height: 1.8;
  max-width: 36rem;
  margin: 0 auto 2.5rem;
}

.welcome-text strong {
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

/* Enhanced Quick Questions */
.quick-questions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.quick-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.8rem;
  border: 2px solid transparent;
  border-radius: 1.5rem;
  background: linear-gradient(white, white) padding-box, linear-gradient(135deg, #667eea, #764ba2) border-box;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.quick-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.5s ease;
}

.quick-btn:hover::before {
  left: 100%;
}

.quick-btn:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.2);
}

.quick-btn-icon {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.quick-btn:hover .quick-btn-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.quick-btn-icon i {
  font-size: 1.4rem;
  color: white;
}

.quick-btn span {
  font-size: 1rem;
  font-weight: 500;
  color: #374151;
}

/* Enhanced Messages */
.messages-container {
  max-height: 28rem; /* Increased from 24rem */
  overflow-y: auto;
  padding: 2rem; /* Increased from 1.5rem */
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: 85%; /* Increased from 75% */
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  flex-shrink: 0;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  position: relative;
}

.message-avatar.assistant {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.message-avatar.user {
  background: linear-gradient(135deg, #f093fb, #f5576c);
}

.message-avatar i {
  font-size: 1.4rem;
  color: white;
}

.message-bubble {
  padding: 1.5rem 2rem; /* Increased padding */
  border-radius: 1.8rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  position: relative;
}

.message-bubble.assistant {
  background: white;
  border: 1px solid #f3f4f6;
  border-bottom-left-radius: 0.6rem;
}

.message-bubble.user {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-bottom-right-radius: 0.6rem;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.message-header span {
  font-size: 0.8rem;
  font-weight: 600;
  color: #667eea;
}

.message-header i {
  font-size: 0.8rem;
  color: #ffd700;
}

.message-content {
  font-size: 1rem; /* Slightly increased */
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Enhanced Loading */
.loading-container {
  padding: 0 2rem 2rem; /* Increased padding */
}

.loading-message {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.loading-avatar {
  width: 2.8rem;
  height: 2.8rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  position: relative;
}

.loading-avatar i {
  font-size: 1.4rem;
  color: white;
  animation: pulse 2s infinite;
}

.thinking-waves {
  position: absolute;
  top: -5px;
  right: -5px;
}

.wave {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4facfe;
  animation: waveFloat 1.5s ease-in-out infinite;
}

.wave-1 {
  animation-delay: 0s;
}
.wave-2 {
  animation-delay: 0.3s;
  top: 5px;
  right: 5px;
}
.wave-3 {
  animation-delay: 0.6s;
  top: 10px;
  right: -2px;
}

@keyframes waveFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-10px) scale(1.2);
    opacity: 0.7;
  }
}

.loading-bubble {
  background: white;
  border: 1px solid #f3f4f6;
  border-radius: 1.8rem;
  border-bottom-left-radius: 0.6rem;
  padding: 1.5rem 2rem; /* Increased padding */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.loading-dots {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.8rem;
}

.dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) {
  background: #667eea;
  animation-delay: -0.32s;
}

.dot:nth-child(2) {
  background: #f093fb;
  animation-delay: -0.16s;
}

.dot:nth-child(3) {
  background: #4facfe;
}

.loading-bubble span {
  font-size: 0.9rem;
  color: #6b7280;
  font-style: italic;
}

/* Enhanced Input Container */
.input-container {
  border-top: 1px solid #f3f4f6;
  background: linear-gradient(135deg, rgba(249, 250, 251, 0.8), rgba(243, 244, 246, 0.8));
  padding: 2.5rem; /* Increased padding */
}

.input-form {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.input-wrapper {
  flex: 1;
  position: relative;
}

.message-input {
  width: 100%;
  border: 2px solid transparent;
  border-radius: 1.5rem;
  padding: 1.2rem 2rem; /* Increased padding */
  padding-right: 4rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  font-family: "Fredoka", sans-serif;
}

.message-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 5px 15px rgba(0, 0, 0, 0.08);
  background: white;
}

.input-decoration {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.input-icon {
  color: #667eea;
  font-size: 1.2rem;
}

.input-sparkle {
  font-size: 1rem;
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.2) rotate(180deg);
    opacity: 1;
  }
}

.send-button {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  border-radius: 1.5rem;
  padding: 1.2rem 2.5rem; /* Increased padding */
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.send-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;
}

.send-button:hover:not(:disabled)::before {
  left: 100%;
}

.send-button:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.send-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.send-button i {
  font-size: 1.3rem;
  position: relative;
  z-index: 1;
}

.button-glow {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.send-button:hover:not(:disabled) .button-glow {
  opacity: 0.3;
}

/* Enhanced Encouragement */
.encouragement {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 1rem;
  color: #6b7280;
  font-weight: 500;
}

.encouragement i:first-child {
  color: #fbbf24;
  animation: bulbGlow 2s ease-in-out infinite;
}

@keyframes bulbGlow {
  0%,
  100% {
    color: #fbbf24;
    transform: scale(1);
  }
  50% {
    color: #f59e0b;
    transform: scale(1.1);
  }
}

.encouragement i:last-child {
  color: #10b981;
  animation: gemSparkle 3s ease-in-out infinite;
}

@keyframes gemSparkle {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.1) rotate(90deg);
  }
  50% {
    transform: scale(1.2) rotate(180deg);
  }
  75% {
    transform: scale(1.1) rotate(270deg);
  }
}

/* Enhanced Footer */
.footer {
  text-align: center;
  margin-top: 2.5rem;
}

.footer-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  border-radius: 1.5rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  color: #6b7280;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 500;
}

.footer-icon {
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: atomSpin 4s linear infinite;
}

@keyframes atomSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.footer-icon i {
  font-size: 1rem;
  color: white;
}

.footer-content i:last-child {
  color: #10b981;
  font-size: 1.2rem;
  animation: globeRotate 6s linear infinite;
}

@keyframes globeRotate {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .header-content {
    padding: 1rem 2rem;
    gap: 1rem;
  }

  .title {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1.1rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .welcome-screen {
    padding: 2rem 1.5rem;
  }

  .quick-questions {
    grid-template-columns: 1fr;
  }

  .message {
    max-width: 95%; /* Increased for mobile */
  }

  .input-form {
    gap: 0.5rem;
  }

  .send-button {
    padding: 1rem 1.5rem;
  }

  .logo-main {
    width: 3rem;
    height: 3rem;
  }

  .brain-icon {
    font-size: 1.5rem;
  }

  .chat-container {
    max-width: 95%; /* Make it almost full width on mobile */
  }

  .messages-container {
    padding: 1.5rem; /* Reduce padding on mobile */
  }

  .input-container {
    padding: 2rem; /* Reduce padding on mobile */
  }
}

/* Scrollbar Styling */
.messages-container::-webkit-scrollbar {
  width: 8px;
}

.messages-container::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 4px;
}

.messages-container::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 4px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a67d8, #6b46c1);
}



#awardLayer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.award-star {
  position: absolute;
  font-size: 28px;
  line-height: 1;
  will-change: transform, opacity;
  text-shadow: 0 2px 6px rgba(0,0,0,.25);
  animation: starPop 900ms ease-out forwards, starFloat 1200ms ease-in forwards;
}

@keyframes starPop {
  0%   { transform: scale(0.2) rotate(0deg); opacity: 0; }
  40%  { transform: scale(1.15) rotate(15deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes starFloat {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-120px); opacity: 0; }
}

.award-toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: toastIn 250ms ease-out forwards, toastOut 600ms ease-in forwards 1400ms;
}

@keyframes toastIn {
  from { transform: translateX(-50%) translateY(8px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);  opacity: 1; }
}
@keyframes toastOut {
  to   { transform: translateX(-50%) translateY(-6px); opacity: 0; }
}
