/* 加拿大28 - 蓝黑金白 · 科技尊贵风主题 */
:root {
    /* 背景层级 - 深蓝黑 */
    --bg-primary: #030712;
    --bg-secondary: #0a101f;
    --bg-elevated: #0f172a;
    --bg-card: rgba(12, 20, 40, 0.82);
    --bg-card-hover: rgba(18, 30, 58, 0.92);
    --bg-glass: rgba(15, 23, 42, 0.65);

    /* 尊贵金 */
    --gold: #c9a227;
    --gold-light: #f5d78e;
    --gold-dark: #92700c;
    --gold-glow: rgba(201, 162, 39, 0.4);

    /* 科技蓝 */
    --blue: #2563eb;
    --blue-light: #60a5fa;
    --blue-dark: #1e3a8a;
    --blue-glow: rgba(37, 99, 235, 0.35);
    --cyan: #22d3ee;

    /* 白 */
    --white: #ffffff;
    --white-soft: #f1f5f9;
    --white-muted: #cbd5e1;

    /* 文字 */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* 边框 */
    --border: rgba(96, 165, 250, 0.12);
    --border-gold: rgba(201, 162, 39, 0.22);
    --border-blue: rgba(37, 99, 235, 0.25);

    /* 语义色 */
    --accent-big: #f87171;
    --accent-small: #60a5fa;
    --accent-odd: #f5d78e;
    --accent-even: #34d399;
    --accent-extreme: #a78bfa;
    --accent-danger: #ef4444;
    --accent-success: #22c55e;

    /* 布局 */
    --radius: 10px;
    --radius-lg: 14px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    --shadow-gold: 0 4px 24px rgba(201, 162, 39, 0.15);
    --shadow-blue: 0 4px 24px rgba(37, 99, 235, 0.12);
    --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(37, 99, 235, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(201, 162, 39, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 0% 80%, rgba(37, 99, 235, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(96, 165, 250, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(96, 165, 250, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 70%);
}

a { color: var(--gold-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--white); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; position: relative; z-index: 1; }

/* ===== Header ===== */
.site-header {
    background: linear-gradient(180deg, rgba(10, 16, 31, 0.97) 0%, rgba(8, 12, 24, 0.95) 100%);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--blue-light), var(--gold), transparent);
    opacity: 0.5;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
}

.logo a {
    font-size: 1.15rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--blue-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1.5px;
    text-shadow: none;
}

.main-nav { display: flex; gap: 4px; }

.main-nav a {
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: all var(--transition);
    border: 1px solid transparent;
}

.main-nav a:hover {
    color: var(--white-soft);
    background: rgba(37, 99, 235, 0.12);
    border-color: var(--border-blue);
}

.main-nav a.active {
    color: var(--gold-light);
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.12), rgba(37, 99, 235, 0.08));
    border-color: var(--border-gold);
    box-shadow: var(--shadow-gold);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--blue-light));
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 1px;
}

/* ===== Main ===== */
.site-main { padding: 24px 0 48px; min-height: calc(100vh - 160px); position: relative; z-index: 1; }

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.35), rgba(96, 165, 250, 0.25), transparent);
}

.card:hover {
    border-color: rgba(96, 165, 250, 0.2);
    box-shadow: var(--shadow), var(--shadow-blue);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h2, .card h2, .card h3 {
    color: var(--gold-light);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
    padding-left: 12px;
}

.section-header h2::before, .card h2::before, .card h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 70%;
    background: linear-gradient(180deg, var(--gold), var(--blue-light));
    border-radius: 2px;
}

.more-link { font-size: 0.85rem; color: var(--blue-light); }
.more-link:hover { color: var(--gold-light); }

/* ===== Current Draw ===== */
.current-draw { text-align: center; }

.draw-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.page-heading {
    color: var(--white-soft);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.draw-period { color: var(--text-secondary); font-size: 0.95rem; }
.draw-period strong {
    color: var(--gold-light);
    font-size: 1.25rem;
    font-weight: 700;
    text-shadow: 0 0 20px var(--gold-glow);
}

.balls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--gold-dark) 0%, var(--gold) 45%, var(--gold-light) 100%);
    color: #0a0e1a;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 4px 16px var(--gold-glow), inset 0 1px 0 rgba(255,255,255,0.3);
    border: 2px solid rgba(255, 255, 255, 0.15);
    position: relative;
}

.balls-lg .ball { width: 54px; height: 54px; font-size: 1.35rem; }

