/* ===== 基础重置 ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #e62129;
    --primary-dark: #c41e1a;
    --primary-light: #ff4757;
    --gold: #ffb800;
    --gold-dark: #e69500;
    --bg: #fff5f5;
    --card-bg: #ffffff;
    --text: #2d2d2d;
    --text-light: #666;
    --text-muted: #999;
    --border: #ffe0e0;
    --shadow: 0 2px 12px rgba(230, 33, 41, 0.1);
    --shadow-lg: 0 8px 32px rgba(230, 33, 41, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --gradient-red: linear-gradient(135deg, #e62129, #ff4757);
    --gradient-gold: linear-gradient(135deg, #ffb800, #e69500);
    --gradient-bg: linear-gradient(180deg, #fff5f5 0%, #ffffff 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--gradient-bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 按钮 ===== */
.btn-primary {
    background: var(--gradient-red);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(230, 33, 41, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 33, 41, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 26px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 14px;
    cursor: pointer;
    padding: 6px 12px;
    transition: opacity 0.2s;
}

.btn-text:hover {
    opacity: 0.8;
}

.btn-lg {
    padding: 14px 36px;
    font-size: 18px;
}

.btn-block {
    width: 100%;
    display: block;
}

/* ===== 顶部导航 ===== */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon {
    font-size: 28px;
}

.logo-text small {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
}

.top-nav {
    display: flex;
    gap: 24px;
}

.top-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.top-nav a:hover {
    color: var(--primary);
}

.user-area {
    display: flex;
    gap: 8px;
    align-items: center;
}

.user-area .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

/* ===== 悬浮红包 ===== */
.redpacket-float {
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 90;
    background: var(--gradient-red);
    color: #fff;
    border-radius: 50px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(230, 33, 41, 0.4);
    animation: floatPulse 2s ease-in-out infinite;
    transition: transform 0.2s;
}

.redpacket-float:hover {
    transform: scale(1.05);
}

.rp-icon {
    font-size: 28px;
}

.rp-text {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.rp-text small {
    font-size: 11px;
    opacity: 0.9;
}

@keyframes floatPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ===== 悬浮客服按钮 ===== */
.kefu-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 90;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-radius: 50px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
    animation: floatPulse 2s ease-in-out infinite;
    transition: transform 0.2s;
}

.kefu-float:hover {
    transform: scale(1.05);
}

.kefu-icon {
    font-size: 24px;
}

.kefu-text {
    font-size: 13px;
    font-weight: 600;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #e62129 0%, #ff4757 40%, #ff6b6b 70%, #ffb800 100%);
    opacity: 0.95;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Ccircle cx='50' cy='50' r='1' fill='rgba(255,255,255,0.15)'/%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 40px 20px;
    max-width: 800px;
}

.hero-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 12px;
    letter-spacing: 4px;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 24px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    line-height: 1.3;
}

