/* 基础变量定义 */
:root {
    --primary: #C8102E;      /* 传奇红色 */
    --secondary: #8B0000;    /* 深红色 */
    --gold: #D4AF37;         /* 金色 */
    --dark: #100A06;         /* 深色背景 */
    --dark-light: #1E150F;   /* 稍浅的深色 */
    --light-gold: #F5E8C8;   /* 浅金色文本 */
}

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局动画定义（整合HTML内联动画，统一管理） */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
/* 导航栏辉光动画 */
@keyframes navbarGlow {
    0% { 
        box-shadow: 0 4px 30px rgba(249, 212, 35, 0.6), 
                    0 0 40px rgba(255, 215, 0, 0.5) inset,
                    0 2px 3px rgba(255, 255, 255, 0.7) inset; 
    }
    100% { 
        box-shadow: 0 4px 40px rgba(249, 212, 35, 0.8), 
                    0 0 50px rgba(255, 215, 0, 0.7) inset,
                    0 2px 3px rgba(255, 255, 255, 0.9) inset; 
    }
}
/* 滚动后导航栏辉光动画 */
@keyframes navbarGlowScrolled {
    0% { box-shadow: 0 6px 35px rgba(249, 212, 35, 0.7); }
    100% { box-shadow: 0 6px 45px rgba(249, 212, 35, 0.9); }
}
/* 导航栏光泽流动动画 */
@keyframes shine {
    0% { background-position: -100% 0; }
    100% { background-position: 100% 0; }
}
/* LOGO文字发光动画 */
@keyframes textGlow {
    0% { 
        text-shadow: 0 1px 0 #fff,
                     0 2px 0 #f9d423,
                     0 3px 0 #e6c229,
                     0 4px 0 #c89b0e,
                     0 5px 15px rgba(0,0,0,0.4),
                     0 0 20px rgba(255, 215, 0, 0.5); 
    }
    100% { 
        text-shadow: 0 1px 0 #fff,
                     0 2px 0 #f9d423,
                     0 3px 0 #e6c229,
                     0 4px 0 #c89b0e,
                     0 5px 20px rgba(0,0,0,0.5),
                     0 0 30px rgba(255, 215, 0, 0.8); 
    }
}
/* 视频区域标题脉冲动画 */
@keyframes titlePulse {
    0% { 
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8),
                     0 0 20px rgba(255,215,0,0.6); 
    }
    100% { 
        text-shadow: 0 2px 15px rgba(0, 0, 0, 0.8),
                     0 0 30px rgba(255,215,0,0.9); 
        transform: scale(1.05); 
    }
}
/* 下载区域背景缓慢缩放动画 */
@keyframes slowZoom {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}
/* 下载区域背景脉冲动画 */
@keyframes slowPulse {
    0% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0.6; transform: scale(1); }
}
/* 下载区域装饰浮动动画 */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', sans-serif;
    scroll-behavior: smooth;
}

