:root {
  --bg-primary: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-border: rgba(226, 232, 240, 0.8);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #090d16;
    --bg-card: rgba(19, 26, 42, 0.85);
    --bg-card-border: rgba(30, 41, 59, 0.8);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-light: rgba(59, 130, 246, 0.15);
    --success: #34d399;
    --success-bg: rgba(16, 185, 129, 0.15);
    --shadow-md: 0 4px 25px -2px rgba(0, 0, 0, 0.4);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 16px 12px;
}

.app-container {
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 头部 Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 6px;
}

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

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text .subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* 卡片基础样式 */
.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* 指标栅格 */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 640px) {
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.metric-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.metric-value {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.metric-value.highlight {
  color: var(--accent);
}

.metric-value.status-success {
  color: var(--success);
}

.metric-footer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 截图展台 */
.screenshot-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title h2 {
  font-size: 1.05rem;
  font-weight: 600;
}

.screenshot-actions {
  display: flex;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.2s ease;
}

.btn-sm {
  padding: 5px 10px;
}

.btn-primary {
  background-color: var(--accent);
  color: white;
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-secondary {
  background-color: var(--bg-primary);
  color: var(--text-main);
  border: 1px solid var(--bg-card-border);
}

.btn-secondary:hover {
  background-color: rgba(0,0,0,0.05);
}

.screenshot-wrapper {
  background: rgba(0, 0, 0, 0.03);
  border: 1px dashed var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  justify-content: center;
}

.image-container {
  position: relative;
  max-width: 380px;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.15);
  background: #fff;
}

.image-container img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.screenshot-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 4px;
}

.screenshot-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0 4px;
}

/* 时间轴 */
.timeline-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.badge {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
}

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

.timeline-item {
  display: flex;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bg-card-border);
}

.timeline-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.timeline-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.timeline-icon.success {
  background: var(--success-bg);
  color: var(--success);
}

.timeline-icon.info {
  background: var(--accent-light);
  color: var(--accent);
}

.timeline-content {
  flex: 1;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.timeline-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.timeline-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.timeline-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.timeline-thumb {
  margin-top: 6px;
  max-width: 140px;
  border-radius: 6px;
  border: 1px solid var(--bg-card-border);
  overflow: hidden;
  cursor: pointer;
}

.timeline-thumb img {
  width: 100%;
  display: block;
}

.timeline-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 20px 0;
}

/* 底部 */
.footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 12px 0 24px;
}

.footer .sub {
  margin-top: 4px;
  font-size: 0.7rem;
  opacity: 0.7;
}
