/* #################css type 5 - wow futuristic look ######################  */

/* Base styles with futuristic theme */
:root {
  --primary: #4361ee;
  --primary-light: #1d2443;
  --primary-glow: rgba(67, 97, 238, 0.4);
  --secondary: #290083;
  --dark: #0a0e17;
  --light: #f8f9fa;
  --gray: #6c757d;
  --success: #4cc9f0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}
/* 
body {
  background: linear-gradient(135deg, #f5f7fa 0%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
} */

.container {
  max-width: 1200px;
  width: 100%;
  text-align: center;
}

h1 {
  color: var(--dark);
  margin-bottom: 30px;
  font-weight: 600;
  font-size: 2.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.description {
  color: var(--gray);
  margin-bottom: 40px;
  font-size: 1.1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Floating animation */
@keyframes float {
  0% {
      transform: translateY(0px);
  }
  50% {
      transform: translateY(0px);
  }
  100% {
      transform: translateY(0px);
  }
}

@keyframes pulse {
  0% {
      box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
  }
  50% {
      box-shadow: 0 10px 25px rgba(67, 97, 238, 0.5);
  }
  100% {
      box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
  }
}


/* @keyframes rotate {
  0% {
      transform: rotate(0deg);
  }
  100% {
      transform: rotate(360deg);
  }
} */

/* Chatbot button styles */
.chatbot-button {
  position: fixed;
  bottom: 30px;
  right: 100px;
  width: 1px;
  height: 1px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  z-index: 1000;
  transition: all 0.3s ease;
  animation:pulse 2s infinite; ;
  /* animation: float 3s ease-in-out infinite, pulse 2s infinite; */
}

.chatbot-button:hover {
  transform: scale(1);
  animation:pulse 2s infinite;
  box-shadow: 0 8px 25px rgba(67, 97, 238, 0.5);
}

.chatbot-button img {
  width: 60px;
  margin-top: -5px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

/* Chat container styles */
.chatbot-container {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 355px;
  height: 530px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 20px var(--primary-glow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot-container.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
  animation: float 6s ease-in-out infinite;
}

/* Chat header styles */
.chatbot-header {
  padding: 16px 20px;
  background: #1d2443;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.chatbot-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
      transparent, 
      rgba(236, 236, 236, 0.404), 
      transparent);
  transform: translateX(-100%);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
      transform: translateX(-100%);
  }
  100% {
      transform: translateX(100%);
  }
}

.chatbot-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 20px;
  transition: transform 0.3s ease;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 2;
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(360deg);
}

.chatbot-close img {
  width: 18px;
}

/* Chat messages area */
.chatbot-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background-color: #f5f7f8;
  background-image: url('img/cse_logo2.png');
  background-position: center;
  background-size: 100%;
  background-repeat: no-repeat;
  position: relative;
}

.chatbot-messages::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, 
      transparent, 
      rgba(67, 97, 238, 0.05) 40%,
      rgba(58, 12, 163, 0.05) 60%,
      transparent);
  pointer-events: none;
}

.message {
  margin-bottom: 16px;
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  line-height: 1.4;
  font-size: 14px;
  animation: messageAppear 0.3s ease-out;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
}

.bot-message {
  background: white;
  border-top-left-radius: 5px;
  align-self: flex-start;
  color: #333;
  border-left: 4px solid var(--primary);
  box-shadow: 0 3px 10px rgba(67, 97, 238, 0.15);
}

/* For bullet point lists */
.bot-message ul {
  margin: 0.5em 0;
  padding-left: 1.5em;
}

.bot-message li {
  margin-bottom: 0.3em;
  list-style-type: none;
  position: relative;
}

.bot-message li::before {
  content: "❖";
  position: absolute;
  left: -1em;
  color: var(--primary);
  font-weight: bold;
}


.user-message {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border-top-right-radius: 5px;
  margin-left: auto;
  box-shadow: 0 3px 10px rgba(67, 97, 238, 0.3);
}

/* Chips (quick replies) styles */
.chatbot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  background: white;
  color: #111f69;
  /* color: var(--primary); */
  padding: 8px 14px;
  border-radius: 18px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.chip::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
      transparent, 
      rgba(67, 97, 238, 0.1), 
      transparent);
  transition: left 0.5s;
}

.chip:hover {
  background: #f0f5ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(67, 97, 238, 0.15);
  border-color: var(--primary-light);
}

.chip:hover::before {
  left: 100%;
}

.chip-container-style {
  border: 1px dashed var(--primary);
  border-radius: 12px;
  padding: 12px;
  background: #f8f9fa;
  margin: 10px 0;
  box-shadow: 0 3px 10px rgba(67, 97, 238, 0.1);
}

/* Input area */
.chatbot-input {
  padding: 16px;
  border-top: 1px solid #eaeaea;
  display: flex;
  align-items: center;
  background: white;
  position: relative;
}

.chatbot-input::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, 
      transparent, 
      var(--primary-light), 
      transparent);
  opacity: 0.6;
}

