/* ========================================
   FMBlog CMS Default Theme - Modern Edition
   设计理念：现代扁平化、精致排版、视觉层次
   配色：深黑 #0f0f0f | 现代蓝 #2563eb | 极浅灰 #f8fafc
   ======================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: #1e293b;
    background: #f8fafc;
}

a {
    color: #0f0f0f;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: #666;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   Typography Scale
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    color: #0f0f0f;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* ========================================
   Layout
   ======================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    margin-top: 48px;
    padding-bottom: 80px;
}

.content-area {
    min-width: 0;
}

.sidebar {
    position: sticky;
    top: 88px;
    height: fit-content;
}

/* ========================================
   Header - Modern Design
   ======================================== */
header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    gap: 40px;
}

.site-logo {
    font-size: 28px;
    font-weight: 800;
    color: #0f0f0f;
    letter-spacing: -0.03em;
    white-space: nowrap;
    position: relative;
}

.site-logo::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: #0f0f0f;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-logo:hover::after {
    width: 100%;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 36px;
    flex: 1;
    justify-content: center;
}

.site-nav a {
    color: #64748b;
    font-size: 15px;
    font-weight: 600;
    padding: 8px 0;
    position: relative;
    letter-spacing: -0.01em;
}

.site-nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #0f0f0f;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-nav a:hover {
    color: #0f0f0f;
}

