/**
 *  彩票机选工具 - 精美样式
 *  Lottery Random Generator - Premium Styles
 */

/* ========== 设计令牌 ========== */
:root {
  /* 主色调 - 温暖高级红 */
  --primary: #dc2626;
  --primary-light: #ef4444;
  --primary-dark: #b91c1c;
  --primary-glow: rgba(220, 38, 38, 0.15);

  /* 辅色调 - 沉稳蓝 */
  --secondary: #2563eb;
  --secondary-light: #3b82f6;
  --secondary-dark: #1d4ed8;
  --secondary-glow: rgba(37, 99, 235, 0.15);

  /* 强调色 */
  --accent-gold: #f59e0b;
  --accent-green: #10b981;
  --accent-purple: #8b5cf6;

  /* 中性色 */
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-soft: #f1f5f9;
  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* 阴影系统 */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-glow-primary: 0 0 20px rgba(220, 38, 38, 0.2);
  --shadow-glow-secondary: 0 0 20px rgba(37, 99, 235, 0.2);

  /* 圆角 */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* 过渡 */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========== 深色模式 ========== */
[data-theme="dark"] {
  --primary: #f87171;
  --primary-light: #fca5a5;
  --primary-dark: #ef4444;
  --primary-glow: rgba(248, 113, 113, 0.15);

  --secondary: #60a5fa;
  --secondary-light: #93c5fd;
  --secondary-dark: #3b82f6;
  --secondary-glow: rgba(96, 165, 250, 0.15);

  --bg: #0f172a;
  --bg-elevated: #1e293b;
  --bg-soft: #1a2332;
  --ink: #f1f5f9;
  --ink-secondary: #cbd5e1;
  --muted: #94a3b8;
  --muted-light: #64748b;
  --border: #334155;
  --border-light: #1e293b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-glow-primary: 0 0 20px rgba(248, 113, 113, 0.25);
  --shadow-glow-secondary: 0 0 20px rgba(96, 165, 250, 0.25);
}

/* 深色模式下的背景渐变调整 */
[data-theme="dark"] .page-header,
[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #0a0f1a 0%, #111827 50%, #1a2332 100%);
}

[data-theme="dark"] .site-header {
  background: rgba(15, 23, 42, 0.9);
}

[data-theme="dark"] .rules-info {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(220, 38, 38, 0.08));
}

