/* ============================================================
 * 双色球智能分析系统 - 样式
 * 设计:深色主题 + 红蓝主色 + 现代卡片化
 * ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  background: #0a0e1a;
  color: #e8ecf4;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* ============== 登录页 ============== */
.login-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  overflow: hidden;
}
.login-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(220,38,38,0.25), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(37,99,235,0.25), transparent 50%),
    linear-gradient(135deg, #0a0e1a 0%, #1a1f3a 100%);
  animation: bgShift 12s ease-in-out infinite alternate;
}
@keyframes bgShift {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(20deg); }
}
.login-card {
  position: relative; z-index: 2;
  width: 90%; max-width: 420px;
  background: rgba(20, 26, 44, 0.85);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 40px 32px;
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  text-align: center;
}
.login-logo {
  display: flex; justify-content: center; gap: 10px; margin-bottom: 16px;
}
.ball {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 18px;
  box-shadow: inset 0 -4px 8px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.3);
}
.ball-red { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.ball-blue { background: linear-gradient(135deg, #3b82f6, #1e40af); }

.login-card h1 {
  font-size: 24px; font-weight: 700; margin-bottom: 8px;
  background: linear-gradient(90deg, #ef4444, #3b82f6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.login-subtitle { color: #94a3b8; font-size: 13px; margin-bottom: 24px; }
.login-mode {
  display: inline-block;
  padding: 4px 12px; border-radius: 12px;
  background: rgba(59,130,246,0.15); color: #60a5fa;
  font-size: 12px; margin-bottom: 20px;
  border: 1px solid rgba(59,130,246,0.3);
}
#password-input {
  width: 100%; padding: 14px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #fff; font-size: 16px;
  letter-spacing: 4px; text-align: center;
  margin-bottom: 16px;
  transition: all 0.2s;
}
#password-input:focus {
  outline: none; border-color: rgba(59,130,246,0.5);
  background: rgba(255,255,255,0.08);
}
.btn-primary {
  width: 100%; padding: 14px 16px;
  background: linear-gradient(90deg, #dc2626, #2563eb);
  color: #fff; border: none; border-radius: 10px;
  font-size: 16px; font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(220,38,38,0.3);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.login-error {
  color: #f87171; font-size: 13px; min-height: 18px; margin-top: 8px;
}
.login-hint {
  margin-top: 20px; color: #64748b; font-size: 12px;
  padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.05);
}

.remember-row {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  margin: 14px 0 4px 0;
  font-size: 13px;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}
.remember-row input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: #10b981;
  cursor: pointer;
}
.remember-row:hover { color: #cbd5e1; }

/* ============== 顶部 ============== */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px;
  background: rgba(20, 26, 44, 0.7);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.logo-mini { display: flex; gap: 4px; }
.ball-mini {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 12px;
}
.ball-mini.ball-red { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.ball-mini.ball-blue { background: linear-gradient(135deg, #3b82f6, #1e40af); }

.title-block h1 {
  font-size: 17px; font-weight: 700; color: #f1f5f9;
}
.mode-badge {
  display: inline-block; margin-top: 2px;
  font-size: 11px; padding: 2px 8px; border-radius: 8px;
  background: rgba(220,38,38,0.15); color: #f87171;
  border: 1px solid rgba(220,38,38,0.3);
}
.mode-badge.sub-mode { background: rgba(59,130,246,0.15); color: #60a5fa; border-color: rgba(59,130,246,0.3); }

.topbar-right { display: flex; gap: 10px; align-items: center; }
.btn-icon {
  padding: 8px 14px;
  background: rgba(255,255,255,0.05);
  color: #cbd5e1; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; font-size: 13px;
  transition: all 0.15s;
}
.btn-icon:hover { background: rgba(255,255,255,0.1); color: #fff; }
#share-btn { padding: 8px 16px; font-size: 13px; width: auto; }
.icon-refresh { display: inline-block; font-size: 16px; margin-right: 4px; }
.icon-refresh.spin { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.icon-share { display: inline-block; font-size: 14px; margin-right: 4px; }

/* ============== 主网格 ============== */
.main-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
  padding: 16px;
  max-width: 1400px;
  margin: 0 auto;
}

.card {
  background: rgba(20, 26, 44, 0.6);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 18px;
  backdrop-filter: blur(10px);
}
.card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.card-head h2 { font-size: 15px; font-weight: 600; color: #e2e8f0; }

.issue-tag {
  padding: 3px 10px; border-radius: 8px;
  background: rgba(220,38,38,0.15); color: #f87171;
  font-size: 12px; font-weight: 600;
  font-family: 'SF Mono', 'Monaco', monospace;
}

/* 最新开奖 */
.card-latest { grid-row: span 1; }
.latest-date { color: #94a3b8; font-size: 13px; margin-bottom: 12px; }
.balls-row {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; margin-bottom: 16px;
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
}
.balls { display: flex; gap: 8px; }
.ball-display {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 16px;
  box-shadow: inset 0 -3px 6px rgba(0,0,0,0.3), 0 3px 10px rgba(0,0,0,0.3);
  animation: popIn 0.4s ease-out;
}
@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.balls-sep { font-size: 22px; color: #64748b; font-weight: 300; }

.countdown-block {
  padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.06);
}
.countdown-block h3 {
  font-size: 13px; color: #94a3b8; font-weight: 500; margin-bottom: 10px;
}
.countdown { display: flex; gap: 10px; margin-bottom: 12px; }
.cd-cell {
  flex: 1; text-align: center;
  padding: 10px 4px;
  background: linear-gradient(135deg, rgba(220,38,38,0.1), rgba(37,99,235,0.1));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
}
.cd-cell span {
  display: block; font-size: 22px; font-weight: 700;
  color: #f1f5f9;
  font-family: 'SF Mono', 'Monaco', monospace;
}
.cd-cell label {
  display: block; font-size: 11px; color: #64748b; margin-top: 2px;
}
.next-info { font-size: 13px; color: #94a3b8; }
.next-info b { color: #fbbf24; font-weight: 600; }

/* 数据状态 */
.status-dot {
  color: #10b981; font-size: 14px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.stat-row { display: flex; gap: 10px; margin-bottom: 10px; }
.stat-cell {
  flex: 1; padding: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 10px;
  text-align: center;
}
.stat-num {
  font-size: 18px; font-weight: 700; color: #fbbf24;
  font-family: 'SF Mono', 'Monaco', monospace;
}
.stat-label { font-size: 11px; color: #64748b; margin-top: 4px; }

.rules-box {
  margin-top: 12px; padding: 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
  border-left: 3px solid #f59e0b;
}
.rules-box h4 {
  font-size: 13px; color: #fbbf24; margin-bottom: 6px; font-weight: 600;
}
.rules-box ul { list-style: none; }
.rules-box li {
  font-size: 12px; color: #cbd5e1; padding: 2px 0;
  position: relative; padding-left: 12px;
}
.rules-box li::before {
  content: '·'; position: absolute; left: 0; color: #f59e0b;
}

/* 冷热统计 */
.filter-tabs { display: flex; gap: 4px; }
.tab {
  padding: 4px 10px; font-size: 12px;
  background: transparent; color: #94a3b8;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  transition: all 0.15s;
}
.tab.active { background: rgba(59,130,246,0.2); color: #60a5fa; border-color: rgba(59,130,246,0.4); }
.tab:hover { color: #fff; }

/* 智能精选组数切换(1/3/5) */
.picks-count-tabs { display: flex; gap: 4px; }
.picks-count-tab {
  padding: 5px 12px; font-size: 12px;
  background: transparent; color: #94a3b8;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.picks-count-tab:hover { color: #fff; border-color: rgba(255,255,255,0.2); }
.picks-count-tab.active {
  background: linear-gradient(90deg, rgba(16,185,129,0.2), rgba(59,130,246,0.2));
  color: #10b981;
  border-color: rgba(16,185,129,0.4);
  font-weight: 600;
}

.hot-grid {
  display: grid; grid-template-columns: repeat(11, 1fr);
  gap: 6px;
}
.hot-cell {
  aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  cursor: default;
  position: relative;
  transition: transform 0.15s;
}
.hot-cell:hover { transform: scale(1.1); }
.hot-cell .num { color: #fff; font-size: 14px; font-weight: 700; }
.hot-cell .cnt { font-size: 10px; margin-top: 1px; opacity: 0.85; }
.hot-cell.hot { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.hot-cell.warm { background: linear-gradient(135deg, #f59e0b, #d97706); }
.hot-cell.cold { background: linear-gradient(135deg, #475569, #334155); }
.hot-legend {
  margin-top: 12px; display: flex; gap: 14px; font-size: 12px; color: #94a3b8;
}
.legend-hot { color: #f87171; }
.legend-warm { color: #fbbf24; }
.legend-cold { color: #94a3b8; }

/* 蓝球 */
.blue-grid {
  display: grid; grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}
.blue-cell {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 13px; font-weight: 700; color: #fff;
  position: relative;
}
.blue-cell .cnt {
  position: absolute; bottom: -2px; right: -2px;
  background: #1e293b; color: #fbbf24;
  font-size: 9px; padding: 1px 4px; border-radius: 6px;
  border: 1px solid #334155;
}
.blue-cell.hot { background: linear-gradient(135deg, #3b82f6, #1e40af); }
.blue-cell.warm { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.blue-cell.cold { background: linear-gradient(135deg, #334155, #1e293b); color: #94a3b8; }

/* 5 组精选 */
.card-picks { grid-column: span 2; }
.picks-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

/* 智能选号占位(未点击"智能选号"按钮) */
.picks-placeholder {
  grid-column: span 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 50px 20px;
  background: linear-gradient(135deg, rgba(16,185,129,0.05), rgba(59,130,246,0.05));
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 16px;
  text-align: center;
  min-height: 280px;
}
.placeholder-icon { font-size: 56px; margin-bottom: 12px; }
.placeholder-title { font-size: 18px; font-weight: 600; color: #e8ecf4; margin-bottom: 12px; }
.placeholder-tip { color: #94a3b8; font-size: 13px; line-height: 1.7; margin-bottom: 24px; }
.placeholder-tip span { color: #10b981; font-weight: 700; }
.placeholder-meta { color: #64748b; font-size: 12px; margin-top: 16px; }
.placeholder-meta span { color: #60a5fa; font-weight: 600; }

.btn-pick-primary {
  background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
  color: white;
  border: none;
  padding: 16px 40px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(16,185,129,0.3), 0 0 0 1px rgba(255,255,255,0.1) inset;
  transition: all 0.2s ease;
  font-family: inherit;
  letter-spacing: 1px;
}
.btn-pick-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16,185,129,0.4), 0 0 0 1px rgba(255,255,255,0.15) inset;
}
.btn-pick-primary:active {
  transform: translateY(0);
}

/* 当只显示 1 组或 3 组时,占位卡片横跨全部 */
.picks-grid:has(.picks-placeholder) { grid-template-columns: 1fr; }
.pick-card {
  background: linear-gradient(135deg, rgba(220,38,38,0.05), rgba(37,99,235,0.05));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px;
  position: relative;
  transition: all 0.2s;
}
.pick-card:hover {
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}
.pick-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.pick-label {
  font-size: 12px; padding: 2px 8px; border-radius: 6px;
  background: rgba(255,255,255,0.05); color: #cbd5e1;
  font-weight: 600;
}
.pick-label.gold { background: rgba(251,191,36,0.2); color: #fbbf24; }
.pick-label.silver { background: rgba(148,163,184,0.2); color: #cbd5e1; }
.pick-label.bronze { background: rgba(217,119,6,0.2); color: #fdba74; }
.pick-balls { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.pick-balls .b {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.pick-balls .b.red { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.pick-balls .b.blue { background: linear-gradient(135deg, #3b82f6, #1e40af); margin-left: 4px; }
.pick-meta {
  font-size: 11px; color: #94a3b8;
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.pick-meta span {
  padding: 1px 6px; background: rgba(255,255,255,0.04);
  border-radius: 4px;
}
.pick-note {
  font-size: 11px; color: #fbbf24;
  padding-top: 6px; border-top: 1px dashed rgba(255,255,255,0.06);
  line-height: 1.4;
}
.btn-secondary {
  padding: 6px 12px;
  background: rgba(255,255,255,0.05);
  color: #cbd5e1; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; font-size: 12px;
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); }

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

.fav-badge {
  display: inline-block;
  margin-left: 4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: #fbbf24; color: #1e293b;
  border-radius: 9px; font-size: 11px; font-weight: 700;
  text-align: center; line-height: 18px;
}
.icon-star { color: #fbbf24; }

/* 选号卡片上的收藏按钮 */
.pick-fav-btn {
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  font-size: 14px; color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s;
}
.pick-fav-btn:hover {
  border-color: #fbbf24; color: #fbbf24;
  background: rgba(251,191,36,0.1);
}
.pick-fav-btn.faved {
  background: rgba(251,191,36,0.2);
  border-color: #fbbf24;
  color: #fbbf24;
}

/* 收藏夹弹窗 */
.modal-card-wide { max-width: 720px; }

.fav-count-label {
  font-size: 14px; color: #94a3b8; font-weight: 400; margin-left: 4px;
}

.btn-clear-all {
  padding: 6px 12px; font-size: 12px;
  background: rgba(239,68,68,0.1);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-clear-all:hover {
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.5);
  color: #fff;
}
.btn-clear-all:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.fav-custom {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
}
.fav-custom-title {
  font-size: 13px; color: #cbd5e1;
  margin-bottom: 10px; font-weight: 600;
}
.fav-custom-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.fav-red-inputs {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.fav-red-inputs input {
  width: 36px; height: 32px;
  background: rgba(220,38,38,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5; border-radius: 6px;
  text-align: center; font-size: 13px; font-weight: 600;
  -moz-appearance: textfield;
}
.fav-red-inputs input::-webkit-outer-spin-button,
.fav-red-inputs input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.fav-red-inputs input:focus {
  outline: none;
  border-color: #ef4444;
  background: rgba(220,38,38,0.2);
}
.fav-plus { color: #94a3b8; font-size: 16px; margin: 0 2px; }
#fav-blue-input {
  width: 50px; height: 32px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.3);
  color: #93c5fd; border-radius: 6px;
  text-align: center; font-size: 13px; font-weight: 600;
  -moz-appearance: textfield;
}
#fav-blue-input::-webkit-outer-spin-button,
#fav-blue-input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
#fav-blue-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(59,130,246,0.2);
}
.fav-custom-hint {
  font-size: 11px; color: #64748b; margin-top: 8px;
}

.fav-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 50vh; overflow-y: auto;
  padding-right: 4px;
}
.fav-list::-webkit-scrollbar { width: 6px; }
.fav-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1); border-radius: 3px;
}

.fav-empty {
  text-align: center;
  padding: 30px 20px;
  color: #64748b; font-size: 13px;
}

.fav-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 12px;
  position: relative;
  transition: all 0.15s;
}
.fav-item:hover {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
}
.fav-item-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-size: 12px;
}
.fav-item-meta {
  color: #94a3b8;
}
.fav-item-meta b { color: #fbbf24; }
.fav-item-actions { display: flex; gap: 6px; }
.fav-del-btn {
  background: transparent;
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
  font-size: 11px; padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.fav-del-btn:hover {
  background: rgba(239,68,68,0.15);
  border-color: #ef4444;
}
.fav-item-balls {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.fav-item-balls .b {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
}
.fav-item-balls .b.red { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.fav-item-balls .b.blue { background: linear-gradient(135deg, #3b82f6, #1e40af); margin-left: 4px; }
.fav-item-balls .b.source {
  background: rgba(251,191,36,0.2);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.4);
  font-size: 10px;
  width: auto; padding: 0 6px; height: 24px;
  border-radius: 4px;
  margin-left: 4px;
}
.fav-item-result {
  font-size: 12px; padding-top: 6px;
  border-top: 1px dashed rgba(255,255,255,0.06);
}
.fav-item-result.win {
  color: #fbbf24; font-weight: 600;
}
.fav-item-result.win-big {
  color: #ef4444; font-weight: 700;
  background: linear-gradient(90deg, rgba(239,68,68,0.1), transparent);
  padding: 4px 8px; border-radius: 4px;
  border: 1px solid rgba(239,68,68,0.3);
}
.fav-item-result.nope {
  color: #64748b;
}

.fav-tip {
  margin-top: 12px;
  font-size: 11px; color: #64748b;
  padding: 8px 10px;
  background: rgba(255,255,255,0.02);
  border-radius: 6px;
}

/* 历史 */
.card-history { grid-column: span 2; }
.history-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 280px; overflow-y: auto;
}
.history-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 6px;
  font-size: 12px;
}
.history-issue { color: #94a3b8; font-family: 'SF Mono', monospace; min-width: 70px; }
.history-date { color: #64748b; min-width: 90px; }
.history-balls { display: flex; gap: 4px; flex: 1; }
.history-balls .b {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
}
.history-balls .b.red { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.history-balls .b.blue { background: linear-gradient(135deg, #3b82f6, #1e40af); }

/* 弹窗 */
.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.modal-mask {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
}
.modal-card {
  position: relative; z-index: 2;
  width: 90%; max-width: 500px;
  background: #1a1f3a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  overflow: hidden;
  animation: modalIn 0.25s ease-out;
}
@keyframes modalIn {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.modal-head h3 { font-size: 16px; color: #f1f5f9; }
.modal-close {
  width: 28px; height: 28px;
  background: transparent; border: none;
  color: #94a3b8; font-size: 22px;
  border-radius: 6px;
}
.modal-close:hover { background: rgba(255,255,255,0.1); color: #fff; }
.modal-body { padding: 20px; }
.modal-tip {
  font-size: 13px; color: #cbd5e1;
  margin-bottom: 16px; line-height: 1.6;
}
.modal-tip b { color: #fbbf24; }
.share-url-box {
  display: flex; gap: 8px; margin-bottom: 12px;
}
.share-url-box input {
  flex: 1; padding: 10px 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #60a5fa; font-size: 12px;
  font-family: 'SF Mono', monospace;
}
.share-url-box .btn-primary { width: auto; padding: 10px 16px; }
.share-meta {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: #94a3b8; margin-bottom: 14px;
}
.share-meta code {
  color: #fbbf24; font-family: 'SF Mono', monospace;
}
.share-warning {
  font-size: 12px; color: #fbbf24;
  padding: 10px 12px;
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: 8px;
  line-height: 1.5;
}
.share-warning b { color: #f87171; }

/* 管理副链接列表 */
.query-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}
.query-box-title {
  font-size: 13px; font-weight: 600;
  color: #94a3b8; margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.query-box-row {
  display: flex; gap: 8px; margin-bottom: 8px;
}
.query-box-row input {
  flex: 1;
  padding: 10px 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #e8ecf4;
  font-size: 13px;
  font-family: 'SF Mono', Consolas, monospace;
  outline: none;
  transition: border-color 0.15s;
}
.query-box-row input:focus { border-color: #3b82f6; }
.query-box-row .btn-primary { padding: 10px 20px; font-size: 13px; }
.query-result {
  margin-top: 10px;
  padding: 12px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.7;
}
.query-result.found { border-left: 3px solid #10b981; }
.query-result.not-found { border-left: 3px solid #f59e0b; }
.query-result.deleted { border-left: 3px solid #ef4444; }
.query-result .qr-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.query-result .qr-label { color: #94a3b8; min-width: 60px; }
.query-result .qr-value { color: #e8ecf4; font-weight: 600; }
.query-result .qr-id {
  font-family: 'SF Mono', Consolas, monospace;
  background: rgba(0,0,0,0.3);
  padding: 2px 6px;
  border-radius: 4px;
  color: #60a5fa;
  word-break: break-all;
}
.query-result .qr-actions { margin-top: 12px; }
.query-divider {
  text-align: center;
  color: #64748b;
  margin: 14px 0;
  font-size: 12px;
}

/* 折叠区 - 我创建的副链接 */
.local-section {
  margin-top: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
}
.local-section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
  font-size: 13px;
  color: #cbd5e1;
  font-weight: 500;
}
.local-section-header:hover { background: rgba(255,255,255,0.04); }
.local-section-count {
  margin-left: auto;
  margin-right: 8px;
  background: rgba(59,130,246,0.15);
  color: #93c5fd;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.local-section-arrow {
  font-size: 10px;
  color: #94a3b8;
  transition: transform 0.2s;
}
.local-section-arrow.expanded { transform: rotate(180deg); }
.local-section-body {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* 展开/收起按钮 */
.manage-expand-btn {
  text-align: center;
  padding: 10px;
  margin-top: 8px;
  color: #60a5fa;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid rgba(96,165,250,0.2);
  border-radius: 6px;
  background: rgba(96,165,250,0.05);
  user-select: none;
  transition: all 0.15s;
}
.manage-expand-btn:hover {
  background: rgba(96,165,250,0.1);
  border-color: rgba(96,165,250,0.4);
}

.manage-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  margin-bottom: 8px;
  gap: 12px;
}
.manage-row.deleted { opacity: 0.55; }
.manage-row-main { flex: 1; min-width: 0; }
.manage-id {
  display: block;
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 12px;
  color: #60a5fa;
  background: rgba(0,0,0,0.3);
  padding: 3px 8px;
  border-radius: 4px;
  word-break: break-all;
  margin-bottom: 4px;
}
.manage-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 11px; color: #94a3b8;
}
.manage-meta .status {
  padding: 2px 6px; border-radius: 4px; font-weight: 600;
}
.manage-meta .status.active { background: rgba(16,185,129,0.2); color: #10b981; }
.manage-meta .status.deleted { background: rgba(239,68,68,0.2); color: #ef4444; }
.manage-meta .status.unknown { background: rgba(245,158,11,0.2); color: #f59e0b; }
.manage-row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.btn-mini {
  padding: 6px 10px; font-size: 12px;
  background: rgba(255,255,255,0.06);
  color: #e8ecf4;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.btn-mini:hover { background: rgba(255,255,255,0.1); }
.btn-mini.copy-sub:hover { border-color: rgba(59,130,246,0.4); color: #60a5fa; }
.btn-mini.btn-del {
  border-color: rgba(239,68,68,0.2);
  color: #fca5a5;
}
.btn-mini.btn-del:hover {
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.4);
}
.btn-mini:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 提示 */
.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 20px;
  background: rgba(20, 26, 44, 0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #f1f5f9; font-size: 13px;
  z-index: 2000;
  opacity: 0;
  transition: all 0.25s;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.error { border-color: rgba(239,68,68,0.4); }

/* 页脚 */
.footer {
  text-align: center;
  padding: 20px 16px;
  color: #64748b; font-size: 12px;
  border-top: 1px solid rgba(255,255,255,0.04);
  margin-top: 30px;
}
.footer div { padding: 2px 0; }

/* 响应式 */
@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .card-picks, .card-history { grid-column: span 1; }
  .picks-grid { grid-template-columns: repeat(2, 1fr); }
  .hot-grid { grid-template-columns: repeat(8, 1fr); }
  .topbar { padding: 10px 14px; }
  .title-block h1 { font-size: 15px; }
  .topbar-right .btn-icon span:not(.icon-refresh):not(.icon-share) { display: none; }
}
@media (max-width: 600px) {
  .picks-grid { grid-template-columns: 1fr; }
  .hot-grid { grid-template-columns: repeat(6, 1fr); }
  .blue-grid { grid-template-columns: repeat(8, 1fr); }
  .countdown { gap: 6px; }
  .cd-cell span { font-size: 18px; }
  .balls-row { flex-wrap: wrap; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