.result-ball {
    background: linear-gradient(145deg, #991b1b 0%, #dc2626 50%, #f87171 100%);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.45), inset 0 1px 0 rgba(255,255,255,0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.plus, .equals {
    color: var(--blue-light);
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.8;
}

.draw-tags { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

.tag {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(201, 162, 39, 0.1);
    color: var(--gold-light);
    border: 1px solid var(--border-gold);
    backdrop-filter: blur(4px);
}

.tag-big { background: rgba(248, 113, 113, 0.12); color: var(--accent-big); border-color: rgba(248, 113, 113, 0.3); }
.tag-small { background: rgba(96, 165, 250, 0.12); color: var(--accent-small); border-color: rgba(96, 165, 250, 0.3); }
.tag-odd { background: rgba(245, 215, 142, 0.12); color: var(--accent-odd); border-color: rgba(245, 215, 142, 0.3); }
.tag-even { background: rgba(52, 211, 153, 0.12); color: var(--accent-even); border-color: rgba(52, 211, 153, 0.3); }
.tag-extreme { background: rgba(167, 139, 250, 0.12); color: var(--accent-extreme); border-color: rgba(167, 139, 250, 0.3); }

.tag-sm { padding: 2px 8px; font-size: 0.75rem; }

.draw-time { color: var(--text-muted); font-size: 0.85rem; }

/* ===== Countdown ===== */
.countdown-box {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(201, 162, 39, 0.06) 100%);
    border: 1px solid var(--border-blue);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.countdown-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.05), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.countdown-label { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 8px; position: relative; }
.countdown-label span { color: var(--gold-light); font-weight: 700; }

.countdown-timer {
    font-size: 2.4rem;
    font-weight: 800;
    font-family: 'Courier New', 'Consolas', monospace;
    background: linear-gradient(135deg, var(--white-soft) 0%, var(--gold-light) 50%, var(--blue-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-variant-numeric: tabular-nums;
    letter-spacing: 4px;
    position: relative;
    filter: drop-shadow(0 0 12px var(--gold-glow));
}

/* ===== Tables ===== */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table th {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.15) 0%, rgba(201, 162, 39, 0.08) 100%);
    color: var(--gold-light);
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-gold);
    letter-spacing: 0.3px;
}

.data-table td {
    padding: 11px 8px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    transition: background var(--transition);
}

.data-table tbody tr:hover { background: var(--bg-card-hover); }
.data-table tbody tr:hover td { color: var(--white-soft); }

.data-table .nums { font-family: 'Courier New', 'Consolas', monospace; color: var(--blue-light); font-weight: 600; }
.result-num { color: var(--accent-big); font-weight: 700; text-shadow: 0 0 8px rgba(248, 113, 113, 0.3); }
.time-col { color: var(--text-muted); white-space: nowrap; }
.no-data { text-align: center; color: var(--text-muted); padding: 36px !important; }

/* ===== Ads ===== */
.ad-banner, .ad-global-top, .ad-footer { margin-bottom: 16px; text-align: center; }
.ad-banner img, .ad-global-top img, .ad-footer img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.ad-global-top { margin-bottom: 0; }

/* ===== Stats ===== */
.stat-summary { color: var(--text-muted); font-size: 0.85rem; }

.stat-grid { display: grid; gap: 14px; }
.stat-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stat-grid-4 { grid-template-columns: repeat(4, 1fr); }

