/* ============================================================
 * 彩票工具网站 - 主样式 v2 (红金质感 + 深色模式)
 * ============================================================ */

:root {
    --c-primary: #d32f2f;
    --c-primary-2: #ff5252;
    --c-primary-3: #b71c1c;
    --c-gold: #f5a623;
    --c-gold-2: #ffc857;

    --c-success: #16a34a;
    --c-info: #0ea5e9;
    --c-warning: #f59e0b;
    --c-danger: #dc2626;

    --c-bg: #f5f7fb;
    --c-bg-elev: #ffffff;
    --c-card: #ffffff;
    --c-card-2: #fafbfd;
    --c-text: #1f2937;
    --c-text-2: #4b5563;
    --c-muted: #6b7280;
    --c-border: #e5e7eb;
    --c-border-2: #eef0f4;

    --c-red-1: #ff6b6b;
    --c-red-2: #c62828;
    --c-blue-1: #5dade2;
    --c-blue-2: #1565c0;
    --c-green-1: #4ade80;
    --c-green-2: #15803d;
    --c-purple-1: #a78bfa;
    --c-purple-2: #6d28d9;
    --c-orange-1: #fb923c;
    --c-orange-2: #c2410c;

    --c-red-ball: linear-gradient(135deg, #ff7373 0%, #d32f2f 50%, #8b0000 100%);
    --c-blue-ball: linear-gradient(135deg, #5dade2 0%, #1976d2 50%, #0d3a72 100%);
    --c-green-ball: linear-gradient(135deg, #4ade80 0%, #16a34a 50%, #14532d 100%);

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12), 0 4px 8px rgba(15, 23, 42, 0.06);
    --shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.18);
    --shadow-red: 0 8px 24px rgba(211, 47, 47, 0.18);
    --shadow-gold: 0 0 0 3px rgba(245, 166, 35, 0.4), 0 0 16px rgba(245, 166, 35, 0.5);

    --r-xs: 4px;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 24px;
    --r-pill: 999px;

    --t-fast: 0.15s ease;
    --t-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    --f-display: 2.5rem;
    --f-h1: 1.875rem;
    --f-h2: 1.5rem;
    --f-h3: 1.25rem;
    --f-body: 0.9375rem;

    --grad-primary: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    --grad-gold: linear-gradient(135deg, #ffc857 0%, #f5a623 100%);
    --grad-red-gold: linear-gradient(135deg, #d32f2f 0%, #f5a623 100%);
    --grad-night: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);

    --container-max: 1200px;
}

[data-bs-theme="dark"] {
    --c-bg: #0b0f1a;
    --c-bg-elev: #131826;
    --c-card: #131826;
    --c-card-2: #1a2030;
    --c-text: #e5e7eb;
    --c-text-2: #cbd5e1;
    --c-muted: #94a3b8;
    --c-border: #1f2937;
    --c-border-2: #1a2030;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6), 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-red: 0 8px 24px rgba(211, 47, 47, 0.35);
}

/* ============================================================
 * 全局
 * ============================================================ */
* { -webkit-tap-highlight-color: transparent; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
                 "Microsoft YaHei", "微软雅黑", "Helvetica Neue", sans-serif;
    background-color: var(--c-bg);
    color: var(--c-text);
    transition: background-color var(--t-base), color var(--t-base);
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }
a:hover { text-decoration: none; }

::selection { background: var(--c-primary); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(120, 120, 140, 0.35); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(120, 120, 140, 0.55); }

/* 焦点环统一 */
:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================================
 * 导航栏
 * ============================================================ */
.navbar-brand {
    font-size: 1.35rem;
    font-weight: 800;
    background: var(--grad-red-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.navbar-brand i { -webkit-text-fill-color: var(--c-primary); margin-right: 4px; }

.navbar {  }

.navbar.bg-white {
    background: var(--c-bg-elev) !important;
    box-shadow: var(--shadow-sm);
}

[data-bs-theme="dark"] .navbar.bg-white { background: rgba(19, 24, 38, 0.85) !important; backdrop-filter: blur(12px); }

.nav-link {
    font-weight: 500;
    color: var(--c-text-2) !important;
    padding: 0.5rem 0.9rem !important;
    border-radius: var(--r-sm);
    transition: all var(--t-fast);
    position: relative;
}
.nav-link:hover { color: var(--c-primary) !important; background: rgba(211, 47, 47, 0.06); }
.nav-link.active { color: var(--c-primary) !important; }

.theme-toggle {
    width: 38px; height: 38px;
    border-radius: var(--r-pill);
    border: 1px solid var(--c-border);
    background: var(--c-card-2);
    color: var(--c-text-2);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all var(--t-fast);
}
.theme-toggle:hover { color: var(--c-primary); border-color: var(--c-primary); transform: rotate(15deg); }

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline-block; }
[data-bs-theme="dark"] .theme-toggle .icon-sun { display: inline-block; }
[data-bs-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ============================================================
 * 球号
 * ============================================================ */
.lottery-balls {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    background: var(--c-red-ball);
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.5),
        inset 0 -3px 6px rgba(0, 0, 0, 0.25),
        0 2px 6px rgba(0, 0, 0, 0.15);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    transition: transform var(--t-fast);
    position: relative;
}

.ball::after {
    content: '';
    position: absolute;
    top: 5px; left: 7px;
    width: 8px; height: 8px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

.ball-red  { background: var(--c-red-ball); }
.ball-blue { background: var(--c-blue-ball); }
.ball-green { background: var(--c-green-ball); }
.ball-sep  {
    font-size: 20px; font-weight: 700;
    color: var(--c-muted);
    margin: 0 4px;
    align-self: center;
    text-shadow: none;
}

.ball-sm  { width: 28px; height: 28px; font-size: 11px; }
.ball-sm::after { width: 5px; height: 5px; top: 4px; left: 5px; }

.ball-lg  { width: 52px; height: 52px; font-size: 20px; }
.ball-lg::after { width: 12px; height: 12px; top: 6px; left: 9px; }

.ball-xl  { width: 64px; height: 64px; font-size: 24px; }
.ball-xl::after { width: 16px; height: 16px; top: 7px; left: 11px; }

.lottery-balls.is-hoverable .ball { cursor: pointer; }
.lottery-balls.is-hoverable .ball:hover { transform: translateY(-2px) scale(1.06); }

.ball-prize {
    box-shadow: var(--shadow-gold);
    animation: prize-pulse 1.6s ease-in-out infinite;
}

@keyframes prize-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.45), 0 0 16px rgba(245, 166, 35, 0.5); }
    50%      { box-shadow: 0 0 0 5px rgba(245, 166, 35, 0.65), 0 0 24px rgba(245, 166, 35, 0.7); }
}

/* ============================================================
 * 通用卡片
 * ============================================================ */
.card {
    background: var(--c-card);
    border-color: var(--c-border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-xs);
    transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}

.card-header, .card-footer {
    background: var(--c-card-2);
    border-color: var(--c-border-2);
}

.draw-card {
    border: 1px solid var(--c-border-2);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    position: relative;
}
.draw-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--grad-red-gold);
    opacity: 0.85;
}
.draw-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(211, 47, 47, 0.3);
}
.draw-card .card-header {
    background: var(--c-card-2);
    color: var(--c-text);
    border-bottom: 1px solid var(--c-border-2);
    padding: 0.75rem 1rem;
}
.draw-card .card-header .lottery-name {
    font-weight: 700;
    color: var(--c-text);
}
.draw-card .card-header .issue-no {
    font-size: 0.8rem;
    color: var(--c-muted);
    background: var(--c-card);
    padding: 2px 8px;
    border-radius: var(--r-pill);
    border: 1px solid var(--c-border-2);
}

