/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局自定义鼠标指针 */
html, body {
    cursor: url('../images/nf2.cur'), auto;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background-color: rgba(10, 10, 10, 0.3);
    background-image: url('../images/bg_body.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 有视频背景的页面仍然显示背景图（作为fallback和内容区域背景），使用半透明样式 */
body.has-video-background {
    background-color: rgba(10, 10, 10, 0.6);
    background-image: url('../images/bg_body.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    position: relative;
}

/* 添加半透明遮罩层，使背景图呈现半透明效果 */
body.has-video-background::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
    pointer-events: none;
}


/* 顶部导航栏 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
    z-index: 1000;
    backdrop-filter: blur(10px);
    min-height: 70px;
    height: auto;
}

.header-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    height: auto;
    gap: 0.75rem;
    width: 100%;
    box-sizing: border-box;
}

.logo-section {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-width: fit-content;
}

.main-nav {
    flex: 1 1 auto;
    justify-content: center;
    overflow: visible;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
    row-gap: 0.3rem;
}

.header-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-shrink: 0;
    min-width: fit-content;
}

.logo-icon {
    font-size: 28px;
    font-weight: normal;
    color: #4a9eff;
    line-height: 1;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.nav-link {
    color: #cccccc;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 6px 5px;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-block;
    line-height: 1.3;
}

.nav-link:hover {
    color: #ffffff;
}

.nav-link.active {
    color: #4a9eff;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #4a9eff;
}

.icon-link {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-link:hover {
    color: #4a9eff;
}

/* 英雄区域 */
.hero-section {
    position: relative;
    width: 100%;
    height: 600px;
    margin-top: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: contain;
    object-position: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(74, 158, 255, 0.03) 2px,
            rgba(74, 158, 255, 0.03) 4px
        );
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.4) 0%, rgba(10, 10, 10, 0.6) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    pointer-events: none;
}

.hero-title {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #4a9eff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 22px;
    color: #b0b0b0;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* 主要内容区域 */
.content-section {
    position: relative;
    background: transparent;
    padding: 2rem 0;
    min-height: calc(100vh - 100px);
}

.content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: none;
    opacity: 0;
    pointer-events: none;
}

.content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.content-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.section-description {
    font-size: 18px;
    color: #888888;
    max-width: 600px;
    margin: 0 auto;
}

/* 功能卡片网格 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 80px;
}

.feature-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4a9eff, #8a2be2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: #4a9eff;
    box-shadow: 0 10px 30px rgba(74, 158, 255, 0.2);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    color: #4a9eff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.feature-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ffffff;
}

.feature-description {
    font-size: 15px;
    color: #aaaaaa;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.feature-link {
    color: #4a9eff;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
}

.feature-link:hover {
    gap: 12px;
}

/* 代码展示区域 */
.code-showcase {
    background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 60px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.code-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #30363d;
}

.code-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

.code-block {
    background: #010409;
    border: 1px solid #21262d;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #c9d1d9;
}

.code-block code {
    color: #c9d1d9;
}

.code-block .keyword {
    color: #ff7b72;
}

.code-block .string {
    color: #a5d6ff;
}

.code-block .comment {
    color: #8b949e;
}