.stat-item { display: flex; align-items: center; gap: 12px; }
.stat-label { width: 30px; font-weight: 700; text-align: center; }
.stat-bar-wrap {
    flex: 1;
    height: 10px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.stat-bar { height: 100%; border-radius: 5px; transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.stat-value { width: 110px; text-align: right; font-size: 0.8rem; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

.stat-color-big { color: var(--accent-big); }
.stat-color-small { color: var(--accent-small); }
.stat-color-odd { color: var(--accent-odd); }
.stat-color-even { color: var(--accent-even); }
.stat-bar-big { background: linear-gradient(90deg, #991b1b, var(--accent-big)); }
.stat-bar-small { background: linear-gradient(90deg, var(--blue-dark), var(--accent-small)); }
.stat-bar-odd { background: linear-gradient(90deg, var(--gold-dark), var(--accent-odd)); }
.stat-bar-even { background: linear-gradient(90deg, #065f46, var(--accent-even)); }

.stat-box {
    text-align: center;
    padding: 18px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(12, 20, 40, 0.7));
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.stat-box:hover {
    border-color: var(--border-gold);
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}

.stat-box-label { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 6px; }
.stat-box-value { font-size: 1.6rem; font-weight: 800; color: var(--gold-light); text-shadow: 0 0 16px var(--gold-glow); }
.stat-box-pct { font-size: 0.8rem; color: var(--blue-light); }

.highlight { color: var(--accent-big); font-weight: 600; }

/* ===== Trend Matrix ===== */
.trend-matrix-wrap { overflow-x: auto; }
.trend-matrix { border-collapse: collapse; font-size: 0.7rem; }
.trend-matrix th, .trend-matrix td {
    width: 22px; height: 22px;
    text-align: center;
    border: 1px solid var(--border);
    padding: 0;
}
.trend-matrix th {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.12), rgba(201, 162, 39, 0.06));
    color: var(--gold-light);
    font-size: 0.65rem;
}
.trend-matrix .period-col { width: 50px; color: var(--text-muted); font-size: 0.65rem; }
.trend-matrix .hit {
    background: linear-gradient(135deg, var(--blue-dark), var(--blue));
    color: var(--white);
    font-weight: 700;
    border-radius: 2px;
    box-shadow: 0 0 6px var(--blue-glow);
}

.chart-wrap {
    padding: 10px 0;
    background: rgba(8, 12, 24, 0.5);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.chart-wrap canvas { width: 100% !important; }

/* ===== Detail ===== */
.detail-card { max-width: 700px; margin: 0 auto; }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--gold-light); }
.breadcrumb .sep { color: var(--blue-light); opacity: 0.5; }

.detail-header { text-align: center; margin-bottom: 24px; }
.detail-header h1 {
    background: linear-gradient(135deg, var(--white-soft), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.detail-subtitle { color: var(--text-secondary); font-size: 1rem; margin-bottom: 6px; }
.detail-result { margin-bottom: 24px; }

.seo-content {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.seo-content h2 {
    color: var(--gold-light);
    font-size: 1rem;
    font-weight: 600;
    margin: 16px 0 10px;
    padding-left: 10px;
    border-left: 3px solid var(--blue);
}

.seo-content h2:first-child { margin-top: 0; }

.seo-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.85;
    margin-bottom: 10px;
}

.seo-content a { color: var(--blue-light); text-decoration: underline; }
.seo-content a:hover { color: var(--gold-light); }
.seo-content strong { color: var(--white-soft); }

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(12, 20, 40, 0.6));
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: border-color var(--transition);
}

.detail-item:hover { border-color: var(--border-blue); }

.detail-label { color: var(--text-muted); font-size: 0.85rem; }
.detail-value { font-weight: 600; color: var(--white-soft); }
.detail-value small { color: var(--text-muted); font-weight: 400; }

.detail-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

/* ===== Play page ===== */
.play-content { line-height: 1.85; color: var(--text-primary); }
.play-content h3 { color: var(--gold-light); margin: 20px 0 10px; font-size: 1rem; }
.play-content p { margin-bottom: 10px; color: var(--text-secondary); }
.play-item { padding-left: 14px; border-left: 3px solid var(--blue); }

.card-inner {
    margin-top: 24px;
    background: rgba(12, 20, 40, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 12px; }
.rule-box {
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.rule-box:hover { border-color: var(--border-gold); box-shadow: var(--shadow-gold); }
.rule-box h4 { color: var(--gold-light); margin-bottom: 6px; font-size: 0.9rem; }
.rule-box p { font-size: 0.85rem; color: var(--text-secondary); }
.rule-box strong { color: var(--blue-light); }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.page-btn {
    padding: 7px 15px;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.8);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    transition: all var(--transition);
}
.page-btn:hover, .page-btn.active {
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.15), rgba(37, 99, 235, 0.1));
    color: var(--gold-light);
    border-color: var(--border-gold);
    box-shadow: var(--shadow-gold);
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 50%, var(--gold-light) 100%);
    color: #0a0e1a;
    box-shadow: 0 4px 16px var(--gold-glow);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    box-shadow: 0 6px 24px var(--gold-glow);
    transform: translateY(-1px);
    color: #0a0e1a;
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.8);
    color: var(--text-primary);
    border: 1px solid var(--border-blue);
}
.btn-secondary:hover {
    border-color: var(--gold);
    color: var(--gold-light);
    background: rgba(37, 99, 235, 0.1);
}

.btn-block { display: block; width: 100%; }

/* ===== Footer ===== */
.site-footer {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-top: 1px solid var(--border);
    padding: 28px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--blue-light), transparent);
    opacity: 0.35;
}

/* ===== CS Float ===== */
.cs-float {
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 50%, var(--cyan) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: 0 6px 24px var(--blue-glow), 0 0 0 2px rgba(201, 162, 39, 0.3);
    z-index: 99;
    transition: transform var(--transition), box-shadow var(--transition);
}
.cs-float:hover {
    transform: scale(1.08);
    color: var(--white);
    box-shadow: 0 8px 32px var(--blue-glow), 0 0 0 3px rgba(201, 162, 39, 0.5);
}

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--text-secondary); font-size: 0.85rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 11px 14px;
    background: rgba(8, 12, 24, 0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--blue-light);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.hint { color: var(--text-muted); font-size: 0.8rem; margin-top: 4px; display: block; }