/* ============================================================
 * 资讯卡
 * ============================================================ */
.news-card {
    border: 1px solid var(--c-border-2);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    background: var(--c-card);
    transition: all var(--t-base);
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(211, 47, 47, 0.25);
}
.news-card .card-img-top { height: 180px; object-fit: cover; transition: transform var(--t-slow); }
.news-card:hover .card-img-top { transform: scale(1.05); }
.news-card .card-img-wrapper { overflow: hidden; position: relative; }
.news-card .news-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    font-size: 0.75rem;
    backdrop-filter: blur(4px);
    z-index: 2;
}
.news-card .news-meta {
    color: var(--c-muted);
    font-size: 0.8rem;
}
.news-card .card-title a {
    color: var(--c-text);
    font-weight: 600;
    transition: color var(--t-fast);
}
.news-card .card-title a:hover {
    color: var(--c-primary);
}
.news-content img { max-width: 100%; height: auto; border-radius: var(--r-sm); }

/* ============================================================
 * 统计卡
 * ============================================================ */
.stat-card {
    text-align: center;
    padding: 1.25rem;
    border-radius: var(--r-lg);
    border: 1px solid var(--c-border-2);
    background: var(--c-card);
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
    transition: all var(--t-base);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card .stat-icon {
    position: absolute;
    top: 12px; right: 12px;
    width: 36px; height: 36px;
    border-radius: var(--r-sm);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1rem;
    opacity: 0.9;
}
.stat-card .stat-num {
    font-size: 1.875rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 4px;
    background-clip: text;
    -webkit-background-clip: text;
}
.stat-card .stat-label {
    font-size: 0.825rem;
    color: var(--c-muted);
}
.stat-card .stat-trend {
    font-size: 0.75rem;
    margin-top: 4px;
}
.stat-card.is-primary { border-top: 3px solid var(--c-primary); }
.stat-card.is-primary .stat-num { background-image: var(--grad-primary); -webkit-text-fill-color: transparent; }
.stat-card.is-primary .stat-icon { background: rgba(211, 47, 47, 0.1); color: var(--c-primary); }

.stat-card.is-gold    { border-top: 3px solid var(--c-gold); }
.stat-card.is-gold .stat-num { background-image: var(--grad-gold); -webkit-text-fill-color: transparent; }
.stat-card.is-gold .stat-icon { background: rgba(245, 166, 35, 0.12); color: var(--c-gold); }

.stat-card.is-success { border-top: 3px solid var(--c-success); }
.stat-card.is-success .stat-num { color: var(--c-success); }
.stat-card.is-success .stat-icon { background: rgba(22, 163, 74, 0.1); color: var(--c-success); }

.stat-card.is-info    { border-top: 3px solid var(--c-info); }
.stat-card.is-info .stat-num { color: var(--c-info); }
.stat-card.is-info .stat-icon { background: rgba(14, 165, 233, 0.1); color: var(--c-info); }

/* sparkline */
.sparkline { display: block; width: 100%; height: 32px; margin-top: 6px; }

/* ============================================================
 * Hero 区
 * ============================================================ */
.hero {
    position: relative;
    background:
        radial-gradient(ellipse at top left, rgba(245, 166, 35, 0.35), transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(211, 47, 47, 0.4), transparent 55%),
        linear-gradient(135deg, #2c0b0e 0%, #5a0e14 50%, #1a0b1f 100%);
    color: #fff;
    border-radius: var(--r-xl);
    padding: 2.5rem 2rem 2rem;
    overflow: hidden;
    margin-top: 0.5rem;
    box-shadow: var(--shadow-red);
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 60%; height: 200%;
    background:
        radial-gradient(circle, rgba(255, 200, 87, 0.15) 0%, transparent 60%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.06) 1px, transparent 0);
    background-size: 28px 28px;
    pointer-events: none;
    opacity: 0.5;
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, #ffc857 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero .lead { color: rgba(255, 255, 255, 0.85); max-width: 540px; }
.hero .hero-search {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--r-pill);
    padding: 4px;
    box-shadow: var(--shadow-md);
    max-width: 520px;
}
.hero .hero-search .form-control {
    border: none;
    background: transparent;
    box-shadow: none !important;
    color: var(--c-text);
}
.hero .hero-search .form-control::placeholder { color: var(--c-muted); }
.hero .hero-search .btn {
    border-radius: var(--r-pill);
    padding: 0.45rem 1.25rem;
    background: var(--grad-primary);
    color: #fff;
    border: none;
    font-weight: 600;
    box-shadow: var(--shadow-red);
}
.hero .hero-search .btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(211, 47, 47, 0.4); }
.hero .hero-quick {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-top: 1rem;
}
.hero .hero-quick a {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: var(--r-pill);
    font-size: 0.825rem;
    backdrop-filter: blur(4px);
    transition: all var(--t-fast);
}
.hero .hero-quick a:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: rgba(255, 200, 87, 0.6);
}

