/* ===== 全局变量与重置 ===== */
:root {
    --primary: #1a1a2e;
    --secondary: #ffd700;
    --accent: #e94560;
    --bg-dark: #0f0f1a;
    --bg-card: rgba(255, 255, 255, 0.08);
    --bg-glass: rgba(255, 255, 255, 0.12);
    --text-primary: #f0f0f0;
    --text-secondary: #b0b0b0;
    --text-muted: #7a7a8a;
    --border-glass: rgba(255, 255, 255, 0.18);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover,
a:focus-visible {
    color: #fff3a0;
    outline: none;
}

ul, ol {
    list-style: none;
    padding: 0;
}

img, svg {
    max-width: 100%;
    display: block;
}

/* ===== 暗色模式（默认已暗） ===== */
@media (prefers-color-scheme: light) {
    :root {
        /* 保持暗色，覆盖系统偏好 */
        --bg-dark: #0f0f1a;
        --text-primary: #f0f0f0;
        --text-secondary: #b0b0b0;
        --bg-card: rgba(255, 255, 255, 0.08);
    }
}

/* ===== 滚动动画 ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.6); }
}

section {
    opacity: 0;
    animation: fadeUp 0.6s ease forwards;
}

section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }
section:nth-child(5) { animation-delay: 0.4s; }
section:nth-child(6) { animation-delay: 0.5s; }
section:nth-child(7) { animation-delay: 0.6s; }
section:nth-child(8) { animation-delay: 0.7s; }

/* 滚动时再次触发（浏览器支持） */
@media (prefers-reduced-motion: no-preference) {
    section {
        animation: none;
        opacity: 1;
    }
    section:target,
    section.in-view {
        animation: fadeUp 0.6s ease forwards;
    }
}

/* ===== 渐变Banner ===== */
#hero {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #e94560 100%);
    background-size: 300% 300%;
    animation: shimmer 8s ease infinite;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 215, 0, 0.08) 0%, transparent 60%),
                radial-gradient(circle at 70% 50%, rgba(233, 69, 96, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

#hero h1 {
    font-size: clamp(2.2rem, 8vw, 4.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--secondary), #fff3a0, var(--secondary));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s linear infinite;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.2);
}

#hero p {
    font-size: clamp(1rem, 3vw, 1.4rem);
    color: var(--text-secondary);
    margin: 1.2rem 0 2rem;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

#hero a[role="button"] {
    display: inline-block;
    padding: 1rem 3rem;
    background: linear-gradient(135deg, var(--secondary), #ffb700);
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all var(--transition);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
    position: relative;
    z-index: 1;
    animation: pulseGlow 3s ease-in-out infinite;
}

#hero a[role="button"]:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 35px rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, #ffe066, #ffb700);
}

/* ===== 圆角卡片与毛玻璃效果 ===== */
section:not(#hero) {
    padding: 4rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

section:not(#hero) h2 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

section:not(#hero) h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    border-radius: 4px;
    margin-top: 8px;
}

#about {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 3rem 2rem;
    margin: 2rem 1.5rem;
}

#about p {
    max-width: 800px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

#services ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

#services li {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    transition: all var(--transition);
    box-shadow: var(--shadow-card);
}

#services li:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--secondary);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

#services li strong {
    display: block;
    color: var(--secondary);
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
}

#services li {
    color: var(--text-secondary);
}

/* ===== 文章卡片 ===== */
#insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

#insights h2 {
    grid-column: 1 / -1;
}

#insights article {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.8rem 1.5rem;
    transition: all var(--transition);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
}

#insights article:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
}

#insights h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

#insights article p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    flex: 1;
}

#insights time {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0.8rem 0;
}

#insights a {
    align-self: flex-start;
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition);
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
}

#insights a:hover {
    color: #fff3a0;
    border-bottom-color: var(--secondary);
}

/* ===== FAQ 折叠面板 ===== */
#faq details {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    margin-bottom: 0.8rem;
    padding: 0.8rem 1.2rem;
    transition: all var(--transition);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

#faq details:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--secondary);
}

#faq summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    padding: 0.4rem 0;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#faq summary::-webkit-details-marker {
    display: none;
}

#faq summary::after {
    content: '▾';
    font-size: 1.2rem;
    color: var(--secondary);
    transition: transform var(--transition);
}

#faq details[open] summary::after {
    transform: rotate(180deg);
}

