/* ================================
   主样式文件
   从index.html提取的样式
   ================================ */

/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans SC", "Noto Sans JP", "Microsoft YaHei UI", "Yu Gothic UI", "Microsoft YaHei", "Yu Gothic", sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 桌面端隐藏移动端元素 */
@media (min-width: 769px) {

  .mobile-sidebar,
  .mobile-overlay,
  .mobile-menu-btn,
  .mobile-search-bar {
    display: none !important;
  }
}

/* Header样式优化 */
header h1 {
  font-size: 1.375rem;
  font-weight: 400;
  letter-spacing: 0.025em;
  color: var(--text-primary);
}

/* 侧边栏卡片 */
.sidebar-card {
  background: var(--bg-primary);
  border-radius: 12px;
  border: 1px solid var(--border-primary);
  box-shadow: none;
}

/* 博客卡片 - 官网网格样式 */
.blog-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  transition: all 0.2s ease;
  overflow: hidden;
}

.blog-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.blog-card-image {
  width: 100%;
  height: 0;
  padding-bottom: 125%;
  /* 4:5 比例（高/宽 = 5/4 = 125%） */
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}



.blog-card-content {
  padding: 1.25rem;
}

.blog-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.blog-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: 0.01em;
}

.blog-meta {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
}

.member-name {
  font-weight: 500;
  color: var(--text-secondary);
  display: inline-block;
  margin-bottom: 0.25rem;
}

/* 状态显示 */
.loading-state,
.empty-state {
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 4rem;
  text-align: center;
  color: var(--text-secondary);
}

/* 成员网格 */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border-primary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  overflow: hidden;
}

.member-item {
  background: var(--bg-primary);
  padding: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  cursor: pointer;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  min-height: 65px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--border-primary);
}

.member-item:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-secondary);
}

.member-item.opacity-50 {
  opacity: 0.4;
}

/* 已毕业成员样式：视觉区分，但可点击 */
.member-item--graduated {
  background: var(--bg-secondary);
  color: var(--text-tertiary);
  border-color: var(--border-primary);
  font-style: italic;
  position: relative;
}

.member-item--graduated::after {
  content: '†';
  font-size: 0.65rem;
  color: #bbb;
  position: absolute;
  top: 4px;
  right: 5px;
  font-style: normal;
}

.member-item--graduated:hover {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

/* 操作按钮 */
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid var(--border-secondary);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s, transform 0.1s;
  text-decoration: none;
  position: relative;
  height: 38px;
  /* 固定高度确保对齐 */
}

.action-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.action-btn:active {
  transform: scale(0.97);
}

.action-btn.primary {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.action-btn.primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.action-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-tertiary);
}

/* 分享菜单 */
.share-dropdown {
  position: relative;
  display: inline-block;
}

.share-menu {
  position: absolute;
  top: calc(100% + 8px);
  /* PC端：向下弹出 */
  left: 0;
  /* PC端：左对齐，出现在分享按钮右下方 */
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 10;
  min-width: 240px;
  /* 减小宽度以更紧凑 */
  display: none;
  grid-template-columns: repeat(4, 1fr);
  /* 4列 */
  gap: 4px;
  /* 减小间距使更紧凑 */
}

.share-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  /* 减小按钮尺寸 */
  height: 44px;
  flex-shrink: 0;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border-radius: 6px;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
}

.share-option svg {
  width: 20px;
  /* 减小图标尺寸 */
  height: 20px;
}

.share-option:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: #2563eb;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

/* 统计卡片 */
.stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.2s ease;
}

.stat-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.stat-number {
  font-size: 3rem;
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

/* 筛选器卡片 */
.filter-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  transition: all 0.2s ease;
}

.filter-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.filter-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Blog inline navigation (content area) */
.blog-inline-nav {
  margin-bottom: 1.5rem;
}

.blog-page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.blog-nav-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.blog-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Group filter pills */
.blog-pills-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-pills-divider {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: var(--border-primary);
  margin: 0 4px;
}