.chatbot-input input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 24px;
  outline: none;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.chatbot-input input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
  background: white;
}


#voice-input {
  margin-left: 10px;
  background: none;
  padding: 0;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
}

#voice-input:hover {
  background: #f0f5ff;
  border-color: var(--primary-light);
  transform: scale(1.1);
}

#voice-input img {
  width: 20px;
  height: auto;
}

#sendButton {
  margin-left: 10px;
  padding: 10px 16px;
  background: var(--primary-light);
  color: white;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#sendButton::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;
}

#sendButton:hover {
  background: #1d2443;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

#sendButton:hover::before {
  left: 100%;
}

/* Animations */
@keyframes messageAppear {
  from {
      opacity: 0;
      transform: translateY(10px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

/* Scrollbar styling */
.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}






.suggestions-container {
  position: absolute;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 150px;
  overflow-y: auto;
  z-index: 1100; /* Higher than chatbot-container to ensure visibility */
  width: calc(100% - 32px); /* Match input width, accounting for padding */
  bottom: 65px; /* Position above the input field */
  left: 16px; /* Align with input padding */
  font-size: small;
  font-family: 'Poppins', sans-serif; /* Match chatbot font */
  background: #f8f9fa;
  transform: translateY(0);
  transition: all 0.2s ease-in-out;
  opacity: 0;
  visibility: hidden;
}

.suggestions-container.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(-5px); /* Slight upward lift for effect */
}

.suggestion-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background 0.2s ease;
}

.suggestion-item:hover {
  background: #f0f5ff;
  color: var(--primary);
}

.suggestions-container::-webkit-scrollbar {
  width: 6px;
}

.suggestions-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.suggestions-container::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 3px;
}

.suggestions-container::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}










/* Responsive styles */


/* =========================================== */
/* COMPREHENSIVE MEDIA QUERIES FOR ALL DEVICES */
/* =========================================== */

/* Large Desktops and Monitors (1440px and up) */
@media (min-width: 1440px) {
  .chatbot-container {
      width: 380px;
      height: 520px;
  }
  
  .chatbot-button {
      width: 1px;
      height: 1px;
      bottom: 40px;
      right: 40px;
  }
  
  .chatbot-button img {
      width: 65px;
  }
}

/* Standard Desktops and Laptops (1024px to 1439px) */
@media (max-width: 1439px) and (min-width: 1024px) {
  .chatbot-container {
      width: 340px;
      height: 520px;
  }
}

/* Small Laptops (992px to 1023px) */
@media (max-width: 1023px) and (min-width: 992px) {
  .chatbot-container {
      width: 340px;
      height: 480px;
  }
  
  .chatbot-button {
      width: 1px;
      height: 1px;
  }
  
  .chatbot-button img {
      width: 55px;
  }
}

/* Tablets Landscape (768px to 991px) */
@media (max-width: 991px) and (min-width: 768px) and (orientation: landscape) {
  .chatbot-container {
      width: 320px;
      height: 400px;
      bottom: 100px;
      right: 15px;
  }
  
  .chatbot-button {
      width: 1px;
      height: 1px;
      bottom: 35px;
      right: 35px;
  }
  
  .chatbot-button img {
      width: 50px;
  }
  
  .chatbot-messages {
      background-size: 90%;
  }
  
  .message {
      font-size: 13px;
      padding: 10px 14px;
  }
}

/* Tablets Portrait (768px to 991px) */
@media (max-width: 991px) and (min-width: 768px) and (orientation: portrait) {
  .chatbot-container {
      width: 340px;
      height: 460px;
      bottom: 110px;
      right: 15px;
  }
  
  .chatbot-button {
      width: 1px;
      height: 1px;
      bottom: 35px;
      right: 35px;
  }
  
  .chatbot-button img {
      width: 55px;
  }
}

/* Large Phones Landscape (576px to 767px) */
@media (max-width: 767px) and (min-width: 576px) and (orientation: landscape) {
  .chatbot-container {
      width: 300px;
      height: 365px;
      bottom: 90px;
      right: 10px;
  }
  
  .chatbot-button {
      width: 1px;
      height: 1px;
      bottom: 60px;
      right: 40px;
  }
  
  .chatbot-button img {
      width: 45px;
  }
  
  .chatbot-messages {
      padding: 15px;
      background-size: 85%;
  }
  
  .message {
      font-size: 12px;
      padding: 8px 12px;
      max-width: 85%;
  }
  
  .chip {
      padding: 6px 10px;
      font-size: 11px;
  }
  
  .chatbot-input {
      padding: 12px;
  }
  
  .chatbot-input input {
      padding: 10px 14px;
      font-size: 13px;
  }
  
  #sendButton {
      padding: 10px 15px;
      font-size: 13px;
  }
}

