/* ===== TRPG 约团全局样式 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #0f0f1a;
  color: #e0e0e0;
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== 顶部导航 ===== */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, #1a1a33, #0f0f1a);
  border-bottom: 1px solid #333366;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.nav-title {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(90deg, #8b5cf6, #3b82f6, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-right: 32px;
  letter-spacing: 2px;
}

.nav-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}

.nav-btn {
  padding: 8px 18px;
  border: 1px solid #333366;
  background: transparent;
  color: #9ca3af;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn:hover {
  color: #e0e0e0;
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
}

.nav-btn.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: #8b5cf6;
  color: #fff;
}

/* ===== 搜索筛选区域 ===== */
.search-area {
  padding: 16px 24px;
  border-bottom: 1px solid #1e1e33;
}

.search-params {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-select {
  padding: 8px 14px;
  border: 1px solid #333355;
  border-radius: 8px;
  background: #1a1a2e;
  color: #e0e0e0;
  font-size: 13px;
  min-width: 120px;
}

.filter-select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.filter-select option {
  background: #1a1a2e;
}

.btn-secondary {
  padding: 8px 16px;
  border: 1px solid #333;
  border-radius: 8px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  color: #e0e0e0;
  border-color: #555;
}

/* ===== 统计行 ===== */
.stats-row {
  display: flex;
  gap: 24px;
  padding: 0 24px 12px;
}

.stat-item {
  font-size: 13px;
  color: #9ca3af;
}

.stat-item strong {
  color: #8b5cf6;
  font-size: 16px;
}

/* ===== 团组卡片网格 ===== */
.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  padding: 0 24px 24px;
}