.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 0.9rem; }
.alert-error { background: rgba(239, 68, 68, 0.12); color: var(--accent-danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.alert-success { background: rgba(34, 197, 94, 0.12); color: var(--accent-success); border: 1px solid rgba(34, 197, 94, 0.3); }

.period-filter { display: flex; align-items: center; gap: 8px; }
.period-filter select {
    padding: 7px 12px;
    background: rgba(8, 12, 24, 0.8);
    border: 1px solid var(--border-blue);
    border-radius: var(--radius);
    color: var(--text-primary);
}

/* ===== Admin ===== */
.admin-body { background: var(--bg-primary); }

.admin-layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

.admin-sidebar {
    width: 230px;
    background: linear-gradient(180deg, rgba(10, 16, 31, 0.98) 0%, rgba(8, 12, 24, 0.95) 100%);
    border-right: 1px solid var(--border);
    padding: 20px 0;
    flex-shrink: 0;
    backdrop-filter: blur(12px);
}

.admin-brand {
    padding: 0 20px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-light), var(--blue-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.admin-sidebar nav a {
    display: block;
    padding: 11px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.admin-sidebar nav a:hover, .admin-sidebar nav a.active {
    color: var(--gold-light);
    background: linear-gradient(90deg, rgba(201, 162, 39, 0.08), transparent);
    border-left-color: var(--gold);
}

.admin-main { flex: 1; padding: 28px; overflow-x: auto; }
.admin-main h2 {
    color: var(--gold-light);
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    text-align: center;
    backdrop-filter: blur(8px);
    transition: all var(--transition);
}
.admin-stat-card:hover { border-color: var(--border-gold); box-shadow: var(--shadow-gold); }
.admin-stat-card .stat-num { font-size: 1.9rem; font-weight: 800; color: var(--gold-light); text-shadow: 0 0 16px var(--gold-glow); }
.admin-stat-card .stat-label { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }

.admin-form { max-width: 600px; }
.code-block {
    display: block;
    padding: 14px;
    background: rgba(8, 12, 24, 0.8);
    border: 1px solid var(--border-blue);
    border-radius: var(--radius);
    font-size: 0.8rem;
    color: var(--blue-light);
    word-break: break-all;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
}

.ad-preview, .ad-thumb { max-width: 200px; max-height: 80px; border-radius: 4px; margin-top: 8px; border: 1px solid var(--border); }
.ad-thumb { max-width: 120px; max-height: 50px; }
.action-col a { margin-right: 8px; font-size: 0.85rem; }

/* ===== Login / Install ===== */
.admin-login-page, .install-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(37, 99, 235, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse 40% 30% at 80% 80%, rgba(201, 162, 39, 0.08) 0%, transparent 50%),
        var(--bg-primary);
    position: relative;
}

.login-box, .install-box {
    width: 100%;
    max-width: 400px;
    padding: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow), var(--shadow-blue);
    backdrop-filter: blur(16px);
    position: relative;
    z-index: 1;
}

.login-box::before, .install-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--blue), var(--gold), var(--blue-light));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.login-box h1, .install-box h1 {
    text-align: center;
    background: linear-gradient(135deg, var(--white-soft), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 28px;
    font-size: 1.35rem;
    letter-spacing: 1px;
}

.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row input { flex: 1; }
.captcha-code {
    display: inline-block;
    padding: 10px 16px;
    background: rgba(8, 12, 24, 0.9);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    color: var(--gold-light);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 6px;
    user-select: none;
    font-family: 'Courier New', monospace;
}

/* Install helpers */
.missing-list {
    text-align: left;
    background: rgba(12, 20, 40, 0.8);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius);
    padding: 16px;
    margin: 16px 0;
}
.missing-list h3 { color: var(--accent-danger); font-size: 0.95rem; margin-bottom: 10px; }
.missing-list li { color: var(--accent-odd); font-family: monospace; font-size: 0.85rem; padding: 3px 0; }
.file-ok {
    color: var(--accent-success);
    text-align: left;
    background: rgba(12, 20, 40, 0.8);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-toggle { display: block; }

    .main-nav {
        display: none;
        position: absolute;
        top: 58px;
        left: 0;
        right: 0;
        background: rgba(10, 16, 31, 0.98);
        flex-direction: column;
        padding: 10px;
        border-bottom: 1px solid var(--border);
        backdrop-filter: blur(16px);
    }

    .main-nav.open { display: flex; }

    .ball { width: 40px; height: 40px; font-size: 1rem; }
    .countdown-timer { font-size: 1.8rem; letter-spacing: 2px; }

    .stat-grid-3, .stat-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .detail-grid { grid-template-columns: 1fr; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; }
    .admin-stats { grid-template-columns: 1fr; }

    .data-table { font-size: 0.78rem; }
    .data-table th, .data-table td { padding: 8px 4px; }
}

@media (max-width: 480px) {
    .stat-grid-3, .stat-grid-4 { grid-template-columns: 1fr; }
    .detail-nav { flex-direction: column; }
    .card { padding: 18px; }
}