.hero-floating-balls {
    position: absolute;
    right: 5%; top: 50%;
    transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 12px;
    z-index: 1;
    opacity: 0.85;
}
.hero-floating-balls .ball { animation: float-y 4s ease-in-out infinite; }
.hero-floating-balls .ball:nth-child(2) { animation-delay: 0.4s; }
.hero-floating-balls .ball:nth-child(3) { animation-delay: 0.8s; }
.hero-floating-balls .ball:nth-child(4) { animation-delay: 1.2s; }
@keyframes float-y {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@media (max-width: 768px) { .hero-floating-balls { display: none; } }

/* ============================================================
 * 彩种入口网格
 * ============================================================ */
.lottery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.lottery-tile {
    position: relative;
    display: block;
    padding: 1.25rem 1rem;
    border-radius: var(--r-lg);
    color: #fff;
    overflow: hidden;
    text-align: center;
    transition: all var(--t-base);
    box-shadow: var(--shadow-sm);
    isolation: isolate;
}
.lottery-tile::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--tile-bg, var(--grad-primary));
    z-index: -1;
    transition: transform var(--t-slow);
}
.lottery-tile::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.25), transparent 50%);
    z-index: -1;
}
.lottery-tile:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg);
}
.lottery-tile:hover::before { transform: scale(1.08); }
.lottery-tile .lt-name { font-weight: 700; font-size: 1.05rem; }
.lottery-tile .lt-sub  { font-size: 0.75rem; opacity: 0.85; margin-top: 2px; }
.lottery-tile .lt-icon { font-size: 1.75rem; margin-bottom: 6px; display: block; }