[data-theme="dark"] .balls-container {
  background: linear-gradient(135deg, #0f172a, #1a2332);
}

[data-theme="dark"] .batch-row {
  background: linear-gradient(135deg, #0f172a, #1a2332) !important;
}

[data-theme="dark"] .seo-card th {
  background: linear-gradient(135deg, #1a2332, #0f172a);
}

[data-theme="dark"] .seo-card tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .site-footer {
  background: linear-gradient(135deg, #0a0f1a 0%, #0f172a 100%);
}

[data-theme="dark"] .count-select {
  background: var(--bg-elevated);
  color: var(--ink);
}

/* ========== 右下角浮动切换按钮组 ========== */
.float-toggle-group {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.theme-toggle,
.accessibility-toggle {
  border: none;
  border-radius: var(--radius-full);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  color: white;
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.theme-toggle {
  background: linear-gradient(135deg, #1e293b, #334155);
}

.accessibility-toggle {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.theme-toggle:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(30, 41, 59, 0.4);
}

.accessibility-toggle:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

[data-theme="dark"] .theme-toggle {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

[data-theme="dark"] .theme-toggle:hover {
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

[data-mode="elderly"] .accessibility-toggle {
  background: linear-gradient(135deg, #10b981, #059669);
}

[data-mode="elderly"] .accessibility-toggle:hover {
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* 切换按钮提示文字 */
.theme-toggle::after,
.accessibility-toggle::after {
  content: attr(title);
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-fast);
}

.theme-toggle:hover::after,
.accessibility-toggle:hover::after {
  opacity: 1;
}

/* ========== 老年模式 ========== */
[data-mode="elderly"] {
  --bg: #fffef5;
  --bg-elevated: #ffffff;
  --bg-soft: #fef9e7;
  --ink: #1a1a1a;
  --ink-secondary: #333333;
  --muted: #555555;
  --muted-light: #888888;
  --border: #cccccc;
  --border-light: #e8e8e8;
}

[data-mode="elderly"] body,
[data-mode="elderly"] {
  font-size: 18px;
  line-height: 1.8;
}

[data-mode="elderly"] .page-header h1 {
  font-size: 2rem;
}

[data-mode="elderly"] .page-header p,
[data-mode="elderly"] .hero p {
  font-size: 1.125rem;
}

[data-mode="elderly"] .generator-card h2,
[data-mode="elderly"] .history-card h2,
[data-mode="elderly"] .seo-card h2 {
  font-size: 1.375rem;
}

[data-mode="elderly"] .generator-card,
[data-mode="elderly"] .history-card,
[data-mode="elderly"] .seo-card {
  padding: 28px;
}

[data-mode="elderly"] .rules-info,
[data-mode="elderly"] .exclude-panel,
[data-mode="elderly"] .danma-panel,
[data-mode="elderly"] .countdown-panel,
[data-mode="elderly"] .favorites-panel {
  padding: 24px;
}

[data-mode="elderly"] .rules-info h3,
[data-mode="elderly"] .seo-card h3 {
  font-size: 1.125rem;
}

[data-mode="elderly"] .rules-info li,
[data-mode="elderly"] .rules-info p,
[data-mode="elderly"] .seo-card p,
[data-mode="elderly"] .seo-card li {
  font-size: 1.0625rem;
  line-height: 1.9;
}

[data-mode="elderly"] .nav-links a {
  font-size: 0.9375rem;
  padding: 8px 12px;
}

[data-mode="elderly"] .logo {
  font-size: 1.375rem;
}

[data-mode="elderly"] .ball {
  width: 56px;
  height: 56px;
  font-size: 1.375rem;
}

[data-mode="elderly"] .history-ball {
  width: 40px;
  height: 40px;
  font-size: 1rem;
}

[data-mode="elderly"] .btn {
  padding: 16px 36px;
  font-size: 1.125rem;
}

[data-mode="elderly"] .count-select {
  padding: 12px 20px;
  font-size: 1.0625rem;
}

[data-mode="elderly"] .exclude-btn,
[data-mode="elderly"] .danma-btn {
  width: 44px;
  height: 44px;
  font-size: 0.9375rem;
}

[data-mode="elderly"] .countdown-time {
  font-size: 1.75rem;
}

[data-mode="elderly"] .analysis-value {
  font-size: 2rem;
}

[data-mode="elderly"] .analysis-label {
  font-size: 0.9375rem;
}

[data-mode="elderly"] .analysis-desc {
  font-size: 0.8125rem;
}

[data-mode="elderly"] .today-header h2 {
  font-size: 1.5rem;
}

[data-mode="elderly"] .card h3 {
  font-size: 1.25rem;
}

[data-mode="elderly"] .card p {
  font-size: 1rem;
}

[data-mode="elderly"] .card-link {
  font-size: 1rem;
}

[data-mode="elderly"] .footer-links a {
  font-size: 1rem;
}

[data-mode="elderly"] .footer-disclaimer {
  font-size: 0.9375rem;
}

/* 老年模式深色 */
[data-mode="elderly"][data-theme="dark"] {
  --bg: #1a1a1a;
  --bg-elevated: #252525;
  --bg-soft: #2a2a2a;
  --ink: #f0f0f0;
  --ink-secondary: #d4d4d4;
  --muted: #aaaaaa;
  --muted-light: #888888;
  --border: #444444;
  --border-light: #333333;
}

/* 老年模式指示器 */
.elderly-badge {
  display: none;
  position: fixed;
  bottom: 136px;
  right: 20px;
  background: var(--accent-gold);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  z-index: 200;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: var(--transition);
  animation: fadeInUp 0.3s ease;
}

.elderly-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

[data-mode="elderly"] .elderly-badge {
  display: block;
}

/* ========== 基础重置 ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  font-size: 15px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

/* ========== 布局容器 ========== */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== 顶部导航 ========== */
.site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
  transition: var(--transition);
}

.logo:hover .logo-icon {
  transform: rotate(-10deg) scale(1.05);
  box-shadow: var(--shadow-glow-primary);
}

.nav-links {
  display: flex;
  gap: 2px;
  list-style: none;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: calc(100vw - 120px);
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links a:hover {
  color: var(--ink-secondary);
  background: var(--bg-soft);
}

.nav-links a.active {
  color: var(--primary);
  background: var(--primary-glow);
  font-weight: 600;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--ink-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.mobile-menu-btn:hover {
  background: var(--bg-soft);
}

/* ========== 页面标题区 ========== */
.page-header {
  background: linear-gradient(135deg, var(--ink) 0%, #1e293b 50%, #334155 100%);
  color: white;
  padding: 56px 20px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(220, 38, 38, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(37, 99, 235, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.page-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -1px;
  position: relative;
}

.page-header p {
  opacity: 0.7;
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

/* ========== 面包屑 ========== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted-light);
  transition: var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span[aria-hidden="true"] {
  color: var(--border);
}

/* ========== 卡片系统 ========== */
.generator-card,
.history-card,
.seo-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.generator-card::before,
.history-card::before,
.seo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: var(--transition);
}

.generator-card:hover::before,
.history-card:hover::before,
.seo-card:hover::before {
  opacity: 1;
}

.generator-card:hover,
.history-card:hover,
.seo-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.generator-card h2,
.history-card h2,
.seo-card h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

/* ========== 规则信息 ========== */
.rules-info {
  background: linear-gradient(135deg, #eff6ff, #fef2f2);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 28px;
  border: 1px solid rgba(37, 99, 235, 0.08);
  position: relative;
}

.rules-info::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  background: linear-gradient(to bottom, var(--secondary), var(--primary));
  border-radius: var(--radius-full);
}

.rules-info h3 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ink-secondary);
  padding-left: 8px;
}

.rules-info ul {
  list-style: none;
  padding-left: 8px;
}

.rules-info li {
  padding: 5px 0;
  font-size: 0.875rem;
  color: var(--muted);
  position: relative;
  padding-left: 20px;
}

.rules-info li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
}

/* ========== 号码球容器 ========== */
.balls-container {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
  min-height: 90px;
  padding: 32px 24px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  border: 2px dashed var(--border);
  position: relative;
}

.balls-container::before {
  content: '点击按钮生成号码';
  position: absolute;
  color: var(--muted-light);
  font-size: 0.875rem;
  pointer-events: none;
}

.balls-container:has(.ball)::before {
  display: none;
}

/* ========== 号码球 - 3D立体效果 ========== */
.ball {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: white;
  position: relative;
  cursor: default;
  user-select: none;
  animation: ballAppear 0.5s var(--transition-bounce) forwards;
  opacity: 0;
}

/* 红球 */
.ball:not(.blue):not(.special) {
  background: radial-gradient(circle at 35% 35%, #ff6b6b, var(--primary));
  box-shadow:
    inset -3px -3px 8px rgba(0,0,0,0.2),
    inset 3px 3px 8px rgba(255,255,255,0.25),
    0 4px 12px rgba(220, 38, 38, 0.35),
    0 2px 4px rgba(220, 38, 38, 0.2);
}

.ball:not(.blue):not(.special)::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 12px;
  width: 16px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  filter: blur(2px);
  transform: rotate(-25deg);
}

/* 蓝球 */
.ball.blue {
  background: radial-gradient(circle at 35% 35%, #60a5fa, var(--secondary));
  box-shadow:
    inset -3px -3px 8px rgba(0,0,0,0.2),
    inset 3px 3px 8px rgba(255,255,255,0.25),
    0 4px 12px rgba(37, 99, 235, 0.35),
    0 2px 4px rgba(37, 99, 235, 0.2);
}

.ball.blue::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 12px;
  width: 16px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  filter: blur(2px);
  transform: rotate(-25deg);
}

/* 特殊球（金色） */
.ball.special {
  background: radial-gradient(circle at 35% 35%, #fbbf24, #d97706);
  box-shadow:
    inset -3px -3px 8px rgba(0,0,0,0.2),
    inset 3px 3px 8px rgba(255,255,255,0.25),
    0 4px 12px rgba(245, 158, 11, 0.35),
    0 2px 4px rgba(245, 158, 11, 0.2);
}

.ball.special::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 12px;
  width: 16px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  filter: blur(2px);
  transform: rotate(-25deg);
}

@keyframes ballAppear {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-180deg);
  }
  60% {
    transform: scale(1.15) rotate(10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* ========== 按钮 ========== */
.btn-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.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: var(--transition-slow);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--ink-secondary);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--secondary);
  color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary:active {
  transform: translateY(0) scale(0.98);
}

/* ========== 历史记录 ========== */
.history-section {
  margin-top: 24px;
}

.history-card h2 {
  justify-content: space-between;
}

.clear-history {
  background: var(--bg-soft);
  border: none;
  color: var(--muted);
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.clear-history:hover {
  background: var(--primary-glow);
  color: var(--primary);
}

.history-list {
  list-style: none;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.history-list::-webkit-scrollbar {
  width: 4px;
}

.history-list::-webkit-scrollbar-track {
  background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 6px;
  transition: var(--transition-fast);
  animation: slideUp 0.3s ease forwards;
  border: 1px solid transparent;
}

.history-item:hover {
  background: var(--bg-soft);
  border-color: var(--border);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.history-balls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.history-ball {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: white;
  background: radial-gradient(circle at 35% 35%, #ff6b6b, var(--primary));
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
  position: relative;
}

.history-ball.blue {
  background: radial-gradient(circle at 35% 35%, #60a5fa, var(--secondary));
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.history-ball.special {
  background: radial-gradient(circle at 35% 35%, #fbbf24, #d97706);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

.history-time {
  font-size: 0.75rem;
  color: var(--muted-light);
  white-space: nowrap;
  margin-left: 12px;
  font-variant-numeric: tabular-nums;
}

.empty-history {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted-light);
  font-size: 0.875rem;
}

.empty-history-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* ========== SEO内容区 ========== */
.seo-content {
  margin-top: 24px;
}

.seo-card + .seo-card {
  margin-top: 20px;
}

.seo-card h2 {
  color: var(--ink);
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 14px;
}

.seo-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 24px 0 12px;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.seo-card h3::before {
  content: '';
  width: 4px;
  height: 16px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  border-radius: var(--radius-full);
}

.seo-card p {
  margin-bottom: 14px;
  line-height: 1.8;
  color: var(--ink-secondary);
}

.seo-card ul,
.seo-card ol {
  margin: 12px 0 16px 20px;
}

.seo-card li {
  margin-bottom: 8px;
  line-height: 1.7;
  color: var(--ink-secondary);
}

.seo-card table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 20px 0;
  font-size: 0.875rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.seo-card th,
.seo-card td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.seo-card th {
  background: linear-gradient(135deg, var(--bg-soft), var(--bg));
  font-weight: 700;
  color: var(--ink-secondary);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.seo-card tr:last-child td {
  border-bottom: none;
}

.seo-card tr:hover td {
  background: var(--bg-soft);
}

/* ========== 页脚 ========== */
.site-footer {
  background: linear-gradient(135deg, var(--ink) 0%, #1e293b 100%);
  color: rgba(255,255,255,0.7);
  padding: 48px 20px 32px;
  margin-top: 48px;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent-purple));
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.footer-section h4 {
  color: white;
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 10px;
}

.footer-section a {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  transition: var(--transition-fast);
  display: inline-block;
}

.footer-section a:hover {
  color: white;
  transform: translateX(2px);
}

.footer-bottom {
  grid-column: 1 / -1;
  text-align: center;
  padding-top: 24px;
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.6;
}

/* ========== Toast提示 ========== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--ink);
  color: white;
  padding: 14px 28px;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  opacity: 0;
  transition: all 0.4s var(--transition-bounce);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast::before {
  content: '✓';
  width: 22px;
  height: 22px;
  background: var(--accent-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========== 今日推荐 ========== */
.today-pick {
  padding: 32px 0 16px;
}

.today-card {
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-soft));
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.today-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-gold), var(--primary), var(--secondary));
}

.today-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.today-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.today-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
}

.today-date {
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 500;
  background: var(--bg-soft);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.today-desc {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 20px;
}

.today-balls {
  background: transparent !important;
  border: none !important;
  padding: 16px 0 !important;
  min-height: auto !important;
}

.today-balls::before {
  display: none !important;
}

.today-actions {
  margin-top: 8px;
}

/* ========== 骨架屏 ========== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-soft) 25%, var(--border-light) 50%, var(--bg-soft) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========== 首页卡片hover增强 ========== */
.card {
  cursor: pointer;
}

.card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ========== 首页特有样式 ========== */
.hero {
  background: linear-gradient(135deg, var(--ink) 0%, #1e293b 50%, #334155 100%);
  color: white;
  padding: 72px 20px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(220, 38, 38, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(37, 99, 235, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -1.5px;
  position: relative;
}

.hero p {
  opacity: 0.65;
  font-size: 1.125rem;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
}

/* 首页彩种卡片 */
.lottery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding: 32px 0;
}

.lottery-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.lottery-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: var(--transition);
}

.lottery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.lottery-card:hover::before {
  height: 4px;
}

.lottery-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
  transition: var(--transition);
}

.lottery-card:hover .lottery-card-icon {
  transform: scale(1.1) rotate(-5deg);
}

.lottery-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}

.lottery-card p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.lottery-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.lottery-card-link:hover {
  gap: 10px;
}

/* ========== 辅助类 ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .header-inner {
    height: 56px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 12px 20px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.mobile-open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 16px;
    width: 100%;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero {
    padding: 48px 20px 40px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .page-header {
    padding: 40px 20px 32px;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }

  .generator-card,
  .history-card,
  .seo-card {
    padding: 24px 20px;
  }

  .ball {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
  }

  .balls-container {
    padding: 24px 16px;
    gap: 10px;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    padding: 14px 24px;
  }

  .history-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .history-time {
    margin-left: 0;
  }

  .lottery-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* ========== 打印样式 ========== */
@media print {
  .site-header,
  .btn-group,
  .site-footer,
  .clear-history {
    display: none !important;
  }

  .generator-card,
  .history-card,
  .seo-card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  .ball {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* ========== 旧类名兼容（子代理生成页面使用） ========== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding: 32px 0;
}

.card {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card:hover::before {
  height: 4px;
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
  transition: var(--transition);
}

.card:hover .card-icon {
  transform: scale(1.1) rotate(-5deg);
}

.card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}

.card p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.card-link:hover {
  gap: 10px;
}

/* 页脚兼容 */
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: white;
}

.footer-disclaimer {
  text-align: center;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* ========== 批量机选控件 ========== */
.batch-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.batch-label {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
}

.count-select {
  padding: 10px 16px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition-fast);
  outline: none;
  min-width: 80px;
  text-align: center;
}

.count-select:hover,
.count-select:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px var(--secondary-glow);
}

/* ========== 统计图表 ========== */
.stats-section {
  margin-top: 24px;
}

.stats-chart {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 160px;
  padding: 16px 8px 0;
  overflow-x: auto;
}

.stats-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 20px;
  flex: 1;
  max-width: 32px;
}

.stats-bar {
  width: 100%;
  min-height: 4px;
  background: linear-gradient(to top, var(--secondary), var(--secondary-light));
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: var(--transition);
  position: relative;
}

.stats-bar.hot {
  background: linear-gradient(to top, var(--primary), var(--primary-light));
}

.stats-bar.cold {
  background: linear-gradient(to top, var(--muted-light), var(--muted));
}

.stats-bar:hover {
  filter: brightness(1.1);
}

.stats-num {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.stats-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--muted);
}

.stats-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stats-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-sm);
}

.stats-legend .dot.hot {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.stats-legend .dot.normal {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
}

.stats-legend .dot.cold {
  background: linear-gradient(135deg, var(--muted-light), var(--muted));
}

/* ========== 批量行 ========== */
.batch-row {
  animation: slideUp 0.3s ease both;
}

/* ========== 摇奖机滚动 ========== */
.ball.rolling {
  background: linear-gradient(135deg, #64748b, #475569);
  box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3);
  animation: ballRollBlur 0.1s linear infinite;
}

.ball.rolling.blue {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

@keyframes ballRollBlur {
  0% { filter: blur(0px); transform: scale(1); }
  50% { filter: blur(1px); transform: scale(1.05); }
  100% { filter: blur(0px); transform: scale(1); }
}

/* ========== 幸运号码页面特殊样式 ========== */
.lucky-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 400px;
  margin: 0 auto 24px;
}

.lucky-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lucky-input-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.lucky-input {
  padding: 12px 16px;
  font-size: 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--ink);
  transition: var(--transition-fast);
  outline: none;
}

.lucky-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.lucky-select {
  padding: 12px 16px;
  font-size: 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--ink);
  cursor: pointer;
  outline: none;
}

.lucky-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ========== 走势图 ========== */
.trend-chart {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 200px;
  padding: 20px 8px 0;
  overflow-x: auto;
}

.trend-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 16px;
  flex: 1;
  max-width: 28px;
}

.trend-bar {
  width: 100%;
  min-height: 4px;
  background: linear-gradient(to top, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: var(--transition);
}

.trend-num {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ========== 收藏面板 ========== */
.favorites-panel {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  margin-top: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.favorites-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-purple));
  opacity: 0;
  transition: var(--transition);
}

.favorites-panel:hover::before {
  opacity: 1;
}

.favorites-panel:hover {
  box-shadow: var(--shadow-lg);
}

/* ========== 收藏按钮 ========== */
.btn-fav {
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
  color: white;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.btn-fav:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.35);
}

/* ========== 摇一摇提示 ========== */
.shake-hint {
  display: none;
  text-align: center;
  padding: 12px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(37, 99, 235, 0.06));
  border-radius: var(--radius);
  border: 1px solid rgba(139, 92, 246, 0.12);
  font-size: 0.875rem;
  color: var(--accent-purple);
  font-weight: 500;
}

@media (hover: none) and (pointer: coarse) {
  .shake-hint {
    display: block;
  }
}

/* ========== 号码滚动动画 ========== */
.ball.rolling {
  animation: ballRoll 0.6s ease-out;
}

@keyframes ballRoll {
  0% { transform: rotateX(0deg) scale(1); }
  50% { transform: rotateX(180deg) scale(1.2); }
  100% { transform: rotateX(360deg) scale(1); }
}

/* ========== 倒计时闪烁效果 ========== */
.countdown-panel.urgent {
  animation: urgentPulse 1s ease-in-out infinite;
}

@keyframes urgentPulse {
  0%, 100% { border-color: rgba(220, 38, 38, 0.12); }
  50% { border-color: rgba(220, 38, 38, 0.4); }
}

/* ========== 按钮波纹效果 ========== */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.btn:active::after {
  width: 200%;
  height: 200%;
}

/* ========== 胆码选择器 ========== */
.danma-panel {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.danma-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-gold), var(--primary));
  opacity: 0;
  transition: var(--transition);
}

.danma-panel:hover::before {
  opacity: 1;
}

.danma-panel:hover {
  box-shadow: var(--shadow-lg);
}

.danma-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 8px;
  padding: 4px;
}

.danma-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--ink-secondary);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.danma-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: scale(1.08);
}

