/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f7;
    overflow-x: hidden;
}

/* 主容器 */
.container {
    display: flex;
    min-height: 100vh;
}

/* 左侧导航栏 */
.sidebar {
    width: 160px;
    background-color: #1a1a2e;
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.sidebar-nav ul {
    list-style: none;
}

/* 背景纹理字体效果 */
.content-texture-bg {
    position: relative;
}

/* 背景纹理字体样式 - 从左到右向上斜起 */
/* 1. 右侧纹理 */
.content-texture-bg::before {
    content: '图龙网络科技工作室';
    position: absolute;
    top: 30%;
    left: 20px; /* 确保在侧边栏右侧显示 */
    font-size: 35px;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.03);
    transform: rotate(15deg) scale(1.1); /* 正值15度确保字体从左到右向上斜起 */
    transform-origin: left center;
    z-index: 0;
    pointer-events: none;
    letter-spacing: 10px;
    white-space: nowrap;
}

/* 2. 顶部纹理 */
.content-texture-bg::after {
    content: '图龙网络科技工作室';
    position: absolute;
    top: 2%;
    left: calc(50% + 80px); /* 考虑侧边栏宽度的偏移 */
    font-size: 35px;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.03);
    transform: translateX(-50%) rotate(15deg) scale(1.1); /* 正值15度确保字体从左到右向上斜起 */
    z-index: 0;
    pointer-events: none;
    letter-spacing: 10px;
    white-space: nowrap;
}

/* 3. 底部纹理 - 增强显示效果 */
.texture-bottom {
    content: '图龙网络科技工作室';
    position: absolute;
    bottom: 5%;
    left: calc(50% + 80px); /* 考虑侧边栏宽度的偏移 */
    font-size: 35px;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.04); /* 稍微增加不透明度以增强底部纹理可见度 */
    transform: translateX(-50%) rotate(15deg) scale(1.2); /* 正值15度确保字体从左到右向上斜起，并略微放大 */
    z-index: 0;
    pointer-events: none;
    letter-spacing: 10px;
    white-space: nowrap;
    display: block;
}

/* 为确保所有纹理可见，增加一个额外的伪元素用于底部备份 */
.section::before {
    content: '图龙网络科技工作室';
    position: absolute;
    bottom: 5%;
    left: calc(50% + 80px);
    font-size: 35px;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.04); /* 稍微增加不透明度以增强底部纹理可见度 */
    transform: translateX(-50%) rotate(15deg) scale(1.2); /* 正值15度确保字体从左到右向上斜起，并略微放大 */
    z-index: 0;
    pointer-events: none;
    letter-spacing: 10px;
    white-space: nowrap;
}

/* 底部区域额外纹理 - 确保底部有清晰的向上斜起纹理 */
.main-content::after {
    content: '图龙网络科技工作室';
    position: absolute;
    bottom: 2%;
    left: 50%;
    transform: translateX(-50%) rotate(15deg) scale(1.3); /* 正值15度确保字体从左到右向上斜起，并适当放大 */
    font-size: 35px;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.03);
    z-index: -1;
    pointer-events: none;
    letter-spacing: 12px;
    white-space: nowrap;
}

/* 响应式设计 - 确保在不同屏幕尺寸下都保持从左到右向上斜起的效果 */
@media (max-width: 1200px) {
    .content-texture-bg::before {
        left: 15px;
        font-size: 30px;
        transform: rotate(15deg) scale(1.1); /* 正值15度确保字体从左到右向上斜起 */
    }
    
    .content-texture-bg::after,
    .texture-bottom,
    .section::before {
        left: calc(50% + 70px);
        font-size: 30px;
        transform: translateX(-50%) rotate(15deg) scale(1.2); /* 正值15度确保字体从左到右向上斜起，并略微放大 */
    }
    
    /* 底部额外纹理的响应式调整 */
    .main-content::after {
        font-size: 30px;
        transform: translateX(-50%) rotate(15deg) scale(1.3); /* 保持向上斜起效果 */
    }
    
    /* 卡片区域纹理的响应式调整 */
    .card-container::before,
    .concepts-grid::before {
        font-size: 30px;
    }
}

@media (max-width: 992px) {
    .content-texture-bg::before {
        left: 10px;
        font-size: 28px;
        transform: rotate(15deg) scale(1.1); /* 正值15度确保字体从左到右向上斜起 */
    }
    
    .content-texture-bg::after,
    .texture-bottom,
    .section::before {
        left: calc(50% + 60px);
        font-size: 28px;
        transform: translateX(-50%) rotate(15deg) scale(1.2); /* 正值15度确保字体从左到右向上斜起，并略微放大 */
    }
    
    /* 底部额外纹理的响应式调整 */
    .main-content::after {
        font-size: 28px;
        transform: translateX(-50%) rotate(15deg) scale(1.3); /* 保持向上斜起效果 */
    }
    
    /* 卡片区域纹理的响应式调整 */
    .card-container::before,
    .concepts-grid::before {
        font-size: 28px;
    }
}