.hero-badge {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.hero-badge span {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 15px;
}

.hero-badge strong {
    color: var(--gold);
    font-size: 18px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.hero-actions .btn-outline {
    border-color: #fff;
    color: #fff;
}

.hero-actions .btn-outline:hover {
    background: #fff;
    color: var(--primary);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: var(--gold);
}

.stat-label {
    font-size: 13px;
    opacity: 0.85;
}

/* ===== 通用 Section ===== */
section {
    padding: 60px 0;
}

.section-head {
    margin-bottom: 32px;
}

.section-head.center {
    text-align: center;
}

.section-head h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.section-head.center h2 {
    color: var(--primary);
}

.section-tag {
    font-size: 13px;
    color: var(--text-muted);
    margin-left: 12px;
}

.section-desc {
    font-size: 15px;
    color: var(--text-light);
    margin-top: 4px;
}

/* ===== 预测 ===== */
.prediction-section {
    background: #fff;
}

.prediction-box {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    border: 1px solid var(--border);
}

.prediction-balls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.ball {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-red);
    color: #fff;
    box-shadow: 0 4px 12px rgba(230, 33, 41, 0.3);
}

.ball-result {
    background: var(--gradient-gold);
    box-shadow: 0 4px 12px rgba(255, 184, 0, 0.3);
}

.loading-ball {
    animation: ballPulse 1.5s ease-in-out infinite;
}

@keyframes ballPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.prediction-tip {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== 开奖结果 ===== */
.result-section {
    background: var(--bg);
}

.result-box {
    background: #fff;
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.result-period {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.result-balls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.result-sales {
    font-size: 14px;
    color: var(--text-muted);
}

/* ===== 红包签到 ===== */
.redpacket-section {
    background: linear-gradient(135deg, #fff5f5, #fff0e0);
}

.checkin-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.checkin-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px 8px;
    text-align: center;
    border: 2px solid var(--border);
    transition: all 0.3s;
    cursor: pointer;
}

.checkin-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.checkin-card.checked {
    background: var(--gradient-red);
    color: #fff;
    border-color: var(--primary);
}

.checkin-card.checked .checkin-status {
    color: rgba(255, 255, 255, 0.9);
}

.checkin-card-special {
    grid-column: span 1;
    background: var(--gradient-gold);
    color: #fff;
    border-color: var(--gold);
}

.checkin-day {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.checkin-amount {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

.checkin-amount small {
    font-size: 12px;
}

.checkin-status {
    font-size: 12px;
    color: var(--text-muted);
}

.checkin-card.checked .checkin-status::before {
    content: '✓ ';
}

.checkin-card.checked .checkin-status {
    content: '已签到';
}

.checkin-actions {
    text-align: center;
}

.checkin-note {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== 玩法介绍 ===== */
.game-section {
    background: #fff;
}

.game-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.game-info-text p {
    margin-bottom: 16px;
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.8;
}

.game-info-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.game-stat {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border);
}

.gs-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.gs-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

/* ===== 公益影像 ===== */
.gongyi-section {
    background: var(--bg);
}

.gongyi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.gongyi-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.gongyi-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.gongyi-img {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

.gongyi-tag {
    display: inline-block;
    background: var(--gradient-red);
    color: #fff;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    margin: 16px 0 0 16px;
}

.gongyi-card h3 {
    font-size: 18px;
    margin: 8px 16px;
    color: var(--text);
}

.gongyi-card p {
    font-size: 14px;
    color: var(--text-light);
    padding: 0 16px 20px;
    line-height: 1.6;
}

/* ===== 发行宗旨 ===== */
.zongzhi-section {
    background: #fff;
}

.zongzhi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.zongzhi-item {
    text-align: center;
    padding: 32px 16px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.zongzhi-item:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.zz-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.zongzhi-item h3 {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 12px;
}

.zongzhi-item p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== 下载 ===== */
.download-section {
    background: linear-gradient(135deg, #fff5f5, #fff8e8);
}

.download-box {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: center;
    background: #fff;
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.download-info h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.download-info h3 {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 16px;
}

.download-info p {
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.8;
}

.qr-placeholder {
    text-align: center;
}

.qr-code {
    width: 160px;
    height: 160px;
    margin: 0 auto 12px;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 1px;
    padding: 8px;
}

.qr-code div {
    background: #000;
    border-radius: 1px;
}

.qr-code div.empty {
    background: transparent;
}

.qr-placeholder p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== 理性购彩 ===== */
.rational-section {
    background: var(--bg);
    text-align: center;
    padding: 48px 0;
}

.rational-section h2 {
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 12px;
}

.rational-section p {
    color: var(--text-light);
    font-size: 15px;
}

/* ===== 底部 ===== */
.footer {
    background: #2d2d2d;
    color: #ccc;
    padding: 40px 0;
    text-align: center;
}

.footer-links {
    margin-bottom: 16px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-links span {
    margin: 0 12px;
    color: #555;
}

.footer-copy {
    font-size: 13px;
    margin-bottom: 8px;
}

.footer-disclaimer {
    font-size: 12px;
    color: #666;
}

/* ===== 弹窗 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-box {
    background: #fff;
    border-radius: var(--radius);
    padding: 32px;
    max-width: 420px;
    width: 100%;
    position: relative;
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--primary);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-emoji {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
}

.modal-header h2 {
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 4px;
}

.modal-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.form-group input {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
}

.captcha-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-row input {
    flex: 1;
}

.captcha-row img {
    height: 44px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 2px solid var(--border);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 0;
}

.checkbox-label input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.modal-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.modal-switch a {
    color: var(--primary);
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}

.modal-switch a:hover {
    text-decoration: underline;
}

/* ===== 红包弹窗 ===== */
.modal-box-rp {
    max-width: 480px;
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
}

.rp-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.rp-big-icon {
    font-size: 56px;
    display: block;
    margin-bottom: 8px;
    animation: floatPulse 2s ease-in-out infinite;
}

.rp-modal-header h2 {
    font-size: 22px;
    color: var(--primary);
}

.rp-modal-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.rp-checkin-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.rp-day {
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 16px 8px;
    text-align: center;
    border: 2px solid var(--border);
    transition: all 0.3s;
}

.rp-day.checked {
    background: var(--gradient-red);
    color: #fff;
    border-color: var(--primary);
}

.rp-day-special {
    grid-column: span 1;
    background: var(--gradient-gold);
    color: #fff;
    border-color: var(--gold);
}

.rp-day-label {
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
}

.rp-day-amt {
    display: block;
    font-size: 16px;
    font-weight: 700;
}

.rp-modal-note {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin: 16px 0 8px;
}

/* ===== 新人红包弹窗 ===== */
.modal-box-newbie {
    max-width: 360px;
    background: linear-gradient(135deg, #e62129, #ff4757);
    color: #fff;
}

.newbie-content {
    text-align: center;
}

.newbie-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 16px;
    animation: floatPulse 2s ease-in-out infinite;
}

.modal-box-newbie h2 {
    color: #fff;
    font-size: 24px;
    margin-bottom: 8px;
}

.modal-box-newbie p {
    font-size: 15px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.modal-box-newbie strong {
    font-size: 22px;
    color: var(--gold);
}

.modal-box-newbie .btn-primary {
    background: #fff;
    color: var(--primary);
}

/* ===== 客服聊天内嵌弹窗 ===== */
.modal-overlay-kefu {
    z-index: 1100;
}

.modal-box-kefu {
    max-width: 480px;
    width: 100%;
    height: 85vh;
    max-height: 700px;
    padding: 0;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-close-kefu {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
}

.modal-box-kefu iframe {
    width: 100%;
    height: 100%;
    border: none;
    flex: 1;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    max-width: 90%;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-num {
        font-size: 22px;
    }

    .checkin-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .checkin-card-special {
        grid-column: span 3;
    }

    .game-info {
        grid-template-columns: 1fr;
    }

    .gongyi-grid {
        grid-template-columns: 1fr;
    }

    .zongzhi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .download-box {
        grid-template-columns: 1fr;
    }

    .top-nav {
        display: none;
    }

    .rp-checkin-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .rp-day-special {
        grid-column: span 3;
    }

    .section-head h2 {
        font-size: 22px;
    }

    .redpacket-float {
        padding: 10px 16px;
        bottom: 70px;
    }

    .kefu-float {
        padding: 10px 16px;
    }

    .rp-icon {
        font-size: 24px;
    }

    .modal-box-kefu {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 22px;
    }

    .hero-badge {
        flex-direction: column;
        gap: 8px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .zongzhi-grid {
        grid-template-columns: 1fr;
    }
}
