* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: #f5f7fa;
  color: #1e293b;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

/* ── 导航栏 ── */
.navbar {
  background: #1e293b; color: #fff;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.navbar-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; height: 56px;
  padding: 0 24px; gap: 24px;
}
.navbar .logo {
  font-size: 18px; font-weight: 700; color: #60a5fa;
  white-space: nowrap; letter-spacing: .5px; text-decoration: none;
}
.navbar .lottery-links {
  display: flex; gap: 4px; flex: 1; overflow-x: auto;
}
.navbar .lottery-links a {
  color: #cbd5e1; text-decoration: none; font-size: 13px;
  padding: 6px 12px; border-radius: 6px; transition: .2s; white-space: nowrap;
}
.navbar .lottery-links a:hover,
.navbar .lottery-links a.active { background: #334155; color: #fff; }
.navbar .auth-links { display: flex; gap: 8px; white-space: nowrap; }
.navbar .auth-links a {
  color: #94a3b8; text-decoration: none; font-size: 13px;
  padding: 6px 12px; border-radius: 6px; transition: .2s;
}
.navbar .auth-links a:hover { color: #fff; }
.navbar .auth-links .btn-reg {
  background: #2563eb; color: #fff; padding: 7px 18px;
  border-radius: 6px; font-weight: 600;
}
.navbar .auth-links .btn-reg:hover { background: #1d4ed8; }

/* ── 主容器 ── */
.container {
  max-width: 1280px; margin: 0 auto; padding: 28px 24px 60px; flex: 1;
}

/* ── 按钮 ── */
.btn {
  display: inline-block; padding: 9px 22px; border-radius: 8px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  cursor: pointer; border: none; transition: .2s; font-family: inherit;
}
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-outline { background: #fff; color: #2563eb; border: 1.5px solid #2563eb; }
.btn-outline:hover { background: #eff6ff; }
.btn-ghost { background: transparent; color: #64748b; }
.btn-ghost:hover { background: #f1f5f9; color: #1e293b; }
.btn-sm { padding: 5px 14px; font-size: 12px; border-radius: 6px; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; }

/* ── 号码球 ── */
.ball {
  width: 48px; height: 48px; border-radius: 50%; background: #fff;
  border: 3px solid; font-size: 20px; font-weight: 700;
  font-family: "SF Mono", "Consolas", "Courier New", monospace;
  display: inline-flex; align-items: center; justify-content: center;
  transition: .2s; cursor: pointer; user-select: none;
}
.ball:hover { transform: scale(1.1); }
.ball-sm { width: 36px; height: 36px; font-size: 15px; border-width: 2px; }

.ball-red { border-color: #ef4444; color: #ef4444; }
.ball-red:hover { box-shadow: 0 0 0 6px rgba(239,68,68,.15); }
.ball-blue { border-color: #2563eb; color: #2563eb; }
.ball-blue:hover { box-shadow: 0 0 0 6px rgba(37,99,235,.15); }
.ball-gold { border-color: #f59e0b; color: #f59e0b; }
.ball-gold:hover { box-shadow: 0 0 0 6px rgba(245,158,11,.15); }
.ball-green { border-color: #10b981; color: #10b981; }
.ball-green:hover { box-shadow: 0 0 0 6px rgba(16,185,129,.15); }

.ball.selected { background: #2563eb; border-color: #2563eb; color: #fff; transform: scale(1.08); }
.ball.ball-red.selected { background: #ef4444; border-color: #ef4444; color: #fff; }
.ball.ball-gold.selected { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.ball.ball-green.selected { background: #10b981; border-color: #10b981; color: #fff; }

.ball-sep { font-size: 24px; color: #cbd5e1; margin: 0 4px; }

/* ── 开奖大卡片 ── */
.draw-hero {
  background: #fff; border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  padding: 36px 40px; text-align: center; margin-bottom: 24px;
}
.draw-hero .meta { font-size: 14px; color: #64748b; margin-bottom: 16px; }
.draw-hero .meta span { color: #2563eb; font-weight: 600; }
.draw-hero .balls { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.draw-hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.draw-hero .disclaimer { margin-top: 16px; font-size: 12px; color: #94a3b8; }

/* ── 彩种标签 ── */
.lottery-tabs {
  display: flex; gap: 4px; margin-bottom: 24px; background: #fff;
  border-radius: 12px; padding: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.lottery-tab {
  flex: 1; text-align: center; padding: 10px 0; font-size: 14px; font-weight: 500;
  color: #64748b; border-radius: 8px; cursor: pointer; transition: .2s;
  border: none; background: transparent; font-family: inherit;
}
.lottery-tab:hover { background: #f1f5f9; color: #1e293b; }
.lottery-tab.active { background: #2563eb; color: #fff; font-weight: 600; }

/* ── 功能卡片 ── */
.feature-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.feature-card {
  background: #fff; border-radius: 14px; padding: 32px 24px; text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.04); transition: .25s;
  text-decoration: none; color: inherit; display: block; border: 1.5px solid transparent;
}
.feature-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); border-color: #2563eb; transform: translateY(-2px); }
.feature-card .icon { font-size: 40px; margin-bottom: 14px; }
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; color: #1e293b; }
.feature-card p { font-size: 13px; color: #64748b; }

/* ── 数据表格 ── */
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.data-table th { background: #f8fafc; padding: 12px 16px; text-align: left; font-size: 13px; font-weight: 600; color: #64748b; border-bottom: 2px solid #e2e8f0; }
.data-table td { padding: 10px 16px; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.data-table tr:hover td { background: #f8fafc; }
.data-table .balls-inline { display: flex; gap: 4px; flex-wrap: wrap; }

/* ── 分页 ── */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.pagination button {
  padding: 6px 14px; border-radius: 6px; border: 1px solid #e2e8f0; background: #fff;
  cursor: pointer; font-size: 13px; font-weight: 500; color: #64748b; transition: .2s;
}
.pagination button:hover { background: #f1f5f9; color: #1e293b; }
.pagination button.active { background: #2563eb; color: #fff; border-color: #2563eb; }

/* ── 卡片/面板 ── */
.panel { background: #fff; border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.04); padding: 24px; margin-bottom: 20px; }
.panel h2 { font-size: 20px; font-weight: 700; margin-bottom: 16px; color: #1e293b; }
.panel h3 { font-size: 16px; font-weight: 600; margin-bottom: 12px; color: #1e293b; }

/* ── 章程式标题 ── */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 26px; font-weight: 700; color: #1e293b; margin-bottom: 6px; }
.page-header p { font-size: 14px; color: #64748b; }

/* ── 图表容器 ── */
.chart-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.chart-tab {
  padding: 7px 18px; border-radius: 8px; border: 1px solid #e2e8f0;
  background: #fff; cursor: pointer; font-size: 13px; font-weight: 500;
  color: #64748b; transition: .2s; font-family: inherit;
}
.chart-tab:hover { background: #eff6ff; border-color: #2563eb; color: #2563eb; }
.chart-tab.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.chart-container { width: 100%; height: 450px; }
.chart-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.chart-row select {
  padding: 6px 12px; border-radius: 6px; border: 1px solid #e2e8f0;
  font-size: 13px; color: #1e293b; background: #fff; font-family: inherit;
}

/* ── 号码球面板 ── */
.ball-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.ball-label { font-size: 13px; color: #64748b; font-weight: 600; margin: 12px 0 6px; }
.picker-section { margin-bottom: 20px; }

/* ── 搜索栏 ── */
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.search-bar input {
  flex: 1; padding: 8px 14px; border-radius: 8px; border: 1px solid #e2e8f0;
  font-size: 14px; font-family: inherit;
}
.search-bar input:focus { border-color: #2563eb; outline: none; }

/* ── 气泡/标签 ── */
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-pro { background: #dbeafe; color: #1d4ed8; }
.badge-free { background: #f1f5f9; color: #64748b; }
.badge-hot { background: #fee2e2; color: #dc2626; }
.badge-cold { background: #dbeafe; color: #2563eb; }
.badge-paid { background: #d1fae5; color: #059669; }
.badge-pending { background: #fef3c7; color: #d97706; }

/* ── Toast ── */
.toast-container { position: fixed; top: 70px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 20px; border-radius: 8px; color: #fff; font-size: 14px; font-weight: 500; animation: slideIn .3s ease; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.toast-success { background: #10b981; }
.toast-error { background: #ef4444; }
.toast-info { background: #2563eb; }
.toast-warning { background: #f59e0b; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── 模态弹窗 ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 150; display: flex; align-items: center; justify-content: center; }
.modal { background: #fff; border-radius: 14px; padding: 32px; max-width: 420px; width: 90%; box-shadow: 0 8px 32px rgba(0,0,0,.15); }
.modal h3 { font-size: 18px; margin-bottom: 16px; }
.modal input {
  width: 100%; padding: 10px 14px; border-radius: 8px; border: 1px solid #e2e8f0;
  font-size: 14px; font-family: inherit; margin-bottom: 12px;
}
.modal input:focus { border-color: #2563eb; outline: none; }
.modal .error-msg { color: #ef4444; font-size: 13px; margin-bottom: 8px; }

/* ── 表单 ── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 4px; }
.form-group input, .form-group select {
  width: 100%; padding: 10px 14px; border-radius: 8px; border: 1px solid #e2e8f0;
  font-size: 14px; font-family: inherit;
}
.form-group input:focus, .form-group select:focus { border-color: #2563eb; outline: none; }

/* ── 双栏布局 ── */
.two-col { display: grid; grid-template-columns: 260px 1fr; gap: 24px; }
.sidebar { }
.sidebar .nav-item {
  display: block; padding: 10px 16px; border-radius: 8px; font-size: 14px;
  color: #64748b; cursor: pointer; transition: .2s; margin-bottom: 4px;
}
.sidebar .nav-item:hover { background: #f1f5f9; color: #1e293b; }
.sidebar .nav-item.active { background: #eff6ff; color: #2563eb; font-weight: 600; }
.content-area { }

/* ── 策略卡片网格 ── */
.strategy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 24px; }
.strategy-card {
  background: #fff; border-radius: 12px; padding: 18px; border: 1.5px solid #e2e8f0;
  cursor: pointer; transition: .2s;
}
.strategy-card:hover { border-color: #2563eb; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.strategy-card .card-header { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.strategy-card .card-body { font-size: 13px; color: #64748b; }
.strategy-card .card-current { font-size: 12px; color: #2563eb; margin-top: 4px; }
.strategy-card.locked { opacity: .5; cursor: pointer; border-style: dashed; position: relative; }
.strategy-card.locked .card-overlay { text-align: center; }
.strategy-card.locked .lock-icon { font-size: 24px; display: block; margin-bottom: 4px; }
.upgrade-banner {
  background: linear-gradient(135deg, #eff6ff, #dbeafe); border-radius: 10px;
  padding: 16px 20px; text-align: center; font-size: 14px; color: #1d4ed8; margin-bottom: 16px;
}
.upgrade-banner a { font-weight: 700; text-decoration: underline; }

/* ── 两列对比 ── */
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── 结果表格高亮 ── */
.prize-high { color: #ef4444; font-weight: 700; }
.prize-mid { color: #f59e0b; font-weight: 600; }
.prize-low { color: #64748b; }
.hidden { display: none !important; }

/* ── 页脚 ── */
.footer {
  background: #f1f5f9; border-top: 1px solid #e2e8f0;
  padding: 28px 24px; text-align: center; font-size: 13px; color: #64748b; line-height: 2;
}
.footer .warning { color: #ef4444; font-weight: 600; font-size: 14px; }
.footer .icp { color: #94a3b8; }

/* ── 即将推出 ── */
.coming-soon {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 2px dashed #cbd5e1; border-radius: 14px; padding: 40px; text-align: center;
}
.coming-soon h3 { font-size: 18px; color: #2563eb; margin-bottom: 8px; }
.coming-soon p { color: #64748b; font-size: 14px; }

/* ── 响应式 ── */
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
  .feature-cards { grid-template-columns: 1fr; }
  .strategy-grid { grid-template-columns: 1fr; }
  .cols-2 { grid-template-columns: 1fr; }
  .draw-hero { padding: 24px 16px; }
  .ball { width: 42px; height: 42px; font-size: 17px; }
  .navbar .lottery-links { display: none; }
  .chart-container { height: 300px; }
}