/* 移动端适配 - 侧边栏隐藏时调整纹理位置 */
@media (max-width: 768px) {
    .content-texture-bg::before {
        display: none; /* 移动端隐藏左侧垂直纹理 */
    }
    
    .content-texture-bg::after,
    .texture-bottom,
    .section::before {
        left: 50%;
        font-size: 24px;
        transform: translateX(-50%) rotate(15deg) scale(1.2); /* 正值15度确保字体从左到右向上斜起，并略微放大 */
    }
    
    /* 底部额外纹理的响应式调整 */
    .main-content::after {
        left: 50%;
        font-size: 24px;
        transform: translateX(-50%) rotate(15deg) scale(1.3); /* 保持向上斜起效果 */
        letter-spacing: 8px;
    }
    
    /* 卡片区域纹理的响应式调整 */
    .card-container::before,
    .concepts-grid::before {
        font-size: 24px;
        letter-spacing: 6px;
    }
}

.main-content {
    position: relative;
    background-color: #fff;
}

.section {
    position: relative;
    z-index: 1;
}

.nav-item {
    transition: background-color 0.3s ease;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    color: #b0b0b0;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-item a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-item.active a {
    color: #fff;
    background-color: #0071e3;
    border-left: 4px solid #00c3ff;
}

/* 导航项触摸效果 */
.nav-item.touched a {
    background-color: rgba(0, 113, 227, 0.2);
    transition: background-color 0.1s ease;
}

.nav-item i {
    font-size: 1.2rem;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

/* 右侧内容区域 - 优化布局 */
.main-content {
    margin-left: 160px;
    flex: 1;
    padding: 24px;
    background-color: #f8f9fa;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    max-width: calc(100% - 160px);
    background-image: none; /* 移除背景图案 */
}

/* 内容区块样式 */
.section {
    background-color: transparent;
    padding: 24px;
    margin-bottom: 0;
    transition: transform 0.3s ease;
    min-height: calc(100vh - 48px);
}

.section-header {
    margin-bottom: 32px;
    text-align: center;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
    background: linear-gradient(90deg, #0071e3, #00c3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    font-size: 1.1rem;
    color: #5f5f5f;
    max-width: 700px;
    margin: 0 auto;
}

.section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e5ea;
}

/* 卡片容器 - 优化布局 */
.card-container,
.concepts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
    position: relative;
}

/* 为中间卡片区域添加从左到右向上斜起的纹理 */
.card-container::before,
.concepts-grid::before {
    content: '图龙网络科技工作室';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%) rotate(15deg) scale(1.1); /* 正值15度确保字体从左到右向上斜起 */
    font-size: 35px;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.02); /* 略微降低不透明度，避免影响卡片内容 */
    z-index: -1;
    pointer-events: none;
    letter-spacing: 10px;
    white-space: nowrap;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 32px 0;
}

/* 卡片样式 */
.card,
.stat-card {
    background-color: #ffffff;
    border-radius: 16px;
    border: 1px solid #e8e8ec;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.card::before,
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #0071e3, #00c3ff);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.card:hover,
.stat-card:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 16px 32px rgba(0, 113, 227, 0.15);
    border-color: #0071e3;
}

.card:hover::before,
.stat-card:hover::before {
    transform: scaleX(1);
}

/* 统计卡片样式 */
.stat-card {
    display: flex;
    align-items: center;
    padding: 24px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.stat-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #0071e3, #00c3ff);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-right: 20px;
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.35);
    flex-shrink: 0;
}

.stat-content h4 {
    font-size: 1.35rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.stat-card:hover .stat-content h4 {
    color: #0071e3;
}

.stat-content p {
    color: #5f5f5f;
    margin-bottom: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.card-header {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9ff, #ffffff);
    border-bottom: 1px solid #e8e8ec;
    transition: all 0.3s ease;
}

.card:hover .card-header {
    background: linear-gradient(135deg, #e8f0ff, #f8f9ff);
    border-bottom-color: #0071e3;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0071e3, #00c3ff);
    color: #fff;
    font-size: 1.4rem;
    margin-right: 16px;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.25);
    transition: transform 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 113, 227, 0.35);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
    transition: color 0.3s ease;
}

.card:hover .card-title {
    color: #0071e3;
}

.card-content {
    padding: 24px;
}

.card-content p {
    color: #5f5f5f;
    margin-bottom: 20px;
    line-height: 1.65;
    font-size: 0.95rem;
}

.card-content ul {
    list-style: none;
    padding-left: 0;
}

.card-content li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    color: #5f5f5f;
    line-height: 1.65;
    font-size: 0.95rem;
}

