/* ============================================
   2026 现代极简主义设计规范
   深色优先 | 玻璃拟态 | OKLCH 色彩空间
   ============================================ */

/* ============================================
   1. 设计令牌（Design Tokens）
   ============================================ */
:root {
  /* 色彩系统 - OKLCH */
  --bg-primary: oklch(13% 0.02 270);
  --bg-secondary: oklch(19% 0.03 270);
  --bg-tertiary: oklch(25% 0.04 270);
  --bg-elevated: oklch(31% 0.05 270);

  --text-primary: oklch(95% 0 0);
  --text-secondary: oklch(70% 0.02 270);
  --text-tertiary: oklch(55% 0.03 270);
  --text-muted: oklch(45% 0.04 270);

  --accent-primary: oklch(65% 0.15 280);
  --accent-hover: oklch(70% 0.16 280);
  --accent-active: oklch(60% 0.14 280);
  --accent-glow: oklch(65% 0.15 280 / 0.3);

  --success: oklch(70% 0.1 145);
  --warning: oklch(75% 0.1 85);
  --error: oklch(65% 0.15 25);
  --info: oklch(70% 0.1 240);

  --border-subtle: oklch(30% 0.02 270 / 0.5);
  --border-hover: oklch(40% 0.03 270 / 0.8);

  --glass-bg: oklch(25% 0.04 270 / 0.6);
  --glass-border: oklch(100% 0 0 / 0.1);
  --glass-blur: blur(20px) saturate(180%);

  /* 字体 */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* 字体大小 */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;

  /* 字重 */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* 行高 */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* 间距 */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-sm: 0 1px 2px oklch(10% 0.02 270 / 0.3);
  --shadow-md:
    0 4px 6px -1px oklch(10% 0.02 270 / 0.2),
    0 2px 4px -2px oklch(10% 0.02 270 / 0.1);
  --shadow-lg:
    0 10px 15px -3px oklch(10% 0.02 270 / 0.2),
    0 4px 6px -4px oklch(10% 0.02 270 / 0.1);
  --shadow-glow: 0 0 20px var(--accent-glow);

  /* 过渡 */
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.15s;
  --duration-normal: 0.2s;
  --duration-slow: 0.3s;
}

/* 浅色模式 */
@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: oklch(98% 0.01 270);
    --bg-secondary: oklch(100% 0 0);
    --bg-tertiary: oklch(95% 0.02 270);
    --bg-elevated: oklch(90% 0.03 270);

    --text-primary: oklch(20% 0.02 270);
    --text-secondary: oklch(45% 0.03 270);
    --text-tertiary: oklch(55% 0.04 270);
    --text-muted: oklch(70% 0.05 270);

    --border-subtle: oklch(80% 0.02 270 / 0.5);
  }
}

/* ============================================
   2. 全局样式重置
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: var(--leading-normal);
  font-size: var(--text-base);
  min-height: 100vh;
  padding: var(--space-4);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================================
   3. 头部（Header）
   ============================================ */
.header {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-md);
}

