/* ===== 基础样式 ===== */
:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --accent: #f093fb;
    --text: #1a202c;
    --text-light: #4a5568;
    --text-lighter: #718096;
    --bg: #f7fafc;
    --bg-white: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    padding: 8px 18px;
    border-radius: 100px;
    font-weight: 500;
    color: var(--text-light);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    padding: 16px 24px;
    flex-direction: column;
    gap: 8px;
    z-index: 999;
    border-bottom: 1px solid var(--border);
}

.mobile-menu a {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--text-light);
    transition: var(--transition);
}

.mobile-menu a:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

.mobile-menu.show {
    display: flex;
}

/* ===== Hero 区域 ===== */
.hero {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
    background: linear-gradient(180deg, #f0f4ff 0%, var(--bg) 100%);
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    bottom: -50px;
    left: -100px;
    animation: float 10s ease-in-out infinite reverse;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #fa709a, #fee140);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 12s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--text);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.hero-search {
    display: flex;
    max-width: 560px;
    margin: 0 auto 48px;
    background: var(--bg-white);
    border-radius: 100px;
    padding: 6px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.hero-search:focus-within {
    box-shadow: var(--shadow-xl), 0 0 0 4px rgba(102, 126, 234, 0.15);
    border-color: var(--primary);
}

.search-input {
    flex: 1;
    border: none;
    background: none;
    padding: 14px 20px;
    font-size: 1rem;
    color: var(--text);
    outline: none;
    font-family: inherit;
}

.search-input::placeholder {
    color: var(--text-lighter);
}

.search-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-lighter);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== 通用区块 ===== */
.section {
    padding: 80px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 48px;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text);
}

