/* 六合宝典 - 精简版前台样式（PC / 手机自适应） */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --lottery-bg: #f5f0eb;
    --lottery-page-bg: #ebe6e0;
    --lottery-shell-bg: #f5f0eb;
    --lottery-shell-shadow: 0 8px 32px rgba(0,0,0,.08);
    --lottery-header-bg: #3d2914;
    --lottery-header-text: #fff;
    --lottery-accent: #e67e22;
    --lottery-card-bg: #fff;
    --lottery-text: #222;
    --lottery-muted: #666;
    --lottery-shell-w: 720px;
    --lottery-ball-red: #e74c3c;
    --lottery-ball-blue: #3498db;
    --lottery-ball-green: #27ae60;
    --lottery-font-base: 16px;
    --lottery-font-lg: 18px;
    --lottery-font-md: 15px;
    --lottery-font-sm: 14px;
    --lottery-badge-recommend-color: #27ae60;
    --lottery-badge-recommend-border: #27ae60;
    --lottery-badge-recommend-bg: #f0fff4;
    --lottery-badge-recommend-glow: rgba(39, 174, 96, 0.45);
    --lottery-badge-invite-color: #d35400;
    --lottery-badge-invite-border: #f39c12;
    --lottery-badge-invite-bg: #fffbf0;
    --lottery-badge-invite-glow: rgba(243, 156, 18, 0.45);
    --lottery-zone-recommend-color: #2ecc71;
    --lottery-zone-invite-color: #e67e22;
}

body.lottery-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: var(--lottery-font-base);
    line-height: 1.42;
    background: var(--lottery-page-bg, var(--lottery-bg));
    color: var(--lottery-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body.lottery-lightbox-open { overflow: hidden; }

.lottery-shell {
    width: 100%;
    max-width: var(--lottery-shell-w);
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--lottery-shell-bg, var(--lottery-bg));
    box-shadow: var(--lottery-shell-shadow, 0 0 0 1px rgba(0,0,0,.04));
}

/* Header */
.lottery-header {
    background: var(--lottery-header-bg);
    color: var(--lottery-header-text);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}
.lottery-has-sticky-top .lottery-header { top: auto; }

