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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  color: #333;
  overflow-x: hidden;
}

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

/* Header */
.header {
  width: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 100%);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  text-align: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
  color: white;
}

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

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

.header h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 15px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
  background: linear-gradient(135deg, #fff 0%, #f0f8ff 50%, #e6f3ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}

.header p {
  font-size: 1.3rem;
  opacity: 0.95;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
  font-weight: 500;
  position: relative;
  z-index: 1;
}
 /* FAQ Button Styles - Replace your existing .faq-button styles with this */

.faq-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 20px 35px;
  background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(248,249,250,0.8) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

#FAQ, .faq-button {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 50%, rgba(240, 147, 251, 0.1) 100%);
  color: #667eea;
  border: 2px solid rgba(102, 126, 234, 0.3);
  padding: 12px 20px;
  margin: 0;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  min-width: auto;
  max-width: 280px;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 
    0 8px 25px rgba(102, 126, 234, 0.15),
    inset 0 1px 0 rgba(255,255,255,0.6);
  text-transform: none;
  letter-spacing: 0.5px;
}

#FAQ::before, .faq-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;
}

#FAQ:hover, .faq-button:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  color: #ffffff;
  border-color: rgba(102, 126, 234, 0.8);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 15px 35px rgba(102, 126, 234, 0.3),
    0 5px 15px rgba(102, 126, 234, 0.2),
    inset 0 1px 0 rgba(255,255,255,0.3);
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

#FAQ:hover::before, .faq-button:hover::before {
  left: 100%;
}

#FAQ:active, .faq-button:active {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 
    0 8px 20px rgba(102, 126, 234, 0.2),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

/* Add some icons to make buttons more attractive */
#FAQ:nth-child(1)::after {
  content: " ⚛️";
  opacity: 0.7;
}

#FAQ:nth-child(2)::after {
  content: " 📚";
  opacity: 0.7;
}

#FAQ:nth-child(3)::after {
  content: " 💰";
  opacity: 0.7;
}

/* Responsive design for FAQ buttons */
@media (max-width: 768px) {
  .faq-container {
    padding: 15px 25px;
    gap: 10px;
  }
  
  #FAQ, .faq-button {
    font-size: 13px;
    padding: 10px 16px;
    max-width: 240px;
  }
}

@media (max-width: 480px) {
  .faq-container {
    padding: 15px 20px;
    gap: 8px;
  }
  
  #FAQ, .faq-button {
    font-size: 12px;
    padding: 8px 14px;
    max-width: 200px;
    flex: 1;
    min-width: 140px;
  }
}

/* Animation for FAQ container */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-container {
  animation: fadeInDown 0.6s ease-out 0.3s both;
}

/* Pulse animation for FAQ buttons when page loads */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 
      0 8px 25px rgba(102, 126, 234, 0.15),
      inset 0 1px 0 rgba(255,255,255,0.6);
  }
  50% {
    box-shadow: 
      0 8px 25px rgba(102, 126, 234, 0.25),
      0 0 20px rgba(102, 126, 234, 0.2),
      inset 0 1px 0 rgba(255,255,255,0.6);
  }
}

#FAQ:nth-child(1) {
  animation: pulseGlow 2s ease-in-out infinite;
  animation-delay: 0.5s;
}

#FAQ:nth-child(2) {
  animation: pulseGlow 2s ease-in-out infinite;
  animation-delay: 0.7s;
}

#FAQ:nth-child(3) {
  animation: pulseGlow 2s ease-in-out infinite;
  animation-delay: 0.9s;
}
.header .tagline {
  font-size: 1rem;
  opacity: 0.85;
  font-style: italic;
  text-shadow: 0 1px 5px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}

/* Chat Container */
.chat-container {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  width: 100%;
  max-width: 900px;
  border-radius: 25px;
  box-shadow: 
    0 25px 50px rgba(0,0,0,0.15),
    0 15px 30px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 70vh;
  margin: 30px 20px;
  border: 1px solid rgba(255,255,255,0.3);
  position: relative;
}

.chat-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
}

/* Response Area */
#response {
  flex: 1;
  padding: 35px;
  max-height: 60vh;
  overflow-y: auto;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f1f3f4 100%);
  border-bottom: 2px solid rgba(102, 126, 234, 0.1);
  line-height: 1.7;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
}

#response:empty::before {
  content: "👋 Hi there! I'm Mentory, your software engineering mentor. Ask me anything about programming, career advice, or the tech industry!";
  color: #6c757d;
  font-style: italic;
  display: block;
  text-align: center;
  padding: 50px 30px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  border-radius: 20px;
  border: 2px dashed rgba(102, 126, 234, 0.2);
  box-shadow: 
    0 10px 30px rgba(102, 126, 234, 0.1),
    inset 0 1px 0 rgba(255,255,255,0.5);
  position: relative;
  overflow: hidden;
}

