/* ==========================================================================
   Modern 现代简约模板 - 紫罗兰渐变风
   ========================================================================== */

:root {
    --md-primary: #6366f1;
    --md-primary-dark: #4f46e5;
    --md-secondary: #8b5cf6;
    --md-pink: #ec4899;
    --md-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #a855f7 100%);
    --md-bg: #f8f9ff;
    --md-card: #ffffff;
    --md-text: #1f2340;
    --md-text-light: #6b7280;
    --md-border: #e9ecf8;
    --md-radius: 16px;
    --md-radius-lg: 22px;
    --md-shadow: 0 8px 30px rgba(99, 102, 241, 0.09);
    --md-shadow-hover: 0 18px 48px rgba(99, 102, 241, 0.18);
    --md-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--md-font);
    color: var(--md-text);
    background: var(--md-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--md-primary);
    text-decoration: none;
    transition: all 0.25s ease;
}

a:hover {
    color: var(--md-primary-dark);
}

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

ul {
    list-style: none;
}

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

/* ==================== 顶部导航 ==================== */

.md-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--md-border);
}

.md-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.md-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--md-text);
}

.md-logo:hover {
    color: var(--md-primary);
}

.md-logo-badge {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: var(--md-grad);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.md-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.md-nav-links a {
    display: block;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 0.95rem;
    color: var(--md-text);
    font-weight: 500;
}

.md-nav-links a:hover {
    color: #fff;
    background: var(--md-grad);
}

.md-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.md-menu-toggle span {
    width: 24px;
    height: 2.5px;
    background: var(--md-text);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.md-menu-toggle.open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.md-menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.md-menu-toggle.open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ==================== Hero ==================== */

.md-hero {
    position: relative;
    color: #fff;
    padding: 100px 0 120px;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(160deg, #4f46e5 0%, #7c3aed 45%, #a855f7 75%, #d946ef 100%);
}

.md-hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 18% 30%, rgba(255, 255, 255, 0.14) 0, transparent 42%),
        radial-gradient(circle at 82% 68%, rgba(255, 255, 255, 0.12) 0, transparent 46%),
        radial-gradient(circle at 60% 15%, rgba(255, 255, 255, 0.1) 0, transparent 40%);
}

.md-hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.md-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    margin-bottom: 24px;
}

.md-hero-title {
    font-size: clamp(2rem, 5vw, 3.1rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.md-hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 34px;
}

.md-hero-search {
    display: flex;
    max-width: 540px;
    margin: 0 auto;
    background: #fff;
    border-radius: 999px;
    padding: 6px 6px 6px 24px;
    box-shadow: 0 18px 48px rgba(30, 20, 90, 0.35);
}

.md-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.98rem;
    color: var(--md-text);
    background: transparent;
}

.md-search-btn {
    border: none;
    cursor: pointer;
    padding: 12px 28px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: var(--md-grad);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.md-search-btn:hover {
    opacity: 0.92;
    transform: scale(1.02);
}

/* ==================== 特色亮点 ==================== */

.md-features {
    margin-top: -54px;
    position: relative;
    z-index: 3;
}

.md-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.md-feature {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--md-card);
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius);
    padding: 24px 26px;
    box-shadow: var(--md-shadow);
    transition: all 0.35s ease;
}

.md-feature:hover {
    transform: translateY(-6px);
    box-shadow: var(--md-shadow-hover);
}

.md-feature-icon {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    font-size: 1.4rem;
    color: #fff;
    background: var(--md-grad);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.md-feature-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.md-feature-desc {
    font-size: 0.86rem;
    color: var(--md-text-light);
}

/* ==================== 通用区块 ==================== */

.md-main {
    padding: 64px 0;
}

.md-main-gray {
    background: #eef0fc;
}

.md-section-head {
    text-align: center;
    margin-bottom: 40px;
}

.md-section-title {
    font-size: clamp(1.5rem, 3vw, 1.9rem);
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--md-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.md-section-subtitle {
    color: var(--md-text-light);
    font-size: 0.96rem;
}

.md-mini-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 22px;
    padding-left: 14px;
    position: relative;
}

.md-mini-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    border-radius: 3px;
    background: var(--md-grad);
}

/* ==================== 首页文章卡片 ==================== */

.md-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.md-card {
    background: var(--md-card);
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius);
    overflow: hidden;
    transition: all 0.35s ease;
}

.md-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--md-shadow-hover);
}

