/* ===================================
   技术笔记页面通用样式
   =================================== */

/* 技术笔记首页英雄区域 */
.tech-notes-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
    margin-top: 60px;
}

.tech-notes-hero h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.tech-notes-hero p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* 分类容器 */
.categories-container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

/* 分类网格布局 */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* 分类卡片 */
.category-card {
    background: white;
    border-radius: 15px;
    padding: 35px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--card-color1), var(--card-color2));
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.category-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.category-title {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 10px;
}

.category-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.category-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}

.note-count {
    background: linear-gradient(135deg, var(--card-color1), var(--card-color2));
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.95em;
}

.view-more {
    color: #667eea;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-more:hover {
    color: #764ba2;
}

/* ===================================
   分类详情页样式
   =================================== */

/* 分类英雄区域 */
.category-hero {
    color: white;
    padding: 80px 0 60px;
    text-align: center;
    margin-top: 60px;
}

.category-hero h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.category-hero p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* 笔记列表 */
.notes-list {
    max-width: 1000px;
    margin: 50px auto;
    padding: 0 20px;
}

/* 笔记项 */
.note-item {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.note-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.note-item h3 {
    margin-bottom: 10px;
    font-size: 1.4em;
}

.note-item p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.note-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
    color: #999;
}

/* 返回链接 */
.back-link {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 30px;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.back-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state h2 {
    font-size: 3em;
    margin-bottom: 20px;
}

/* ===================================
   笔记详情页样式
   =================================== */

.note-content {
    max-width: 900px;
    margin: 80px auto 50px;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.note-header {
    border-bottom: 3px solid #667eea;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.note-header h1 {
    color: #667eea;
    font-size: 2em;
    margin-bottom: 10px;
}

.note-body {
    line-height: 1.8;
    color: #333;
}

.note-body h2 {
    color: #667eea;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.note-body h3 {
    color: #555;
    margin-top: 25px;
    margin-bottom: 12px;
    font-size: 1.2em;
}

.note-body p {
    margin-bottom: 15px;
}

.note-body code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #e83e8c;
}

.note-body pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.note-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.note-body ul, .note-body ol {
    margin-left: 25px;
    margin-bottom: 15px;
}

.note-body li {
    margin-bottom: 8px;
}

/* ===================================
   响应式设计
   =================================== */

@media (max-width: 768px) {
    .tech-notes-hero h1,
    .category-hero h1 {
        font-size: 2em;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        padding: 25px;
    }

    .note-content {
        margin: 80px 20px 50px;
        padding: 25px;
    }

    .note-header h1 {
        font-size: 1.6em;
    }
}
