/* AI电子辅导员 - 样式文件 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f8f9fa;
  min-height: 100vh;
}

/* 背景图片 */
.bg-page {
  background-image: url('/publish/xgxy/images/bg/bj1.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 顶部导航 */
.header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid #e5e7eb;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo img {
  width: 40px;
  height: 40px;
}

.header-logo h1 {
  font-size: 20px;
  font-weight: bold;
  color: #1a1a2e;
}

.header-nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: #666;
}

.header-nav span {
  color: #e63946;
  font-weight: 500;
}

/* 主内容区 */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* 特色区域 */
.featured-section {
  margin-bottom: 32px;
}

.featured-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 32px;
  align-items: center;
}

.featured-card img {
  width: 144px;
  height: 112px;
  object-fit: contain;
}

@media (max-width: 768px) {
  .featured-card img {
    display: none;
  }
}

.featured-info h2 {
  font-size: 30px;
  font-weight: bold;
  color: #1a1a2e;
  margin: 8px 0 16px;
}

.featured-info p {
  color: #666;
  max-width: 600px;
}

.featured-tags {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  font-size: 14px;
  color: #666;
}

.featured-tag {
  display: flex;
  align-items: center;
  gap: 8px;
}

.featured-tag span:first-child {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.featured-tag:first-child span:first-child {
  background: #e63946;
}

.featured-tag:last-child span:first-child {
  background: #1a1a2e;
}

/* 内容布局 */
.content-layout {
  display: flex;
  gap: 32px;
}

/* 辅导员列表 */
.counselor-list {
  flex: 1;
}

/* 辅导员卡片 */
.counselor-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: box-shadow 0.2s;
  display: flex;
  gap: 16px;
}

.counselor-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.counselor-card.disabled {
  background: rgba(31, 41, 55, 0.9);
}

.counselor-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.counselor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.counselor-info {
  flex: 1;
}

.counselor-info h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.counselor-card.disabled .counselor-info h3 {
  color: #fff;
}

.counselor-info p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

.counselor-card.disabled .counselor-info p {
  color: #9ca3af;
}

.counselor-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-top: 8px;
  color: #e63946;
}

.counselor-card.disabled .counselor-action {
  color: #6b7280;
}

/* 侧边栏 */
.sidebar {
  width: 256px;
  flex-shrink: 0;
}

.sidebar-btn {
  display: block;
  background: #e63946;
  color: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  text-decoration: none;
  transition: background 0.2s;
}

.sidebar-btn:hover {
  background: #d62839;
}

.sidebar-btn-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-btn-inner span:first-child {
  font-size: 24px;
}

.sidebar-btn-inner h4 {
  font-weight: 600;
}

.sidebar-btn-inner p {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 4px;
}

.sidebar-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sidebar-card h4 {
  font-weight: 600;
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 12px;
}

.sidebar-card p {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px}

/* 页脚 */
.footer {
  background: #1a1a2e;
  color: #fff;
  padding: 24px;
  margin-top: 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 14px;
  color: #9ca3af;
}

/* 弹窗 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  background: #fff;
  border-radius: 16px;
  max-width: 448px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-icon {
  width: 48px;
  height: 48px;
  background: rgba(230, 57, 70, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 24px;
}

.modal h3 {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.modal p {
  text-align: center;
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-buttons {
  display: flex;
  gap: 12px;
}

.modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
}

.modal-btn:hover {
  background: #f9fafb;
}

.modal-btn-primary {
  background: #e63946;
  color: #fff;
  border-color: #e63946;
}

.modal-btn-primary:hover {
  background: #d62839;
}

/* 响应式 */
@media (max-width: 768px) {
  .content-layout {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    order: -1;
  }
  
  .header-logo h1 {
    font-size: 16px;
  }
  
  .featured-card {
    padding: 24px;
  }
  
  .featured-info h2 {
    font-size: 24px;
  }
}

/* ============ Chat 页面样式 ============ */

.chat-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f8f9fa;
}

.chat-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 10;
}

.chat-header-inner {
  max-width: 896px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.back-btn:hover {
  color: #1a1a2e;
  background: #f3f4f6;
}

.chat-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.chat-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-user span {
  font-weight: 600;
  color: #1a1a2e;
}

.chat-main {
  flex: 1;
  overflow-y: auto;
}

.chat-messages {
  max-width: 896px;
  margin: 0 auto;
  padding: 24px 16px;
}

.chat-message {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.chat-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-message-content {
  background: #fff;
  border-radius: 16px;
  border-top-left-radius: 4px;
  padding: 16px 20px;
  max-width: 448px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chat-message.user .chat-message-content {
  background: #1a1a2e;
  color: #fff;
  border-radius: 16px;
  border-top-right-radius: 4px;
}

.chat-message-content p {
  line-height: 1.6;
}

.typing-indicator {
  display: flex;
  gap: 4px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #9ca3af;
  border-radius: 50%;
  animation: 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 bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.chat-footer {
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 16px;
}

.chat-footer-inner {
  max-width: 896px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
}

.chat-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #1a1a2e;
  color: #fff;
  font-weight: 500;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
}

.chat-btn:hover {
  background: #2d2d4a;
}

.chat-tip {
  position: fixed;
  bottom: 112px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  color: #fff;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 9999px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.chat-tip.hidden {
  display: none;
}

/* 隐藏页面 */
.page.hidden {
  display: none;
}
