/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", Arial, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: #2d8cf0;
    transition: color 0.3s ease;
}

a:hover {
    color: #1c7ed6;
}

/* 导航栏样式 */
.nav-container {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.site-title {
    font-size: 1.6rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-title i {
    color: #3498db;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
}

.nav-menu a.active {
    border-bottom: 2px solid #3498db;
    color: #3498db;
}

.nav-menu a:hover {
    color: #3498db;
}

/* 主要内容样式 */
.main-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* 通用区块样式 */
.intro-section, .note-list-section, .category-section, 
.progress-section, .tag-section, .search-filter-section,
.full-note-list, .category-detail-section, .note-header,
.note-content, .related-notes, .about-section, .error-page {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

h2 i {
    color: #3498db;
}

h3 {
    color: #2c3e50;
    margin: 1.2rem 0 0.8rem;
}

h4 {
    color: #444;
    margin: 1rem 0 0.6rem;
}

p {
    margin-bottom: 1rem;
    color: #555;
}

ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    color: #555;
}

/* 笔记卡片样式 */
.note-card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.8rem;
    margin-top: 1rem;
}

.note-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1.8rem;
    transition: all 0.3s ease;
    background-color: white;
}

.note-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.note-tag {
    display: inline-block;
    background-color: #e8f4fd;
    color: #2d8cf0;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.note-card h3 {
    margin-bottom: 0.8rem;
    font-size: 1.15rem;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #777;
    margin-top: 1rem;
}

.note-date, .note-words {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* 更多按钮 */
.more-btn {
    text-align: center;
    margin-top: 2rem;
}

.more-btn a {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.more-btn a:hover {
    background-color: #2980b9;
    color: white;
}

/* 分类卡片样式 */
.category-card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.category-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    color: #333;
}

.category-card:hover {
    background-color: #e8f4fd;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.category-card i {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 1rem;
}

.category-card h3 {
    margin-bottom: 0.5rem;
}

.category-card .count {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 0.8rem;
}

/* 学习进度样式 */
.progress-container {
    margin-top: 1rem;
}

.progress-item {
    margin-bottom: 1.5rem;
}

.progress-item h4 {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #3498db;
    border-radius: 4px;
    transition: width 1s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: #777;
    margin-top: 0.3rem;
}

/* 标签云样式 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
}

.tag {
    display: inline-block;
    background-color: #f0f2f5;
    color: #555;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: #3498db;
    color: white;
}

/* 搜索和筛选样式 */
.search-filter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem 2rem;
}

.search-box {
    flex: 1;
    min-width: 300px;
    display: flex;
    align-items: center;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 1rem;
    color: #999;
}

.search-box input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    border-color: #3498db;
}

.search-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: #2980b9;
}

.filter-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-select, .sort-select {
    padding: 0.7rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    font-size: 0.95rem;
    color: #555;
}

/* 笔记表格样式 */
.note-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background-color: white;
}

.note-table th, .note-table td {
    padding: 1.2rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.note-table th {
    background-color: #f8f9fa;
    color: #2c3e50;
    font-weight: 500;
}

.note-table tr:hover {
    background-color: #f8f9fa;
}

.status {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.status.completed {
    background-color: #e6f7e6;
    color: #52c41a;
}

.status.writing {
    background-color: #fff7e6;
    color: #faad14;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #555;
    transition: all 0.3s ease;
}

.page-btn:hover {
    border-color: #3498db;
    color: #3498db;
}

.page-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.page-btn.disabled {
    color: #ccc;
    cursor: not-allowed;
}

.page-btn.disabled:hover {
    border-color: #ddd;
    color: #ccc;
}

/* 分类详情样式 */
.category-note-list {
    margin-top: 1rem;
}

.category-note-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid #eee;
}

.category-note-item:last-child {
    border-bottom: none;
}

.item-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #777;
    margin-top: 0.5rem;
}

.item-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* 笔记详情样式 */
.note-header {
    padding-bottom: 1.5rem;
}