/* Large Phones Portrait (576px to 767px) */
@media (max-width: 767px) and (min-width: 576px) and (orientation: portrait) {
  .chatbot-container {
      width: 320px;
      height: 450px;
      bottom: 100px;
      right: 10px;
  }
  
  .chatbot-button {
      width: 1px;
      height: 1px;
      bottom: 20px;
      right: 20px;
  }
  
  .chatbot-button img {
      width: 50px;
  }
  
  .chatbot-messages {
      background-size: 90%;
  }
}

/* Small Phones Landscape (480px to 575px) */
@media (max-width: 575px) and (min-width: 480px) and (orientation: landscape) {
  .chatbot-container {
      width: 280px;
      height: 320px;
      bottom: 80px;
      right: 8px;
      border-radius: 16px;
  }
  
  .chatbot-button {
      width: 1px;
      height: 1px;
      bottom: 25px;
      right: 25px;
  }
  
  .chatbot-button img {
      width: 40px;
  }
  
  .chatbot-header {
      padding: 12px 15px;
      font-size: 14px;
  }
  
  .chatbot-messages {
      padding: 12px;
      background-size: 80%;
  }
  
  .message {
      font-size: 11px;
      padding: 7px 10px;
      max-width: 90%;
      margin-bottom: 12px;
  }
  
  .chip {
      padding: 5px 8px;
      font-size: 10px;
  }
  
  .chatbot-input {
      padding: 10px;
  }
  
  .chatbot-input input {
      padding: 8px 12px;
      font-size: 12px;
  }
  
  #sendButton {
      padding: 8px 12px;
      font-size: 12px;
  }
  
  #voice-input {
      width: 32px;
      height: 32px;
  }
  
  #voice-input img {
      width: 16px;
  }
}

/* Small Phones Portrait (480px to 575px) */
@media (max-width: 575px) and (min-width: 480px) and (orientation: portrait) {
  .chatbot-container {
      width: 300px;
      height: 420px;
      bottom: 90px;
      right: 8px;
  }
  
  .chatbot-button {
      width: 1px;
      height: 1px;
      bottom: 25px;
      right: 25px;
  }
  
  .chatbot-button img {
      width: 45px;
  }
  
  .chatbot-messages {
      background-size: 85%;
  }
}

/* Extra Small Phones (below 480px) */
@media (max-width: 479px) {
  .chatbot-container {
      width: 92vw;
      height: 75vh;
      bottom: 90px;
      right: 4vw;
      left: 4vw;
      border-radius: 14px;
  }
  
  .chatbot-button {
      width: 1px;
      height: 1px;
      bottom: 25px;
      right: 35px;
  }
  
  .chatbot-button img {
      width: 40px;
  }
  
  .chatbot-header {
      padding: 10px 12px;
      font-size: 14px;
  }
  
  .chatbot-close {
      width: 26px;
      height: 26px;
  }
  
  .chatbot-close img {
      width: 16px;
  }
  
  .chatbot-messages {
      padding: 10px;
      background-size: 75%;
  }
  
  .message {
      font-size: 11px;
      padding: 6px 10px;
      max-width: 90%;
      margin-bottom: 10px;
  }
  
  .chip {
      padding: 4px 8px;
      font-size: 10px;
  }
  
  .chatbot-input {
      padding: 10px;
  }
  
  .chatbot-input input {
      padding: 8px 12px;
      font-size: 12px;
  }
  
  #sendButton {
      padding: 8px 12px;
      font-size: 12px;
  }
  
  #voice-input {
      width: 30px;
      height: 30px;
      margin-left: 8px;
  }
  
  #voice-input img {
      width: 16px;
  }
}

/* Foldable Devices (Short and Wide) */
@media (max-height: 500px) and (min-width: 600px) {
  .chatbot-container {
      height: 80vh;
      bottom: 70px;
  }
  
  .chatbot-messages {
      background-size: 70%;
  }
}

/* High-DPI (Retina) Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .chatbot-button {
      box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
  }
  
  .chatbot-container {
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.15), 0 6px 25px var(--primary-glow);
  }
}

/* Print Styles */
@media print {
  .chatbot-button,
  .chatbot-container {
      display: none !important;
  }
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
  .chatbot-button,
  .chatbot-container,
  .message,
  .chip,
  #sendButton,
  #voice-input {
      transition: none;
  }
  
  .chatbot-container.active {
      animation: none;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
      --dark: #f8f9fa;
      --light: #0a0e17;
  }
  
  body {
      background: linear-gradient(135deg, #1a1f36 0%, #0d1126 100%);
  }
  
  .preview-container,
  .instructions {
      background: #1a1f36;
      color: #f8f9fa;
  }
  
  .device-item {
      background: #2d3748;
      color: #f8f9fa;
  }
}




.preview-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 30px;
  display: inline-block;
  position: relative;
}

.preview-container::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 1px dashed var(--primary-light);
  border-radius: 12px;
  pointer-events: none;
  opacity: 0.5;
}
.chip-link::after {
  content: '🔗 ';
  font-size: small;
  /* font-size: 12px; */
}