.danma-btn.selected {
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
  color: white;
  border-color: var(--accent-gold);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.danma-btn.selected:hover {
  background: linear-gradient(135deg, #fbbf24, var(--accent-gold));
}

.danma-hint {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}

/* ========== 号码分析 ========== */
.analysis-panel {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
  display: none;
}

.analysis-panel.show {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  animation: slideUp 0.4s ease both;
}

.analysis-item {
  flex: 1;
  min-width: 100px;
  max-width: 140px;
  text-align: center;
  padding: 16px 12px;
  background: linear-gradient(135deg, var(--bg-soft), var(--bg));
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  transition: var(--transition-fast);
}

.analysis-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.analysis-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 4px;
}

.analysis-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 2px;
}

.analysis-desc {
  display: block;
  font-size: 0.6875rem;
  color: var(--muted);
}

/* ========== 粒子动效 ========== */
.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  animation: particleBurst 0.8s ease-out forwards;
  z-index: 10;
}

@keyframes particleBurst {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx, 60px), var(--ty, -80px)) scale(0);
  }
}

.particle:nth-child(1) { --tx: 40px; --ty: -60px; }
.particle:nth-child(2) { --tx: -50px; --ty: -70px; }
.particle:nth-child(3) { --tx: 60px; --ty: 40px; }
.particle:nth-child(4) { --tx: -40px; --ty: 50px; }
.particle:nth-child(5) { --tx: 70px; --ty: -30px; }
.particle:nth-child(6) { --tx: -60px; --ty: -40px; }
.particle:nth-child(7) { --tx: 30px; --ty: 60px; }
.particle:nth-child(8) { --tx: -70px; --ty: 30px; }
.particle:nth-child(9) { --tx: 50px; --ty: -50px; }
.particle:nth-child(10) { --tx: -30px; --ty: -60px; }
.particle:nth-child(11) { --tx: 60px; --ty: 20px; }
.particle:nth-child(12) { --tx: -50px; --ty: 40px; }

/* ========== 号码排除器 ========== */
.exclude-panel {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.exclude-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent-gold));
  opacity: 0;
  transition: var(--transition);
}

.exclude-panel:hover::before {
  opacity: 1;
}

.exclude-panel:hover {
  box-shadow: var(--shadow-lg);
}

.exclude-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 8px;
  padding: 4px;
}

.exclude-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--ink-secondary);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.exclude-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.08);
}

.exclude-btn.excluded {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.exclude-btn.excluded:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  transform: scale(1.08);
}

.exclude-hint {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}

/* ========== 开奖倒计时 ========== */
.countdown-panel {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.08), rgba(245, 158, 11, 0.06));
  border-radius: var(--radius);
  padding: 16px 24px;
  margin-bottom: 24px;
  border: 1px solid rgba(220, 38, 38, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  text-align: center;
}

.countdown-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.countdown-time {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  font-family: "SF Mono", "Fira Code", monospace;
  background: var(--bg-elevated);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* ========== 导出按钮 ========== */
.btn-export {
  background: linear-gradient(135deg, var(--accent-green), #059669);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-export:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.35);
}

/* ========== 减少动画偏好 ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