.view-all {
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.view-all:hover {
    color: var(--secondary);
    transform: translateX(4px);
}

/* ===== 文章卡片 ===== */
.articles {
    background: var(--bg);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.article-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.article-card.featured {
    grid-column: span 2;
    flex-direction: row;
}

.card-image {
    height: 200px;
    position: relative;
    flex-shrink: 0;
}

.article-card.featured .card-image {
    width: 45%;
    height: auto;
}

.card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #fa709a, #f5576c);
    color: white;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(245, 87, 108, 0.3);
}

.card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tag-purple { background: rgba(102, 126, 234, 0.12); color: #667eea; }
.tag-blue { background: rgba(79, 172, 254, 0.12); color: #4facfe; }
.tag-pink { background: rgba(245, 87, 108, 0.12); color: #f5576c; }
.tag-orange { background: rgba(254, 225, 64, 0.2); color: #c79500; }
.tag-cyan { background: rgba(0, 242, 254, 0.12); color: #00b8c4; }
.tag-green { background: rgba(67, 233, 123, 0.12); color: #2eb872; }
.tag-teal { background: rgba(56, 249, 215, 0.12); color: #00b894; }
.tag-yellow { background: rgba(254, 225, 64, 0.15); color: #d4a017; }
.tag-indigo { background: rgba(118, 75, 162, 0.12); color: #764ba2; }

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.4;
    transition: var(--transition);
}

.article-card:hover .card-title {
    color: var(--primary);
}

.card-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.card-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.author-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
}

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

/* ===== 分类区域 ===== */
.categories {
    background: linear-gradient(180deg, var(--bg) 0%, #edf2f7 100%);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    border: 2px solid transparent;
    transition: var(--transition);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--cat-color);
    transform: scaleX(0);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--cat-color);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.cat-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 16px;
    transition: var(--transition);
}

.category-card:hover .cat-icon {
    transform: scale(1.2);
}

.category-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.category-card p {
    font-size: 0.9rem;
    color: var(--text-lighter);
    font-weight: 500;
}

/* ===== 关于区域 ===== */
.about {
    background: var(--bg-white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-text {
    max-width: 520px;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-features {
    list-style: none;
    margin: 28px 0;
}

.about-features li {
    padding: 12px 0;
    font-size: 1rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.about-features li:last-child {
    border-bottom: none;
}

.about-features strong {
    color: var(--primary);
}

.about-image {
    display: grid;
    gap: 20px;
}

.about-card {
    background: linear-gradient(135deg, var(--bg) 0%, #edf2f7 100%);
    border-radius: var(--radius);
    padding: 28px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.about-card:nth-child(2) {
    margin-left: 30px;
}

.about-card:nth-child(3) {
    margin-left: 60px;
}

.about-card-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.about-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.about-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ===== 页脚 ===== */
.footer {
    background: var(--text);
    color: #a0aec0;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .logo {
    margin-bottom: 16px;
    color: white;
}

.footer-brand .logo-text {
    -webkit-text-fill-color: white;
    background: none;
}

.footer-brand p {
    color: #a0aec0;
    max-width: 280px;
    line-height: 1.7;
}

.footer-links h4 {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-links a {
    display: block;
    color: #a0aec0;
    padding: 8px 0;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: white;
    transform: translateX(4px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.beian a {
    color: #718096;
    transition: var(--transition);
}

.beian a:hover {
    color: white;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .article-card.featured {
        grid-column: span 1;
        flex-direction: column;
    }
    
    .article-card.featured .card-image {
        width: 100%;
        height: 200px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .about-image {
        order: -1;
    }
    
    .about-card:nth-child(2),
    .about-card:nth-child(3) {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero-stats {
        gap: 24px;
    }
    
    .stat-num {
        font-size: 2rem;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-search {
        flex-direction: column;
        border-radius: var(--radius);
    }
    
    .search-btn {
        width: 100%;
        border-radius: 100px;
        margin-top: 8px;
    }
}

/* ===== 新增组件样式 ===== */

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: rgba(102, 126, 234, 0.08);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.05rem;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.btn-danger {
    background: #f5576c;
    color: white;
}

.btn-danger:hover {
    background: #e0455a;
}

/* 导航栏写笔记按钮 */
.nav-write-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white !important;
    padding: 8px 18px !important;
    border-radius: 100px;
}

/* 用户菜单 */
.user-menu {
    position: relative;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 12px 4px 4px;
    border-radius: 100px;
    transition: var(--transition);
}

.user-trigger:hover {
    background: rgba(102, 126, 234, 0.08);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 0.7rem;
    color: var(--text-lighter);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    z-index: 1001;
    overflow: hidden;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: block;
    padding: 12px 16px;
    color: var(--text-light);
    font-size: 0.95rem;
    transition: var(--transition);
}

.user-dropdown a:hover {
    background: rgba(102, 126, 234, 0.06);
    color: var(--primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* 弹窗 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 20px;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 440px;
    width: 100%;
    position: relative;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95);
    transition: var(--transition);
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg);
    color: var(--text-light);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--border);
    color: var(--text);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    text-align: center;
}

.modal-footer {
    margin-top: 24px;
    text-align: center;
    color: var(--text-lighter);
    font-size: 0.9rem;
}

.modal-footer a {
    color: var(--primary);
    font-weight: 600;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: flex;
    gap: 16px;
}

/* 编辑器页面 */
.editor-section {
    min-height: calc(100vh - 80px);
    background: var(--bg);
}

.editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.editor-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
}

.editor-actions {
    display: flex;
    gap: 12px;
}

.editor-form {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* 笔记详情 */
.note-detail-section {
    min-height: calc(100vh - 300px);
    background: var(--bg);
}

.note-detail-header {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.note-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.note-category {
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
}

.note-date,
.note-views {
    font-size: 0.9rem;
    color: var(--text-lighter);
}

.note-detail-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 24px;
}

.note-author-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.note-author-bar .author-info {
    flex: 1;
}

.note-author-bar .author-name {
    font-weight: 600;
    color: var(--text);
}

.note-actions {
    display: flex;
    gap: 8px;
}

.note-content-wrapper {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    min-height: 400px;
}

.vditor-preview {
    font-size: 1.05rem;
    line-height: 1.8;
}

.vditor-preview h1,
.vditor-preview h2,
.vditor-preview h3,
.vditor-preview h4 {
    margin-top: 32px;
    margin-bottom: 16px;
    font-weight: 700;
}

.vditor-preview p {
    margin-bottom: 16px;
}

.vditor-preview pre {
    background: #f6f8fa;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.vditor-preview code {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.9rem;
}

.vditor-preview blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 16px;
    margin-left: 0;
    color: var(--text-light);
}

.vditor-preview img {
    max-width: 100%;
    border-radius: 8px;
}

.vditor-preview table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.vditor-preview th,
.vditor-preview td {
    border: 1px solid var(--border);
    padding: 8px 12px;
    text-align: left;
}

.vditor-preview th {
    background: var(--bg);
    font-weight: 600;
}

/* 笔记列表页 */
.notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.notes-search {
    display: flex;
    max-width: 360px;
    background: white;
    border-radius: 100px;
    padding: 4px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.notes-search input {
    flex: 1;
    border: none;
    background: none;
    padding: 10px 16px;
    font-size: 0.95rem;
    outline: none;
    font-family: inherit;
}

.notes-search button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 18px;
    border-radius: 100px;
    border: 2px solid var(--border);
    background: white;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.page-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-light);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
}

/* 个人中心 */
.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 48px;
    padding: 32px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    flex-shrink: 0;
}

.profile-info h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-info p {
    color: var(--text-lighter);
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #fee140;
    color: #8a6d0b;
}

.profile-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-lighter);
    margin-bottom: 24px;
}

/* Toast */
#toastContainer {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 320px;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-left-color: #43e97b;
}

.toast-error {
    border-left-color: #f5576c;
}

.toast-info {
    border-left-color: var(--primary);
}

/* 加载和错误 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-lighter);
    grid-column: 1 / -1;
}

.error {
    text-align: center;
    padding: 40px;
    color: #f5576c;
    font-weight: 600;
    grid-column: 1 / -1;
}

/* Hero 操作按钮 */
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* 响应式补充 */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        width: 100% !important;
    }
    
    .editor-form {
        padding: 20px;
    }
    
    .note-detail-header,
    .note-content-wrapper {
        padding: 24px;
    }
    
    .note-detail-title {
        font-size: 1.5rem;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .notes-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .notes-search {
        max-width: 100%;
    }
    
    .editor-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modal {
        padding: 28px 20px;
        margin: 20px;
    }
    
    .nav-auth {
        display: none;
    }
    
    .user-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        margin-top: 8px;
    }
}
