/* ============================================
   凡人修仙传：星海飞驰 - 主样式表
   修仙主题 · 响应式设计 · SEO优化
   ============================================ */

/* ===== CSS 变量 ===== */
:root {
    --primary: #c9a84c;
    --primary-dark: #a8883a;
    --primary-light: #e4cc7a;
    --secondary: #1a1a2e;
    --secondary-light: #16213e;
    --accent: #e94560;
    --text: #e8e6e3;
    --text-muted: #a0a0b0;
    --bg-dark: #0a0a14;
    --bg-card: rgba(20, 20, 40, 0.8);
    --border: rgba(201, 168, 76, 0.2);
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    --shadow-gold: 0 4px 30px rgba(201, 168, 76, 0.15);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container: 1200px;
    --header-height: 72px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Header / Navigation ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.header.scrolled {
    background: rgba(10, 10, 20, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.logo img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 2px solid var(--primary);
    transition: var(--transition);
}

.logo:hover img {
    border-color: var(--primary-light);
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.3);
}

.logo-text {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    display: block;
    padding: 8px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: rgba(201, 168, 76, 0.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero / Banner Slider ===== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.hero-slider {
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,10,20,0.6) 0%, rgba(10,10,20,0.3) 50%, rgba(10,10,20,0.8) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 50%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    letter-spacing: 4px;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text);
    margin-bottom: 12px;
    font-weight: 500;
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 动画延迟 */
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 36px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #1a1a2e;
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #1a1a2e;
    transform: translateY(-2px);
}

.btn-large {
    padding: 18px 48px;
    font-size: 1.1rem;
}

.btn-icon {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* ===== Slider Controls ===== */
.slider-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary);
    transform: scale(1.2);
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.slider-arrow:hover {
    background: var(--primary);
    color: #1a1a2e;
}

.slider-prev { left: 24px; }
.slider-next { right: 24px; }

/* ===== Game Info Cards ===== */
.game-info {
    margin-top: -60px;
    position: relative;
    z-index: 10;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.info-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-gold);
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.info-card h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.info-card p {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
}

/* ===== Section Headers ===== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-top: 20px;
}

/* ===== Features Section ===== */
.features {
    padding: 100px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: var(--shadow-gold);
}

.feature-img {
    overflow: hidden;
    aspect-ratio: 16/10;
}

.feature-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.feature-card:hover .feature-img img {
    transform: scale(1.05);
}

.feature-text {
    padding: 24px;
}

.feature-text h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.feature-text p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ===== Welfare Section ===== */
.welfare {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--secondary-light) 50%, var(--bg-dark) 100%);
}

.welfare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.welfare-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.welfare-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: var(--transition);
}

.welfare-item:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-gold);
}

.welfare-item:hover::before {
    opacity: 1;
}

.welfare-item.highlight {
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.15), rgba(201, 168, 76, 0.05));
    border-color: var(--primary);
}

.welfare-icon {
    font-size: 2.8rem;
    margin-bottom: 16px;
}

.welfare-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.welfare-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== About Section ===== */
.about {
    padding: 100px 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 24px;
}

.about-text p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.about-tags span {
    padding: 6px 16px;
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--primary);
}

.about-image img {
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    box-shadow: var(--shadow);
}

/* ===== Gallery Section ===== */
.gallery {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--secondary-light) 50%, var(--bg-dark) 100%);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 2px solid var(--border);
    transition: var(--transition);
    aspect-ratio: 16/9;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item::after {
    content: '🔍';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    font-size: 2rem;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.gallery-item:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-gold);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ===== Download Section ===== */
.download {
    padding: 100px 0;
    text-align: center;
}

.download-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 16px;
}

.download-content > p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.download-date {
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 40px;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.download-qr {
    text-align: center;
}

.download-qr p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* QR Code */
.qr-code {
    width: 140px;
    height: 140px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code img,
.qr-code canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

/* Hero按钮二维码下拉 */
.btn-qr-wrapper {
    position: relative;
    display: inline-block;
}

.qr-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.btn-qr-wrapper:hover .qr-dropdown {
    display: inline-block;
}

.qr-dropdown-content {
    display: inline-block;
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(201, 168, 76, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: fadeUp 0.25s ease;
    width: 180px;
    box-sizing: border-box;
}

.qr-dropdown-content::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--primary);
}

.qr-dropdown-content p {
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 600;
}

.qr-dropdown-content .qr-code {
    width: 120px;
    height: 120px;
    margin-bottom: 8px;
    box-shadow: none;
    padding: 4px;
}

.qr-dropdown-content > span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== 友情链接 ===== */
.friend-links {
    padding: 50px 0;
    border-top: 1px solid var(--border);
    background: var(--secondary);
}

.friend-links-title {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-weight: 600;
    letter-spacing: 2px;
}

.friend-links-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.friend-links-grid a {
    display: inline-block;
    padding: 8px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.friend-links-grid a:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(201, 168, 76, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.1);
}

/* ===== Footer ===== */
.footer {
    padding: 60px 0 30px;
    border-top: 1px solid var(--border);
    background: var(--secondary);
}

.footer-content {
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 24px;
}

.footer-brand img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--primary);
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

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

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

.footer-copy {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.8;
}

/* ===== Lightbox ===== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: 0 0 60px rgba(201, 168, 76, 0.2);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--primary);
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: #1a1a2e;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.3);
}

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

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.5);
}

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

.animate-fadeUp {
    animation: fadeUp 0.8s ease forwards;
}

.animate-in {
    animation: fadeUp 0.8s ease forwards;
}

/* ===== Responsive Design ===== */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.8rem;
    }

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

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        order: -1;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .hero {
        height: 90vh;
        min-height: 500px;
    }

    .hero-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-desc {
        font-size: 0.9rem;
        padding: 0 16px;
    }

    /* Mobile Nav */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(10, 10, 20, 0.98);
        backdrop-filter: blur(20px);
        padding: 20px;
        gap: 4px;
        transform: translateY(-120%);
        transition: transform 0.3s ease;
        border-bottom: 1px solid var(--border);
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .nav-link {
        padding: 14px 20px;
        font-size: 1rem;
        border-radius: 8px;
    }

    .info-cards {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .info-card {
        padding: 20px 16px;
    }

    .info-icon {
        font-size: 2rem;
    }

    .info-card p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .features {
        padding: 60px 0;
    }

    .welfare {
        padding: 60px 0;
    }

    .welfare-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .gallery {
        padding: 60px 0;
    }

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

    .download {
        padding: 60px 0;
    }

    .download-content h2 {
        font-size: 2rem;
    }

    .download-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-large {
        width: 100%;
        max-width: 300px;
    }

    .slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .slider-prev { left: 12px; }
    .slider-next { right: 12px; }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }

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

    .info-cards {
        grid-template-columns: 1fr;
    }

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

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

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 24px;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .about-text h2 {
        font-size: 1.6rem;
    }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