/* 自定义工具类 */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}
.text-shadow-gold {
    text-shadow: 0 0 5px #D4AF37, 0 0 10px #D4AF37;
}
.bg-texture {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* 顶部通知栏 */
.top-notice {
    background-color: var(--primary);
    position: relative;
    z-index: 10;
}

/* 导航栏3D炫彩效果（整合自HTML内联，删除冲突代码） */
#navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    /* 增强的渐变色彩 */
    background: linear-gradient(135deg, #c89b0e 0%, #f9d423 40%, #ffdf00 50%, #f9d423 60%, #c89b0e 100%) !important;
    background-color: var(--gold) !important; /* 复用全局金色变量，统一风格 */
    /* 增强的光影效果 */
    box-shadow: 0 4px 30px rgba(249, 212, 35, 0.6), 
                0 0 40px rgba(255, 215, 0, 0.5) inset,
                0 2px 3px rgba(255, 255, 255, 0.7) inset;
    border-bottom: 1px solid rgba(255, 215, 0, 0.5);
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: all 0.3s ease;
    /* 导航栏辉光动画 */
    animation: navbarGlow 3s ease-in-out infinite alternate;
}
/* 滚动时导航栏样式变化 */
#navbar.scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background-color: rgba(200, 155, 14, 0.98) !important;
    box-shadow: 0 6px 35px rgba(249, 212, 35, 0.8);
    animation: navbarGlowScrolled 2s ease-in-out infinite alternate;
}
/* 导航栏光泽效果 */
#navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.9) 50%, 
        rgba(255,255,255,0) 100%);
    opacity: 0.8;
    animation: shine 3s infinite linear;
}
/* LOGO文字3D效果 */
#navbar h1 {
    font-family: 'Ma Shan Zheng', cursive;
    text-shadow: 0 1px 0 #fff,
                 0 2px 0 #f9d423,
                 0 3px 0 #e6c229,
                 0 4px 0 #c89b0e,
                 0 5px 15px rgba(0,0,0,0.4),
                 0 0 20px rgba(255, 215, 0, 0.5);
    transform: translateZ(3px);
    transition: all 0.3s ease;
    /* 文字发光动画 */
    animation: textGlow 2s ease-in-out infinite alternate;
}
#navbar:hover h1 {
    transform: translateZ(8px) scale(1.05);
}

/* 导航链接样式（增强3D炫彩效果） */
.nav-link {
    position: relative;
    color: #3d2b00 !important;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    transform: translateZ(1px);
    text-shadow: 0 1px 0 rgba(255,255,255,0.7);
    border: 1px solid transparent;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff4e50, #f9d423);
    transition: width 0.3s ease;
}
.nav-link:hover {
    color: #fff !important;
    background-color: rgba(0,0,0,0.2);
    transform: translateZ(5px) translateY(-2px);
    text-shadow: 0 2px 8px rgba(0,0,0,0.5),
                 0 0 10px rgba(255,255,255,0.5);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3),
                0 0 15px rgba(255,215,0,0.3) inset;
    border-color: rgba(255,215,0,0.3);
}
.nav-link:hover::after {
    width: 100%;
}
.nav-link.active {
    color: #fff !important;
    background-color: rgba(0,0,0,0.25);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) inset,
                0 0 15px rgba(255,215,0,0.4) inset;
    border-color: rgba(255,215,0,0.4);
}

/* 移动端菜单样式（增强版） */
#mobile-menu {
    background: linear-gradient(180deg, #c89b0e 0%, #a0881a 100%) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3),
                0 0 20px rgba(255,215,0,0.2) inset;
    border-top: 1px solid rgba(255,215,0,0.3);
}
.mobile-nav-link {
    color: #3d2b00 !important;
    transition: all 0.3s ease;
    border-left-color: transparent;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}
.mobile-nav-link:hover, 
.mobile-nav-link.active {
    color: #fff !important;
    background-color: rgba(0,0,0,0.2);
    border-left-color: #f9d423;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5),
                 0 0 8px rgba(255,215,0,0.5);
    box-shadow: 0 0 10px rgba(255,215,0,0.2) inset;
}

/* 移动端菜单按钮效果 */
#mobile-menu-btn {
    transition: all 0.3s ease;
    transform: translateZ(1px);
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}
#mobile-menu-btn:hover {
    transform: translateZ(5px) rotate(90deg) scale(1.2);
    text-shadow: 0 0 15px rgba(255,255,255,0.8),
                 0 0 20px rgba(255,215,0,0.8);
}

/* CG视频背景样式（优化完全铺满） */
.cg-background {
    position: relative;
    width: 100%;
    height: 70vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
}
.cg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 1;
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
}
.cg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}
/* CG视频背景样式（优化完全铺满） */
.cg-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    /* 1. 删除 justify-content: center，取消强制垂直居中 */
    align-items: center; /* 只保留水平居中 */
    padding-bottom: 150px; /* 2. 底部预留 150px 空间，确保 #Download 向下移动后不被截断 */
    transform: none;
    z-index: 3;
    text-align: center;
    color: white;
}
.cg-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8),
                 0 0 20px rgba(255,215,0,0.6);
    animation: titlePulse 3s ease-in-out infinite alternate;
}
.cg-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8),
                 0 0 10px rgba(255,215,0,0.4);
}