/* 页脚 */
.footer {
    background: linear-gradient(to top, #0a0a0a 0%, #151515 100%);
    border-top: 1px solid #2a2a2a;
    padding: 80px 0 30px;
    margin-top: 80px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #4a9eff, transparent);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
    margin-bottom: 3rem;
    justify-content: center;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #4a9eff, transparent);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links li {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.3s ease;
}

.footer-links li::before {
    content: '▸';
    position: absolute;
    left: -15px;
    color: #4a9eff;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 12px;
}

.footer-links li:hover::before {
    opacity: 1;
    left: -12px;
}

.footer-links li:hover {
    padding-left: 8px;
}

.footer-links li a {
    color: #aaaaaa;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links li a:hover {
    color: #4a9eff;
    transform: translateX(4px);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    padding-top: 2.5rem;
    border-top: 1px solid #2a2a2a;
    position: relative;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #4a9eff, transparent);
}

.footer-bottom p {
    color: #888888;
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* 移动端通用优化 */
@media (max-width: 480px) {
    .content-container {
        padding: 0 0.75rem;
    }
    
    .content-section {
        padding: 0.75rem 0;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .section-description {
        font-size: 13px;
    }
    
    .feature-card {
        padding: 1rem;
    }
    
    .features-grid {
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .footer-container,
    .footer-bottom {
        padding: 0 1rem;
    }
    
    .footer-main {
        gap: 1.5rem;
    }
}

/* 中等屏幕优化 */
@media (max-width: 1600px) {
    .header-container {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
        min-height: 75px;
    }
    
    .main-nav {
        gap: 0.4rem;
        row-gap: 0.3rem;
    }
    
    .nav-link {
        font-size: 12.5px;
        padding: 6px 4px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .logo-icon {
        font-size: 24px;
    }
    
    .header-actions {
        gap: 0.5rem;
        font-size: 13px;
    }
}

@media (max-width: 1400px) {
    .header-container {
        padding: 0.5rem 0.75rem;
        gap: 0.4rem;
        min-height: 80px;
    }
    
    .main-nav {
        gap: 0.35rem;
        row-gap: 0.3rem;
    }
    
    .nav-link {
        font-size: 12px;
        padding: 6px 3px;
    }
    
    .logo-text {
        font-size: 15px;
    }
    
    .logo-icon {
        font-size: 22px;
    }
    
    .header-actions {
        gap: 0.4rem;
        font-size: 12px;
    }
}

@media (max-width: 1200px) {
    .header-container {
        padding: 0.5rem 0.5rem;
        gap: 0.3rem;
        min-height: 85px;
    }
    
    .main-nav {
        gap: 0.3rem;
        row-gap: 0.3rem;
    }
    
    .nav-link {
        font-size: 11.5px;
        padding: 6px 2px;
    }
    
    .logo-text {
        font-size: 14px;
    }
    
    .logo-icon {
        font-size: 20px;
    }
    
    .header-actions {
        gap: 0.3rem;
        font-size: 11px;
    }
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* 移动端导航菜单 */
.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
    border-bottom: 1px solid #2a2a2a;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    z-index: 999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-link {
    display: block;
    padding: 15px 20px;
    color: #cccccc;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid #2a2a2a;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: rgba(74, 158, 255, 0.1);
    color: #4a9eff;
}

.mobile-nav-divider {
    height: 1px;
    background: #2a2a2a;
    margin: 10px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-container {
        padding: 0.5rem 0.5rem;
        gap: 0.3rem;
        min-height: 60px;
    }
    
    .logo-section {
        gap: 5px;
    }
    
    .logo-text {
        font-size: 13px;
    }
    
    .logo-icon {
        font-size: 18px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
    }
    
    .header-actions {
        gap: 0.3rem;
        font-size: 11px;
    }
    
    .mobile-nav {
        top: 60px;
    }
    
    .header {
        min-height: 60px;
    }
    
    .forum-page-content, .wiki-page-content {
        margin-top: 60px !important;
        min-height: calc(100vh - 60px) !important;
    }

    .hero-section {
        height: 500px;
    }

    .hero-video {
        min-width: 100%;
        min-height: 100%;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .section-title {
        font-size: 32px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .content-container {
        padding: 0 1rem;
    }
    
    .content-section {
        padding: 1rem 0;
        margin-top: 60px;
    }
    
    .content-header {
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 0.5rem;
    }
    
    .section-description {
        font-size: 14px;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-title {
        font-size: 20px;
    }
    
    .feature-description {
        font-size: 14px;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-section {
        margin-bottom: 2rem;
    }
    
    /* 表格响应式 */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 表单响应式 */
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"],
    textarea,
    select {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* 按钮响应式 */
    button,
    .btn,
    input[type="submit"],
    input[type="button"] {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 12px 16px;
    }
    
    /* 图片响应式 */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* 防止横向滚动 */
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    * {
        max-width: 100%;
    }
    
    /* 确保所有容器在移动端正确显示 */
    .content-section,
    .forum-page-content,
    .wiki-page-content {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 修复表格溢出 */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 修复代码块溢出 */
    pre,
    code {
        word-wrap: break-word;
        white-space: pre-wrap;
    }
    
    /* 修复长链接 */
    a {
        word-break: break-word;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3a3a;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card {
    animation: fadeIn 0.6s ease-out;
}

.feature-card:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.3s;
}

.feature-card:nth-child(4) {
    animation-delay: 0.4s;
}

