/* ===== tc.mjhg.cn 全站公共样式 ===== */
/* 从 index.html 提取，各页面共用 */

:root {
    --primary: #4361ee;
    --primary-dark: #3a0ca3;
    --tc-color: #4361ee;
    --fc-color: #e63946;
    --zc-color: #f77f00;
    --green: #2dc653;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 24px rgba(67,97,238,0.10);
    --card-radius: 16px;
    --text-main: #1a1a2e;
    --text-sub: #64748b;
    --border: #e8edf5;
    --bg-page: #f0f4ff;
}

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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Segoe UI', Arial, sans-serif;
    background: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== HERO HEADER ===== */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 80%, #4361ee 100%);
    padding: 56px 20px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(67,97,238,0.35) 0%, transparent 70%);
    pointer-events: none;
}
.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(67,97,238,0.25);
    border: 1px solid rgba(67,97,238,0.5);
    color: #a5b4fc;
    font-size: 0.82em;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.hero h1 {
    color: #ffffff;
    font-size: clamp(1.7rem, 1rem + 3.2vw, 2.7rem);
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 14px;
    text-shadow: 0 2px 20px rgba(67,97,238,0.4);
}
.hero-desc {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.hero-desc span {
    color: rgba(255,255,255,0.75);
    font-size: 0.97em;
    display: flex;
    align-items: center;
    gap: 5px;
}
.hero-desc span::before {
    content: '\25B8';
    color: #818cf8;
}

/* ===== MAIN CONTAINER ===== */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(20px, 3vw, 36px) clamp(12px, 2.4vw, 20px) clamp(32px, 4vw, 48px);
}