/* 按钮样式 */
.btn-primary {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(200, 16, 46, 0.4);
}
.btn-primary:hover {
    background-color: var(--secondary);
    box-shadow: 0 0 15px rgba(200, 16, 46, 0.6);
    transform: translateY(-2px);
}
.btn-outline {
    display: inline-block;
    background-color: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 4px;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}
.btn-outline:hover {
    background-color: rgba(212, 175, 55, 0.1);
    color: var(--light-gold);
}

/* 轮播图样式 */
.carousel-container {
    position: relative;
}
.carousel-item {
    position: relative;
    height: 100%;
}
.carousel-desc {
    animation: fadeIn 1s ease-out;
}
.carousel-prev, 
.carousel-next {
    cursor: pointer;
}
.indicator-item {
    cursor: pointer;
    transition: all 0.3s ease;
}
.indicator-item.active {
    background-color: var(--gold);
    transform: scale(1.2);
}

/* 通用区域标题样式 */
.section-title {
    animation: slideUp 0.8s ease-out;
}

/* 游戏特色样式（整合重复代码，保留轮播发光效果） */
.feature-card {
    transition: all 0.5s ease;
}
.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}
/* 激活状态的发光效果 */
.feature-card.card-active {
    box-shadow: 0 0 20px 5px rgba(59, 130, 246, 0.5), 
                0 0 30px 10px rgba(59, 130, 246, 0.3),
                inset 0 0 10px rgba(59, 130, 246, 0.5);
    border-color: rgba(59, 130, 246, 0.8) !important;
}
/* 文字高亮效果 */
.feature-card.card-active h3 {
    color: #2563eb;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
}
/* 图标高亮效果 */
.feature-card.card-active .feature-icon {
    background-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.7);
}
.feature-card.card-active .feature-icon i {
    color: #1d4ed8;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
}

/* 职业卡片样式 */
.class-card {
    transition: all 0.5s ease;
}
.class-card:hover {
    transform: translateY(-10px);
}

/* 新闻卡片样式 */
.news-card {
    transition: all 0.3s ease;
}
.news-card:hover {
    transform: translateY(-5px);
}

/* 下载卡片样式（增强3D和炫彩效果） */
.download-card {
    transition: all 0.3s ease;
    position: relative;
    transition: all 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.download-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}
/* 激活状态的发光效果 */
.download-card.card-active {
    box-shadow: 0 15px 40px -15px rgba(59, 130, 246, 0.2), 
                0 0 30px rgba(139, 92, 246, 0.1),
                inset 0 0 15px rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.3) !important;
}
/* 文字高亮效果 */
.download-card.card-active h3 {
    color: #1e40af;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}
/* 悬停时图标脉冲效果 */
.download-card:hover .download-icon i {
    animation: pulse 2s ease-in-out infinite;
}

/* 常见问题样式 */
.faq-question {
    cursor: pointer;
    padding: 8px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}
.faq-question.active i {
    transform: rotate(45deg);
}

/* 下载区域专属样式（整合动态效果） */
#download {
    position: relative;
    overflow: hidden;
}
/* 下载区域背景纹理 */
#download .absolute.inset-0.opacity-20 {
    z-index: 0;
}
#download .absolute.inset-0.bg-\[\'./images/热血传奇背景图9.png\'\] {
    background-cover: cover;
    background-fixed: fixed;
    animation: slowZoom 25s ease-in-out infinite;
}
/* 下载区域炫彩背景光效 */
#download .absolute.top-1\/4.left-1\/3 {
    width: 96px;
    height: 96px;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    filter: blur(120px);
    z-index: -10;
    animation: slowPulse 5s ease-in-out infinite;
}
#download .absolute.bottom-1\/3.right-1\/3 {
    width: 80px;
    height: 80px;
    background-color: rgba(139, 92, 246, 0.1);
    border-radius: 50%;
    filter: blur(100px);
    z-index: -10;
    animation: slowPulse 5s ease-in-out infinite;
    animation-delay: 1.5s;
}
#download .absolute.top-2\/3.left-1\/4 {
    width: 64px;
    height: 64px;
    background-color: rgba(249, 115, 22, 0.1);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -10;
    animation: slowPulse 5s ease-in-out infinite;
    animation-delay: 3s;
}
/* 下载区域大外框3D效果 */
#download .border-2.border-transparent {
    background-clip: padding-box;
    border-image: linear-gradient(to right, rgba(59,130,246,0.5), rgba(139,92,246,0.5), rgba(236,72,153,0.5)) 1;
    transform-style: preserve-3d;
    perspective: 1000px;
    transform: translateZ(5px);
}
/* 下载卡片3D旋转效果 */
#download .download-card:hover {
    transform: rotateX(2deg) rotateY(2deg) translateY(-8px);
}
/* 下载图标3D效果 */
#download .download-icon {
    transform-style: preserve-3d;
}
#download .download-icon:hover {
    transform: rotateX(10deg) rotateY(10deg) scale(1.1);
}

