/**
 * 极光主题 — Aurora Theme
 *
 * 设计语言：深色背景 + 流动极光 + 毛玻璃 + 液态按钮
 * 核心组件：glass-card / liquid-btn / gradient-text / status-tag
 */

/* ===== CSS 变量 ===== */
:root {
  --bg-deep: #080b16;
  --bg-surface: rgba(255, 255, 255, 0.04);
  --bg-surface-hover: rgba(255, 255, 255, 0.07);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.15);

  --text-primary: #e8eaf0;
  --text-secondary: #8b8fa3;
  --text-muted: #5a5e72;

  --accent-cyan: #00d4ff;
  --accent-purple: #a855f7;
  --accent-green: #00ff9d;
  --accent-pink: #ff6b9d;
  --accent-gradient: linear-gradient(135deg, #00d4ff, #a855f7);
  --accent-gradient-hover: linear-gradient(135deg, #00b8e6, #9333ea);

  --status-open: #00ff9d;
  --status-accepted: #00d4ff;
  --status-completed: #a855f7;
  --status-cancelled: #ff5b7e;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif;
  color: var(--text-primary);
  background: var(--bg-deep);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; cursor: pointer; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, textarea, select { font-family: inherit; outline: none; }

/* ===== 极光画布 ===== */
#aurora-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ===== 导航栏 ===== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 64px;
  background: rgba(8, 11, 22, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 20px;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.nav-link.active {
  color: var(--accent-cyan);
  background: rgba(0, 212, 255, 0.1);
}

.nav-link .badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  font-size: 11px;
  background: var(--accent-pink);
  color: #fff;
  border-radius: 20px;
  vertical-align: top;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-username {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===== 毛玻璃卡片 ===== */
.glass-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.glass-card:hover {
  border-color: var(--border-glass-hover);
  background: var(--bg-surface-hover);
}

/* ===== 液态按钮 ===== */
.liquid-btn {
  position: relative;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent-gradient);
  background-size: 200% 200%;
  background-position: 0% 50%;
  transition: var(--transition);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.liquid-btn::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;
}

.liquid-btn:hover {
  background-position: 100% 50%;
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.3);
  transform: translateY(-1px);
}

.liquid-btn:hover::before {
  left: 100%;
}

.liquid-btn:active {
  transform: translateY(0);
}

.liquid-btn-ghost {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}

.liquid-btn-ghost:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.1);
}

.liquid-btn-danger {
  background: rgba(255, 91, 126, 0.15);
  border: 1px solid rgba(255, 91, 126, 0.3);
  color: var(--accent-pink);
}

.liquid-btn-danger:hover {
  background: rgba(255, 91, 126, 0.25);
  box-shadow: 0 0 16px rgba(255, 91, 126, 0.2);
}

.liquid-btn-sm {
  padding: 6px 16px;
  font-size: 13px;
}

.liquid-btn-block {
  width: 100%;
  display: block;
}

.liquid-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ===== 渐变文字 ===== */
.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* ===== 状态标签 ===== */
.status-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-open {
  background: rgba(0, 255, 157, 0.12);
  color: var(--status-open);
  border: 1px solid rgba(0, 255, 157, 0.2);
}

.status-accepted {
  background: rgba(0, 212, 255, 0.12);
  color: var(--status-accepted);
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.status-completed {
  background: rgba(168, 85, 247, 0.12);
  color: var(--status-completed);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.status-cancelled {
  background: rgba(255, 91, 126, 0.12);
  color: var(--status-cancelled);
  border: 1px solid rgba(255, 91, 126, 0.2);
}

/* ===== 审核状态标签 ===== */
.review-pending {
  background: rgba(255, 170, 68, 0.12);
  color: #ffaa44;
  border: 1px solid rgba(255, 170, 68, 0.25);
}

.review-approved {
  background: rgba(0, 255, 157, 0.12);
  color: var(--status-open);
  border: 1px solid rgba(0, 255, 157, 0.2);
}

.review-rejected {
  background: rgba(255, 91, 126, 0.12);
  color: var(--status-cancelled);
  border: 1px solid rgba(255, 91, 126, 0.2);
}

/* ===== 表单元素 ===== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent-cyan);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238b8fa3' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-group select option {
  background: #1a1e2e;
  color: var(--text-primary);
}

/* ===== 协议勾选框（注册页）：豁免输入框的通用样式，防止被拉成大黑框 ===== */
.form-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 4px 0 0;
  padding: 0;
  border: none;
  background: none;
  border-radius: 4px;
  accent-color: var(--accent-cyan, #00d4ff);
  cursor: pointer;
  flex-shrink: 0;
}
/* 勾选行内的 label 不吃底部间距（避免与勾选框垂直错位） */
.form-group.form-group-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
}
.form-group.form-group-check label {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary, rgba(255,255,255,.75));
  cursor: pointer;
  user-select: none;
  line-height: 1.6;
  text-align: left;
}
.form-group.form-group-check label a {
  color: var(--accent-cyan, #7ec8ff);
  text-decoration: underline;
}
.form-group.form-group-check label a:hover {
  opacity: .8;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

.error-msg {
  color: var(--accent-pink);
  font-size: 13px;
  margin-top: 12px;
  min-height: 18px;
}

/* ===== 页面容器 ===== */
.page-container {
  padding: 32px;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 112px);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-header h2 {
  font-size: 24px;
  font-weight: 700;
}

/* ===== 认证页面 ===== */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 48px);
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 48px 40px;
  text-align: center;
}

