/* ===================================================
   CAREER COMPASS - AI MENTOR CSS
   Futuristic, sleek dark mode chat layout matching system styles
   =================================================== */

:root {
  --bg-main: #060814;
  --bg-card: #0c0f2b;
  --bg-card-inner: #070921;
  --text-main: #ffffff;
  --text-muted: #8fa0dd;
  --text-dim: #506199;
  --accent-purple: #6366f1;
  --accent-blue: #2563eb;
  --accent-neon: #7c3aed;
  --border-light: rgba(255, 255, 255, 0.06);
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #2563eb 100%);
  --gradient-ai: linear-gradient(135deg, #0f1642 0%, #080b26 100%);
  --glow-purple: rgba(99, 102, 241, 0.25);
  --glow-blue: rgba(37, 99, 235, 0.2);
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  background-image: 
    radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.08) 0%, transparent 50%);
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* --- TOP NAVBAR --- */
.top-bar {
  height: 75px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid var(--border-light);
  background: rgba(6, 8, 20, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  flex-shrink: 0;
}

.logo.page-title {
  position: absolute;
  left: 72px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.logo.page-title .page-title-icon {
  color: var(--accent-purple);
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 0 6px var(--accent-purple));
}

.logo.page-title span {
  color: var(--accent-purple);
}

.top-nav {
  display: flex;
  gap: 32px;
}

.top-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding: 24px 0;
  transition: color 0.3s ease;
}

.top-link:hover, .top-link.active {
  color: #fff;
}

.top-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-purple);
  box-shadow: 0 0 8px var(--accent-purple);
}

.top-actions {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 20px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  transition: color 0.2s;
}

.icon-btn:hover {
  color: #fff;
}

.profile-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

/* --- CHAT VIEWPORT CONTAINER --- */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 40px 30px;
}

/* Chat Board Wrapper */
.chat-board {
  flex: 1;
  background: rgba(12, 15, 43, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Chat Header Area */
.chat-board-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 9, 33, 0.3);
}

.mentor-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mentor-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.15);
  border: 1.5px solid var(--accent-blue);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mentor-avatar i {
  color: #fff;
  font-size: 22px;
}

.online-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #10b981;
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 6px #10b981;
}

.mentor-meta h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 2px;
}

.mentor-meta p {
  font-size: 11px;
  color: var(--text-dim);
  margin: 0;
}

.mentor-actions {
  display: flex;
  gap: 10px;
}

.mentor-action-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.mentor-action-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* Chat Feed */
.chat-feed {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-behavior: smooth;
}

/* Message layouts */
.message {
  display: flex;
  gap: 16px;
  max-width: 80%;
  animation: slide-up 0.3s ease;
}

.message.ai {
  align-self: flex-start;
}

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

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.message.ai .message-avatar {
  background: #172265;
  border: 1.5px solid var(--accent-blue);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.2);
}

.message.user .message-avatar {
  background: var(--accent-purple);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
}

.message-bubble {
  border-radius: 18px;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.6;
}

.message.ai .message-bubble {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border-top-left-radius: 4px;
}

.message.user .message-bubble {
  background: var(--gradient-primary);
  color: #fff;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

/* Formatting within bubbles */
.message-bubble h4 {
  font-size: 15px;
  margin: 0 0 8px;
  color: #fff;
}

.message-bubble p {
  margin: 0 0 10px;
}

.message-bubble p:last-child {
  margin-bottom: 0;
}

.message-bubble ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.message-bubble ul:last-child {
  margin-bottom: 0;
}

.message-bubble li {
  margin-bottom: 6px;
}

.message-bubble code {
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 6px;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  color: #a78bfa;
}

.message-bubble pre {
  background: #03040c;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 14px;
  overflow-x: auto;
  margin: 12px 0;
}

.message-bubble pre code {
  background: none;
  padding: 0;
  color: #e2e8f0;
}

/* Chat Prompt Suggestions */
.suggestion-area {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 24px;
  border-top: 1px solid var(--border-light);
  background: rgba(6, 8, 20, 0.2);
}

.suggestion-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.suggestion-chip:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--accent-purple);
  color: #fff;
  transform: translateY(-1.5px);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

/* Input Area */
.chat-input-area {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 16px;
  align-items: center;
  background: rgba(7, 9, 33, 0.4);
}

.chat-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.chat-input-wrapper input {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 50px 14px 18px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: all 0.25s;
}

.chat-input-wrapper input:focus {
  border-color: var(--accent-purple);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
}

.chat-input-wrapper input::placeholder {
  color: var(--text-dim);
}

.chat-attachment-btn {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 18px;
  transition: color 0.2s;
}

.chat-attachment-btn:hover {
  color: #fff;
}

.btn-send {
  background: var(--gradient-primary);
  border: none;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

.btn-send:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.btn-send i {
  font-size: 18px;
}

/* Typing Indicator Animation */
.typing-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 4px;
}

.typing-dots span {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.4;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 900px) {
  .chat-container {
    padding: 10px 20px 20px;
  }
  .top-nav {
    display: none;
  }
  .logo.page-title {
    left: 70px;
  }
}

@media (max-width: 600px) {
  .message {
    max-width: 90%;
  }
  .suggestion-area {
    display: none; /* Hide suggestion chips on small screens to save space */
  }
}