.note-header h1 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.note-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 1.5rem;
}

.note-header-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.note-content {
    line-height: 1.8;
}

.note-content-inner {
    max-width: 800px;
    margin: 0 auto;
}

pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid #eee;
}

code {
    font-family: "Consolas", "Monaco", monospace;
    font-size: 0.95rem;
    color: #e53935;
}

pre code {
    color: #333;
}

/* 相关笔记样式 */
.related-note-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.related-note-item {
    padding: 1.5rem;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

.related-note-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* 关于页样式 */
.about-content {
    line-height: 1.8;
}

.about-item {
    margin-bottom: 2rem;
}

.about-item h3 {
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-item h3 i {
    color: #3498db;
}
/* 404页面样式 */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-icon {
    font-size: 4rem;
    color: #faad14;
    margin-bottom: 1.5rem;
}

.error-page h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.error-page p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1.5rem;
}

.error-page ul {
    text-align: left;
    max-width: 400px;
    margin: 0 auto 2rem;
    color: #666;
}

.error-btn {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.error-btn a {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-btn a:hover {
    background-color: #2980b9;
    color: white;
}

/* 页脚整体样式优化 */
.footer-container {
    background-color: #2c3e50;
    color: white;
    padding: 2.5rem 0 1.5rem;
    margin-top: 3rem;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 通用页脚区样式 */
.footer-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

/* 备案信息区样式 */
.beian-section {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
    justify-content: center;
}

.beian-logo img {
    width: 18px;
    height: 18px;
}

.beian-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.beian-info a {
    color: #fff;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.beian-info a:hover {
    color: #3498db;
    text-decoration: underline;
}

.beian-info span {
    color: #ddd;
    font-size: 0.95rem;
}

/* 网站信息区样式 */
.info-section {
    justify-content: space-between;
}

.footer-column {
    flex: 1;
    min-width: 300px;
}

.footer-column p {
    color: #ddd;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-column i {
    color: #3498db;
    margin-right: 0.5rem;
}

/* 合规声明区样式 */
.disclaimer-section {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    text-align: center;
}

.disclaimer-section p {
    color: #ccc;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

.disclaimer-section a {
    color: #3498db;
    transition: color 0.3s ease;
}

.disclaimer-section a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 响应式适配 */
@media (max-width: 992px) {
    .note-card-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }

    .nav-menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-menu li {
        margin: 0 1rem;
    }

    .main-container {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .intro-section, .note-list-section, .category-section, 
    .progress-section, .tag-section, .search-filter-section,
    .full-note-list, .category-detail-section, .note-header,
    .note-content, .related-notes, .about-section, .error-page {
        padding: 1.5rem 1rem;
    }

    .note-card-container, .category-card-container, .related-note-list {
        grid-template-columns: 1fr;
    }

    .search-filter-section {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .search-box {
        min-width: 100%;
    }

    .filter-box {
        justify-content: flex-start;
    }

    .note-table th, .note-table td {
        padding: 0.8rem 0.5rem;
        font-size: 0.9rem;
    }

    .error-page h1 {
        font-size: 2rem;
    }

    .error-icon {
        font-size: 3rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-column {
        min-width: 100%;
    }
    
    .beian-section {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .beian-info {
        flex-direction: column;
        align-items: center;
        gap: 0.3rem;
    }
    
    .info-section {
        flex-direction: column;
        gap: 1rem;
    }
    
    .disclaimer-section p {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-menu li {
        margin: 0 0.5rem;
    }

    .nav-menu a {
        font-size: 0.9rem;
    }

    .site-title {
        font-size: 1.4rem;
    }

    .note-header h1 {
        font-size: 1.5rem;
    }

    .pagination {
        gap: 0.3rem;
    }

    .page-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .error-btn {
        flex-direction: column;
    }

    .error-btn a {
        width: 100%;
    }
}

/* 通用动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro-section, .note-list-section, .category-section, 
.progress-section, .tag-section {
    animation: fadeIn 0.5s ease forwards;
}

.note-card {
    animation: fadeIn 0.6s ease forwards;
}

.note-card:nth-child(2) {
    animation-delay: 0.1s;
}

.note-card:nth-child(3) {
    animation-delay: 0.2s;
}

.note-card:nth-child(4) {
    animation-delay: 0.3s;
}

.note-card:nth-child(5) {
    animation-delay: 0.4s;
}

.note-card:nth-child(6) {
    animation-delay: 0.5s;
}

/* 笔记详情页新增样式 */
.note-breadcrumb {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 1rem;
}

.note-breadcrumb a {
    color: #3498db;
}

.note-breadcrumb a:hover {
    text-decoration: underline;
}

/* 笔记目录样式 */
.note-toc {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #3498db;
}

.toc-list {
    list-style: none;
    margin: 0;
}

.toc-list li {
    margin: 0.8rem 0;
}

.toc-sub {
    list-style: none;
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.toc-sub li {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.toc-list a {
    color: #555;
    transition: color 0.3s ease;
}

.toc-list a:hover {
    color: #3498db;
    text-decoration: underline;
}

/* 内容区块样式 */
.content-section {
    margin-bottom: 3rem;
}

.content-subsection {
    margin-bottom: 2rem;
}

.content-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 1px solid #eee;
}

.content-card h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.card-item {
    background-color: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #eee;
}

.card-item h5 {
    color: #3498db;
    margin-bottom: 0.5rem;
}

/* 提示框样式 */
.tip-box {
    background-color: #e8f4fd;
    border-left: 4px solid #3498db;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin: 1.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.tip-box i {
    color: #3498db;
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

/* 总结框样式 */
.summary-box {
    background-color: #f0f8fb;
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid #e8f4fd;
}

.summary-box h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 相关笔记优化 */
.related-note-item {
    padding: 1.5rem;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.related-note-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #3498db;
}

.related-note-item .note-tag {
    display: inline-block;
    background-color: #e8f4fd;
    color: #2d8cf0;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .note-toc {
        padding: 1rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .tip-box {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .summary-box {
        padding: 1.5rem 1rem;
    }
}

/* 页脚整体样式优化 */
.footer-container {
    background-color: #2c3e50;
    color: white;
    padding: 2.5rem 0 1.5rem;
    margin-top: 3rem;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 备案信息样式（核心新增） */
.footer-beian {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-beian .beian-logo img {
    width: 18px;
    height: 18px;
}

.footer-beian .beian-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-beian .beian-info a {
    color: #fff;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-beian .beian-info a:hover {
    color: #3498db;
    text-decoration: underline;
}

.footer-beian .beian-info p {
    color: #ddd;
    font-size: 0.95rem;
    margin: 0;
}

/* 网站信息区样式 */
.footer-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
}

.footer-left, .footer-right {
    flex: 1;
    min-width: 300px;
}

.footer-info p {
    color: #ddd;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-info i {
    color: #3498db;
    margin-right: 0.5rem;
}

/* 合规声明区样式 */
.footer-disclaimer {
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-disclaimer p {
    color: #ccc;
    font-size: 0.9rem;
    text-align: center;
    margin: 0;
    line-height: 1.6;
}

.footer-disclaimer a {
    color: #3498db;
    transition: color 0.3s ease;
}

.footer-disclaimer a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .footer-content {
        padding: 0 1.5rem;
    }
    
    .footer-beian {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .footer-beian .beian-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .footer-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-left, .footer-right {
        min-width: 100%;
    }
    
    .footer-disclaimer p {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .footer-container {
        padding: 2rem 0 1rem;
    }
    
    .beian-info a,
    .beian-info span {
        font-size: 0.9rem;
    }
    
    .footer-column p,
    .disclaimer-section p {
        font-size: 0.85rem;
    }
    
    .footer-container {
        padding: 2rem 0 1rem;
    }
}