#faq details p {
    color: var(--text-secondary);
    padding: 0.8rem 0 0.4rem;
    line-height: 1.7;
}

/* ===== 投注指南 ===== */
#howto ol {
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-top: 1.5rem;
}

#howto li {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    counter-increment: step;
    position: relative;
    transition: all var(--transition);
    box-shadow: var(--shadow-card);
}

#howto li:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--accent);
}

#howto li::before {
    content: counter(step);
    position: absolute;
    top: -0.6rem;
    left: -0.6rem;
    width: 2.2rem;
    height: 2.2rem;
    background: linear-gradient(135deg, var(--secondary), #ffb700);
    color: var(--primary);
    font-weight: 800;
    font-size: 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.4);
}

#howto li strong {
    display: block;
    color: var(--secondary);
    margin-bottom: 0.3rem;
    font-size: 1.05rem;
}

#howto li {
    color: var(--text-secondary);
}

/* ===== 联系我们 ===== */
#contact address {
    font-style: normal;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    max-width: 500px;
}

#contact address p {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

#contact a {
    font-weight: 600;
}

/* ===== Header 导航 ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 26, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    padding: 0 1.5rem;
    transition: background var(--transition);
}

header nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.2rem;
    flex-wrap: wrap;
    padding: 0.8rem 0;
}

header nav a {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 30px;
    transition: all var(--transition);
    position: relative;
}

header nav a[aria-current="page"],
header nav a:hover {
    color: var(--secondary);
    background: rgba(255, 215, 0, 0.1);
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--secondary);
    border-radius: 2px;
    transition: transform var(--transition);
}

header nav a:hover::after,
header nav a[aria-current="page"]::after {
    transform: translateX(-50%) scaleX(1);
}

/* ===== Footer ===== */
footer {
    background: var(--primary);
    border-top: 1px solid var(--border-glass);
    padding: 2.5rem 1.5rem 1.5rem;
    text-align: center;
    margin-top: 3rem;
}

footer nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-bottom: 1.5rem;
}

footer nav a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--transition);
}

footer nav a:hover {
    color: var(--secondary);
}

footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

footer time {
    color: var(--text-muted);
}

/* ===== 响应式布局 ===== */
@media (max-width: 768px) {
    header nav ul {
        gap: 0;
        justify-content: center;
    }

    header nav a {
        font-size: 0.85rem;
        padding: 0.4rem 0.9rem;
    }

    #hero {
        min-height: 70vh;
        padding: 6rem 1.2rem 3rem;
    }

    #hero h1 {
        font-size: clamp(1.8rem, 7vw, 2.8rem);
    }

    section:not(#hero) {
        padding: 2.5rem 1rem;
    }

    #about {
        padding: 2rem 1.2rem;
        margin: 1.5rem 1rem;
        border-radius: var(--radius-md);
    }

    #services ul,
    #insights,
    #howto ol {
        grid-template-columns: 1fr;
    }

    #faq details {
        padding: 0.6rem 1rem;
    }

    #contact address {
        padding: 1.5rem;
    }

    footer {
        padding: 2rem 1rem 1rem;
    }

    footer nav ul {
        gap: 0.3rem 1rem;
    }
}

@media (max-width: 480px) {
    header nav a {
        font-size: 0.78rem;
        padding: 0.3rem 0.7rem;
    }

    #hero {
        padding: 5rem 1rem 2.5rem;
    }

    #hero a[role="button"] {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    #services li {
        padding: 1.5rem 1rem;
    }

    #insights article {
        padding: 1.2rem 1rem;
    }

    #howto li {
        padding: 1.2rem;
    }

    #howto li::before {
        width: 1.8rem;
        height: 1.8rem;
        font-size: 0.85rem;
        top: -0.4rem;
        left: -0.4rem;
    }
}

/* ===== 无障碍焦点样式 ===== */
:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ===== 打印样式 ===== */
@media print {
    body {
        background: #fff;
        color: #000;
    }
    header, footer, #hero a[role="button"] {
        display: none;
    }
    section {
        opacity: 1 !important;
        animation: none !important;
        page-break-inside: avoid;
    }
    #services li, #insights article, #faq details, #howto li, #contact address {
        background: #f5f5f5;
        border: 1px solid #ccc;
        backdrop-filter: none;
        box-shadow: none;
    }
}