.header h1 {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.stats {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.stat-item {
  padding: var(--space-3) var(--space-4);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  transition: all var(--duration-normal) var(--ease-out);
}

.stat-item:hover {
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.stat-item strong {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-left: var(--space-2);
}

/* ============================================
   4. 筛选栏（Filter Bar）
   ============================================ */
.filter-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.filter-form {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.filter-group label {
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.filter-group select,
.filter-group input {
  padding: var(--space-2) var(--space-3);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  min-width: 200px;
  transition: all var(--duration-fast) var(--ease-out);
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.filter-group select:hover,
.filter-group input:hover {
  border-color: var(--border-hover);
}

/* ============================================
   5. 按钮（Buttons）
   ============================================ */
.btn {
  padding: var(--space-3) var(--space-5);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.btn-primary {
  background: var(--accent-primary);
  color: oklch(100% 0 0);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

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

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: oklch(65% 0.15 280 / 0.1);
}

.btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* ============================================
   6. 结果信息（Result Info）
   ============================================ */
.result-info {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.result-info strong {
  color: var(--accent-primary);
  font-weight: var(--font-semibold);
}

/* ============================================
   7. 推文卡片（Tweet Cards）
   ============================================ */
.tweet-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.tweet-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.tweet-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border-subtle);
  transition: all var(--duration-slow) var(--ease-out);
}

.tweet-card.status-approved::before {
  background: var(--success);
}

.tweet-card.status-rejected::before {
  background: var(--error);
}

.tweet-card.status-pending::before {
  background: var(--warning);
}

.tweet-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

/* 推文头部 */
.tweet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.tweet-user {
  display: flex;
  gap: var(--space-2);
  align-items: baseline;
}

.display-name {
  font-weight: var(--font-semibold);
  font-size: var(--text-base);
  color: var(--text-primary);
}

.username {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}

/* 状态标签 */
.tweet-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  letter-spacing: 0.02em;
}

.tweet-status.status-pending {
  background: oklch(75% 0.1 85 / 0.15);
  color: oklch(80% 0.12 85);
  border: 1px solid oklch(75% 0.1 85 / 0.3);
}

.tweet-status.status-approved {
  background: oklch(70% 0.1 145 / 0.15);
  color: oklch(75% 0.12 145);
  border: 1px solid oklch(70% 0.1 145 / 0.3);
}

.tweet-status.status-rejected {
  background: oklch(65% 0.15 25 / 0.15);
  color: oklch(70% 0.18 25);
  border: 1px solid oklch(65% 0.15 25 / 0.3);
}

/* 推文内容 */
.tweet-content {
  margin-bottom: var(--space-4);
}

.tweet-content p {
  color: var(--text-primary);
  line-height: var(--leading-relaxed);
  font-size: var(--text-base);
}

/* 审核信息 */
.review-info {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid var(--border-subtle);
}

.review-score {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: var(--accent-primary);
  color: oklch(100% 0 0);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
}

.review-reason {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

/* 推文底部 */
.tweet-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.tweet-stats {
  display: flex;
  gap: var(--space-4);
}

.tweet-stats span {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.tweet-meta {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.tweet-time {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.btn-view {
  padding: var(--space-2) var(--space-3);
  background: var(--accent-primary);
  color: oklch(100% 0 0);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out);
}

.btn-view:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ============================================
   8. 空状态（Empty State）
   ============================================ */
.empty-state {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-12);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
}

.empty-state p {
  font-size: var(--text-lg);
  color: var(--text-tertiary);
}

/* ============================================
   9. 分页（Pagination）
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-8);
  padding: var(--space-4);
  flex-wrap: wrap;
}

.page-btn,
.page-number {
  padding: var(--space-2) var(--space-4);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: var(--font-medium);
  font-size: var(--text-sm);
  transition: all var(--duration-normal) var(--ease-out);
}

.page-btn:hover,
.page-number:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
  background: var(--bg-tertiary);
}

.page-number.active {
  background: var(--accent-primary);
  color: oklch(100% 0 0);
  border-color: var(--accent-primary);
}

/* ============================================
   10. 响应式设计
   ============================================ */
@media (max-width: 768px) {
  body {
    padding: var(--space-2);
  }

  .header {
    padding: var(--space-5);
  }

  .header h1 {
    font-size: var(--text-2xl);
  }

  .stats {
    flex-direction: column;
    gap: var(--space-2);
  }

  .filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group select,
  .filter-group input {
    min-width: 100%;
  }

  .tweet-footer {
    flex-direction: column;
    gap: var(--space-3);
    align-items: flex-start;
  }

  .pagination {
    gap: var(--space-1);
  }

  .page-btn,
  .page-number {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
  }
}

/* ============================================
   11. 辅助动画
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tweet-card {
  animation: fadeIn 0.3s var(--ease-out);
}

/* 状态点动画（可选，用于替代 emoji） */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.4;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* ============================================
   12. 可访问性增强
   ============================================ */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