.md-card-imgwrap {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.md-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.md-card:hover .md-card-img {
    transform: scale(1.08);
}

.md-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: #c3c8ef;
    background: linear-gradient(135deg, #eef0fc, #e0e4f8);
}

.md-card-cat {
    position: absolute;
    left: 14px;
    top: 14px;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.76rem;
    color: #fff;
    background: var(--md-grad);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.md-card-body {
    padding: 20px;
}

.md-card-title {
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.md-card-excerpt {
    font-size: 0.87rem;
    color: var(--md-text-light);
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.md-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--md-text-light);
    padding-top: 12px;
    border-top: 1px dashed var(--md-border);
}

.md-card-views i,
.md-card-meta i {
    color: var(--md-secondary);
    margin-right: 3px;
}

/* ==================== 栏目精选 ==================== */

.md-cats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.md-cat-card {
    background: var(--md-card);
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius);
    padding: 26px;
    transition: box-shadow 0.3s ease;
}

.md-cat-card:hover {
    box-shadow: var(--md-shadow);
}

.md-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f1fb;
}

.md-cat-name a {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--md-text);
}

.md-cat-name a:hover {
    color: var(--md-primary);
}

.md-cat-more {
    font-size: 0.84rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.md-cat-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.md-cat-list li a {
    color: var(--md-text);
    font-size: 0.94rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.md-cat-list li a:hover {
    color: var(--md-primary);
}

.md-cat-date {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: var(--md-text-light);
}

/* ==================== 标签云（分站/友链） ==================== */

.md-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.md-tag-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    border-radius: 999px;
    font-size: 0.9rem;
    color: var(--md-text);
    background: var(--md-card);
    border: 1px solid var(--md-border);
    box-shadow: var(--md-shadow);
    transition: all 0.3s ease;
}

.md-tag-item i {
    color: var(--md-primary);
}

.md-tag-item:hover {
    color: #fff;
    background: var(--md-grad);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: var(--md-shadow-hover);
}

.md-tag-plain {
    box-shadow: none;
    background: #f4f5fd;
}

/* ==================== 列表页头部 ==================== */

.md-page-head {
    background: linear-gradient(150deg, #eef0fc 0%, #e0e4f8 100%);
    padding: 54px 0 46px;
    text-align: center;
}

.md-page-head-sm {
    padding: 22px 0;
    text-align: left;
}

.md-page-title {
    font-size: clamp(1.5rem, 3.5vw, 2.1rem);
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--md-text);
}

.md-page-subtitle {
    color: var(--md-text-light);
    margin-bottom: 22px;
}

.md-breadcrumb {
    font-size: 0.88rem;
    color: var(--md-text-light);
}

.md-breadcrumb a {
    color: var(--md-text-light);
}

.md-breadcrumb a:hover {
    color: var(--md-primary);
}

.md-breadcrumb-sep {
    margin: 0 8px;
    font-size: 0.72rem;
}

.md-breadcrumb-current {
    color: var(--md-primary);
    font-weight: 600;
}

/* 搜索框 */
.md-search-box {
    display: flex;
    max-width: 560px;
    margin: 0 auto 26px;
    background: #fff;
    border-radius: 999px;
    padding: 6px 6px 6px 24px;
    box-shadow: var(--md-shadow);
}

/* ==================== 列表主体 ==================== */

.md-main-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 36px;
    align-items: start;
}

.md-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.md-list-item {
    background: var(--md-card);
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius);
    overflow: hidden;
    transition: all 0.35s ease;
}

.md-list-item:hover {
    box-shadow: var(--md-shadow-hover);
    transform: translateY(-4px);
}

.md-list-link {
    display: flex;
    gap: 22px;
    padding: 18px;
    color: inherit;
}

.md-list-imgwrap {
    width: 230px;
    height: 145px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
}

.md-list-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.md-list-item:hover .md-list-img {
    transform: scale(1.06);
}

.md-list-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #c3c8ef;
    background: linear-gradient(135deg, #eef0fc, #e0e4f8);
}

.md-list-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.md-list-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: var(--md-text-light);
}

.md-list-cat {
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    color: #fff;
    background: var(--md-grad);
}