.auth-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  transition: var(--transition);
}

.auth-tab.active {
  background: var(--accent-gradient);
  color: #fff;
}

/* ===== 任务卡片网格 ===== */
.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.task-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
  cursor: pointer;
}

.task-card:hover {
  border-color: var(--accent-cyan);
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.1);
}

.task-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-card-desc {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== 发布者 + 信誉分行 ===== */
.task-card-publisher {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, rgba(130, 87, 229, 0.08), rgba(14, 165, 233, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
}
.task-card-publisher-name {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}
.task-card-publisher-name::before {
  content: '🪪 ';
  opacity: 0.75;
}
.task-card-publisher-rep {
  display: inline-flex;
  align-items: center;
  max-width: 55%;
}

.task-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.task-card-reward {
  font-size: 18px;
  font-weight: 700;
}

.task-card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.task-card-category {
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  background: rgba(168, 85, 247, 0.1);
  color: var(--accent-purple);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.task-card-publisher {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== 审核管理页面 ===== */
.review-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.review-stat-card {
  flex: 1;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  text-align: center;
  transition: var(--transition);
}

.review-stat-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-glass-hover);
}

.review-stat-card .stat-num {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.review-stat-card .stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-pending .stat-num { color: #ffaa44; }
.stat-approved .stat-num { color: var(--status-open); }
.stat-rejected .stat-num { color: var(--status-cancelled); }

.review-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.review-note {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 91, 126, 0.08);
  border: 1px solid rgba(255, 91, 126, 0.15);
  font-size: 13px;
  line-height: 1.5;
}

.review-note-label {
  color: var(--status-cancelled);
  font-weight: 600;
}

.review-note-text {
  color: var(--text-secondary);
}

.review-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== 通知中心 ===== */
.notif-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 40px;
}

.notif-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.notif-item:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-glass-hover);
  transform: translateX(2px);
}

.notif-item.notif-unread {
  background: rgba(0, 212, 255, 0.05);
  border-color: rgba(0, 212, 255, 0.2);
}

.notif-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

.notif-tone-success { color: var(--accent-green); }
.notif-tone-danger  { color: var(--status-cancelled); }
.notif-tone-info    { color: var(--accent-cyan); }
.notif-tone-muted   { color: var(--text-muted); }

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-content {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
  word-break: break-word;
}

.notif-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.notif-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

