/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    line-height: 1.6;
}

/* 主容器 */
.main-container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

/* 头部区域 */
.header-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    margin: 0 auto 1.5rem;
    display: block;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.header-section h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 300;
}

/* 内容区块 */
.content-section {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.content-section h2 {
    color: #2d3748;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.content-section h2 i {
    margin-right: 12px;
    color: #667eea;
    font-size: 1.4rem;
}

.content-section h3 {
    color: #444;
    font-size: 20px;
    margin-top: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.content-section h3 i {
    margin-right: 8px;
    color: #667eea;
}

.content-section p {
    color: #4a5568;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* 媒体展示区域样式 */
.media-section {
    margin-bottom: 20px;
}

.media-section:last-child {
    margin-bottom: 0;
}

/* 媒体网格 */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* 照片库图片样式 */
.gallery-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* 视频容器样式 */
.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
}

/* 视频加载动画样式 */
.video-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.video-loading i {
    color: #667eea;
    margin-bottom: 10px;
}

/* 视频错误样式 */
.video-error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    text-align: center;
    padding: 20px;
}

.video-error i {
    color: #e53e3e;
    margin-bottom: 10px;
}

.video-error p {
    color: #4a5568;
    margin: 5px 0;
}

.video-error .error-message {
    color: #718096;
    font-size: 14px;
    margin-top: 10px;
    margin-bottom: 15px;
}

/* 博客文章网格 */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Gitee网络图展示样式 */
.gitee-graph-display {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 24px;
    overflow: hidden;
}

/* 网络图头部样式 - 主标题区块 */
.gitee-graph-display .graph-title-main {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    display: block;
    width: 100%;
}

.gitee-graph-display .graph-title-main h3 {
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.gitee-graph-display .graph-title-main p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* 本地网络图容器 */
.local-graph-container {
    background-color: #f8fafc;
    border: 2px dashed #ddd;
    border-radius: 8px;
    margin-bottom: 30px;
    position: relative;
    min-height: 300px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.local-graph-container:hover {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* 占位符样式 */
.graph-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    text-align: center;
    color: #666;
}

.graph-placeholder i {
    margin-bottom: 15px;
    opacity: 0.7;
}

.graph-placeholder p {
    margin: 5px 0;
    font-size: 16px;
}

.graph-placeholder code {
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
}

/* 网络图图像样式 */
.local-graph-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    transition: transform 0.3s ease, max-height 0.3s ease;
    cursor: zoom-in;
    display: block;
    border-radius: 8px;
    margin: 0 auto;
}

.local-graph-image:hover {
    transform: scale(1.01);
}

/* 代码块样式 */
.code-block {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    overflow-x: auto;
    border-left: 4px solid #4299e1;
}

.code-block pre {
    margin: 0;
}

.code-block code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: #2d3748;
}

/* 选项卡样式 */
.graph-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.option-card {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.option-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.option-card h5 {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.option-card ul, .option-card ol {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
    padding-left: 20px;
}

.option-card li {
    margin-bottom: 8px;
}

.option-card code {
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    font-size: 13px;
}

/* 项目展示区域标题样式 - 二级标题 */
.content-section .graph-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f4f8;
    flex-wrap: wrap;
    gap: 1rem;
}

.graph-title h4 {
    color: #2d3748;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    margin: 0;
}

.graph-title h4 i {
    margin-right: 8px;
    color: #c94141;
}

.update-info {
    color: #718096;
    font-size: 0.9rem;
}

/* 博客文章卡片 */
.blog-post-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.blog-post-card h3 {
    color: #2d3748;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.blog-post-card p {
    color: #4a5568;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #4a5568;
    color: white;
}

.btn-secondary:hover {
    background: #2d3748;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.media-grid img,
.media-grid .media-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media-grid img:hover,
.media-grid .media-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.media-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.media-grid video {
    width: 100%;
    height: 300px;
    border-radius: 12px;
}

/* Gitee仓库卡片 */
.repo-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.repo-header {
    background: linear-gradient(90deg, #c94141 0%, #e05d5d 100%);
    color: white;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.repo-info h3 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.repo-info h3 i {
    margin-right: 10px;
    font-size: 1.4rem;
}

.repo-info p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.repo-stats {
    display: flex;
    gap: 1.5rem;
}

.stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    min-width: 80px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease;
}

.stat .number {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.stat .label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.repo-content {
    padding: 2rem;
}

.graph-container {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: #f8fafc;
}

.commit-graph {
    min-height: 200px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.repo-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn i {
    margin-right: 8px;
}

.repo-footer {
    background: #f7fafc;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-top: 1px solid #e2e8f0;
}

.last-update {
    color: #718096;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.last-update i {
    margin-right: 5px;
}

.external-links {
    display: flex;
    gap: 1.5rem;
}

.external-links a {
    color: #718096;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.external-links a:hover {
    color: #c94141;
}

.external-links a i {
    margin-right: 5px;
}

/* 联系方式部分 */
.contact-section {
    text-align: center;
}

.contact-info {
    margin: 1.5rem 0;
}

.contact-info p {
    margin: 1rem 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
}

.contact-info p i {
    margin-right: 10px;
    color: #667eea;
    font-size: 1.2rem;
}

.social-links {
    margin-top: 1.5rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin: 0 8px;
    font-size: 1.4rem;
    color: #667eea;
    background: #f7fafc;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-3px);
}

/* 页脚 */
.footer-section {
    text-align: center;
    margin-top: 3rem;
    color: #718096;
    font-size: 0.9rem;
    padding: 1.5rem 0;
}

/* BJUT课程笔记区域特殊样式 */
.courses-highlight {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-left: 4px solid #667eea;
}

.courses-highlight h2 i {
    color: #667eea;
}

.courses-highlight .notes-grid {
    gap: 1.2rem;
}

/* 笔记子部分样式 */
.notes-subsection {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.notes-subsection:last-child {
    border-bottom: none;
}

/* 笔记目录样式 */
.notes-directory h3 {
    color: #2d3748;
    margin-bottom: 1.5rem;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.note-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.note-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.note-card h4 {
    color: #4a5568;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.note-card h4 i {
    margin-right: 8px;
    color: #667eea;
}

.note-card ul {
    list-style: none;
    padding: 0;
}

.note-card li {
    margin-bottom: 0.8rem;
}

.note-card a {
    color: #4a5568;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.note-card a:hover {
    color: #667eea;
}

.note-card a::before {
    content: "→";
    margin-right: 8px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(-10px);
}

.note-card a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* 仓库更新动态样式 */
.repo-updates h3 {
    color: #2d3748;
    margin-bottom: 1.5rem;
}

.update-timeline {
    position: relative;
    padding-left: 2rem;
}

.update-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #e2e8f0;
    border-radius: 3px;
}

.update-item {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f4f8;
}

.update-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.update-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 16px;
    height: 16px;
    background: #667eea;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
}

.update-date {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.update-content h4 {
    color: #2d3748;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.update-content p {
    color: #4a5568;
    font-size: 1rem;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .header-section {
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .avatar {
        width: 120px;
        height: 120px;
    }
    
    .header-section h1 {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .content-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .content-section h2 {
        font-size: 1.5rem;
    }
    
    .media-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .media-grid img {
        height: 200px;
    }
    
    .media-grid video {
        height: 250px;
    }
    
    .repo-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
    }
    
    .repo-stats {
        width: 100%;
        justify-content: space-between;
        margin-top: 1rem;
    }
    
    .repo-content {
        padding: 1.5rem;
    }
    
    .repo-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .repo-footer {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
    }
    
    .external-links {
        width: 100%;
        justify-content: space-between;
        margin-top: 1rem;
    }
    
    .graph-title {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .contact-info p {
        justify-content: flex-start;
    }
    
    .social-links a {
        width: 45px;
        height: 45px;
        margin: 0 5px;
        font-size: 1.2rem;
    }
    
    /* 笔记介绍响应式调整 */
    .notes-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .update-timeline {
        padding-left: 1.5rem;
    }
    
    .update-item::before {
        left: -1.5rem;
        width: 12px;
        height: 12px;
        border-width: 2px;
    }
}

@media (max-width: 480px) {
    .header-section {
        padding: 1.5rem 1rem;
    }
    
    .avatar {
        width: 100px;
        height: 100px;
    }
    
    .header-section h1 {
        font-size: 1.8rem;
    }
    
    .content-section {
        padding: 1rem;
    }
    
    .repo-stats {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .stat {
        width: 100%;
    }
}
