/* 笔记页面专用样式 */

/* 顶部导航 */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 1rem 0;
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* 笔记容器 */
.notes-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
}

.notes-header {
    text-align: center;
    margin-bottom: 4rem;
}

.notes-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.notes-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* 笔记网格 */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* 笔记卡片 */
.note-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.note-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.12);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.note-header h2 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin: 0;
}

.note-tag {
    background: var(--accent-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* 笔记内容 */
.note-content {
    color: var(--text-main);
    line-height: 1.8;
}

.note-content h3 {
    font-size: 1.1rem;
    color: var(--accent-primary);
    margin: 1.5rem 0 1rem 0;
    font-weight: 600;
}

.note-content h3:first-child {
    margin-top: 0;
}

.note-content pre {
    background: var(--code-bg);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
    position: relative;
}

.note-content code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--code-text);
}

.note-content p {
    margin: 0.5rem 0;
}

.note-content ul,
.note-content ol {
    margin: 0.5rem 0;
    padding-left: 2rem;
}

.note-content li {
    margin: 0.25rem 0;
}

.note-content a {
    color: var(--accent-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.note-content a:hover {
    border-bottom-color: var(--accent-primary);
}

/* 代码复制按钮 */
.copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--code-text);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(5px);
}

.copy-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.copy-button:active {
    transform: scale(0.95);
}

/* 笔记页脚 */
.note-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.note-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .notes-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .notes-container {
        padding: 5rem 1.5rem 3rem;
    }

    .notes-header h1 {
        font-size: 2rem;
    }

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

    .nav-container {
        padding: 0 1.5rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .note-card {
        padding: 1.5rem;
    }

    .note-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .note-content pre {
        font-size: 0.8rem;
    }
}

/* 打印样式 */
@media print {
    .top-nav,
    .copy-button {
        display: none;
    }

    .note-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