.lottery-tile.t-ssq  { --tile-bg: linear-gradient(135deg, #d32f2f, #8b0000); }
.lottery-tile.t-dlt  { --tile-bg: linear-gradient(135deg, #1565c0, #0d2552); }
.lottery-tile.t-qlc  { --tile-bg: linear-gradient(135deg, #16a34a, #14532d); }
.lottery-tile.t-fc3d { --tile-bg: linear-gradient(135deg, #f59e0b, #b45309); }
.lottery-tile.t-pls  { --tile-bg: linear-gradient(135deg, #a78bfa, #6d28d9); }
.lottery-tile.t-plw  { --tile-bg: linear-gradient(135deg, #0ea5e9, #0c4a6e); }

/* ============================================================
 * 横滑开奖列表
 * ============================================================ */
.scroll-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 2px 12px;
    margin: 0 -2px;
    scrollbar-width: thin;
}
.scroll-row > * { flex: 0 0 280px; scroll-snap-align: start; }
.scroll-row::-webkit-scrollbar { height: 6px; }
.scroll-row::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 3px; }
.scroll-row::-webkit-scrollbar-thumb:hover { background: var(--c-muted); }

@media (max-width: 576px) { .scroll-row > * { flex-basis: 86vw; } }

/* ============================================================
 * 走势图容器
 * ============================================================ */
#trend-chart { width: 100%; height: 400px; }

/* ============================================================
 * OCR 拖拽上传
 * ============================================================ */
.ocr-dropzone {
    border: 2px dashed var(--c-border);
    border-radius: var(--r-lg);
    padding: 48px 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--t-base);
    background: var(--c-card-2);
    position: relative;
    overflow: hidden;
}
.ocr-dropzone:hover {
    border-color: var(--c-primary);
    background: rgba(211, 47, 47, 0.03);
}
.ocr-dropzone.dragover {
    border-color: var(--c-primary);
    background: rgba(211, 47, 47, 0.06);
    transform: scale(1.01);
}
.ocr-dropzone .icon {
    font-size: 3rem;
    color: var(--c-primary);
    margin-bottom: 8px;
    display: inline-block;
}

/* ============================================================
 * 彩票记录
 * ============================================================ */
.ticket-card {
    border-radius: var(--r-md);
    border: 1px solid var(--c-border-2);
    box-shadow: var(--shadow-xs);
    background: var(--c-card);
    transition: all var(--t-base);
}
.ticket-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.ticket-card.prize-card {
    border-left: 4px solid var(--c-success);
    background: linear-gradient(90deg, rgba(22, 163, 74, 0.04), var(--c-card) 30%);
}

/* ============================================================
 * 表单 / 按钮
 * ============================================================ */
.btn { font-weight: 500; border-radius: var(--r-sm); transition: all var(--t-fast); }
.btn-primary, .btn-danger {
    background: var(--grad-primary);
    border: none;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.18);
}
.btn-primary:hover, .btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(211, 47, 47, 0.28);
    background: var(--grad-primary);
    filter: brightness(1.05);
}
.btn-outline-danger { color: var(--c-primary); border-color: var(--c-primary); }
.btn-outline-danger:hover { background: var(--c-primary); border-color: var(--c-primary); }

.form-control, .form-select {
    background: var(--c-card);
    color: var(--c-text);
    border-color: var(--c-border);
    border-radius: var(--r-sm);
    transition: all var(--t-fast);
}
.form-control:focus, .form-select:focus {
    background: var(--c-card);
    color: var(--c-text);
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}

/* ============================================================
 * 后台
 * ============================================================ */
.admin-sidebar {
    min-height: calc(100vh - 56px);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    padding: 0;
}
.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
    padding: 10px 20px;
    font-size: 0.92rem;
    border-radius: 0;
    border-left: 3px solid transparent;
    margin: 2px 0;
    transition: all var(--t-fast);
}
.admin-sidebar .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.04);
    border-left-color: rgba(245, 166, 35, 0.5);
}
.admin-sidebar .nav-link.active {
    color: #fff !important;
    background: linear-gradient(90deg, rgba(211, 47, 47, 0.18), rgba(211, 47, 47, 0.04));
    border-left-color: var(--c-primary);
    font-weight: 600;
}
.admin-sidebar .nav-link i { color: rgba(255, 255, 255, 0.55); }
.admin-sidebar .nav-link:hover i, .admin-sidebar .nav-link.active i { color: var(--c-gold); }

.admin-sidebar .nav-header {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
    padding: 16px 20px 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}
.admin-content {
    background: var(--c-bg);
    min-height: calc(100vh - 56px);
    padding: 24px;
}

.admin-table {
    background: var(--c-card);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}
.admin-table table { margin: 0; }
.admin-table thead th {
    background: var(--c-card-2);
    color: var(--c-text-2);
    font-weight: 600;
    font-size: 0.825rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--c-border);
    padding: 12px 16px;
}
.admin-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--c-border-2);
    vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--c-card-2); }