/* ===== SECTION ===== */
.lottery-section { margin-bottom: 48px; }

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border);
    position: relative;
}
.section-header::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 60px; height: 2px;
    border-radius: 2px;
}
.section-header.tc-hd::after { background: var(--tc-color); }
.section-header.fc-hd::after { background: var(--fc-color); }
.section-header.zc-hd::after { background: var(--zc-color); }
.section-header.analysis-hd::after { background: #7c3aed; }

.section-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4em;
    flex-shrink: 0;
}
.section-icon.tc-icon { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.section-icon.fc-icon { background: linear-gradient(135deg, #fee2e2, #fecaca); }
.section-icon.analysis-icon { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }

.section-title-text {
    font-size: clamp(1.1rem, 0.9rem + 1vw, 1.35rem);
    font-weight: 700;
    color: var(--text-main);
}
.section-count {
    margin-left: auto;
    background: #f1f5f9;
    color: var(--text-sub);
    font-size: 0.8em;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
    flex-shrink: 1;
    white-space: normal;
    line-height: 1.3;
    text-align: right;
    max-width: 100%;
}

/* ===== GRID ===== */
.lottery-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
    gap: 18px;
}

/* ===== CARD ===== */
.lottery-type {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform 0.28s cubic-bezier(.4,0,.2,1), box-shadow 0.28s;
    display: flex;
    flex-direction: column;
    position: relative;
}
.lottery-type:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(67,97,238,0.16);
}
.card-accent { height: 4px; width: 100%; }
.card-accent.tc { background: linear-gradient(90deg, var(--tc-color), #818cf8); }
.card-accent.fc { background: linear-gradient(90deg, var(--fc-color), #fb923c); }
.card-accent.analysis { background: linear-gradient(90deg, #7c3aed, #4361ee); }

.lottery-content {
    padding: 22px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.lottery-content h3 {
    font-size: 1.18em;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.draw-schedule {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78em;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    width: fit-content;
}
.draw-schedule.tc { background: #eff6ff; color: #3b82f6; }
.draw-schedule.fc { background: #fff1f2; color: #e11d48; }
.draw-schedule.zc { background: #fff7ed; color: #ea580c; }

.lottery-content > p {
    color: var(--text-sub);
    font-size: 0.88em;
    margin-bottom: 16px;
    line-height: 1.55;
    min-height: 38px;
}

.form-group { margin-bottom: 16px; }
label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    color: #475569;
    font-size: 0.88em;
}
input[type="number"], select {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: 15px;
    transition: border-color 0.25s, box-shadow 0.25s;
    background: #f8fafc;
    color: var(--text-main);
}
input[type="number"]:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67,97,238,0.12);
    background: #fff;
}

/* ===== BUTTON ===== */
.btn {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    padding: 11px 20px;
    border-radius: 9px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(.4,0,.2,1);
    width: 100%;
    letter-spacing: 0.4px;
    position: relative;
    overflow: hidden;
    margin-top: auto;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.2s;
}
.btn:hover::after { background: rgba(255,255,255,0.12); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-tc { background: linear-gradient(135deg, var(--tc-color), #3a0ca3); color: #fff; box-shadow: 0 3px 12px rgba(67,97,238,0.3); }
.btn-fc { background: linear-gradient(135deg, var(--fc-color), #c1121f); color: #fff; box-shadow: 0 3px 12px rgba(230,57,70,0.3); }
.btn-green { background: linear-gradient(135deg, #059669, #047857); color: #fff; box-shadow: 0 3px 12px rgba(5,150,105,0.3); }
.btn-orange { background: linear-gradient(135deg, var(--zc-color), #d62828); color: #fff; box-shadow: 0 3px 12px rgba(247,127,0,0.25); }
.btn-blue-light { background: linear-gradient(135deg, #0ea5e9, #0284c7); color: #fff; box-shadow: 0 3px 12px rgba(14,165,233,0.3); }
.btn-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: #fff; box-shadow: 0 3px 12px rgba(139,92,246,0.3); }
.btn-disabled { background: #e2e8f0; color: #94a3b8; cursor: not-allowed; }
.btn:hover:not(:disabled) { transform: translateY(-2px); }

.btn-row {
    display: flex;
    gap: 10px;
    margin-top: auto;
}
.btn-row a { flex: 1; text-decoration: none; }
.btn-row .btn { font-size: 14px; padding: 10px 14px; }

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 18px;
}

.btn-dev {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #fff;
    box-shadow: 0 3px 12px rgba(100,116,139,0.25);
    cursor: default;
    position: relative;
}
.btn-dev:hover:not(:disabled) { transform: none; }
.btn-dev::after { display: none; }
.dev-badge {
    position: absolute;
    top: -6px; right: -6px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(245,158,11,0.4);
    line-height: 1.3;
    pointer-events: none;
}

/* ===== NEW 徽标 + 新系统卡片高亮（2026-09-23 排列五新分析系统） ===== */
.new-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #ff4d4f, #d92027);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 2px 7px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(217,32,39,0.45);
    line-height: 1.3;
    white-space: nowrap;
    animation: new-badge-pulse 1.8s ease-in-out infinite;
}
@keyframes new-badge-pulse {
    0%, 100% { transform: scale(1);    box-shadow: 0 2px 8px  rgba(217,32,39,0.45); }
    50%      { transform: scale(1.09); box-shadow: 0 2px 14px rgba(217,32,39,0.65); }
}
/* 新系统卡片：红色描边高亮，悬停时更亮 */
.lottery-type.card-new {
    border: 1.5px solid rgba(217,32,39,0.45);
    box-shadow: 0 0 0 3px rgba(217,32,39,0.10), var(--card-shadow);
}
.lottery-type.card-new:hover {
    box-shadow: 0 0 0 3px rgba(217,32,39,0.18), 0 14px 40px rgba(217,32,39,0.20);
}
/* 顶部条：火焰渐变，与其他紫/蓝卡片区分 */
.card-accent.new { background: linear-gradient(90deg, #ff4d4f, #f59e0b); }
/* 醒目图标：轻微跳动 */
.hot-icon {
    font-size: 1.18em;
    line-height: 1;
    animation: hot-icon-bounce 2s ease-in-out infinite;
}
@keyframes hot-icon-bounce {
    0%, 100% { transform: scale(1)    rotate(0deg); }
    30%      { transform: scale(1.18) rotate(-6deg); }
    60%      { transform: scale(1.10) rotate(6deg); }
}

/* ===== RESULT / LOADING / ERROR ===== */
.result-container {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    margin-top: 22px;
    display: none;
    animation: fadeUp 0.4s ease-out;
    border: 1px solid var(--border);
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.result-container h2 {
    color: var(--text-main);
    margin-bottom: 24px;
    font-size: 1.5em;
    text-align: center;
    font-weight: 700;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border);
}

.lottery-numbers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }

.lottery-number {
    background: #f8fafc;
    padding: 16px 20px;
    border-radius: 11px;
    border-left: 4px solid var(--primary);
    transition: all 0.25s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.lottery-number:hover { transform: translateX(5px); background: #f0f4ff; box-shadow: 0 3px 12px rgba(67,97,238,0.1); }

.number-set {
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.number-label { color: #64748b; font-weight: 600; font-size: 14px; white-space: nowrap; }
.number-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px; height: 46px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    box-shadow: 0 3px 8px rgba(0,0,0,0.18), inset 0 -2px 4px rgba(0,0,0,0.12), inset 0 2px 4px rgba(255,255,255,0.25);
}
.number-ball.red   { background: radial-gradient(circle at 35% 35%, #ff6b7a, #e74c3c 55%, #c0392b); }
.number-ball.green { background: radial-gradient(circle at 35% 35%, #4ade80, #27ae60 55%, #1e8449); }
.number-ball.blue  { background: radial-gradient(circle at 35% 35%, #60a5fa, #3b82f6 55%, #2563eb); }
.number-separator { font-size: 24px; color: #94a3b8; font-weight: 700; }

.random-type {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 20px 22px;
    border-radius: 11px;
    border-left: 4px solid #f59e0b;
    margin-top: 20px;
}
.random-type h3 { color: #b45309; font-size: 1.05em; font-weight: 700; margin-bottom: 8px; }
.random-type p { color: #64748b; font-size: 0.88em; line-height: 1.6; margin-bottom: 4px; }

.loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 22px;
    background: #eff6ff;
    border-radius: 11px;
    color: var(--primary);
    font-size: 16px;
    font-weight: 600;
    margin-top: 16px;
    border: 1px solid #bfdbfe;
}
.loading-spinner {
    width: 22px; height: 22px;
    border: 3px solid #bfdbfe;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error {
    display: none;
    background: #fff1f2;
    color: #be123c;
    padding: 14px 18px;
    border-radius: 10px;
    border-left: 4px solid #e11d48;
    font-weight: 600;
    font-size: 0.9em;
    margin-top: 14px;
    animation: shake 0.45s ease;
}
@keyframes shake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* ===== DISCLAIMER ===== */
.disclaimer {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    padding: 24px 28px;
    border-radius: var(--card-radius);
    border-left: 5px solid #f59e0b;
    margin-bottom: 32px;
    box-shadow: 0 2px 12px rgba(245,158,11,0.1);
}
.disclaimer h3 { color: #92400e; margin-bottom: 12px; font-size: 1.1em; font-weight: 700; }
.disclaimer p { color: #78350f; font-size: 0.88em; margin-bottom: 6px; line-height: 1.65; }

/* ===== TOOLTIP ===== */
.tooltip { position: relative; display: inline-block; }
.tooltip .tooltip-text {
    visibility: hidden;
    width: 160px;
    background: #1e293b;
    color: #e2e8f0;
    text-align: center;
    border-radius: 8px;
    padding: 9px 12px;
    position: absolute;
    z-index: 999;
    bottom: 130%; left: 50%;
    transform: translateX(-50%) translateY(8px);
    opacity: 0;
    transition: all 0.25s;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.tooltip .tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%; left: 50%; margin-left: -6px;
    border: 6px solid transparent;
    border-top-color: #1e293b;
}
.tooltip:hover .tooltip-text { visibility: visible; opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 28px 20px 20px;
    color: var(--text-sub);
    font-size: 0.88em;
    border-top: 1px solid var(--border);
    margin-top: 12px;
}
.footer a { color: var(--primary); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero { padding: 36px 14px 28px; }
    .hero h1 { font-size: 1.85em; }
    .hero-badge { font-size: 0.88em; padding: 6px 16px; }
    .hero-desc span { font-size: 1.02em; }
    .container { padding: 20px 10px 36px; }
    .section-title-text { font-size: 1.2em; }
    .section-count { font-size: 0.85em; }
    .number-ball { width: 40px; height: 40px; font-size: 18px; }
    .result-container { padding: 20px 14px; }
    .lottery-content { padding: 16px 14px 14px; }
    .lottery-content h3 { font-size: 1.15em; }
    .lottery-content > p { font-size: 0.95em; }
    label { font-size: 0.95em; }
    input[type="number"], select { height: 46px; font-size: 16px; }
    .btn { padding: 13px 18px; font-size: 15.5px; }
    .draw-schedule { font-size: 0.84em; }
    .number-label { font-size: 15px; }
    .number-set { font-size: 15px; gap: 8px; }
    .number-separator { font-size: 22px; }
    .disclaimer h3 { font-size: 1.15em; }
    .disclaimer p { font-size: 0.95em; }
    .footer { font-size: 0.92em; }
}
@media (max-width: 480px) {
    .hero { padding: 28px 10px 22px; }
    .hero h1 { font-size: 1.5em; letter-spacing: 1px; }
    .hero-badge { font-size: 0.82em; }
    .hero-desc { gap: 10px; }
    .hero-desc span { font-size: 0.95em; }
    .container { padding: 16px 8px 30px; }
    .section-header { gap: 10px; margin-bottom: 16px; padding-bottom: 10px; }
    .section-title-text { font-size: 1.12em; }
    .section-icon { width: 36px; height: 36px; font-size: 1.2em; border-radius: 10px; }
    .lottery-content { padding: 14px 12px 12px; }
    .lottery-content h3 { font-size: 1.1em; }
    .lottery-content > p { font-size: 0.92em; min-height: auto; }
    label { font-size: 0.92em; margin-bottom: 5px; }
    input[type="number"], select { height: 44px; font-size: 16px; border-radius: 10px; }
    .btn { padding: 12px 14px; font-size: 15px; border-radius: 10px; }
    .btn-row { gap: 8px; margin-top: auto; }
    .btn-row .btn { font-size: 14px; padding: 10px 10px; }
    .draw-schedule { font-size: 0.8em; padding: 3px 8px; }
    .number-ball { width: 36px; height: 36px; font-size: 16px; }
    .number-label { font-size: 14px; }
    .number-set { font-size: 14px; gap: 6px; }
    .number-separator { font-size: 20px; }
    .lottery-number { padding: 14px 14px; }
    .result-container { padding: 18px 10px; border-radius: 12px; }
    .result-container h2 { font-size: 1.25em; margin-bottom: 16px; }
    .random-type { padding: 16px 14px; }
    .random-type h3 { font-size: 1em; }
    .random-type p { font-size: 0.9em; }
    .disclaimer { padding: 18px 16px; }
}

/* ===== 响应式表格 ===== */
@media (max-width: 768px) {
    .responsive-table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ===== 流畅滚动 & 锚点偏移 ===== */
html { scroll-behavior: smooth; }
.lottery-section { scroll-margin-top: 72px; }

/* ===== 跳转链接（无障碍） ===== */
.skip-link {
    position: absolute;
    left: 12px; top: -60px;
    background: var(--primary);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 700;
    z-index: 100;
    transition: top 0.2s;
    text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ===== 吸顶导航 ===== */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,0.82);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.site-nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 9px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.site-nav-brand {
    font-weight: 800;
    color: var(--text-main);
    font-size: 1.02em;
    display: flex; align-items: center; gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}
.site-nav-brand .logo-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: linear-gradient(135deg, var(--tc-color), var(--fc-color));
    box-shadow: 0 0 0 3px rgba(67,97,238,0.18);
}
.site-nav-links {
    margin-left: auto;
    display: flex;
    gap: 4px;
}
.site-nav-links a {
    text-decoration: none;
    color: var(--text-sub);
    font-weight: 600;
    font-size: 0.92em;
    padding: 8px 14px;
    border-radius: 9px;
    transition: background 0.2s, color 0.2s;
}
.site-nav-links a:hover { background: #eef2ff; color: var(--primary); }
/* 移动端导航：原为 display:none 隐藏，2026-10-13 改为横向可滚动（见文件末尾"首页显示优化"块） */

/* ===== 回到顶部 ===== */
.back-to-top {
    position: fixed;
    right: 20px; bottom: 20px;
    width: 46px; height: 46px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(67,97,238,0.4);
    opacity: 0; visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    z-index: 60;
    display: flex; align-items: center; justify-content: center;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); }
.back-to-top:active { transform: scale(0.94); }
@media (max-width: 480px) { .back-to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; font-size: 18px; } }

/* ===== 结果复制按钮 ===== */
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 auto 18px;
    background: #eef2ff;
    color: var(--primary);
    border: 1px solid #c7d2fe;
    border-radius: 9px;
    padding: 8px 16px;
    font-size: 0.9em;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.copy-btn:hover { background: #e0e7ff; }
.copy-btn.copied { background: #dcfce7; color: #16a34a; border-color: #86efac; }

/* ===== 滚动入场动画（仅 JS 启用时隐藏，无 JS 则正常显示） ===== */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ===== 焦点可见性（键盘无障碍） ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
.btn:focus-visible,
.site-nav-links a:focus-visible {
    outline: 3px solid rgba(67,97,238,0.55);
    outline-offset: 2px;
}

/* ===== 降低动效偏好 ===== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1 !important; transform: none !important; }
    .lottery-type:hover,
    .btn:hover:not(:disabled),
    .lottery-number:hover { transform: none !important; }
    .loading-spinner { animation: spin 0.7s linear infinite !important; }
}

/* ===== 移动端触控与渲染优化（全局，首页同步） ===== */
/* 去除移动端点击时的灰色高亮，改用统一焦点环 */
* { -webkit-tap-highlight-color: transparent; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* 触控设备：保证最小点按区域 44x44，避免误触 */
@media (pointer: coarse) {
    .btn, .site-nav-links a, .copy-btn, .back-to-top, button {
        min-height: 44px;
    }
    .site-nav-links a { display: inline-flex; align-items: center; }
    .back-to-top { width: 48px; height: 48px; }
}

/* 适配刘海屏 / 底部安全区（iPhone 等全面屏） */
.back-to-top {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    right: calc(20px + env(safe-area-inset-right, 0px));
}
.skip-link {
    left: calc(12px + env(safe-area-inset-left, 0px));
    top: calc(-60px - env(safe-area-inset-top, 0px));
}

/* ===== 移动端宽度防护（2026-08-18 新增，全站生效） ===== */
/* 防止整页横向滚动：页面整体贴合视口宽度，不再出现"左右滑动看整页/自动缩小" */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
/* 媒体元素自适应，不撑破容器 */
img, video, canvas, svg, iframe, table {
    max-width: 100%;
    height: auto;
}
/* 长标题/长文本允许断行，避免把卡片或容器撑宽 */
.lottery-content h3,
.draw-schedule,
.section-count,
.site-nav-brand,
.number-set {
    overflow-wrap: anywhere;
    word-break: break-word;
}
/* 超窄屏(<340px)兜底：副标题计数、按钮组自动换行 */
@media (max-width: 340px) {
    .section-count { font-size: 0.75em; padding: 3px 8px; }
    .hero-desc span { font-size: 0.9em; }
    .btn-row { flex-wrap: wrap; }
    .btn-row a, .btn-row > div { flex: 1 1 45%; }
}
/* 触屏点击输入框不触发 iOS 自动缩放（输入框字号已在移动端设为16px，此处兜底） */
@media (pointer: coarse) {
    input, select, textarea { font-size: 16px; }
}

/* =====================================================================
   首页显示优化 2026-10-13
   目标：消除分析区孤卡留白、补齐导航入口、统一卡片对齐、优化移动端导航
   ===================================================================== */

/* 1) 体彩分析区（8 张卡）：3 列布局，按 3+3+2 排布（排列五×3 → 大乐透×3 → 排列三+北单）。
      所有卡片等宽，最后一行为 2 张卡，自然靠左。
      980px 以下网格退为 2 列，8 卡天然 4×2 满格。 */

/* 2) 福彩分析区（2 张卡）：桌面固定 2 列填满整行，窄屏退回单列 */
.analysis-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 767px) {
    .analysis-grid.cols-2 { grid-template-columns: 1fr; }
}

/* 3) 分析卡：描述统一最小高度 + 按钮行底部对齐 + 单按钮整行
      （配合移除 HTML 内联 min-height:0 生效） */
.analysis-grid .lottery-content > p {
    color: var(--text-sub);
    font-size: 0.88em;
    min-height: 3.2em;
    margin-bottom: 16px;
}
.analysis-grid .lottery-content h3 { line-height: 1.35; }
.analysis-grid .btn-row { margin-top: auto; }
.analysis-grid .btn-row > .btn:only-child { flex: 1; }

/* 4) 移动端导航：4 个入口改为横向可滚动，不再整体隐藏（替代原 display:none） */
@media (max-width: 520px) {
    .site-nav-links {
        display: flex;
        gap: 2px;
        margin-left: auto;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .site-nav-links::-webkit-scrollbar { display: none; }
    .site-nav-links a { padding: 8px 10px; font-size: 0.82em; flex: 0 0 auto; }
    /* 窄屏收起品牌文字，让 4 个导航入口全部可见（品牌标识保留圆点） */
    .site-nav-brand .brand-text { display: none; }
    .site-nav-inner { gap: 8px; }
}
@media (min-width: 521px) and (max-width: 768px) {
    .site-nav-links a { padding: 8px 10px; font-size: 0.86em; }
}

/* 5) 视觉细节打磨（轻量，不改变既有设计语言） */
.analysis-grid .lottery-type:hover { border-color: rgba(67,97,238,0.28); }
.analysis-grid .lottery-type.card-new:hover { border-color: rgba(217,32,39,0.60); }
.section-header::after { width: 72px; height: 3px; border-radius: 3px; }
.hero-badge { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

