/* AI知识卡片网站 - 统一样式文件 */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==================== 科技感背景动画 ==================== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundShift 10s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ==================== 容器样式 ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== 导航栏样式 ==================== */
.nav-bar {
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(120, 119, 198, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    gap: 20px;
    justify-content: center;
    padding: 10px 0;
}

.nav-bar a,
.nav-bar .nav-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: rgba(240, 240, 240, 0.1);
    border-radius: 8px;
    text-decoration: none;
    color: #ffffff; /* 默认文字颜色为白色 */
    transition: all 0.3s ease;
}

.nav-bar a:hover {
    background-color: rgba(120, 119, 198, 0.3);
    color: #7877c6;
    transform: translateY(-2px);
}

.nav-bar .current {
    background: linear-gradient(45deg, #7877c6, #ff77c6);
    color: white;
    font-weight: bold;
    cursor: default;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(120, 119, 198, 0.4);
}

/* ==================== 移动端菜单按钮 ==================== */
.menu-toggle {
    display: none;
    background: linear-gradient(45deg, #7877c6, #ff77c6);
    color: white;
    padding: 10px 15px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    margin: 10px auto;
    box-shadow: 0 2px 8px rgba(120, 119, 198, 0.4);
}

/* ==================== 主要内容区域 ==================== */
.main-content {
    margin-top: 80px; /* 需要与导航栏高度匹配 */
    min-height: calc(100vh - 80px - 120px); /* 减去导航栏和页脚的大致高度 */
    padding: 2rem 0;
}

/* ==================== 首页特殊样式 ==================== */
.hero-section {
    text-align: center;
    padding: 4rem 0;
    position: relative;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #7877c6, #ff77c6, #77dbff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #b0b0b0;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== 按钮样式 ==================== */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(45deg, #7877c6, #ff77c6);
    color: white;
    box-shadow: 0 4px 15px rgba(120, 119, 198, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #7877c6;
    border: 2px solid #7877c6;
}

.btn:hover {
    box-shadow: 0 8px 25px rgba(120, 119, 198, 0.6);
    transform: translateY(-3px);
}

.btn:active {
    transform: translateY(-1px);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* ==================== 内容页面样式 ==================== */
.page-header {
    text-align: center;
    padding: 3rem 0;
    border-bottom: 1px solid rgba(120, 119, 198, 0.3);
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #7877c6;
    margin-bottom: 1rem;
}

.page-description {
    font-size: 1.2rem;
    color: #b0b0b0;
    max-width: 600px;
    margin: 0 auto;
}

/* ==================== 内容卡片样式 ==================== */
.content-section {
    margin-bottom: 4rem;
}

.content-card {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(120, 119, 198, 0.3);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7877c6, #ff77c6, #77dbff);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-card:hover::before {
    opacity: 1;
}

.content-card:hover {
    box-shadow: 0 10px 30px rgba(120, 119, 198, 0.3);
    border-color: rgba(120, 119, 198, 0.6);
    transform: translateY(-5px);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
}

.card-content {
    color: #d0d0d0;
    line-height: 1.8;
}

/* ==================== 特殊内容块样式 ==================== */
/* 小节标题 (如"主要应用:", "技术特点"等) */
.subsection-title {
    color: #7877c6;
    margin: 1.5rem 0 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
}

/* 列表样式 (ul, ol) */
.card-content ul,
.card-content ol {
    color: #d0d0d0;
    line-height: 2;
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.card-content li {
    margin-bottom: 0.5rem;
}

/* 链接样式 */
.card-content a {
    color: #77dbff;
    text-decoration: none;
}

.card-content a:hover {
    text-decoration: underline;
    color: #ff77c6;
}

/* 图片说明文字 */
.image-caption {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #b0b0b0;
    text-align: center;
    font-style: italic;
}

/* 关键点回顾框 */
.key-points-box {
    background: rgba(120, 119, 198, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid #7877c6;
}

.key-points-title {
    color: #7877c6;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* 下一章提示区域 */
.next-chapter-prompt {
    text-align: center;
    margin-top: 2rem;
}

.next-chapter-prompt > p {
    margin-bottom: 1rem;
}

/* ==================== 图片样式 ==================== */
.card-content img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin: 1rem 0;
    display: block;
}

.image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, rgba(120, 119, 198, 0.2), rgba(255, 119, 198, 0.2));
    border: 2px dashed rgba(120, 119, 198, 0.5);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7877c6;
    font-size: 1.1rem;
    margin: 1rem 0;
    transition: all 0.3s ease;
}

.image-placeholder:hover {
    background: linear-gradient(45deg, rgba(120, 119, 198, 0.3), rgba(255, 119, 198, 0.3));
    border-color: rgba(120, 119, 198, 0.8);
}

/* ==================== 视频容器样式 ==================== */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
    border-radius: 8px;
    overflow: hidden;
    background-color: #000;
    margin: 1rem 0;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    outline: none;
}

/* ==================== 网格布局 ==================== */
.grid {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

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

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

/* ==================== 页脚样式 ==================== */
.footer {
    background: rgba(15, 15, 35, 0.95);
    border-top: 1px solid rgba(120, 119, 198, 0.3);
    padding: 2rem 0;
    text-align: center;
    color: #b0b0b0;
    margin-top: 4rem;
}

.footer-subtext {
    margin-top: 0.5rem;
    color: #7877c6;
}

/* ==================== 加载动画 ==================== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(120, 119, 198, 0.3);
    border-radius: 50%;
    border-top-color: #7877c6;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 15, 35, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #7877c6, #ff77c6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #9896d4, #ff95d1);
}

/* ==================== 返回顶部按钮 ==================== */
#topBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 20px;
    z-index: 99;
    font-size: 16px;
    border: none;
    outline: none;
    background: linear-gradient(45deg, #7877c6, #ff77c6);
    color: white;
    cursor: pointer;
    padding: 12px 15px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background 0.3s ease;
}

#topBtn:hover {
    background: linear-gradient(45deg, #9896d4, #ff95d1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

#topBtn:active {
    transform: translateY(-2px);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    /* 基础调整 */
    body {
        font-size: 16px;
    }

    .container {
        padding: 0 15px;
    }

    /* 导航栏 */
    .menu-toggle {
        display: block;
    }

    .nav-bar {
        display: none;
        flex-direction: column;
        gap: 10px;
        align-items: center;
        padding: 10px 0;
    }

    .nav-bar.active {
        display: flex;
    }

    .nav-bar a,
    .nav-bar .nav-link {
        width: 90%;
        text-align: center;
        padding: 12px;
    }

    /* 主要内容 */
    .main-content {
        margin-top: 70px; /* 适应移动端导航栏高度 */
        padding: 1.5rem 0;
    }

    /* 首页 */
    .hero-title {
        font-size: 2.5rem;
    }

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

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

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

    /* 内容页 */
    .page-title {
        font-size: 2rem;
    }

    .page-description {
        font-size: 1.1rem;
    }

    .content-card {
        padding: 1.5rem;
    }

    .card-title {
        font-size: 1.3rem;
    }

    /* 网格 */
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    /* 页脚 */
    .footer {
        padding: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .page-title {
        font-size: 1.8rem;
    }

    .content-card {
        padding: 1rem;
    }

    .subsection-title {
        font-size: 1.1rem;
    }

    .card-content ul,
    .card-content ol {
        padding-left: 1rem;
    }

    #topBtn {
        bottom: 20px;
        right: 15px;
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* ==================== 响应式表格 (针对 page4.html) ==================== */
/* 默认隐藏 data-label，仅在小屏幕上显示 */
@media screen and (max-width: 768px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .responsive-table {
        min-width: 100%;
        border-collapse: collapse;
    }

    .responsive-table thead {
        display: none; /* 隐藏桌面端表头 */
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
    }

    .responsive-table tr {
        margin-bottom: 1rem;
        background: rgba(26, 26, 46, 0.8);
        border: 1px solid rgba(120, 119, 198, 0.3);
        border-radius: 8px;
        padding: 1rem;
    }

    .responsive-table td {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border: none;
        position: relative;
        padding-left: 40%; /* 为伪元素 label 留出空间 */
    }

    .responsive-table td::before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 0;
        top: 0.5rem;
        width: 35%;
        font-weight: bold;
        color: #7877c6;
    }
}
/* --- 针对 page4.html 的团队成员表格样式 --- */
.team-table {
    width: 100%;
    border-collapse: separate; /* 关键：允许设置单元格间距 (cellspacing) 和边框 */
    border-spacing: 0; /* 移除默认的单元格间距 */
    /* 添加外边框 */
    border: 1px solid rgba(120, 119, 198, 0.5); 
    border-radius: 8px; /* 给表格添加圆角 */
    overflow: hidden; /* 隐藏超出圆角的内容 */
}

.team-table th,
.team-table td {
    /* 添加内边距 */
    padding: 12px 15px; 
    /* 添加边框 - 只设置右边和下边，避免双重边框 */
    border-right: 1px solid rgba(120, 119, 198, 0.3); 
    border-bottom: 1px solid rgba(120, 119, 198, 0.3); 
    text-align: left; /* 文本左对齐 */
}

/* 移除最右边单元格的右边框 */
.team-table th:last-child,
.team-table td:last-child {
    border-right: none;
}

/* 移除底部表体单元格的下边框 */
.team-table tbody tr:last-child td {
    border-bottom: none;
}

/* 表头样式 */
.team-table thead th {
    background-color: rgba(120, 119, 198, 0.2); /* 柔和的背景色 */
    color: #ffffff; /* 文字颜色 */
    font-weight: bold;
}

/* 表格主体行悬停效果 (可选) */
.team-table tbody tr:hover {
    background-color: rgba(120, 119, 198, 0.05); 
}

/* 移动端响应式表格的边框调整 */
@media screen and (max-width: 768px) {
    .team-table tr {
        /* 为每个行添加边框，因为在移动端它们会变成块状 */
        border: 1px solid rgba(120, 119, 198, 0.3);
        border-radius: 8px;
        margin-bottom: 1rem; /* 行与行之间的间距 */
        padding: 1rem; /* 行内部的填充 */
    }

    .team-table td {
        /* 移除移动端单元格的原有边框 */
        border: none;
        border-bottom: 1px solid rgba(120, 119, 198, 0.2);
        /* 调整内边距 */
        padding: 0.5rem 0 0.5rem 40%;
        position: relative;
        padding-left: 40%; /* 为伪元素 label 留出空间 */
    }

    /* 确保移动端最后一个td没有下边框 */
    .team-table tr td:last-child {
        border-bottom: none;
    }

    /* 移除移动端伪元素的边框相关样式冲突 */
    .team-table td::before {
        /* ... 保持原有样式 ... */
        /* 移除可能存在的边框样式 */
        border: none;
    }
}
```