.site-nav a:hover::before {
    width: 100%;
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-search form {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-search input {
    background: #f8fafc;
    padding: 10px 16px;
    font-size: 14px;
    width: 220px;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    color: #1e293b;
}

.nav-search input::placeholder {
    color: #94a3b8;
}

.nav-search input:focus {
    background: #fff;
}

.nav-search button {
    background: #0f0f0f;
    cursor: pointer;
    padding: 10px 14px;
    color: #fff;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-search button:hover {
    background: #1a1a1a;
}

.nav-search button svg {
    display: block;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    cursor: pointer;
    padding: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle:hover {
    background: #f8fafc;
}

.menu-toggle svg {
    display: block;
    color: #0f0f0f;
    transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Widget - Modern Design
   ======================================== */
.widget {
    background: #fff;
    padding: 28px;
    margin-bottom: 28px;
    position: relative;
}

.widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #0f0f0f;
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.widget:hover::before {
    transform: scaleY(1);
}

.widget-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f0f0f;
    padding-bottom: 16px;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

/* Author Widget */
.author-widget {
    text-align: center;
    padding: 32px 28px;
}

.author-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.author-avatar:hover {
    transform: scale(1.05);
}

.author-name {
    font-size: 20px;
    font-weight: 800;
    color: #0f0f0f;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.author-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.7;
}

/* Category List */
.cate-list {
    list-style: none;
}

.cate-list li {
    margin-bottom: 8px;
}

.cate-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cate-list a:hover {
    color: #0f0f0f;
    padding-left: 8px;
}

.cate-list .count {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 4px 10px;
    letter-spacing: 0.05em;
}

/* ========================================
   Article Card - Modern Design
   ======================================== */
.article-card {
    background: #fff;
    display: block;
    margin-bottom: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #0f0f0f;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.article-card:hover {
    transform: translateY(-4px);
}

.article-card-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #f1f5f9;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover .article-card-thumb {
    transform: scale(1.05);
}

.article-card-thumb-wrapper {
    overflow: hidden;
}

.article-card-body {
    padding: 16px;
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.article-card-meta .cate-tag {
    background: #0f0f0f;
    color: #fff;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.article-card-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f0f0f;
    margin-bottom: 8px;
    line-height: 1.4;
    letter-spacing: -0.02em;
    transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover .article-card-title {
    color: #666;
}

.article-card-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    font-weight: 400;
}

/* ========================================
   Section Title - Modern Design
   ======================================== */
.section-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f0f0f;
    margin-bottom: 28px;
    padding-bottom: 16px;
    letter-spacing: -0.02em;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #0f0f0f;
}

.section-title a {
    color: #0f0f0f;
}

.section-title a:hover {
    color: #666;
}

/* ========================================
   Article Content - Modern Design
   ======================================== */
.article-content {
    background: #fff;
    padding: 32px;
}

.article-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
}

.article-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: #0f0f0f;
    line-height: 1.3;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: #94a3b8;
    flex-wrap: wrap;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.article-meta .cate-link {
    background: #0f0f0f;
    color: #fff;
    padding: 6px 16px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.article-body {
    font-size: 16px;
    line-height: 1.75;
    color: #1e293b;
    font-weight: 400;
}

.article-body p {
    margin-bottom: 16px;
}

.article-body h2,
.article-body h3,
.article-body h4 {
    margin: 32px 0 16px;
    color: #0f0f0f;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.article-body h2 {
    font-size: 24px;
    padding-bottom: 12px;
}

.article-body h3 {
    font-size: 20px;
}

.article-body h4 {
    font-size: 18px;
}

.article-body img {
    margin: 24px 0;
}

.article-body a {
    color: #0f0f0f;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.article-body a:hover {
    color: #666;
}

.article-body blockquote {
    padding: 16px 24px;
    margin: 24px 0;
    background: #f8fafc;
    color: #64748b;
    font-style: italic;
    font-size: 16px;
}

.article-body code {
    background: #f1f5f9;
    padding: 2px 6px;
    font-size: 14px;
    font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace;
}

.article-body pre {
    background: #0f0f0f;
    color: #e2e8f0;
    padding: 16px;
    overflow-x: auto;
    margin: 24px 0;
}

.article-body pre code {
    background: none;
    padding: 0;
    color: #e2e8f0;
}

.article-body ul,
.article-body ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.article-body li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* ========================================
   Page Content - Modern Design
   ======================================== */
.page-content {
    background: #fff;
    padding: 32px;
}

.page-content h1 {
    font-size: 28px;
    font-weight: 800;
    color: #0f0f0f;
    margin-bottom: 24px;
    padding-bottom: 16px;
    letter-spacing: -0.02em;
}

/* ========================================
   Pagination - Modern Design
   ======================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 48px 0;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    background: #fff;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.02em;
}

.page-btn:hover {
    background: #0f0f0f;
    color: #fff;
    transform: translateY(-2px);
}

.page-btn.active {
    background: #0f0f0f;
    color: #fff;
}

.page-dots {
    padding: 0 12px;
    color: #94a3b8;
    font-weight: 700;
}

/* ========================================
   Search Box - Modern Design
   ======================================== */
.search-box {
    margin-bottom: 28px;
}

.search-box input {
    width: 100%;
    padding: 14px 20px;
    background: #f8fafc;
    font-size: 15px;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    color: #1e293b;
}

.search-box input::placeholder {
    color: #94a3b8;
}

.search-box input:focus {
    background: #fff;
}

/* ========================================
   Footer - Modern Design
   ======================================== */
footer {
    background: #0f0f0f;
    color: #94a3b8;
    padding: 60px 0;
    margin-top: 60px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-inner a {
    color: #94a3b8;
    font-weight: 500;
    transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-inner a:hover {
    color: #fff;
}

.footer-links {
    display: flex;
    gap: 32px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.footer-copy {
    font-size: 14px;
    font-weight: 500;
}

/* ========================================
   Error Page - Modern Design
   ======================================== */
.error-page {
    text-align: center;
    padding: 120px 20px;
}

.error-page h1 {
    font-size: 160px;
    font-weight: 800;
    color: #e2e8f0;
    margin-bottom: 24px;
    letter-spacing: -0.05em;
    line-height: 1;
}

.error-page p {
    font-size: 20px;
    color: #64748b;
    margin-bottom: 32px;
    font-weight: 500;
}

.error-page a {
    display: inline-block;
    padding: 14px 40px;
    background: #0f0f0f;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.02em;
}

.error-page a:hover {
    background: #1a1a1a;
    color: #fff;
    transform: translateY(-2px);
}

/* ========================================
   No Data - Modern Design
   ======================================== */
.no-data {
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
    font-size: 16px;
    background: #fff;
    font-weight: 500;
}

/* ========================================
   Related Articles Grid - Modern Design
   ======================================== */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* ========================================
   Utility Classes
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1200px) {
    .container {
        padding: 0 32px;
    }

    .main-layout {
        gap: 40px;
    }

    .sidebar {
        width: 280px;
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 0 24px;
    }

    .main-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .sidebar {
        width: 100%;
        position: static;
    }

    .header-inner {
        height: 70px;
        gap: 24px;
    }

    .site-logo {
        font-size: 24px;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 24px;
        gap: 0;
        justify-content: flex-start;
    }

    .site-nav.active {
        display: flex;
    }

    .site-nav a {
        padding: 16px 0;
        width: 100%;
        font-size: 16px;
    }

    .site-nav a::before {
        display: none;
    }

    .nav-search {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 24px;
    }

    .nav-search.active {
        display: block;
    }

    .nav-search input {
        width: 100%;
    }

    .nav-search button {
        margin-top: 0px;
    }

    .menu-toggle {
        display: block;
    }

    .article-content,
    .page-content {
        padding: 24px;
    }

    .article-header h1,
    .page-content h1 {
        font-size: 24px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .main-layout {
        margin-top: 32px;
        padding-bottom: 60px;
    }

    .article-card-body {
        padding: 14px;
    }

    .article-card-title {
        font-size: 15px;
    }

    .article-card-thumb {
        height: 140px;
    }

    .widget {
        padding: 24px;
    }

    .section-title {
        font-size: 20px;
    }

    .error-page h1 {
        font-size: 100px;
    }

    .error-page p {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .header-inner {
        height: 60px;
    }

    .site-logo {
        font-size: 20px;
    }

    .site-nav {
        top: 60px;
    }

    .nav-search {
        top: 60px;
    }

    .article-content,
    .page-content {
        padding: 20px;
    }

    .article-header h1,
    .page-content h1 {
        font-size: 22px;
    }

    .article-body {
        font-size: 15px;
    }

    .article-card-body {
        padding: 12px;
    }

    .article-card-title {
        font-size: 14px;
    }

    .article-card-thumb {
        height: 120px;
    }

    .widget {
        padding: 20px;
    }

    .error-page h1 {
        font-size: 80px;
    }

    .footer {
        padding: 40px 0;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stagger animation for multiple cards */
.article-card:nth-child(1) { animation-delay: 0.05s; }
.article-card:nth-child(2) { animation-delay: 0.1s; }
.article-card:nth-child(3) { animation-delay: 0.15s; }
.article-card:nth-child(4) { animation-delay: 0.2s; }
.article-card:nth-child(5) { animation-delay: 0.25s; }