/* ============================================================
 * Flash 消息
 * ============================================================ */
.alert { border-radius: var(--r-md); border: none; }
.alert-flash { position: relative; box-shadow: var(--shadow-sm); }
.alert-success { background: rgba(22, 163, 74, 0.1); color: var(--c-success); }
.alert-danger  { background: rgba(220, 38, 38, 0.1); color: var(--c-danger); }
.alert-warning { background: rgba(245, 158, 11, 0.1); color: var(--c-warning); }
.alert-info    { background: rgba(14, 165, 233, 0.1); color: var(--c-info); }

/* ============================================================
 * 分页（全状态美化 + 红金主题）
 * ============================================================ */
.pagination { gap: 6px; }
.pagination .page-item { margin: 0; }

/* 基础样式：所有页码链接 */
.pagination .page-link {
    color: var(--c-text-2);
    background-color: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    padding: 0.45rem 0.9rem;
    font-weight: 500;
    font-size: 0.9rem;
    min-width: 40px;
    text-align: center;
    transition: all var(--t-fast);
    line-height: 1.4;
}

/* 普通页码 hover */
.pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    color: var(--c-primary);
    background-color: rgba(211, 47, 47, 0.06);
    border-color: var(--c-primary);
}

/* 当前页 active */
.pagination .page-item.active .page-link {
    background-color: var(--c-primary);
    border-color: var(--c-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
    font-weight: 600;
    pointer-events: none;
}

/* 上一页 / 下一页 / 第一页 / 最后一页 */
.pagination .page-item:not(.active):not(.disabled) .page-link {
    color: var(--c-muted);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}
.pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    color: #fff;
    background-color: var(--c-primary);
    border-color: var(--c-primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(211, 47, 47, 0.25);
}

/* 禁用态（省略号 / 超出边界的上一页下一页） */
.pagination .page-item.disabled .page-link {
    color: var(--c-muted);
    background-color: var(--c-card-2);
    border-color: var(--c-border-2);
    pointer-events: none;
    opacity: 0.45;
}

/* 省略号样式 */
.pagination .page-item.disabled .page-link[data-page="..."],
.pagination .page-item.disabled .page-link[aria-disabled="true"] {
    letter-spacing: 3px;
    min-width: 32px;
    padding: 0.45rem 0.5rem;
}

/* ============================================================
 * 骨架屏
 * ============================================================ */
.skeleton {
    background: linear-gradient(90deg,
        var(--c-card-2) 25%,
        var(--c-border-2) 50%,
        var(--c-card-2) 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.4s ease-in-out infinite;
    border-radius: var(--r-sm);
    display: inline-block;
}
@keyframes skeleton-shine {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
 * 空状态
 * ============================================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--c-muted);
}
.empty-state .empty-icon {
    font-size: 3.5rem;
    color: var(--c-border);
    margin-bottom: 0.5rem;
    display: inline-block;
}
.empty-state .empty-title {
    font-weight: 600;
    color: var(--c-text-2);
    margin-bottom: 4px;
}

/* ============================================================
 * 登录注册
 * ============================================================ */
.auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(ellipse at top left, rgba(211, 47, 47, 0.08), transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(245, 166, 35, 0.06), transparent 50%);
}
.auth-card {
    border-radius: var(--r-xl);
    border: 1px solid var(--c-border-2);
    box-shadow: var(--shadow-lg);
    background: var(--c-card);
    overflow: hidden;
}
.auth-card .auth-side {
    background: var(--grad-red-gold);
    color: #fff;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}
.auth-card .auth-side::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.08) 1px, transparent 0);
    background-size: 24px 24px;
}
.auth-card .auth-side > * { position: relative; z-index: 1; }
.auth-card .auth-side .auth-brand { font-size: 1.5rem; font-weight: 800; }
.auth-card .auth-side .auth-quote { font-size: 0.95rem; opacity: 0.9; line-height: 1.6; }