#response:empty::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  animation: welcomeShimmer 4s infinite;
}

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

/* Markdown Styling */
#response h1, #response h2, #response h3 {
  color: #495057;
  margin: 20px 0 15px 0;
  font-weight: 600;
}

#response h1 {
  font-size: 1.5rem;
  border-bottom: 2px solid #667eea;
  padding-bottom: 5px;
}

#response h2 {
  font-size: 1.3rem;
  color: #667eea;
}

#response h3 {
  font-size: 1.1rem;
}

#response p {
  margin-bottom: 15px;
  color: #495057;
}

#response ul, #response ol {
  margin: 15px 0;
  padding-left: 25px;
}

#response li {
  margin-bottom: 8px;
  color: #495057;
}

#response code {
  background: #e9ecef;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  color: #d63384;
}

#response pre {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  overflow-x: auto;
  margin: 15px 0;
}

#response blockquote {
  border-left: 4px solid #667eea;
  padding-left: 15px;
  margin: 15px 0;
  color: #6c757d;
  font-style: italic;
}

/* Input Section */
.input-section {
  padding: 30px 35px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,249,250,0.9) 100%);
  backdrop-filter: blur(10px);
  display: flex;
  gap: 20px;
  align-items: center;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.5),
    0 -5px 20px rgba(0,0,0,0.05);
  position: relative;
}

#UserInput {
  flex: 1;
  padding: 18px 25px;
  border: 2px solid rgba(102, 126, 234, 0.2);
  border-radius: 30px;
  font-size: 1.1rem;
  outline: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,249,250,0.9) 100%);
  backdrop-filter: blur(10px);
  box-shadow: 
    0 8px 25px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,0.6);
  color: #495057;
}

#UserInput:focus {
  border-color: #667eea;
  background: rgba(255,255,255,0.95);
  box-shadow: 
    0 0 0 4px rgba(102, 126, 234, 0.15),
    0 12px 35px rgba(102, 126, 234, 0.2),
    inset 0 1px 0 rgba(255,255,255,0.8);
  transform: translateY(-2px);
}

#UserInput::placeholder {
  color: #adb5bd;
  font-style: italic;
}

button {
  padding: 18px 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 200% 200%;
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 140px;
  box-shadow: 
    0 10px 30px rgba(102, 126, 234, 0.3),
    inset 0 1px 0 rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}

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

button:hover {
  transform: translateY(-3px);
  background-position: 100% 0;
  box-shadow: 
    0 15px 40px rgba(102, 126, 234, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

button:hover::before {
  left: 100%;
}

button:active {
  transform: translateY(-1px);
}

/* Spinner */
#spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 40px;
  border-radius: 25px;
  box-shadow: 
    0 25px 50px rgba(0,0,0,0.2),
    0 15px 30px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.6);
  z-index: 1000;
  border: 1px solid rgba(255,255,255,0.3);
}

.loader {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(102, 126, 234, 0.1);
  border-top: 5px solid #667eea;
  border-right: 5px solid #764ba2;
  border-radius: 50%;
  animation: spin 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  margin: 0 auto 20px;
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

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

#spinner p {
  color: #667eea;
  font-size: 1.1rem;
  margin: 0;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Scrollbar Styling */
#response::-webkit-scrollbar {
  width: 8px;
}

#response::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

#response::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 10px;
}

#response::-webkit-scrollbar-thumb:hover {
  background: #5a6fd8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header {
    padding: 30px 15px;
  }
  
  .header h1 {
    font-size: 2.8rem;
  }
  
  .header p {
    font-size: 1.1rem;
  }
  
  .chat-container {
    min-height: 75vh;
    border-radius: 20px;
    margin: 20px 15px;
  }
  
  #response {
    padding: 25px;
    max-height: 50vh;
  }
  
  .input-section {
    padding: 25px;
    flex-direction: column;
    gap: 20px;
  }
  
  #UserInput {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
  }
  
  button {
    width: 100%;
    padding: 15px 25px;
    font-size: 1rem;
  }
  
  #spinner {
    padding: 30px;
    margin: 0 15px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 25px 10px;
  }
  
  .header h1 {
    font-size: 2.2rem;
  }
  
  .header p {
    font-size: 1rem;
  }
  
  .input-section {
    padding: 20px;
  }
  
  #response {
    padding: 20px;
    font-size: 0.95rem;
  }
  
  #UserInput {
    padding: 12px 18px;
    font-size: 0.95rem;
  }
  
  button {
    padding: 12px 20px;
    font-size: 0.95rem;
  }
  
  #spinner {
    padding: 25px;
  }
}

/* Animation for responses */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#response {
  animation: fadeInUp 0.5s ease-out;
}