.md-list-title {
    font-size: 1.18rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.md-list-item:hover .md-list-title {
    color: var(--md-primary);
}

.md-list-excerpt {
    font-size: 0.9rem;
    color: var(--md-text-light);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.md-list-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.84rem;
    color: var(--md-text-light);
    padding-top: 10px;
    border-top: 1px dashed var(--md-border);
}

.md-list-more {
    color: var(--md-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.md-list-more i {
    transition: transform 0.3s ease;
}

.md-list-item:hover .md-list-more i {
    transform: translateX(4px);
}

/* 空状态 */
.md-empty {
    text-align: center;
    padding: 70px 20px;
    background: var(--md-card);
    border: 1px dashed var(--md-border);
    border-radius: var(--md-radius-lg);
}

.md-empty-icon {
    font-size: 3rem;
    color: #c3c8ef;
    margin-bottom: 18px;
}

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

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

.md-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.md-btn-primary {
    color: #fff;
    background: var(--md-grad);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.md-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(99, 102, 241, 0.45);
    color: #fff;
}

/* 分页 */
.md-pagination {
    margin-top: 34px;
    display: flex;
    justify-content: center;
}

.md-pagination a,
.md-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    margin: 0 4px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--md-text);
    background: var(--md-card);
    border: 1px solid var(--md-border);
    transition: all 0.25s ease;
}

.md-pagination a:hover {
    color: #fff;
    background: var(--md-grad);
    border-color: transparent;
}

.md-pagination .active {
    color: #fff;
    background: var(--md-grad);
    border-color: transparent;
}

/* ==================== 详情页 ==================== */

.md-article {
    background: var(--md-card);
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius-lg);
    padding: 38px;
}

.md-article-head {
    border-bottom: 1px solid var(--md-border);
    padding-bottom: 24px;
    margin-bottom: 30px;
}

.md-article-cat {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    color: #fff;
    background: var(--md-grad);
    margin-bottom: 14px;
}

.md-article-title {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 16px;
}

.md-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.86rem;
    color: var(--md-text-light);
}

.md-article-meta i {
    color: var(--md-secondary);
    margin-right: 5px;
}

/* 正文排版 */
.md-article-body {
    font-size: 1.02rem;
    line-height: 1.9;
    color: var(--md-text);
}

.md-article-body p {
    margin-bottom: 1.2em;
}

.md-article-body h2,
.md-article-body h3,
.md-article-body h4 {
    margin: 1.6em 0 0.8em;
    line-height: 1.4;
}

.md-article-body img {
    border-radius: 14px;
    margin: 1.4em auto;
    box-shadow: var(--md-shadow);
}

.md-article-body blockquote {
    border-left: 4px solid var(--md-primary);
    background: #f4f5fd;
    padding: 16px 22px;
    margin: 1.4em 0;
    border-radius: 0 12px 12px 0;
    color: var(--md-text-light);
}

.md-article-body ul,
.md-article-body ol {
    padding-left: 1.4em;
    margin-bottom: 1.2em;
}

.md-article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
}

.md-article-body th,
.md-article-body td {
    border: 1px solid var(--md-border);
    padding: 10px 14px;
    text-align: left;
}

.md-article-body th {
    background: #f4f5fd;
}

/* 标签与分享 */
.md-article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    border-top: 1px solid var(--md-border);
    margin-top: 32px;
    padding-top: 22px;
}

.md-tags-label,
.md-share-label {
    font-size: 0.9rem;
    color: var(--md-text-light);
    margin-right: 6px;
}

.md-tag-item {
    display: inline-block;
    padding: 4px 14px;
    margin-right: 6px;
    border-radius: 999px;
    font-size: 0.82rem;
    color: var(--md-primary);
    background: #f0f1fd;
}

.md-tag-item:hover {
    color: #fff;
    background: var(--md-grad);
}

.md-share-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--md-border);
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    color: var(--md-text-light);
    font-size: 1rem;
    transition: all 0.25s ease;
}

.md-share-btn:hover {
    color: #fff;
    background: var(--md-grad);
    border-color: transparent;
}

.md-share-sm {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
}

/* 上一篇/下一篇 */
.md-article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 30px;
}

.md-nav-item {
    display: block;
    padding: 16px 20px;
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius);
    background: #f7f8fe;
    transition: all 0.3s ease;
}

.md-nav-item:hover {
    border-color: var(--md-primary);
    background: #fff;
    box-shadow: var(--md-shadow);
}

.md-nav-next {
    text-align: right;
}

.md-nav-label {
    display: block;
    font-size: 0.8rem;
    color: var(--md-text-light);
    margin-bottom: 6px;
}

.md-nav-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 相关文章 */
.md-related {
    margin-top: 34px;
}

.md-related-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.md-related-title i {
    color: var(--md-secondary);
}

.md-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.md-related-card {
    background: #f7f8fe;
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius);
    padding: 18px;
    transition: all 0.3s ease;
}

.md-related-card:hover {
    background: #fff;
    box-shadow: var(--md-shadow);
    border-color: var(--md-primary);
}

.md-related-name {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.md-related-meta {
    font-size: 0.8rem;
    color: var(--md-text-light);
}

/* ==================== 侧边栏 ==================== */

.md-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 88px;
}

.md-widget {
    background: var(--md-card);
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius);
    padding: 24px;
}

.md-widget-title {
    font-size: 1.02rem;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.md-widget-title i {
    color: var(--md-primary);
}

.md-widget-cats li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--md-border);
}

