/* ===== 品牌变量 ===== */
:root {
    --primary: #8b5cf6;        /* 紫罗兰主色 */
    --primary-dark: #7c3aed;
    --accent: #f59e0b;         /* 金色辅色 */
    --accent-light: #fbbf24;
    --bg-light: #f5f3ff;       /* 浅紫背景 */
    --bg-dark: #1e1b4b;        /* 深紫背景 */
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --border: #e5e5e5;
    --white: #fff;
    --shadow: 0 4px 20px rgba(139,92,246,0.12);
    --radius: 16px;
    --transition: all 0.3s ease;
}

/* ===== 全局重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow); }
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.nav-left { display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 32px; height: 32px; }
.logo-text { font-size: 20px; font-weight: 700; color: var(--primary); }
.menu-toggle { display: none; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--primary); padding: 4px; }
.nav-menu { display: flex; gap: 24px; }
.nav-link {
    font-size: 15px; font-weight: 500; color: var(--text-secondary); padding: 8px 0; position: relative;
    transition: var(--transition);
}
.nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--primary);
    transition: var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* ===== Hero 区 ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-light) 0%, #ede9fe 50%, #fef3c7 100%);
    text-align: center;
    padding: 120px 20px 80px;
}
.hero-content { max-width: 700px; }
.hero-logo { width: 120px; height: auto; margin: 0 auto 20px; }
.hero-title {
    font-size: 48px; font-weight: 700; color: var(--primary); margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(139,92,246,0.15);
}
.hero-slogan {
    font-size: 22px; font-weight: 600; color: var(--accent); margin-bottom: 16px;
    letter-spacing: 2px;
}
.hero-sub { font-size: 16px; color: var(--text-secondary); margin-bottom: 32px; max-width: 500px; margin-left: auto; margin-right: auto; }
.hero-btn { padding: 14px 48px; font-size: 18px; }

/* ===== 通用按钮 ===== */
.btn {
    display: inline-block; padding: 12px 32px; border-radius: 12px; font-weight: 600; border: none;
    cursor: pointer; transition: var(--transition); text-align: center; font-size: 16px;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white); box-shadow: 0 4px 15px rgba(139,92,246,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(139,92,246,0.4); }
.btn-primary:active { transform: scale(0.97); }

/* ===== 通用区块 ===== */
.section { padding: 80px 0; }
.section-title {
    font-size: 34px; font-weight: 700; color: var(--primary); text-align: center; margin-bottom: 16px;
}
.section-desc {
    font-size: 16px; color: var(--text-secondary); text-align: center; max-width: 600px;
    margin: 0 auto 48px;
}

/* ===== 关于区 ===== */
.about-section { background: var(--white); }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.about-card {
    background: var(--bg-light); padding: 32px; border-radius: var(--radius);
    box-shadow: var(--shadow); transition: var(--transition); text-align: center;
}
.about-card:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(139,92,246,0.18); }
.about-card h3 { font-size: 22px; font-weight: 600; color: var(--primary); margin-bottom: 12px; }
.about-card p { font-size: 14px; color: var(--text-secondary); }

/* ===== 功能特色 ===== */
.features-section { background: var(--bg-light); }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-item {
    background: var(--white); padding: 28px 20px; border-radius: var(--radius);
    box-shadow: var(--shadow); text-align: center; transition: var(--transition);
}
.feature-item:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(139,92,246,0.15); }
.feature-icon { font-size: 40px; margin-bottom: 12px; }
.feature-item h3 { font-size: 18px; font-weight: 600; color: var(--primary); margin-bottom: 8px; }
.feature-item p { font-size: 13px; color: var(--text-muted); }

/* ===== 求签区 ===== */
.draw-section { background: var(--white); }
.draw-box {
    max-width: 600px; margin: 0 auto; background: var(--bg-light); padding: 40px;
    border-radius: var(--radius); box-shadow: var(--shadow); text-align: center;
}
.lottery-result {
    min-height: 150px; display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: var(--text-secondary); margin-bottom: 24px;
    background: var(--white); border-radius: var(--radius); padding: 20px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.04);
}
.lottery-placeholder { color: var(--text-muted); font-size: 16px; }
.lottery-card {
    text-align: left; width: 100%;
}
.lottery-card h3 { font-size: 24px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.lottery-card .lottery-category {
    display: inline-block; padding: 4px 12px; background: var(--accent); color: var(--white);
    border-radius: 20px; font-size: 12px; margin-bottom: 12px;
}
.lottery-card p { font-size: 15px; color: var(--text-secondary); line-height: 1.7; }
.draw-btn { padding: 14px 48px; font-size: 18px; margin-top: 10px; }
.draw-history { margin-top: 32px; text-align: left; }
.draw-history h3 { font-size: 18px; color: var(--primary); margin-bottom: 12px; }
.draw-history ul { list-style: none; }
.draw-history li {
    padding: 10px 16px; background: var(--white); border-radius: 10px; margin-bottom: 8px;
    font-size: 14px; color: var(--text-secondary); border-left: 4px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* ===== 联系区 ===== */
.contact-section { background: var(--bg-light); }
.contact-form {
    max-width: 500px; margin: 0 auto; background: var(--white); padding: 36px;
    border-radius: var(--radius); box-shadow: var(--shadow);
}
.form-group { margin-bottom: 16px; }
.form-group input, .form-group textarea {
    width: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px;
    font-size: 15px; transition: var(--transition); background: var(--white);
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139,92,246,0.1); }
.form-feedback { margin-top: 12px; font-size: 14px; text-align: center; color: var(--primary); }

/* ===== 页脚 ===== */
.footer {
    background: var(--bg-dark); color: var(--white); padding: 60px 0 0;
}
.footer-content {
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-logo { width: 120px; height: auto; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-brand-desc { font-size: 14px; color: rgba(255,255,255,0.7); line-height: 1.7; }
.footer-links h4, .footer-social h4 { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: var(--accent); }
.footer-links a { display: block; font-size: 14px; color: rgba(255,255,255,0.7); margin-bottom: 10px; }
.footer-links a:hover { color: var(--accent); }
.social-icons { display: flex; gap: 16px; }
.social-icons a { font-size: 24px; transition: var(--transition); }
.social-icons a:hover { transform: scale(1.2); color: var(--accent); }
.footer-bottom { text-align: center; padding: 20px; font-size: 13px; color: rgba(255,255,255,0.5); }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-menu {
        display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--white);
        flex-direction: column; padding: 20px; box-shadow: 0 8px 20px rgba(0,0,0,0.1);
        border-bottom: 1px solid var(--border);
    }
    .nav-menu.open { display: flex; }
    .nav-link { padding: 12px 0; border-bottom: 1px solid var(--border); }
    .hero-title { font-size: 36px; }
    .hero-slogan { font-size: 18px; }
    .hero-logo { width: 80px; }
    .about-grid, .features-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-links a { display: inline-block; margin: 0 10px; }
    .social-icons { justify-content: center; }
    .section-title { font-size: 28px; }
}

@media (max-width: 480px) {
    .hero { padding: 100px 16px 60px; }
    .hero-title { font-size: 30px; }
    .hero-btn { padding: 12px 36px; font-size: 16px; }
    .draw-box { padding: 24px; }
    .contact-form { padding: 24px; }
}