/* ============================================================
 * 页脚
 * ============================================================ */
.site-footer {
    background: linear-gradient(180deg, #1f2937 0%, #0f172a 100%);
    color: rgba(255, 255, 255, 0.75);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}
.site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: var(--grad-red-gold);
}
.site-footer h6 { color: #fff; font-weight: 700; margin-bottom: 1rem; font-size: 0.95rem; }
.site-footer a { color: rgba(255, 255, 255, 0.65); transition: color var(--t-fast); }
.site-footer a:hover { color: var(--c-gold); text-decoration: none; }
.site-footer .footer-list { list-style: none; padding: 0; margin: 0; }
.site-footer .footer-list li { padding: 4px 0; font-size: 0.875rem; }
.site-footer .footer-divider { border-color: rgba(255, 255, 255, 0.08); margin: 1.5rem 0 1rem; }
.site-footer .copyright { color: rgba(255, 255, 255, 0.4); font-size: 0.8rem; }
.site-footer .disclaimer {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--r-sm);
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.825rem;
    line-height: 1.6;
}
.site-footer .disclaimer i { color: var(--c-warning); }

/* ============================================================
 * 通用动画
 * ============================================================ */
.fade-in-up { animation: fade-in-up 0.5s ease-out; }
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fade-in 0.4s ease-out; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
 * 响应式
 * ============================================================ */
@media (max-width: 768px) {
    .hero { padding: 2rem 1.5rem 1.75rem; border-radius: var(--r-lg); }
    .hero h1 { font-size: 1.5rem; }
    .lottery-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-card .stat-num { font-size: 1.5rem; }
}

@media (max-width: 576px) {
    .ball { width: 32px; height: 32px; font-size: 12px; }
    .ball::after { width: 6px; height: 6px; top: 4px; left: 5px; }
    #trend-chart { height: 280px; }
    .lottery-grid { grid-template-columns: 1fr 1fr; }
}