.lottery-header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    min-height: 40px;
}
.lottery-header-antiloss {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1.3;
    background: rgba(0, 0, 0, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.lottery-header-antiloss-label {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    white-space: nowrap;
}
.lottery-header-antiloss-label::after {
    content: '：';
}
.lottery-header-antiloss-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    min-width: 0;
}
.lottery-header-antiloss-links a {
    color: var(--lottery-accent, #ffd700);
    text-decoration: none;
    white-space: nowrap;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    transition: background .15s, color .15s;
}
.lottery-header-antiloss-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}
.lottery-skin-light .lottery-header-antiloss {
    background: rgba(0, 0, 0, 0.04);
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
.lottery-skin-light .lottery-header-antiloss-label { color: #555; }
.lottery-skin-light .lottery-header-antiloss-links a {
    color: #c0392b;
    background: rgba(0, 0, 0, 0.04);
}
.lottery-brand {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
}
.lottery-brand a {
    color: inherit;
    text-decoration: none;
}

.lottery-type-tabs {
    display: flex;
    margin: 0 10px 6px;
    padding: 3px;
    background: rgba(255,255,255,.12);
    border-radius: 8px;
    gap: 3px;
}
.lottery-type-tab {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
    border-radius: 8px;
    transition: background .2s, color .2s, box-shadow .2s;
}
.lottery-type-tab.active {
    color: #fff;
    font-weight: 700;
    background: var(--lottery-accent);
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.lottery-type-tab.active::after {
    display: none;
}

.lottery-type-panel.is-switching {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.lottery-main-nav {
    display: none;
}

.lottery-result-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    font-size: var(--lottery-font-lg);
    font-weight: 700;
    color: var(--lottery-text);
}
.lottery-link-history {
    font-size: var(--lottery-font-md);
    font-weight: 600;
    color: var(--lottery-accent);
    text-decoration: none;
    padding: 3px 10px;
    border: 1px solid rgba(230,126,34,.35);
    border-radius: 12px;
    background: #fef5eb;
}
.lottery-link-history:hover {
    background: var(--lottery-accent);
    color: #fff;
    border-color: var(--lottery-accent);
}

.lottery-gallery-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.lottery-gallery-head h3 {
    font-size: var(--lottery-font-lg);
    font-weight: 700;
}
.lottery-gallery-period {
    font-size: var(--lottery-font-md);
    color: var(--lottery-muted);
}
.lottery-gallery-loading {
    font-size: var(--lottery-font-md);
    color: var(--lottery-muted);
}
.lottery-gallery-foot {
    text-align: center;
    padding: 8px 0 2px;
}
.lottery-gallery-loading.is-error {
    color: #e74c3c;
}

/* Main */
.lottery-main {
    flex: 1;
    width: 100%;
    padding: 0 0 12px;
}

.lottery-ad-slot {
    margin: 6px 10px 0;
    border-radius: 8px;
    overflow: hidden;
}
.lottery-ad-slot-sm { margin-top: 8px; }

.lottery-main .vod-ad,
.lottery-main .vod-ad-global {
    max-width: 100%;
    overflow: hidden;
}
.lottery-main .vod-ad-list_top .vod-ad-item {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 6px;
}
.lottery-main .vod-ad-list_top .vod-ad-item:last-child { margin-bottom: 0; }
.lottery-main .vod-ad-list_top .vod-ad-item img {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    display: block;
}
.lottery-main .vod-ad-list_bottom .vod-ad-item img {
    max-height: 36px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
}

/* Result Card */
.lottery-result-card,
.lottery-panel {
    background: var(--lottery-card-bg);
    margin: 6px 10px;
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.lottery-result-head,
.lottery-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 8px;
}
.lottery-result-head h2,
.lottery-panel-head h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--lottery-text);
}
.lottery-panel-sub {
    width: 100%;
    font-size: 12px;
    color: var(--lottery-muted);
    margin-top: -6px;
}
.lottery-stale-tag {
    font-size: 11px;
    color: #e74c3c;
    background: #fdecea;
    padding: 2px 6px;
    border-radius: 4px;
}

.lottery-balls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 4px 3px;
}
.lottery-balls-sm { gap: 6px 4px; }
.lottery-ball-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 46px;
}
.lottery-balls-sm .lottery-ball-wrap { width: 44px; }
.lottery-ball {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.lottery-balls-sm .lottery-ball { width: 36px; height: 36px; font-size: 13px; }
.lottery-ball-red { background: radial-gradient(circle at 35% 30%, #ff6b6b, var(--lottery-ball-red)); }
.lottery-ball-blue { background: radial-gradient(circle at 35% 30%, #74b9ff, var(--lottery-ball-blue)); }
.lottery-ball-green { background: radial-gradient(circle at 35% 30%, #55efc4, var(--lottery-ball-green)); }
.lottery-ball-special { box-shadow: 0 0 0 2px var(--lottery-accent); }
.lottery-ball-plus {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--lottery-muted);
    height: 42px;
    padding: 0 2px;
}
.lottery-balls-sm .lottery-ball-plus { height: 36px; }
.lottery-ball-meta {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-top: 2px;
    white-space: nowrap;
}
.lottery-meta-line {
    margin-top: 8px;
    font-size: var(--lottery-font-md);
    color: #555;
    text-align: center;
}

.lottery-empty {
    text-align: center;
    padding: 24px 0;
    color: var(--lottery-muted);
}
.lottery-empty-tip {
    font-size: 12px;
    margin-top: 8px;
    color: #aaa;
}
.lottery-refresh-btn {
    margin-top: 12px;
    padding: 8px 24px;
    background: var(--lottery-accent);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

/* History */
.lottery-page-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -2px 0 8px;
    padding: 8px 0 10px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 92px;
    z-index: 90;
    background: var(--lottery-card-bg);
}
.lottery-back-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: var(--lottery-font-md);
    font-weight: 700;
    color: var(--lottery-accent);
    text-decoration: none;
    border: 1px solid rgba(230,126,34,.45);
    border-radius: 16px;
    background: #fef5eb;
    white-space: nowrap;
}
.lottery-back-btn:hover {
    background: var(--lottery-accent);
    color: #fff;
    border-color: var(--lottery-accent);
}
.lottery-page-toolbar-title {
    flex: 1;
    min-width: 0;
    font-size: var(--lottery-font-md);
    font-weight: 600;
    color: var(--lottery-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lottery-history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lottery-history-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.lottery-history-item:last-child { border-bottom: none; padding-bottom: 0; }
.lottery-history-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: var(--lottery-font-md);
}
.lottery-history-period { font-weight: 700; }
.lottery-history-date { color: var(--lottery-muted); font-size: var(--lottery-font-sm); }

.lottery-link-back {
    font-size: var(--lottery-font-md);
    font-weight: 600;
    color: var(--lottery-accent);
    text-decoration: none;
}
.lottery-link-back:hover { text-decoration: underline; }

.lottery-pager {
    text-align: center;
    padding-top: 12px;
}
.lottery-pager-btn {
    display: inline-block;
    padding: 10px 28px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: var(--lottery-font-md);
    font-weight: 600;
    color: var(--lottery-text);
    cursor: pointer;
    font-family: inherit;
}
.lottery-pager-btn:disabled {
    color: var(--lottery-muted);
    cursor: default;
}

/* Gallery at page bottom */
.lottery-gallery-block {
    margin: 6px 10px;
    padding: 10px 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.lottery-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.lottery-gallery-card {
    display: block;
    margin: 0;
    background: #fafafa;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid #eee;
    transition: box-shadow .2s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.lottery-gallery-card-click {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.lottery-gallery-card-click:focus {
    outline: 2px solid var(--lottery-accent);
    outline-offset: 2px;
}
.lottery-gallery-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.lottery-gallery-card img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: top;
}
.lottery-gallery-caption {
    padding: 6px 8px;
    font-size: var(--lottery-font-md);
    font-weight: 600;
    color: var(--lottery-text);
    background: #fff;
    border-top: 1px solid #f0f0f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Lightbox */
.lottery-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 12px;
}
.lottery-lightbox.is-open { display: flex; }
.lottery-lightbox-mask {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.88);
}
.lottery-lightbox-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: min(96vw, 680px);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lottery-lightbox-close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}
.lottery-lightbox-img-wrap {
    width: 100%;
    max-height: calc(92vh - 56px);
    overflow: auto;
    background: #111;
    border-radius: 8px;
}
.lottery-lightbox-img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}
.lottery-lightbox-title {
    margin-top: 10px;
    color: #fff;
    font-size: var(--lottery-font-lg);
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    padding: 0 8px;
}

.lottery-gallery-html {
    padding: 8px;
    font-size: var(--lottery-font-sm);
    max-height: 200px;
    overflow: hidden;
}

/* Expert zone */
.lottery-expert-block {
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 6px;
}
.lottery-expert-zone-head {
    text-align: center;
    font-size: var(--lottery-font-lg);
    font-weight: 700;
    color: var(--lottery-zone-recommend-color, #2ecc71);
    padding: 6px 4px 4px;
    letter-spacing: 0;
    line-height: 1.3;
    animation: lottery-zone-blink-recommend 2.4s ease-in-out infinite;
    text-shadow: 0 0 0 transparent;
    transform-origin: center center;
}
.lottery-expert-zone-head-invite {
    color: var(--lottery-zone-invite-color, #e67e22);
    animation-name: lottery-zone-blink-invite;
}
.lottery-expert-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 4px;
    min-height: 0;
    text-decoration: none;
    color: #1a73e8;
    font-size: var(--lottery-font-md);
    line-height: 1.35;
    border-bottom: 1px solid #f0f0f0;
}
.lottery-expert-row:nth-child(even) { background: #fafafa; }
.lottery-expert-row:hover { background: #f5f9ff; }
.lottery-expert-badge {
    flex-shrink: 0;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid;
    white-space: nowrap;
    line-height: 1.2;
    font-weight: 700;
}
.lottery-expert-badge-recommend {
    color: var(--lottery-badge-recommend-color, #27ae60);
    border-color: var(--lottery-badge-recommend-border, #27ae60);
    background: var(--lottery-badge-recommend-bg, #f0fff4);
    animation: lottery-badge-glow-recommend 2.2s ease-in-out infinite;
}
.lottery-expert-badge-invite {
    color: var(--lottery-badge-invite-color, #d35400);
    border-color: var(--lottery-badge-invite-border, #f39c12);
    background: var(--lottery-badge-invite-bg, #fffbf0);
    animation: lottery-badge-glow-invite 2.6s ease-in-out infinite;
}

@keyframes lottery-badge-glow-recommend {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 var(--lottery-badge-recommend-glow, rgba(39, 174, 96, 0));
        transform: scale(1);
    }
    50% {
        opacity: 0.92;
        box-shadow: 0 0 10px 1px var(--lottery-badge-recommend-glow, rgba(39, 174, 96, 0.35));
        transform: scale(1.04);
    }
}
@keyframes lottery-badge-glow-invite {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 var(--lottery-badge-invite-glow, rgba(243, 156, 18, 0));
        transform: scale(1);
    }
    50% {
        opacity: 0.92;
        box-shadow: 0 0 10px 1px var(--lottery-badge-invite-glow, rgba(243, 156, 18, 0.35));
        transform: scale(1.04);
    }
}
@keyframes lottery-zone-blink-recommend {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        text-shadow: 0 0 0 transparent;
        filter: brightness(1);
    }
    50% {
        opacity: 0.88;
        transform: scale(1.03);
        text-shadow: 0 0 14px var(--lottery-zone-recommend-color, rgba(46, 204, 113, 0.65)),
                     0 0 28px var(--lottery-zone-recommend-color, rgba(46, 204, 113, 0.35));
        filter: brightness(1.15);
    }
}
@keyframes lottery-zone-blink-invite {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        text-shadow: 0 0 0 transparent;
        filter: brightness(1);
    }
    50% {
        opacity: 0.88;
        transform: scale(1.03);
        text-shadow: 0 0 14px var(--lottery-zone-invite-color, rgba(230, 126, 34, 0.65)),
                     0 0 28px var(--lottery-zone-invite-color, rgba(230, 126, 34, 0.35));
        filter: brightness(1.15);
    }
}
@media (prefers-reduced-motion: reduce) {
    .lottery-expert-badge-recommend,
    .lottery-expert-badge-invite,
    .lottery-expert-zone-head { animation: none; }
}
.lottery-expert-main {
    flex: 1;
    min-width: 0;
    line-height: 1.35;
}
.lottery-expert-period { font-weight: 700; }
.lottery-expert-type { color: #1a73e8; }
.lottery-expert-sep { margin: 0 1px; }
.lottery-expert-link {
    color: #e74c3c;
    font-weight: 700;
    margin-left: 2px;
    white-space: nowrap;
}
.lottery-expert-detail { margin: 6px 10px; }
.lottery-expert-detail-head { margin-bottom: 6px; }
.lottery-expert-rank {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    font-size: var(--lottery-font-md);
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 4px;
}
.lottery-expert-detail-title {
    font-size: var(--lottery-font-lg);
    color: #1a73e8;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.45;
}
.lottery-expert-record {
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
    font-size: var(--lottery-font-md);
    line-height: 1.45;
}
.lottery-expert-record-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 4px;
}
.lottery-expert-record-period { font-weight: 700; margin-right: 2px; }
.lottery-expert-record-badge {
    display: inline-block;
    background: #3498db;
    color: #fff;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 2px;
    font-size: var(--lottery-font-sm);
}
.lottery-expert-record-type { color: #e91e8c; margin-right: 2px; font-weight: 600; }
.lottery-expert-record-predict {
    margin-top: 3px;
    font-size: var(--lottery-font-base);
    font-weight: 700;
    color: #222;
    line-height: 1.35;
    letter-spacing: 0;
    word-break: break-all;
}
.lottery-expert-record-open { color: #e74c3c; margin-left: 2px; }
.lottery-expert-record-hit { color: #333; font-weight: 700; margin-left: 2px; }
.lottery-expert-record-miss { color: #e74c3c; font-weight: 700; margin-left: 2px; }
.lottery-expert-record-pending { color: #888; margin-left: 2px; }
.lottery-expert-record-extra {
    margin-top: 2px;
    padding-left: 0;
    color: #555;
    font-size: var(--lottery-font-sm);
}
.lottery-empty-text { text-align: center; color: var(--lottery-muted); padding: 12px 0; }

/* Zodiac chart */
.lottery-zodiac-chart {
    margin: 6px 10px;
    padding: 10px 10px 12px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.lottery-zodiac-chart-head {
    text-align: center;
    padding: 4px 0 8px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 8px;
}
.lottery-zodiac-chart-head h3 {
    font-size: 20px;
    font-weight: 700;
    color: #c0392b;
    letter-spacing: 1px;
}
.lottery-zodiac-block {
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px dashed #eee;
}
.lottery-zodiac-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.lottery-zodiac-block-title {
    font-size: var(--lottery-font-lg);
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
    text-align: center;
}
.lottery-zodiac-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 6px;
}
.lottery-zodiac-cell {
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    padding: 6px 4px;
    background: #fafafa;
}
.lottery-zodiac-cell-head {
    text-align: center;
    font-size: var(--lottery-font-md);
    font-weight: 700;
    margin-bottom: 5px;
    color: #333;
}
.lottery-zodiac-clash {
    color: #666;
    font-weight: 500;
    font-size: 13px;
}
.lottery-zodiac-nums,
.lottery-zodiac-line-nums {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}
.lottery-zodiac-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    font-size: var(--lottery-font-md);
    line-height: 1.65;
}
.lottery-zodiac-line-label {
    flex-shrink: 0;
    width: 58px;
    font-weight: 700;
    color: #333;
    text-align: right;
}
.lottery-zodiac-line-nums {
    flex: 1;
    justify-content: flex-start;
}
.lottery-zodiac-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 26px;
    padding: 0 5px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}
.lottery-zodiac-ball-red { background: var(--lottery-ball-red); }
.lottery-zodiac-ball-blue { background: var(--lottery-ball-blue); }
.lottery-zodiac-ball-green { background: var(--lottery-ball-green); }
.lottery-zodiac-attrs { font-size: var(--lottery-font-md); }
.lottery-zodiac-attr-line {
    margin-bottom: 4px;
    line-height: 1.45;
    color: #1a73e8;
}
.lottery-zodiac-attr-label {
    color: #333;
    font-weight: 600;
}

/* Footer */
.lottery-footer {
    padding: 16px 12px 24px;
    text-align: center;
    font-size: 12px;
    color: var(--lottery-muted);
}
.lottery-footer-title { margin-bottom: 8px; font-weight: 600; }
.lottery-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.lottery-footer-links a {
    color: var(--lottery-accent);
    text-decoration: none;
    background: #fff;
    padding: 4px 10px;
    border-radius: 4px;
}

/* Skin variants — page-bg 为 PC 两侧大背景，shell-bg 为中间内容区 */
.lottery-skin-classic {
    --lottery-page-bg: linear-gradient(135deg, #d4c4b0 0%, #ebe6e0 35%, #c9b896 70%, #ddd5c8 100%);
    --lottery-shell-bg: #f5f0eb;
    --lottery-shell-shadow: 0 10px 48px rgba(61, 41, 20, 0.18);
}
.lottery-skin-festive {
    --lottery-header-bg: #8b0000;
    --lottery-accent: #ffd700;
    --lottery-bg: #fff5f5;
    --lottery-page-bg: linear-gradient(160deg, #ffcccc 0%, #ffe0e0 30%, #fff5f5 55%, #ffd6d6 100%);
    --lottery-shell-bg: #fffafa;
    --lottery-shell-shadow: 0 10px 48px rgba(139, 0, 0, 0.22);
    --lottery-badge-recommend-color: #c0392b;
    --lottery-badge-recommend-border: #e74c3c;
    --lottery-badge-recommend-bg: #fff5f5;
    --lottery-badge-recommend-glow: rgba(231, 76, 60, 0.4);
    --lottery-zone-recommend-color: #e74c3c;
}
.lottery-skin-light {
    --lottery-header-bg: #fff;
    --lottery-header-text: #333;
    --lottery-bg: #f8f9fa;
    --lottery-page-bg: linear-gradient(180deg, #e3e8ee 0%, #f0f3f7 50%, #dce3eb 100%);
    --lottery-shell-bg: #fff;
    --lottery-shell-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}
.lottery-skin-light .lottery-type-tab { color: #666; }
.lottery-skin-light .lottery-type-tab.active { color: #fff; }

.lottery-skin-dark {
    --lottery-bg: #1a1a2e;
    --lottery-page-bg: linear-gradient(145deg, #0d0d1a 0%, #1a1a2e 40%, #16213e 100%);
    --lottery-shell-bg: #1a1a2e;
    --lottery-shell-shadow: 0 12px 56px rgba(0, 0, 0, 0.55);
    --lottery-header-bg: #16213e;
    --lottery-card-bg: #0f3460;
    --lottery-text: #e0e0e0;
    --lottery-muted: #aaa;
    --lottery-badge-recommend-color: #81c784;
    --lottery-badge-recommend-border: #66bb6a;
    --lottery-badge-recommend-bg: rgba(46, 125, 50, 0.2);
    --lottery-zone-recommend-color: #81c784;
}
.lottery-skin-dark .lottery-history-item { border-color: rgba(255,255,255,.08); }
.lottery-skin-dark .lottery-gallery-card { background: #1a2744; border-color: rgba(255,255,255,.08); }
.lottery-skin-dark .lottery-gallery-caption { background: #0f3460; border-color: rgba(255,255,255,.08); }
.lottery-skin-dark .lottery-expert-row { color: #90caf9; border-bottom-color: rgba(255,255,255,.06); }
.lottery-skin-dark .lottery-expert-row:nth-child(even) { background: rgba(255,255,255,.03); }

.lottery-skin-compact {
    --lottery-font-base: 14px;
    --lottery-font-lg: 16px;
    --lottery-font-md: 13px;
    --lottery-font-sm: 12px;
    --lottery-page-bg: linear-gradient(120deg, #e8e0d8 0%, #f5f0eb 50%, #ddd4c8 100%);
    --lottery-shell-bg: #faf8f5;
    --lottery-shell-shadow: 0 8px 36px rgba(61, 41, 20, 0.12);
}
.lottery-skin-compact .lottery-header-inner { padding: 8px 12px; }
.lottery-skin-compact .lottery-brand { font-size: 16px; }
.lottery-skin-compact .lottery-ball { width: 34px; height: 34px; font-size: 13px; }
.lottery-skin-compact .lottery-expert-card { padding: 8px 10px; }

.lottery-skin-emerald {
    --lottery-header-bg: #1b5e20;
    --lottery-accent: #66bb6a;
    --lottery-bg: #f1f8f4;
    --lottery-page-bg: linear-gradient(155deg, #a5d6a7 0%, #c8e6c9 25%, #e8f5e9 55%, #81c784 100%);
    --lottery-shell-bg: #fafffe;
    --lottery-shell-shadow: 0 12px 52px rgba(27, 94, 32, 0.2);
    --lottery-badge-recommend-color: #1b5e20;
    --lottery-badge-recommend-border: #2e7d32;
    --lottery-badge-recommend-glow: rgba(46, 125, 50, 0.5);
    --lottery-zone-recommend-color: #2e7d32;
}
.lottery-skin-emerald .lottery-type-tab.active { background: #2e7d32; }

.lottery-skin-royal {
    --lottery-header-bg: #1a237e;
    --lottery-accent: #ffd54f;
    --lottery-bg: #eef2ff;
    --lottery-page-bg: linear-gradient(140deg, #9fa8da 0%, #c5cae9 35%, #e8eaf6 65%, #7986cb 100%);
    --lottery-shell-bg: #fafbff;
    --lottery-shell-shadow: 0 12px 52px rgba(26, 35, 126, 0.22);
    --lottery-badge-recommend-color: #283593;
    --lottery-badge-recommend-border: #3949ab;
    --lottery-badge-recommend-bg: #e8eaf6;
    --lottery-badge-recommend-glow: rgba(57, 73, 171, 0.45);
    --lottery-zone-recommend-color: #3949ab;
}
.lottery-skin-royal .lottery-type-tab.active { background: #283593; }

.lottery-skin-sunset {
    --lottery-header-bg: linear-gradient(135deg, #e65100, #bf360c);
    --lottery-accent: #ffab00;
    --lottery-bg: #fff8f0;
    --lottery-page-bg: linear-gradient(150deg, #ffcc80 0%, #ffe0b2 30%, #fff3e0 60%, #ffb74d 100%);
    --lottery-shell-bg: #fffaf5;
    --lottery-shell-shadow: 0 12px 52px rgba(191, 54, 12, 0.22);
    --lottery-badge-recommend-color: #e65100;
    --lottery-badge-recommend-border: #ff6d00;
    --lottery-badge-recommend-bg: #fff3e0;
    --lottery-badge-recommend-glow: rgba(255, 109, 0, 0.45);
    --lottery-zone-recommend-color: #ef6c00;
}
.lottery-skin-sunset .lottery-header { background: linear-gradient(135deg, #e65100, #bf360c); }
.lottery-skin-sunset .lottery-type-tab.active { background: #ef6c00; }

/* Global ads */
.vod-ad-global { z-index: 300; }
.vod-ad-sticky_top, .vod-ad-sticky_bottom { position: fixed; left: 0; right: 0; z-index: 250; }
.vod-ad-sticky_top { top: 0; }
.vod-ad-sticky_bottom { bottom: 0; }
.vod-ad-global.is-hidden { display: none !important; }
.vod-ad-popup.is-open { display: block; }
.vod-ad-popup:not(.is-open) { display: none; }

/* Responsive */
@media (min-width: 600px) {
    :root { --lottery-shell-w: 680px; }
    .lottery-header-inner { padding: 14px 20px; }
    .lottery-brand { font-size: 20px; }
    .lottery-type-tab,
    .lottery-main-nav-item { font-size: 15px; padding: 12px 0; }
    .lottery-result-card,
    .lottery-panel { margin: 12px 16px; padding: 20px 18px; }
    .lottery-ad-slot { margin: 12px 16px 0; }
    .lottery-ball { width: 48px; height: 48px; font-size: 16px; }
    .lottery-ball-wrap { width: 52px; }
    .lottery-gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}

@media (min-width: 960px) {
    body.lottery-app {
        background: var(--lottery-page-bg, #ebe6e0);
        background-attachment: fixed;
        padding: 16px 0;
    }
    .lottery-shell {
        border-radius: 12px;
        overflow: hidden;
        min-height: calc(100vh - 32px);
        box-shadow: var(--lottery-shell-shadow, 0 8px 32px rgba(0,0,0,.08));
    }
    .lottery-gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

@media (max-width: 380px) {
    .lottery-ball-wrap { width: 44px; }
    .lottery-ball { width: 40px; height: 40px; font-size: 15px; }
    .lottery-ball-plus { height: 40px; font-size: 18px; }
    .lottery-ball-meta { font-size: 12px; }
    .lottery-gallery-grid { gap: 8px; }
}