.group-card {
  background: linear-gradient(135deg, #1a1a33, #15152a);
  border: 1px solid #2a2a55;
  border-radius: 14px;
  padding: 20px;
  transition: all 0.25s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.group-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  opacity: 0;
  transition: opacity 0.25s;
}

.group-card:hover {
  border-color: #6366f1;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.15);
  transform: translateY(-2px);
}

.group-card:hover::before {
  opacity: 1;
}

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

.group-name {
  font-size: 18px;
  font-weight: 600;
  color: #e0e0e0;
}

.group-system {
  font-size: 11px;
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.group-desc {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 12px;
  line-height: 1.5;
}

.group-meta-row {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #777;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.group-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.group-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tag-chip {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}

/* .tag-chip display:inline-block moved to new rules block */

.tag-style-1 { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.tag-style-2 { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.tag-style-3 { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }
.tag-style-4 { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.tag-style-5 { background: rgba(234, 179, 8, 0.15); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.3); }
.tag-style-6 { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.tag-chip.selected {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.25);
}

.tag-chip:hover {
  transform: scale(1.05);
}

/* ===== 人数进度条 ===== */
.players-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.players-label {
  font-size: 12px;
  color: #9ca3af;
  min-width: 55px;
}

.players-progress {
  flex: 1;
  height: 6px;
  background: #222244;
  border-radius: 3px;
  overflow: hidden;
}

.players-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #6366f1, #22d3ee);
  transition: width 0.3s;
}

/* ===== 按钮 ===== */
.btn-primary {
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

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

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-join {
  width: 100%;
  padding: 10px;
  font-size: 14px;
}

.btn-hidden {
  display: none !important;
}

.btn-full {
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  background: #2a2a44;
  color: #6b7280;
  font-size: 14px;
  cursor: default;
}

.btn-wait {
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  background: #5b4300;
  color: #facc15;
  font-size: 14px;
}

/* ===== 创建团组表单 ===== */
.view {
  padding: 20px 24px;
  display: none;
}

.view.active {
  display: block;
}

.view.active-search {
  display: block;
}

.create-form-block {
  max-width: 600px;
  margin: 0 auto;
  background: linear-gradient(135deg, #1a1a33, #15152a);
  border: 1px solid #2a2a55;
  border-radius: 14px;
  padding: 28px;
}

.create-form-block h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.create-form-block > p {
  color: #9ca3af;
  font-size: 14px;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 6px;
}

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

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

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="datetime-local"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #333355;
  border-radius: 8px;
  background: #111128;
  color: #e0e0e0;
  font-size: 14px;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

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

.hint-tag {
  font-size: 12px;
  color: #555;
  display: block;
  margin-bottom: 6px;
}

.style-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.selected-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
  min-height: 24px;
}

.selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 12px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.selected-tag .remove {
  cursor: pointer;
  font-size: 14px;
  opacity: 0.6;
  line-height: 10px;
}

.selected-tag .remove:hover {
  opacity: 1;
}

.custom-tag-input-wrapper, .input-pair-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.custom-tag-input-wrapper input, .input-pair-wrapper input {
  width: 80px;
  padding: 4px 8px;
  font-size: 12px;
}

.custom-tag-input-wrapper button, .input-pair-wrapper .tag-add {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #555;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== 加入团组视图 ===== */
.join-intro {
  text-align: center;
  margin-bottom: 24px;
}

.join-intro h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.join-form-block h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.preference-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.new-tag-btn {
  font-size: 13px;
  padding: 6px 14px;
  border: 1px solid #333355;
  border-radius: 18px;
  background: #1a1a33;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s;
}

/*.new-tag-btn display:inline-block kept in original def */

.new-tag-btn:hover {
  color: #e0e0e0;
  border-color: #555;
}

.new-tag-btn.active {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.4);
}

.match-result {
  background: linear-gradient(135deg, #1a1a33, #15152a);
  border: 1px solid #2a2a55;
  border-radius: 14px;
  padding: 20px;
  margin-top: 16px;
}

.match-result h3 {
  margin-bottom: 12px;
  font-size: 16px;
  color: #a78bfa;
}

.match-result .group-card {
  cursor: pointer;
}

/* ===== 我的团组 ===== */
.my-groups-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.my-group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #1a1a33, #15152a);
  border: 1px solid #2a2a55;
  border-radius: 12px;
}

.my-group-left {
  flex: 1;
}

.my-group-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.my-group-status {
  font-size: 12px;
}

.my-group-joined { color: #4ade80; }
.my-group-pending { color: #facc15; }
.my-group-created { color: #a78bfa; }

.my-group-right {
  display: flex;
  gap: 8px;
}

/* ===== 底部信息栏 ===== */
.footer-info {
  text-align: center;
  padding: 16px;
  color: #444;
  font-size: 12px;
  border-top: 1px solid #1e1e33;
}

/* ===== 加载状态 ===== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px;
  color: #9ca3af;
  font-size: 14px;
}

.loading-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6366f1;
  animation: bounce 1.4s infinite;
}

.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

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

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #555;
}

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

.empty-state p {
  font-size: 14px;
}

/* ===== 弹窗样式 ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.65);
  z-index: 999;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #1a1a33;
  border: 1px solid #2a2a55;
  border-radius: 14px;
  padding: 28px;
  max-width: 520px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-content h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.modal-content .m-desc {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 16px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}

/* ===== 用户头像 ===== */
.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}

.user-avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

/* ===== 用户资料面板 ===== */
.user-panel-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.65);
  z-index: 999;
  justify-content: center;
  align-items: center;
}

.user-panel-overlay.active { display: flex; }

.user-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.user-panel-content {
  background: #1a1a33;
  border: 1px solid #2a2a55;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  max-height: 80vh;
  overflow-y: auto;
}

.user-panel-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid #2a2a55;
}

.user-panel-header .user-avatar {
  width: 48px; height: 48px; font-size: 18px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.user-panel-header img { width: 48px; height: 48px; border-radius: 50%; background: #333; }
.user-panel-header h3 { margin: 0; font-size: 18px; }
.user-id { font-size: 12px; color: #777; margin: 2px 0 0; }

.user-panel-body { padding: 20px 24px 24px; }

.btn-full { width: 100%; }

.user-avatar.small { width: 28px; height: 28px; font-size: 11px; }
.user-avatar.large { width: 56px; height: 56px; font-size: 20px; }

/* ===== 登录/注册表单 ===== */
.auth-container {
  max-width: 420px;
  margin: 40px auto;
  padding: 40px;
  background: linear-gradient(135deg, #1a1a33, #15152a);
  border: 1px solid #2a2a55;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.auth-container h2 {
  text-align: center;
  font-size: 24px;
  margin-bottom: 6px;
}

.auth-container > p {
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
  margin-bottom: 28px;
}

.auth-form .form-group {
  margin-bottom: 18px;
}

.auth-form label {
  display: block;
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 6px;
}

.auth-form input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #333355;
  border-radius: 10px;
  background: #111128;
  color: #e0e0e0;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
}

.auth-form input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.auth-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.auth-actions .btn-primary { flex: 1; padding: 12px; font-size: 15px; }
.auth-actions .btn-secondary { flex: 1; padding: 12px; font-size: 15px; }

.auth-divider {
  text-align: center;
  font-size: 12px;
  color: #555;
  margin: 20px 0;
  position: relative;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #2a2a44;
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-hint {
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
  margin-top: 16px;
}

.auth-hint a {
  color: #8b5cf6;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}

.auth-hint a:hover { color: #a78bfa; }

.auth-error {
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  font-size: 13px;
  text-align: center;
  margin-bottom: 16px;
}

/* ===== 第三方登录 ===== */
.auth-social {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-social {
  padding: 10px 16px;
  border: 1px solid #2a2a44;
  border-radius: 10px;
  background: #1a1a33;
  color: #e0e0e0;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.btn-social:hover {
  border-color: #4a4a7a;
  background: #1e1e3a;
}

/* ===== 搜索排序 ===== */
.search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.sort-controls label {
  color: #777;
  white-space: nowrap;
}

.sort-select {
  padding: 6px 12px;
  border: 1px solid #333355;
  border-radius: 8px;
  background: #1a1a2e;
  color: #e0e0e0;
  font-size: 13px;
  cursor: pointer;
}

/* ===== 搜索结果 / 排序标签 ===== */
.sort-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 24px 8px;
}

.sort-tag {
  font-size: 11px;
  padding: 3px 12px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.12);
  color: #8b5cf6;
  border: 1px solid rgba(99, 102, 241, 0.25);
  cursor: pointer;
  transition: all 0.2s;
}

.sort-tag:hover { background: rgba(99, 102, 241, 0.2); }
.sort-tag.order-asc .sort-icon::after { content: ' ↑'; }
.sort-tag.order-desc .sort-icon::after { content: ' ↓'; }

/* ===== 规则书页面 ===== */
.rules-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 24px 40px;
}

.rules-header {
  text-align: center;
  margin-bottom: 32px;
}

.rules-header h2 { font-size: 26px; margin-bottom: 8px; }
.rules-header p { color: #9ca3af; font-size: 15px; }

.rules-search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.rules-search-bar input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #333355;
  border-radius: 10px;
  background: #111128;
  color: #e0e0e0;
  font-size: 14px;
}

.rules-search-bar button {
  padding: 12px 24px;
  font-size: 14px;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.rule-card {
  background: linear-gradient(135deg, #1a1a33, #15152a);
  border: 1px solid #2a2a55;
  border-radius: 14px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.rule-card:hover {
  border-color: #6366f1;
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.rule-card-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.rule-card-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.rule-card-desc {
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.5;
  margin-bottom: 12px;
}

.rule-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #777;
}

.rule-card-language {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.12);
  color: #22d3ee;
}

/* ===== 用户资料页 ===== */
.profile-section {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px 24px 40px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: linear-gradient(135deg, #1a1a33, #15152a);
  border: 1px solid #2a2a55;
  border-radius: 14px;
  margin-bottom: 20px;
}

.profile-info h2 { font-size: 22px; margin-bottom: 4px; }
.profile-info .profile-role { font-size: 13px; color: #8b5cf6; margin-bottom: 8px; }
.profile-info .profile-title { font-size: 14px; color: #9ca3af; }

.profile-tabs {
  display: flex;
  gap: 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid #1e1e33;
  margin-bottom: 20px;
}

.profile-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.profile-tab.active {
  color: #8b5cf6;
  border-bottom-color: #8b5cf6;
}

.profile-tab:hover { color: #e0e0e0; }

.profile-stats {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #1a1a33, #15152a);
  border: 1px solid #2a2a55;
  border-radius: 12px;
  margin-bottom: 20px;
}

.profile-stat {
  flex: 1;
  text-align: center;
}

.profile-stat .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #8b5cf6;
}

.user-stats-row, .profile-stats {
  display: flex;
  gap: 16px;
}

.user-stat, .profile-stat {
  flex: 1 0 0;
  text-align: center;
  padding: 8px;
  background: rgba(26, 26, 51, 0.5);
  border-radius: 8px;
}

.user-stat strong, .profile-stat .stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #8b5cf6;
}

.user-stat .stat-label, .profile-stat .stat-label {
  font-size: 12px;
  color: #777;
  margin-top: 4px;
  display: block;
}

/* ===== 顶部导航用户区 ===== */
.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-user .nav-btn {
  padding: 6px 14px;
  font-size: 13px;
}

.nav-welcome {
  font-size: 13px;
  color: #9ca3af;
}

.nav-welcome strong {
  color: #8b5cf6;
}

/* ===== 团组详情弹窗 ===== */
.detail-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.65);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.detail-modal-overlay.active { display: flex; }

.detail-modal {
  background: #1a1a33;
  border: 1px solid #2a2a55;
  border-radius: 14px;
  max-width: 520px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  border-bottom: 1px solid #2a2a55;
}

.detail-dm-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-dm-info img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.detail-dm-info h2 {
  font-size: 18px;
  margin: 0;
  color: #e0e0e0;
}

.detail-meta {
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.6;
  margin-top: 4px;
}

.detail-close {
  background: none;
  border: 1px solid #333;
  color: #9ca3af;
  font-size: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-close:hover {
  color: #fff;
  border-color: #6366f1;
}

.detail-body {
  padding: 16px 24px;
  line-height: 1.7;
  color: #d0d0d0;
}

.detail-footer {
  padding: 16px 24px;
  border-top: 1px solid #2a2a55;
}

/* ===== 通知提示 ===== */
.toast {
  position: fixed;
  top: 72px;
  right: 16px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  z-index: 1000;
  animation: toastSlideIn 0.3s ease;
  border: 1px solid transparent;
}

.toast-success {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.3);
}

.toast-error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== 响应式 ===== */
@media (max-width: 600px) {
  .nav-bar { flex-direction: column; gap: 8px; padding: 10px; }
  .nav-title { font-size: 20px; margin-right: 0; }
  .nav-buttons { width: 100%; justify-content: center; flex-wrap: wrap; }
  .nav-btn { font-size: 12px; padding: 6px 12px; }
  .group-grid { grid-template-columns: 1fr; padding: 0 12px 16px; }
  .stats-row { flex-wrap: wrap; gap: 16px; }
  .search-params { gap: 8px; }
  .create-form-block { padding: 20px; margin: 0 8px; }
}