.md-widget-cats li:last-child {
    border-bottom: none;
}

.md-widget-cats a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--md-text);
    font-size: 0.92rem;
    font-weight: 500;
}

.md-widget-cats a:hover {
    color: var(--md-primary);
    padding-left: 4px;
}

.md-cat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--md-grad);
    flex-shrink: 0;
}

.md-widget-articles {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.md-widget-item {
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--md-border);
}

.md-widget-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.md-widget-title-item {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--md-text);
}

.md-widget-link:hover .md-widget-title-item {
    color: var(--md-primary);
}

.md-widget-meta {
    display: flex;
    gap: 12px;
    font-size: 0.76rem;
    color: var(--md-text-light);
}

.md-widget-meta i {
    color: var(--md-secondary);
    margin-right: 3px;
}

.md-widget-accent {
    background: linear-gradient(160deg, #4f46e5, #8b5cf6);
    border: none;
    color: #fff;
}

.md-widget-accent .md-widget-title {
    color: #fff;
}

.md-widget-accent-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 16px;
}

.md-widget-accent-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #fff;
}

/* ==================== 页脚 ==================== */

.md-footer {
    background: #161a3d;
    color: rgba(255, 255, 255, 0.72);
    padding-top: 56px;
}

.md-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 42px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.md-footer-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 18px;
}

.md-footer-text {
    font-size: 0.88rem;
    line-height: 1.8;
    margin-bottom: 18px;
}

.md-footer-social {
    display: flex;
    gap: 10px;
}

.md-footer-social .md-share-btn {
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.75);
    background: transparent;
}

.md-footer-social .md-share-btn:hover {
    background: var(--md-grad);
    border-color: transparent;
    color: #fff;
}

.md-footer-links li {
    margin-bottom: 10px;
}

.md-footer-links a {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
}

.md-footer-links a:hover {
    color: #a5b4fc;
}

.md-footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.88rem;
}

.md-footer-contact i {
    color: #a5b4fc;
    width: 18px;
    text-align: center;
}

.md-footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.5);
}

.md-footer-bottom a {
    color: rgba(255, 255, 255, 0.72);
}

.md-footer-bottom a:hover {
    color: #a5b4fc;
}

/* ==================== 回到顶部 ==================== */

.md-back-top {
    position: fixed;
    right: 24px;
    bottom: 30px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    color: #fff;
    background: var(--md-grad);
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.35s ease;
    z-index: 90;
}

.md-back-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.md-back-top:hover {
    transform: translateY(-4px);
}

/* ==================== 404 ==================== */

.md-404 {
    padding: 110px 0 130px;
    text-align: center;
}

.md-404-code {
    font-size: clamp(5rem, 12vw, 8rem);
    font-weight: 800;
    line-height: 1;
    background: var(--md-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

.md-404-title {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.md-404-text {
    color: var(--md-text-light);
    margin-bottom: 30px;
}

/* ==================== 响应式 ==================== */

@media (max-width: 992px) {
    .md-features-grid {
        grid-template-columns: 1fr;
    }

    .md-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .md-main-grid {
        grid-template-columns: 1fr;
    }

    .md-sidebar {
        position: static;
    }

    .md-footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .md-navbar {
        height: 60px;
    }

    .md-menu-toggle {
        display: flex;
    }

    .md-nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 10px 20px 20px;
        transform: translateY(-120%);
        transition: transform 0.35s ease;
        box-shadow: 0 12px 28px rgba(30, 20, 90, 0.15);
        z-index: 99;
        border-bottom: 1px solid var(--md-border);
    }

    .md-nav.open {
        transform: translateY(0);
    }

    .md-nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .md-nav-links a {
        padding: 12px 16px;
        border-radius: 10px;
    }

    .md-hero {
        padding: 70px 0 90px;
    }

    .md-hero-search {
        flex-direction: column;
        gap: 10px;
        background: transparent;
        padding: 0;
        box-shadow: none;
    }

    .md-hero-search .md-search-input {
        padding: 15px 20px;
        border-radius: 999px;
        background: #fff;
    }

    .md-hero-search .md-search-btn {
        justify-content: center;
    }

    .md-features {
        margin-top: -30px;
    }

    .md-main {
        padding: 46px 0;
    }

    .md-grid,
    .md-cats-grid {
        grid-template-columns: 1fr;
    }

    .md-list-link {
        flex-direction: column;
    }

    .md-list-imgwrap {
        width: 100%;
        height: 170px;
    }

    .md-article-nav {
        grid-template-columns: 1fr;
    }

    .md-related-grid {
        grid-template-columns: 1fr;
    }

    .md-footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .md-article {
        padding: 22px;
    }
}
