/* Massive Design for Chatbot Selection Section and UI */

:root {
  --chatbot-glass-bg: rgba(255, 255, 255, 0.05);
  --chatbot-glass-border: rgba(255, 255, 255, 0.1);
  --chatbot-glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
  --career-gradient: linear-gradient(135deg, #FF6B6B, #FF8E53);
  --resume-gradient: linear-gradient(135deg, #4facfe, #00f2fe);
  --assist-gradient: linear-gradient(135deg, #0ba360, #3cba92);
}

/* Chatbot Section on Index */
.ai-chatbots {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
  background: #f8fbff;
  /* Base light theme background, assuming light-background class */
}

/* Optional Darken background inside sec */
.index-page .ai-chatbots {
  background: linear-gradient(to bottom right, #f4f7f6, #ffffff);
}

.chatbot-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 40px 30px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 1;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.chatbot-card:hover {
  transform: translateY(-15px) scale(1.03);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.chatbot-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 24px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.chatbot-card.career::before {
  background: var(--career-gradient);
}

.chatbot-card.resume::before {
  background: var(--resume-gradient);
}

.chatbot-card.assist::before {
  background: var(--assist-gradient);
}

.chatbot-card:hover::before {
  opacity: 1;
}

.chatbot-icon-wrap {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  font-size: 40px;
  position: relative;
  transition: all 0.4s ease;
}

.chatbot-card.career .chatbot-icon-wrap {
  color: #FF6B6B;
  background: rgba(255, 107, 107, 0.1);
}

.chatbot-card.resume .chatbot-icon-wrap {
  color: #4facfe;
  background: rgba(79, 172, 254, 0.1);
}

.chatbot-card.assist .chatbot-icon-wrap {
  color: #0ba360;
  background: rgba(11, 163, 96, 0.1);
}

.chatbot-card:hover .chatbot-icon-wrap {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: scale(1.1);
}

.chatbot-card h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  transition: color 0.4s ease;
  font-family: inherit;
}

.chatbot-card p {
  color: #6c757d;
  font-size: 15px;
  line-height: 1.6;
  transition: color 0.4s ease;
}

.chatbot-card:hover h3,
.chatbot-card:hover p {
  color: #ffffff;
}

.chat-btn-indicator {
  display: inline-block;
  margin-top: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fff;
  line-height: 50px;
  color: #333;
  font-size: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.chatbot-card:hover .chat-btn-indicator {
  opacity: 1;
  transform: translateY(0);
}

/* Chatbot Page Specific Layout - Massive Design Upgrade */
body.starter-page-page {
  position: relative;
  background-color: #f8fbff;
}

body.starter-page-page::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top left, rgba(255, 107, 107, 0.08), transparent 40%),
    radial-gradient(circle at bottom right, rgba(79, 172, 254, 0.08), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(11, 163, 96, 0.04), transparent 60%);
  z-index: -1;
  pointer-events: none;
}

.chatbox-wrapper {
  display: flex;
  height: calc(100vh - 140px);
  /* Adjust based on header and padding */
  margin: 110px 30px 30px;
  gap: 30px;
}

.chat-sidebar {
  width: 340px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  padding: 30px 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.chat-bots-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.chat-bot-item {
  padding: 16px 20px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-bottom: 10px;
  border-left: none;
  background: transparent;
}

.chat-bot-item:hover,
.chat-bot-item.active {
  background: #ffffff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
  transform: translateY(-3px);
}

.chat-bot-item.active {
  border: 1px solid rgba(13, 110, 253, 0.15);
}

.bot-avatar {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.bot-avatar.career-bot {
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  color: #fff;
}

.bot-avatar.resume-bot {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: #fff;
}

.bot-avatar.assist-bot {
  background: linear-gradient(135deg, #0ba360, #3cba92);
  color: #fff;
}

.chat-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.chat-header {
  padding: 30px 40px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  background: rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  gap: 20px;
}

.chat-header h4 {
  margin: 0;
  font-weight: 700;
  color: #1a1a1a;
}

.chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 25px;
  background: transparent;
}

.message {
  max-width: 75%;
  display: flex;
  gap: 15px;
}

.message.bot-message {
  align-self: flex-start;
}

.message.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-bubble {
  padding: 18px 25px;
  border-radius: 24px;
  line-height: 1.6;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.bot-message .message-bubble {
  background: #ffffff;
  color: #2b2b2b;
  border-top-left-radius: 6px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 1);
}

.user-message .message-bubble {
  background: linear-gradient(135deg, #0d6efd, #0099ff);
  color: #fff;
  border-top-right-radius: 6px;
  box-shadow: 0 8px 25px rgba(13, 110, 253, 0.25);
}

.chat-input-area {
  padding: 25px 40px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  background: rgba(255, 255, 255, 0.4);
}

.chat-input-wrapper {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 40px;
  padding: 8px 25px;
  border: 1px solid rgba(0, 0, 0, 0.03);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.chat-input-wrapper:focus-within {
  box-shadow: 0 15px 35px rgba(13, 110, 253, 0.12);
  border-color: rgba(13, 110, 253, 0.2);
  transform: translateY(-2px);
}

.chat-input-wrapper input {
  flex-grow: 1;
  border: none;
  background: transparent;
  padding: 18px 10px;
  font-size: 16px;
  outline: none;
  color: #333;
}

.chat-input-wrapper button {
  background: linear-gradient(135deg, #0d6efd, #0099ff);
  color: #fff;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 20px;
  box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
}

.chat-input-wrapper button:hover {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 8px 25px rgba(13, 110, 253, 0.45);
}

/* Specific styling for the upload button */
#upload-resume-btn {
  background: #f1f5f9;
  color: #0d6efd;
  box-shadow: none;
}

#upload-resume-btn:hover {
  background: #e2e8f0;
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Floating Shapes for visual effect */
.ai-chatbots .shape {
  position: absolute;
  z-index: 0;
  opacity: 0.5;
}

.ai-chatbots .shape-1 {
  top: -50px;
  left: -50px;
  width: 200px;
  filter: blur(50px);
  fill: #FF6B6B;
}

.ai-chatbots .shape-2 {
  bottom: -50px;
  right: -50px;
  width: 300px;
  filter: blur(60px);
  fill: #4facfe;
}

/* Typing Animation Styles */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background-color: #adb5bd;
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing-bounce {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1);
  }
}

.typing-cursor::after {
  content: '▋';
  display: inline-block;
  vertical-align: bottom;
  animation: blink 1s step-end infinite;
  margin-left: 2px;
  color: #adb5bd;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@media (max-width: 991px) {
  .chatbox-wrapper {
    flex-direction: column;
    height: calc(100vh - 100px);
    margin: 90px 15px 15px;
    gap: 15px;
  }

  .chat-sidebar {
    width: 100%;
    padding: 15px;
    border-radius: 20px;
  }

  .chat-bots-list {
    display: flex;
    overflow-x: auto;
    padding: 0 5px;
    gap: 10px;
  }

  .chat-bot-item {
    padding: 12px 18px;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .chat-main {
    border-radius: 20px;
  }

  .chat-header {
    padding: 20px;
  }

  .chat-messages {
    padding: 20px;
  }

  .chat-input-area {
    padding: 15px 20px;
  }

  .bot-name h6 {
    font-size: 15px;
  }

  .bot-name small {
    font-size: 12px;
  }

  .message-bubble {
    padding: 15px 20px;
    font-size: 15px;
  }
}