/* ===== 3377体育官方网站 - 完整Style.css ===== */
/* 包含所有UI设计、动画、响应式、暗色模式等 */

/* 基础重置与变量 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #e94560;
    --secondary: #0f3460;
    --accent: #16213e;
    --bg: #ffffff;
    --text: #1a1a2e;
    --glass: rgba(255, 255, 255, 0.15);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --radius: 16px;
    --gradient: linear-gradient(135deg, #0f3460, #e94560);
    --card-bg: #f8f9fa;
    --border: #e0e0e0;
    --transition: 0.3s ease;
}

body.dark-mode {
    --bg: #1a1a2e;
    --text: #e0e0e0;
    --card-bg: #16213e;
    --border: #2a2a4e;
    --glass: rgba(0, 0, 0, 0.3);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
    scroll-behavior: smooth;
}

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

a:hover {
    color: #ff6b81;
}

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

/* ===== Header & Nav ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition), box-shadow var(--transition);
}

header.scrolled {
    background: var(--bg);
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.logo svg {
    height: 40px;
    width: auto;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 24px;
}

nav ul li a {
    color: var(--text);
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background var(--transition), color var(--transition);
}

nav ul li a:hover,
nav ul li a.active {
    background: var(--primary);
    color: #fff;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text);
    cursor: pointer;
}

.dark-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    font-size: 20px;
    transition: background var(--transition);
}

.dark-toggle:hover {
    background: var(--card-bg);
}

/* ===== Hero Banner ===== */
.hero {
    padding: 120px 0 80px;
    background: var(--gradient);
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: heroGradient 15s ease infinite;
    background-size: 200% 200%;
}

@keyframes heroGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff10' d='M0,160L48,176C96,192,192,224,288,213C384,203,480,149,576,138C672,128,768,160,864,181C960,203,1056,213,1152,197C1248,181,1344,139,1392,117L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'/%3E%3C/svg%3E") no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 32px;
    position: relative;
    z-index: 1;
    opacity: 0.9;
}

.hero .btn {
    display: inline-block;
    background: #fff;
    color: var(--primary);
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}

/* ===== Sections ===== */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 48px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 12px auto 0;
    border-radius: 2px;
}

.grid-2, .grid-3, .grid-4 {
    display: grid;
    gap: 24px;
}

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

/* ===== Cards ===== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}

.card svg {
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
}

.card h3 {
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.card p {
    color: var(--text);
    opacity: 0.8;
}

.btn-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--primary);
    font-weight: 600;
    transition: opacity var(--transition);
}

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

/* ===== FAQ ===== */
.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    user-select: none;
}

.faq-question span {
    font-size: 1.5rem;
    transition: transform var(--transition);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s;
    padding-top: 0;
}

.faq-item.open .faq-answer {
    max-height: 500px;
    padding-top: 12px;
}

.faq-item.open .faq-question span {
    transform: rotate(45deg);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    padding: 12px 0;
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.7;
}

.breadcrumb a {
    color: var(--text);
    transition: color var(--transition);
}

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

.breadcrumb span {
    margin: 0 8px;
}

/* ===== Footer ===== */
footer {
    background: var(--accent);
    color: #ccc;
    padding: 40px 0 20px;
}

footer a {
    color: #aaa;
    transition: color var(--transition);
}

footer a:hover {
    color: #fff;
}

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

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 16px;
    text-align: center;
    font-size: 0.85rem;
}

/* ===== Back to top ===== */
.back-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition), transform var(--transition);
    z-index: 999;
    border: none;
    box-shadow: 0 4px 15px rgba(233,69,96,0.4);
}

.back-top.visible {
    opacity: 1;
}

.back-top:hover {
    transform: scale(1.1);
}

/* ===== Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.counter {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* ===== Search ===== */
.search-box {
    display: flex;
    max-width: 400px;
    margin: 0 auto 32px;
}

.search-box input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 50px 0 0 50px;
    outline: none;
    background: var(--card-bg);
    color: var(--text);
    transition: border-color var(--transition);
}

.search-box input:focus {
    border-color: var(--primary);
}

.search-box button {
    padding: 12px 20px;
    border: none;
    background: var(--primary);
    color: #fff;
    border-radius: 0 50px 50px 0;
    cursor: pointer;
    font-weight: 600;
    transition: opacity var(--transition);
}

.search-box button:hover {
    opacity: 0.9;
}

/* ===== HowTo ===== */
.howto-step {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.howto-step .step-num {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(233,69,96,0.3);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        background: var(--bg);
        padding: 16px;
        box-shadow: var(--shadow);
        gap: 12px;
        z-index: 999;
    }

    nav ul.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

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

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 32px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .hero .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .card {
        padding: 18px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .back-top {
        width: 40px;
        height: 40px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}

/* ===== Dark mode specific tweaks ===== */
body.dark-mode .card {
    border-color: var(--border);
}

body.dark-mode .hero .btn {
    color: var(--primary);
    background: #fff;
}

body.dark-mode .search-box input {
    background: var(--card-bg);
    color: var(--text);
}

/* ===== Print styles ===== */
@media print {
    header, footer, .back-top, .search-box, .menu-toggle, .dark-toggle {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ===== Additional hover effects ===== */
.card svg {
    transition: transform var(--transition);
}

.card:hover svg {
    transform: scale(1.1);
}

nav ul li a {
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all var(--transition);
    transform: translateX(-50%);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 80%;
}

/* ===== Loading animation for cards ===== */
.card {
    animation: cardAppear 0.5s ease forwards;
    opacity: 0;
}

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

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

/* ===== Smooth scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff6b81;
}

/* ===== Focus styles for accessibility ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== End of style.css ===== */