/* #Download 下载按钮区域样式（保持原有定位） */
#Download {
    width: 665px;
    height: 121px;
    text-align: center;
    position: absolute;
    bottom: 55px;
    left: 50%;
    margin-left: -338px;
    z-index: 51;
    border-radius: 5px;
    background: url(../images/xz.png) no-repeat left top;
}
#Download .btn_down_s1 {
    float: left;
    width: 162px;
    height: 50px;
    text-indent: -999em;
    margin-left: 145px;
    margin-top: 10px;
}
#Download .btn_down_s2 {
    float: left;
    width: 162px;
    height: 47px;
    text-indent: -999em;
    margin-left: -162px;
    margin-top: 60px;
}
#Download .btn_down_s3 {
    float: left;
    width: 99px;
    height: 100px;
    text-indent: -999em;
    margin-left: 18px;
    margin-top: 8px;
}
#Download .btn_down_s4 {
    position: absolute;
    right: 0;
    top: 0;
    float: left;
    width: 109px;
    height: 110px;
    text-indent: -999em;
    overflow: hidden;
    margin-right: 0px;
    margin-top: 0px;
}

/* 页脚样式（避免与下载区域重叠） */
.footer {
    margin-top: 191px; /* 121（下载区高度）+50（bottom定位）+20（冗余） */
}

/* 响应式调整 */
@media (max-width: 768px) {
    .carousel-desc {
        bottom: 4px;
    }
    .carousel-desc h2 {
        font-size: 1.8rem;
        margin-bottom: 2px;
    }
    .carousel-desc p {
        font-size: 1rem;
        margin-bottom: 4px;
    }
    .btn-primary, 
    .btn-outline {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    /* 移动端视频区域适配 */
    .cg-background {
        height: 50vh;
    }
    .cg-title {
        font-size: 2rem;
    }
    .cg-subtitle {
        font-size: 1rem;
    }
    /* 移动端下载按钮区域适配 */
    #Download {
        width: 90%;
        margin-left: -45%;
        background-size: cover;
    }
    #Download .btn_down_s1 {
        margin-left: 30%;
    }
    /* 移动端下载卡片适配 */
    #download .download-card {
        padding: 6px;
    }
    #download .download-icon {
        width: 20px;
        height: 20px;
    }
    #download .download-icon i {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .carousel-desc h2 {
        font-size: 1.5rem;
    }
    .carousel-desc p {
        display: none;
    }
    .section-title h2 {
        font-size: 1.8rem;
    }
    /* 移动端视频区域进一步适配 */
    .cg-background {
        height: 40vh;
    }
    .cg-title {
        font-size: 1.5rem;
    }
    /* 移动端下载按钮区域隐藏部分按钮 */
    #Download .btn_down_s3,
    #Download .btn_down_s4 {
        display: none;
    }
    #Download .btn_down_s1 {
        margin-left: 25%;
    }
}