/* 引入免费字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* CSS变量定义 */
:root {
    --primary-color: #ffa500;
    --text-color: #ffffff;
    --bg-dark: #000000;
    --bg-darker: #0a0a0a;
    --container-width: 1200px;
    --header-height: 90px;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

/* 首页特殊样式：禁止滚动 */
html.home-page {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Noto Sans SC', 'Source Han Sans CN', 'Microsoft YaHei', 'SimHei', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 首页body使用flex布局 */
body.home-page {
    height: 100vh;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
}

/* 容器 */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* 顶部导航栏 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: #000000;
    backdrop-filter: blur(0px);
    z-index: 1001;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-shadow: none;
}

/* 滚动后的浮动效果 */
.header.scrolled {
    background-color: #000000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    position: relative;
    z-index: 1002;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 120px;
    height: auto;
    max-height: 60px;
    object-fit: contain;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-chinese {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.logo-english {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-color);
    letter-spacing: 1px;
    line-height: 1.2;
}

/* 导航菜单 */
.nav {
    display: flex;
    gap: 46px;
    align-items: center;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: 500;
}

/* 菜单遮罩层 - 默认隐藏 */
.nav-overlay {
    display: none;
    /* 防止页面跳转时的样式闪烁 */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    position: relative;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* 主视觉区域 */
.main {
    margin-top: var(--header-height);
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.hero-slider {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 10%;
}

.hero-text {
    max-width: var(--container-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: textShowHide 8s ease-in-out;
    white-space: nowrap;
    opacity: 0;
    letter-spacing: 0.1em;
}

.hero-subtitle {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out 0.3s both;
    white-space: nowrap;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes textShowHide {
    0% {
        opacity: 0;
    }
    12.5% {
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    77.5% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* 轮播控制按钮 */
.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.slider-btn {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-color);
    font-size: 30px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: all;
}

.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 轮播指示点 */
.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: var(--primary-color);
    width: 30px;
    border-radius: 6px;
}

/* 底部 */
.footer {
    background-color: #000000;
    padding: 15px 0 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    position: relative;
    z-index: 1001;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: center;
}

.footer-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: nowrap;
    width: 100%;
}

.footer-logo {
    width: 87px;
    height: auto;
    object-fit: contain;
    display: block;
    margin-bottom: 0;
    margin-top: -20px;
    flex-shrink: 0;
}

.footer-section-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
    white-space: nowrap;
    flex: 1;
    text-align: center;
}

.footer-brand h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.footer-slogan {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 20px;
}


/* 社交媒体图标 */
.social-icons {
    display: flex;
    gap: 8px;
    margin-top: 0;
    flex-shrink: 0;
}

.social-item {
    position: relative;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link i {
    font-size: 16px;
    line-height: 1;
}

.social-link.wechat:hover {
    background-color: #07c160;
    color: white;
}

.social-link.bilibili:hover {
    background-color: #fb7299;
    color: white;
}

.social-link.douyin:hover {
    background-color: #000000;
    color: white;
}

.social-link.weibo:hover {
    background-color: #e6162d;
    color: white;
}

/* 二维码弹出层 */
.qr-code-popup {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 100;
}

.qr-code-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: white;
}

.social-item:hover .qr-code-popup {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.qr-code-popup img {
    width: 150px;
    height: 150px;
    background-color: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 版权信息 */
.copyright {
    text-align: center;
    margin-top: 60px;
}

.copyright p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 3px;
    line-height: 1.4;
}

/* 底部链接 */
.footer-right {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
    justify-content: flex-end;
}

.footer-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.footer-link:hover {
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .header {
        height: 60px;
    }

    .main {
        margin-top: 60px;
    }

    .logo-img {
        width: 90px;
        max-height: 45px;
    }

    .footer-logo {
        width: 50px;
        margin-bottom: 0;
    }

    /* 菜单遮罩层 */
    .nav-overlay {
        display: block;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 1001;
        pointer-events: none;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
    }

    .header .container {
        overflow: visible !important;
    }

    .nav {
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        width: 320px !important;
        max-width: 85vw !important;
        height: calc(100vh - 60px) !important;
        min-height: calc(100vh - 60px) !important;
        bottom: 0 !important;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.98) 0%, rgba(10, 10, 10, 0.98) 100%) !important;
        backdrop-filter: blur(20px) !important;
        flex-direction: column !important;
        padding: 30px 20px !important;
        gap: 0 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        z-index: 1002 !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        /* 确保初始状态正确 */
        opacity: 1 !important;
        visibility: visible !important;
    }

    .nav.active {
        transform: translateX(0) !important;
    }
    
    /* 确保非激活状态时菜单隐藏 */
    .nav:not(.active) {
        transform: translateX(-100%) !important;
    }

    .nav-link {
        display: block;
        padding: 16px 20px;
        font-size: 16px;
        font-weight: 500;
        color: var(--text-color);
        text-decoration: none;
        border-radius: 8px;
        transition: all 0.3s ease;
        position: relative;
        margin-bottom: 4px;
    }

    .nav-link::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 0;
        background: linear-gradient(180deg, var(--primary-color), #ff8c00);
        border-radius: 0 3px 3px 0;
        transition: height 0.3s ease;
    }

    .nav-link:hover,
    .nav-link:active {
        background-color: rgba(255, 165, 0, 0.1);
        color: var(--primary-color);
        padding-left: 28px;
        transform: translateX(5px);
    }

    .nav-link:hover::before,
    .nav-link:active::before {
        height: 60%;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-slider {
        flex: 1;
        min-height: 0;
    }

    .hero-title,
    .hero-subtitle {
        font-size: 36px;
    }

    .slide-overlay {
        padding: 0 5%;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .footer {
        padding: 15px 0 12px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-brand {
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-right {
        align-items: center;
        justify-content: center;
    }

    .social-icons {
        justify-content: center;
        margin-left: 0;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .hero-title,
    .hero-subtitle {
        font-size: 36px;
    }

    .logo-img {
        width: 70px;
        max-height: 35px;
    }

    .footer-logo {
        width: 100px;
        margin-bottom: 0;
    }

    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .qr-code-popup img {
        width: 120px;
        height: 120px;
    }
}

/* 浏览器兼容性 */
@supports not (backdrop-filter: blur(10px)) {
    .header {
        background-color: #000000;
    }
    
    .header.scrolled {
        background-color: #000000;
    }
}

/* 清除浮动 */
.clearfix::after {
    content: '';
    display: table;
    clear: both;
}
