/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    background: #0a0f1e;
    color: #e0e6ed;
    line-height: 1.6;
    transition: background 0.4s, color 0.4s;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #f0b90b; text-decoration: none; transition: color 0.3s; }
a:hover, a:focus { color: #ffd966; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

/* ===== Dark Mode ===== */
body.dark-mode { background: #0a0f1e; color: #e0e6ed; }
body:not(.dark-mode) { background: #f5f7fa; color: #1a1f2e; }
body:not(.dark-mode) header { background: rgba(255,255,255,0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
body:not(.dark-mode) header nav ul a { color: #1a1f2e; }
body:not(.dark-mode) header nav ul a:hover { color: #f0b90b; }
body:not(.dark-mode) section { background: rgba(255,255,255,0.75); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(0,0,0,0.06); }
body:not(.dark-mode) #hero { background: linear-gradient(135deg, #f0b90b, #ff8c00, #f0b90b); }
body:not(.dark-mode) #hero h1, body:not(.dark-mode) #hero p { color: #1a1f2e; }
body:not(.dark-mode) #hero a[role="button"] { background: #1a1f2e; color: #f0b90b; }
body:not(.dark-mode) #hero a[role="button"]:hover { background: #2a2f3e; }
body:not(.dark-mode) footer { background: rgba(0,0,0,0.05); color: #333; }
body:not(.dark-mode) #backToTop { background: #f0b90b; color: #1a1f2e; }
body:not(.dark-mode) details { background: rgba(0,0,0,0.03); }
body:not(.dark-mode) details[open] { background: rgba(0,0,0,0.06); }

/* ===== Header & Nav ===== */
header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: rgba(10,15,30,0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(240,185,11,0.2);
    transition: background 0.4s;
}
header nav {
    display: flex; align-items: center; justify-content: space-between;
    max-width: 1200px; margin: 0 auto; padding: 0.75rem 1.5rem;
}
header nav a[aria-label="B体育首页"] { flex-shrink: 0; }
header nav ul {
    display: flex; gap: 1.25rem; align-items: center;
}
header nav ul a {
    color: #e0e6ed; font-weight: 500; padding: 0.4rem 0; position: relative;
    transition: color 0.3s;
}
header nav ul a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: #f0b90b; transition: width 0.3s;
}
header nav ul a:hover::after, header nav ul a:focus::after { width: 100%; }
#darkModeToggle, #menuToggle {
    font-size: 1.4rem; padding: 0.3rem 0.6rem; border-radius: 8px;
    transition: background 0.3s; background: rgba(240,185,11,0.1);
}
#darkModeToggle:hover, #menuToggle:hover { background: rgba(240,185,11,0.25); }
#menuToggle { display: none; }

/* ===== Main & Sections ===== */
main { max-width: 1200px; margin: 0 auto; padding: 5rem 1.5rem 2rem; }
section {
    margin-bottom: 3rem; padding: 2.5rem 2rem; border-radius: 24px;
    background: rgba(26,31,46,0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(240,185,11,0.1);
    opacity: 0; transform: translateY(30px); animation: fadeUp 0.8s 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; }
section:nth-child(9) { animation-delay: 0.8s; }
@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}
h1, h2, h3 { color: #f0b90b; margin-bottom: 1rem; font-weight: 700; }
h1 { font-size: 2.4rem; line-height: 1.2; }
h2 { font-size: 1.8rem; position: relative; display: inline-block; }
h2::after {
    content: ''; display: block; width: 60px; height: 4px; background: #f0b90b;
    border-radius: 2px; margin-top: 0.5rem;
}
h3 { font-size: 1.3rem; }
p { margin-bottom: 1.2rem; color: inherit; }
a[role="button"] {
    display: inline-block; padding: 0.75rem 2rem; border-radius: 40px;
    background: #f0b90b; color: #0a0f1e; font-weight: 700; font-size: 1rem;
    transition: all 0.3s; margin-right: 0.75rem; margin-bottom: 0.75rem;
    border: 2px solid transparent;
}
a[role="button"]:hover {
    background: transparent; color: #f0b90b; border-color: #f0b90b;
    transform: translateY(-3px); box-shadow: 0 8px 25px rgba(240,185,11,0.3);
}

/* ===== Hero ===== */
#hero {
    background: linear-gradient(135deg, #0a0f1e, #1a1f2e, #0a0f1e);
    padding: 3rem 2rem; border-radius: 32px; margin-top: 1rem;
    text-align: center; position: relative; overflow: hidden;
}
#hero::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(240,185,11,0.08), transparent 60%);
    animation: heroGlow 6s infinite alternate;
}
@keyframes heroGlow {
    0% { transform: translate(0,0); }
    100% { transform: translate(10%,10%); }
}
#hero h1 { font-size: 2.8rem; position: relative; z-index: 1; }
#hero p { font-size: 1.15rem; max-width: 700px; margin: 1rem auto 1.5rem; position: relative; z-index: 1; }
#hero a[role="button"] { position: relative; z-index: 1; }
#hero img { margin: 2rem auto 0; border-radius: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.5); }

/* ===== Live & Features ===== */
#live ul, #features ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
#live li, #features li {
    background: rgba(240,185,11,0.08); padding: 1rem 1.2rem; border-radius: 16px;
    border-left: 4px solid #f0b90b; transition: all 0.3s;
}
#live li:hover, #features li:hover { transform: translateY(-4px); background: rgba(240,185,11,0.15); }
#live li strong, #features li strong { color: #f0b90b; }

/* ===== FAQ ===== */
details {
    background: rgba(240,185,11,0.04); border-radius: 16px; padding: 0.8rem 1.2rem;
    margin-bottom: 0.75rem; border: 1px solid rgba(240,185,11,0.1);
    transition: all 0.3s; cursor: pointer;
}
details[open] { background: rgba(240,185,11,0.08); padding-bottom: 1.2rem; }
details summary { font-weight: 600; color: #f0b90b; outline: none; }
details p { margin-top: 0.8rem; padding-left: 0.5rem; }

/* ===== HowTo ===== */
#howto ol { counter-reset: step; margin: 1.5rem 0; }
#howto ol li {
    counter-increment: step; padding: 0.8rem 1rem 0.8rem 3rem; position: relative;
    border-left: 2px solid rgba(240,185,11,0.3); margin-bottom: 0.5rem;
    transition: background 0.3s; border-radius: 0 12px 12px 0;
}
#howto ol li::before {
    content: counter(step); position: absolute; left: 0.5rem; top: 0.8rem;
    background: #f0b90b; color: #0a0f1e; width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem;
}
#howto ol li:hover { background: rgba(240,185,11,0.06); }

/* ===== Articles ===== */
#articles { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
#articles h2 { grid-column: 1 / -1; }
#articles article {
    background: rgba(240,185,11,0.04); padding: 1.5rem; border-radius: 20px;
    border: 1px solid rgba(240,185,11,0.08); transition: all 0.3s;
}
#articles article:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(240,185,11,0.1); }
#articles article h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
#articles article p { font-size: 0.95rem; margin-bottom: 1rem; }
#articles article a { font-weight: 600; }

/* ===== Contact ===== */
#contact ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1rem; }
#contact li { background: rgba(240,185,11,0.06); padding: 1rem; border-radius: 16px; border: 1px solid rgba(240,185,11,0.08); }

/* ===== Footer ===== */
footer {
    background: rgba(10,15,30,0.9); backdrop-filter: blur(8px); padding: 2rem 1.5rem;
    text-align: center; border-top: 1px solid rgba(240,185,11,0.15);
}
footer nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem; margin-bottom: 1rem; }
footer nav ul a { color: #aaa; font-size: 0.9rem; }
footer nav ul a:hover { color: #f0b90b; }
footer p { font-size: 0.85rem; color: #888; margin-bottom: 0.4rem; }

/* ===== Back to Top ===== */
#backToTop {
    position: fixed; bottom: 2rem; right: 2rem; z-index: 999;
    width: 48px; height: 48px; border-radius: 50%; background: #f0b90b; color: #0a0f1e;
    font-size: 1.6rem; display: none; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(240,185,11,0.3); transition: all 0.3s;
}
#backToTop:hover { transform: scale(1.1); background: #ffd966; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    header nav { padding: 0.5rem 1rem; }
    header nav ul {
        display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%;
        background: rgba(10,15,30,0.95); backdrop-filter: blur(12px); padding: 1rem;
        border-bottom: 1px solid rgba(240,185,11,0.2);
    }
    header nav ul.open { display: flex; }
    #menuToggle { display: block; }
    #darkModeToggle { order: 1; }
    main { padding: 4rem 1rem 1.5rem; }
    section { padding: 1.8rem 1.2rem; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }
    #hero h1 { font-size: 2rem; }
    #hero p { font-size: 1rem; }
    #live ul, #features ul { grid-template-columns: 1fr; }
    #articles { grid-template-columns: 1fr; }
    #contact ul { grid-template-columns: 1fr; }
    a[role="button"] { display: block; width: 100%; text-align: center; margin-right: 0; }
    footer nav ul { gap: 0.8rem; }
}
@media (max-width: 480px) {
    html { font-size: 14px; }
    header nav { padding: 0.4rem 0.8rem; }
    #hero { padding: 2rem 1rem; }
    #hero h1 { font-size: 1.6rem; }
    #backToTop { width: 40px; height: 40px; font-size: 1.3rem; bottom: 1rem; right: 1rem; }
}