/* ===== 星级评分 ===== */
.star-rating {
  display: inline-flex;
  gap: 2px;
  letter-spacing: 0;
  line-height: 1;
  vertical-align: middle;
}
.star-rating .star,
.star-rating .star-full,
.star-rating .star-empty {
  display: inline-block;
  line-height: 1;
}
/* 尺寸类作用于子元素,兼容两种 span 写法 */
.star-rating.star-sm { font-size: 13px; }
.star-rating.star-md { font-size: 17px; }
.star-rating.star-lg { font-size: 21px; }
.star-rating.star-sm .star,
.star-rating.star-sm .star-full,
.star-rating.star-sm .star-empty { font-size: 13px; }
.star-rating.star-md .star,
.star-rating.star-md .star-full,
.star-rating.star-md .star-empty { font-size: 17px; }
.star-rating.star-lg .star,
.star-rating.star-lg .star-full,
.star-rating.star-lg .star-empty { font-size: 21px; }
.star-full  { color: #ffd24a; text-shadow: 0 0 6px rgba(255, 210, 74, 0.4); }
.star-empty { color: rgba(255, 255, 255, 0.18); }

/* ===== 星星选择器（交互式） ===== */
.star-picker {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
}
.picker-star {
  font-size: 26px;
  color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 0.1s, color 0.1s;
  padding: 0 2px;
  user-select: none;
}
.picker-star:hover,
.picker-star.hovered,
.picker-star.picked {
  color: #ffd24a;
  transform: scale(1.1);
  text-shadow: 0 0 10px rgba(255, 210, 74, 0.5);
}
.picker-label {
  min-width: 80px;
}

/* ===== 评价卡片 ===== */
.review-entry-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(255, 210, 74, 0.06), rgba(0, 212, 255, 0.06));
  border: 1px solid rgba(255, 210, 74, 0.18);
  border-radius: var(--radius-md);
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-card {
  padding: 16px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.review-card:hover {
  border-color: var(--border-glass-hover);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}

.review-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.review-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.review-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.review-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.review-role {
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}

.review-comment {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  padding-top: 8px;
  border-top: 1px dashed var(--border-glass);
  margin-top: 8px;
}

/* ===== 过滤器 ===== */
.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-input {
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}

.filter-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.filter-input option {
  background: #1a1e2e;
}

/* ===== 弹窗 Modal ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: rgba(18, 22, 38, 0.95);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(255, 91, 126, 0.15);
  color: var(--accent-pink);
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-success {
  background: rgba(0, 255, 157, 0.15);
  border: 1px solid rgba(0, 255, 157, 0.3);
  color: var(--accent-green);
}

.toast-error {
  background: rgba(255, 91, 126, 0.15);
  border: 1px solid rgba(255, 91, 126, 0.3);
  color: var(--accent-pink);
}

.toast-info {
  background: rgba(0, 212, 255, 0.15);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--accent-cyan);
}

/* ===== 聊天布局 ===== */
.chat-layout {
  display: flex;
  gap: 0;
  height: calc(100vh - 176px);
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.conv-list {
  width: 280px;
  border-right: 1px solid var(--border-glass);
  overflow-y: auto;
  padding: 16px;
}

.conv-list h3 {
  font-size: 16px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.conv-item {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 4px;
}

.conv-item:hover {
  background: var(--bg-surface);
}

.conv-item.active {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.conv-item-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.conv-item-last {
  font-size: 12px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.conv-item-unread {
  display: inline-block;
  padding: 1px 7px;
  font-size: 11px;
  background: var(--accent-pink);
  color: #fff;
  border-radius: 20px;
  margin-left: 4px;
}

.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-glass);
  font-weight: 600;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  max-width: 70%;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  word-break: break-word;
}

.chat-msg.sent {
  align-self: flex-end;
  background: var(--accent-gradient);
  color: #fff;
}

.chat-msg.received {
  align-self: flex-start;
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-glass);
}

.chat-msg-time {
  font-size: 11px;
  opacity: 0.6;
  margin-top: 4px;
}

.chat-input-area {
  padding: 16px 24px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  gap: 12px;
}

.chat-input-area input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}

.chat-input-area input:focus {
  border-color: var(--accent-cyan);
}

/* ===== 个人中心 ===== */
.profile-info {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
}

.profile-bio {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

.profile-meta {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state-text {
  font-size: 16px;
}

/* ===== 分页加载更多 ===== */
.pager-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 0 40px;
  grid-column: 1 / -1;
}

.pager-info {
  font-size: 13px;
  color: var(--text-muted);
}

.pager-more-btn {
  min-width: 140px;
}

.pager-end {
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 0;
}

/* ===== 加载动画 ===== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-glass);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ===== 动画 ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-glass-hover);
}

/* ===== 页脚备案 ===== */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 14px 16px;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(8, 11, 22, 0.6);
  border-top: 1px solid var(--border-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.footer-beian {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-beian a {
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-beian a:hover {
  color: var(--text-secondary);
}

.footer-sep {
  color: var(--text-muted);
  opacity: 0.5;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .navbar {
    padding: 0 16px;
    flex-wrap: wrap;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 8px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-around;
  }

  .nav-link {
    padding: 6px 10px;
    font-size: 13px;
  }

  .nav-user {
    gap: 8px;
  }

  .nav-username {
    display: none;
  }

  .page-container {
    padding: 16px;
  }

  .task-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .chat-layout {
    flex-direction: column;
    height: auto;
  }

  .conv-list {
    width: 100%;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--border-glass);
  }

  .modal-content {
    padding: 24px 20px;
  }
}