.card-content li:before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #0071e3;
    transition: transform 0.3s ease;
}

.card:hover .card-content li:before {
    transform: scale(1.5);
}

/* AI首页英雄区域 */
.intro-card {
    background: linear-gradient(135deg, #ffffff, #f8f9ff);
    border-radius: 16px;
    padding: 32px;
    margin: 32px 0;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8f0ff;
}

.intro-card h3 {
    font-size: 1.75rem;
    color: #1a1a2e;
    margin-bottom: 16px;
    font-weight: 600;
}

.intro-card p {
    font-size: 1.1rem;
    color: #5f5f5f;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.feature-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.highlight-item {
    background-color: #ffffff;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #e8e8ec;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.highlight-item:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 16px 32px rgba(0, 113, 227, 0.15);
    border-color: #0071e3;
}

.highlight-icon {
    font-size: 2.5rem;
    color: #0071e3;
    margin-bottom: 16px;
    display: block;
}

.highlight-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 12px;
}

.highlight-item p {
    color: #5f5f5f;
    font-size: 1rem;
    margin-bottom: 0;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #0071e3;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-menu-btn:hover {
    background-color: #0051a3;
    transform: scale(1.05);
}

.mobile-menu-btn.active {
    background-color: #dc3545;
}

.mobile-menu-btn.pressed {
    transform: scale(0.9);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.menu-icon {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #fff;
    position: relative;
    transition: background-color 0.3s ease;
}

.menu-icon:before,
.menu-icon:after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: #fff;
    transition: transform 0.3s ease;
}

.menu-icon:before {
    top: -8px;
}

.menu-icon:after {
    bottom: -8px;
}

.mobile-menu-btn.active .menu-icon {
    background-color: transparent;
}

.mobile-menu-btn.active .menu-icon:before {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn.active .menu-icon:after {
    transform: translateY(-8px) rotate(-45deg);
}

/* 错误消息样式 */
.error-message {
    text-align: center;
    padding: 60px 20px;
}

.error-message h2 {
    color: #dc3545;
    margin-bottom: 16px;
}

.error-message p {
    color: #5f5f5f;
    font-size: 1.1rem;
}

/* 移动设备触摸优化的全局样式 */
@media (hover: none) {
    .card:hover,
    .section:hover,
    .highlight-item:hover {
        transform: none;
    }
    
    .card:active,
    .highlight-item:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .card-container,
    .concepts-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .stats-container {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 18px;
    }
    
    .main-content {
        padding: 24px;
    }
    
    .section {
        padding: 24px;
    }
}

@media (max-width: 992px) {
    .card-container,
    .concepts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }
    
    .stats-container {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
    
    .section h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px; /* 移动端稍微宽一点 */
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.3); /* 更深的阴影 */
    }
    
    .sidebar.active {
        transform: translateX(0);
        /* 添加移动端侧边栏动画效果 */
        animation: slideIn 0.3s ease-out;
    }
    
    /* 侧边栏滑入动画 */
    @keyframes slideIn {
        from { transform: translateX(-100%); }
        to { transform: translateX(0); }
    }
    
    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding: 16px;
        padding-top: 70px; /* 为固定的移动菜单按钮留出空间 */
        transition: padding-top 0.3s ease;
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        /* 在移动设备上添加按下效果 */
    }
    
    .mobile-menu-btn:active {
        transform: scale(0.95);
    }
    
    .section {
        padding: 20px;
    }
    
    .card-container,
    .concepts-grid,
    .stats-container,
    .feature-highlights {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .section h2 {
        font-size: 1.5rem;
        padding-bottom: 10px;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .intro-card p {
        font-size: 1rem;
    }
    
    /* 移动端卡片优化 */
    .card, .stat-card, .highlight-item {
        border-radius: 12px;
        overflow: hidden;
    }
    
    .card-header {
        padding: 16px;
    }
    
    .card-content {
        padding: 16px;
    }
    
    /* 移动端内容区触摸反馈 */
    .section, .card, .highlight-item, .stat-card {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* 增强移动端内容可读性 */
    .card-content p, .card-content li {
        font-size: 1rem;
        line-height: 1.7;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 12px;
    }
    
    .section {
        padding: 16px;
        border-radius: 8px;
    }
    
    .section h2 {
        font-size: 1.35rem;
    }
    
    .card-header {
        padding: 16px;
    }
    
    .card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .card-content {
        padding: 16px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #1a1a2e;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #666;
}