.group-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-tertiary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.group-pill:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.group-pill.active {
  color: var(--color-brand-nogi, #742581);
  background: color-mix(in srgb, var(--color-brand-nogi, #742581) 8%, transparent);
  border-color: color-mix(in srgb, var(--color-brand-nogi, #742581) 20%, transparent);
  font-weight: 600;
}

/* Blog search input */
.blog-search-input {
  height: 34px;
  width: 200px;
  padding: 0 12px;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.8125rem;
  outline: none;
  transition: all 0.2s ease;
}

.blog-search-input:focus {
  border-color: var(--color-brand-nogi, #742581);
  background: var(--bg-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-brand-nogi, #742581) 12%, transparent);
}

.blog-search-input::placeholder {
  color: var(--text-tertiary);
}

/* Mobile responsive for inline nav */
@media (max-width: 767px) {
  .blog-nav-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .blog-pills-row {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
    padding-bottom: 4px;
  }
  .blog-pills-row::-webkit-scrollbar {
    display: none;
  }
  .blog-nav-actions {
    width: 100%;
  }
  .blog-search-input {
    flex: 1;
    width: auto;
    font-size: 0.75rem;
  }
}

/* 筛选器下拉框 */
#memberSelect {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.8125rem;
  outline: none;
  transition: all 0.2s ease;
  cursor: pointer;
  letter-spacing: 0.02em;
}

#memberSelect:hover {
  border-color: var(--border-secondary);
}

#memberSelect:focus {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* 章节标题 */
.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  letter-spacing: 0.03em;
}

/* 查看更多按钮 */
.more-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--text-primary);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: all 0.3s ease;
}

.more-btn:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
}

/* Toast提示 */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 10000;
  animation: toastSlideUp 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* 博客内容官网样式 - 匹配官网 */
.blog-content-official {
  font-size: 14px;
  /* 官网字体大小 */
  line-height: 1.75;
  /* 官网行高 */
  color: var(--text-primary);
  letter-spacing: 0.02em;
  max-width: none;
  /* 保持原始格式和空白 */
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  /* 优先使用日文字体以正确显示颜文字和组合字符 */
  font-family: "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", "MS PGothic", "ＭＳ Ｐゴシック", "MS Gothic", "ＭＳ ゴシック", Osaka, "メイリオ", Meiryo, "Yu Gothic", YuGothic, Monaco, Menlo, Consolas, "Courier New", monospace, -apple-system, BlinkMacSystemFont, sans-serif;
  /* 确保组合字符正确渲染 */
  text-rendering: optimizeLegibility;
  font-variant-ligatures: normal;
  -webkit-font-feature-settings: "liga" 0;
  font-feature-settings: "liga" 0;
}

.blog-content-official br {
  display: block;
  content: "";
  margin: 0;
  /* 关键：移除br的margin */
  padding: 0;
  height: 0;
  line-height: inherit;
}

.blog-content-official p {
  margin: 0;
  /* 关键：移除p的margin */
  padding: 0;
  line-height: 1.75;
}

.blog-content-official img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  border-radius: 0;
  box-shadow: none;
}

.blog-content-official strong {
  font-weight: 600;
  color: var(--text-primary);
}

.blog-content-official a {
  color: #2563eb;
  text-decoration: underline;
  transition: color 0.2s;
}

.blog-content-official a:hover {
  color: #1d4ed8;
}

/* 下载进度对话框 */
.download-progress {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 30px;
  z-index: 10000;
  min-width: 320px;
}

.progress-content {
  text-align: center;
}

.progress-message {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 20px;
  font-weight: 500;
}

.progress-percent {
  font-size: 18px;
  font-weight: 600;
  color: #2563eb;
  margin-top: 15px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border-primary);
  border-radius: 4px;
  overflow: hidden;
  margin: 12px 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* 分页组件样式 */
#paginationContainer {
  padding: 24px 0;
  border-top: 1px solid var(--border-primary);
  margin-top: 48px;
}

#paginationContainer button {
  transition: all 0.2s ease;
}

#paginationContainer button:not(:disabled):hover {
  transform: scale(1.05);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#pageButtons button.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

#pageInfo {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 12px;
}

/* 博客网格布局优化 */
#blogsContainer {
  min-height: 600px;
}

#blogsContainer.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* 网格响应式调整 */
@media (min-width: 768px) {
  #blogsContainer {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 767px) {
  #blogsContainer {
    grid-template-columns: repeat(2, 1fr);
  }

  #paginationContainer {
    padding: 16px 0;
  }
}

/* ================================
   简繁切换按钮样式
   ================================ */

