/* style.css - 乐竞体育官网完整样式表 */

/* 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, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: #007aff;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: underline;
    color: #005bb5;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

::-webkit-scrollbar-track {
    background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

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

/* Selection */
::selection {
    background: #ff6b35;
    color: #fff;
}

/* Header & Nav */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.9;
}

.logo span {
    color: #ff6b35;
}

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

.nav-links a {
    color: #e5e5e5;
    font-size: 0.95rem;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ff6b35;
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after,
.nav-links a.active-link::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active,
.nav-links a.active-link {
    color: #fff;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.2s;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(26, 26, 46, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        animation: slideDown 0.3s ease;
    }

    .nav-links.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
    animation: heroGlow 8s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(20px, -20px);
    }
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 32px;
    color: #ccc;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero .btn {
    display: inline-block;
    background: #ff6b35;
    color: #fff;
    padding: 14px 40px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease 0.4s both;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.hero .btn:hover {
    background: #e55a2b;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    text-decoration: none;
}

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

@media (max-width: 600px) {
    .hero {
        padding: 60px 0;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
}

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

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

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #ff6b35;
    margin: 12px auto 0;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.section-title:hover::after {
    width: 80px;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-grid img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-grid img:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.about-text h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.about-text p {
    margin-bottom: 12px;
    color: #555;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.95);
}

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

.card p {
    color: #555;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.card .btn-sm {
    display: inline-block;
    background: #007aff;
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.card .btn-sm:hover {
    background: #005bb5;
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* Testimonials */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.testimonial {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #ff6b35;
    transition: all 0.3s ease;
}

.testimonial:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.testimonial p {
    font-style: italic;
    margin-bottom: 12px;
}

.testimonial .author {
    font-weight: 600;
    color: #1d1d1f;
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 16px 0;
    transition: background 0.2s ease;
}

.faq-item:hover {
    background: rgba(255, 107, 53, 0.02);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 4px 0;
    color: #1d1d1f;
    transition: color 0.2s ease;
}

.faq-question:hover {
    color: #ff6b35;
}

.faq-question::after {
    content: '+';
    font-size: 1.4rem;
    transition: all 0.3s ease;
    color: #ff6b35;
}

.faq-item.open .faq-question::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-answer {
    padding-top: 12px;
    display: none;
    color: #555;
    line-height: 1.7;
    animation: fadeIn 0.3s ease;
}

.faq-item.open .faq-answer {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* HowTo */
.howto-steps {
    max-width: 700px;
    margin: 0 auto;
    counter-reset: step;
}

.howto-step {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    align-items: flex-start;
    transition: transform 0.3s ease;
}

.howto-step:hover {
    transform: translateX(10px);
}

.howto-step .step-num {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #ff6b35;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.howto-step:hover .step-num {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.howto-step .step-content h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.howto-step .step-content p {
    color: #555;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info p {
    margin-bottom: 8px;
    color: #555;
}

.contact-info strong {
    color: #1d1d1f;
}

.contact-grid form input,
.contact-grid form textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-grid form input:focus,
.contact-grid form textarea:focus {
    border-color: #ff6b35;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.contact-grid form button {
    transition: all 0.3s ease;
    background: #ff6b35;
    color: #fff;
    padding: 12px 32px;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.contact-grid form button:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer */
.site-footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
    margin-bottom: 24px;
}

.footer-grid h4 {
    color: #fff;
    margin-bottom: 12px;
    font-size: 1rem;
    position: relative;
    display: inline-block;
}

.footer-grid h4::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #ff6b35;
}

.footer-grid ul {
    list-style: none;
}

.footer-grid li {
    margin-bottom: 6px;
}

.footer-grid a {
    color: #aaa;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-grid a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

.footer-bottom a {
    color: #aaa;
    margin: 0 8px;
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: #fff;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    body {
        background: #121212;
        color: #e0e0e0;
    }

    .card,
    .testimonial,
    .faq-item {
        background: rgba(30, 30, 30, 0.9);
        border-color: #333;
    }

    .card {
        background: rgba(30, 30, 30, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .card:hover {
        background: rgba(40, 40, 40, 0.95);
    }

    .about-text p,
    .card p,
    .faq-answer,
    .contact-info p {
        color: #aaa;
    }

    .section-title {
        color: #f0f0f0;
    }

    .site-header {
        background: rgba(18, 18, 18, 0.95);
    }

    .hero {
        background: linear-gradient(135deg, #0d0d1a 0%, #1a1a2e 50%, #0f3460 100%);
    }

    .site-footer {
        background: #0d0d1a;
    }

    .faq-question {
        color: #e0e0e0;
    }

    .testimonial .author {
        color: #e0e0e0;
    }

    .contact-info strong {
        color: #e0e0e0;
    }

    .contact-grid form input,
    .contact-grid form textarea {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }

    .contact-grid form input:focus,
    .contact-grid form textarea:focus {
        border-color: #ff6b35;
        box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
    }

    section#services,
    section#testimonials,
    section#howto {
        background: #1a1a1a;
    }
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: #ff6b35;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.back-to-top:hover {
    background: #e55a2b;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

/* Scroll highlight */
.nav-links a.active-link {
    border-bottom-color: #ff6b35;
    color: #fff;
}

/* Animations for scroll */
@media (prefers-reduced-motion: no-preference) {
    .card,
    .testimonial,
    .howto-step {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.6s ease forwards;
    }

    .card:nth-child(1),
    .testimonial:nth-child(1),
    .howto-step:nth-child(1) {
        animation-delay: 0.1s;
    }

    .card:nth-child(2),
    .testimonial:nth-child(2),
    .howto-step:nth-child(2) {
        animation-delay: 0.2s;
    }

    .card:nth-child(3),
    .testimonial:nth-child(3),
    .howto-step:nth-child(3) {
        animation-delay: 0.3s;
    }

    .card:nth-child(4),
    .howto-step:nth-child(4) {
        animation-delay: 0.4s;
    }

    .card:nth-child(5),
    .howto-step:nth-child(5) {
        animation-delay: 0.5s;
    }

    .card:nth-child(6) {
        animation-delay: 0.6s;
    }
}

/* Utility */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 20px;
}

.mb-2 {
    margin-bottom: 20px;
}

/* Print */
@media print {
    .site-header,
    .back-to-top,
    .menu-toggle {
        display: none;
    }

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

    .hero {
        background: #fff;
        color: #000;
        padding: 40px 0;
    }

    .hero p {
        color: #333;
    }

    .card,
    .testimonial {
        background: #fff;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}