/* PC端简繁切换按钮 */
.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-primary);
  border: 1px solid var(--border-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.lang-toggle-btn:hover {
  background: var(--bg-tertiary);
  border-color: #3b82f6;
  color: #3b82f6;
  transform: scale(1.05);
}

.lang-toggle-btn:active {
  transform: scale(0.95);
}

.lang-toggle-btn .lang-text {
  font-family: "Noto Sans SC", sans-serif;
}

/* 移动端简繁切换 */
.mobile-lang-toggle {
  padding: 16px 20px;
  border-top: 1px solid var(--border-primary);
  display: flex;
  justify-content: flex-end;
}

.lang-toggle-btn-mobile {
  display: flex;
  align-items: center;
  gap: 12px;
  width: auto;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  color: var(--text-primary);
}

.lang-toggle-btn-mobile:hover {
  background: var(--bg-secondary);
  border-color: var(--color-brand-nogi, #7e57c2);
}

.lang-toggle-btn-mobile svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.lang-toggle-btn-mobile .lang-text {
  font-family: "Noto Sans SC", sans-serif;
  font-weight: 500;
}

/* ================================
   博客功能入口 (pill style in sub-header)
   ================================ */
.blog-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.blog-pill:hover {
  background: var(--bg-secondary);
  color: var(--color-brand-nogi, #742581);
}

.blog-pill.active {
  color: var(--color-brand-nogi, #742581);
  background: color-mix(in srgb, var(--color-brand-nogi, #742581) 8%, transparent);
  border-color: color-mix(in srgb, var(--color-brand-nogi, #742581) 20%, transparent);
  font-weight: 600;
}

/* ================================
   Interactions view (embedded)
   ================================ */
.interaction-page-container {
  padding: 8px 0;
}

.group-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-primary);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid var(--border-primary);
  margin-bottom: 24px;
}

.group-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: var(--bg-primary);
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  text-align: center;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
}

.group-tab:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.group-tab.active {
  color: var(--color-brand-nogi, #742581);
  border-bottom-color: var(--color-brand-nogi, #742581);
  font-weight: 600;
}

.month-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.month-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-primary);
  background: var(--bg-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.month-nav-btn:hover {
  background: color-mix(in srgb, var(--color-brand-nogi, #742581) 10%, transparent);
  border-color: var(--color-brand-nogi, #742581);
  color: var(--color-brand-nogi, #742581);
}

.month-display {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 140px;
  text-align: center;
}

.analysis-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 4px;
}

.analysis-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: all 0.2s;
  text-align: center;
}

.analysis-tab:hover {
  color: var(--text-primary);
}

.analysis-tab.active {
  background: var(--bg-primary);
  color: var(--color-brand-nogi, #742581);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.panel {
  background: var(--bg-primary);
  border-radius: 8px;
  padding: 24px;
  border: 1px solid var(--border-primary);
}

.panel-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.mention-table {
  width: 100%;
  border-collapse: collapse;
}

.mention-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border-primary);
}

.mention-table td {
  padding: 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-primary);
  color: var(--text-primary);
}

.mention-table tr:hover td {
  background: color-mix(in srgb, var(--color-brand-nogi, #742581) 4%, transparent);
}

.mention-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mention-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: color-mix(in srgb, var(--color-brand-nogi, #742581) 10%, transparent);
  color: var(--color-brand-nogi, #742581);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
}

.mention-tag .count {
  font-weight: 700;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-primary);
}

.ranking-item:last-child {
  border-bottom: none;
}

.ranking-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.ranking-number.top-1 { background: #fef3c7; color: #d97706; }
.ranking-number.top-2 { background: var(--bg-secondary); color: var(--text-secondary); }
.ranking-number.top-3 { background: #fed7aa; color: #ea580c; }
.ranking-number.normal { background: var(--bg-secondary); color: var(--text-tertiary); }

.ranking-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 100px;
}

.ranking-bar-wrapper {
  flex: 1;
  height: 24px;
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
}

.ranking-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
  display: flex;
  align-items: center;
  padding-left: 8px;
}

.ranking-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 50px;
  text-align: right;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  opacity: 0.4;
}

/* Stats view */
.stats-page-container {
  padding: 8px 0;
}

.stats-group-tab.active {
  color: var(--color-brand-nogi, #742581) !important;
  border-bottom-color: var(--color-brand-nogi, #742581) !important;
}

.stats-group-tab:hover {
  background: var(--bg-secondary) !important;
}

/* Ranking bar label & gen */
.ranking-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
}

.ranking-gen {
  font-size: 12px;
  color: var(--text-tertiary);
  min-width: 60px;
}

/* Heatmap grid */
.heatmap-grid {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  max-width: 400px;
}

.heatmap-cell {
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.2s;
  min-height: 44px;
}

.heatmap-cell:hover {
  transform: scale(1.05);
}

.heatmap-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

/* Generation detail */
.gen-detail-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-primary);
}

.gen-detail-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.gen-detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-primary);
}

.gen-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

.gen-badge.same { background: #dbeafe; color: #2563eb; }
.gen-badge.cross { background: #fce7f3; color: #db2777; }

/* Generation sub-tabs */
.gen-sub-tab {
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border-primary);
  background: var(--bg-primary);
}

.gen-sub-tab:hover {
  border-color: var(--color-brand-nogi, #742581);
  color: var(--color-brand-nogi, #742581);
}

.gen-sub-tab.active {
  background: var(--color-brand-nogi, #742581);
  color: white;
  border-color: var(--color-brand-nogi, #742581);
  font-weight: 600;
}

.gen-panel.hidden {
  display: none;
}

@media (max-width: 767px) {
  .group-tabs { border-radius: 6px; }
  .group-tab { padding: 10px 8px; font-size: 13px; }
  .analysis-tab { font-size: 13px; padding: 8px 10px; }
  .mention-table th, .mention-table td { padding: 8px 6px; font-size: 13px; }
  .ranking-name { min-width: 70px; font-size: 13px; }
  .month-display { font-size: 18px; }
  .gen-panel > div { grid-template-columns: 1fr !important; }
  .gen-sub-tab { padding: 6px 14px; font-size: 13px; }
  .heatmap-grid { max-width: 100%; }
}