/* ===========================================================
   autumnmaple 秋枫红黄 主题样式表
   class 前缀: amp-
   =========================================================== */

:root {
    --amp-red: #b83227;
    --amp-red-dark: #8f2419;
    --amp-yellow: #e8a33d;
    --amp-yellow-dark: #d4881f;
    --amp-bg: #faf3e8;
    --amp-panel: #fffaf2;
    --amp-text: #3d2b1f;
    --amp-text-soft: #6b5340;
    --amp-line: #e6d5bd;
    --amp-radius-leaf: 20px 6px 20px 6px;
    --amp-radius-leaf-sm: 12px 4px 12px 4px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--amp-bg);
    color: var(--amp-text);
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
    line-height: 1.7;
    font-size: 15px;
}

h1, h2, h3 {
    font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
    margin: 0;
    color: var(--amp-text);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease, opacity .2s ease;
}

a:hover {
    color: var(--amp-red);
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

/* -----------------------------------------------------------
   渐变文字（先兜底 color，再 clip，避免不支持时文字消失）
----------------------------------------------------------- */
.amp-brand-gradient {
    color: var(--amp-red-dark);
    background: linear-gradient(100deg, var(--amp-red) 0%, var(--amp-yellow-dark) 55%, var(--amp-red-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* -----------------------------------------------------------
   装饰:落叶形状(纯 CSS 非对称圆角,不用图片)
----------------------------------------------------------- */
.amp-leaf-deco {
    position: absolute;
    width: 64px;
    height: 64px;
    border-radius: 0 70% 0 70%;
    opacity: .5;
    pointer-events: none;
    z-index: 0;
}

.amp-leaf-deco--a {
    top: 10px;
    right: 24px;
    background: linear-gradient(135deg, var(--amp-yellow), var(--amp-red));
}

.amp-leaf-deco--b {
    top: -18px;
    left: 30px;
    background: linear-gradient(135deg, var(--amp-red), var(--amp-yellow-dark));
    width: 46px;
    height: 46px;
}

.amp-leaf-deco--c {
    top: 6px;
    left: 50%;
    background: linear-gradient(135deg, var(--amp-yellow-dark), var(--amp-red-dark));
    width: 38px;
    height: 38px;
    opacity: .35;
}

/* -----------------------------------------------------------
   头部 header + logo + 导航
----------------------------------------------------------- */
.amp-header {
    position: relative;
    background: var(--amp-panel);
    border-bottom: 3px solid var(--amp-red);
    padding: 18px 32px 0;
    overflow: hidden;
}

.amp-logo-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    min-width: 0;
    padding-bottom: 14px;
}

.amp-logo-wrap {
    flex-shrink: 0;
}

.amp-logo-wrap img {
    height: auto;
}

.amp-tagline {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.amp-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    border-top: 1px solid var(--amp-line);
    padding: 6px 0;
}

.amp-nav-item a {
    position: relative;
    display: inline-block;
    padding: 8px 14px;
    font-weight: 600;
    color: var(--amp-text);
    border-radius: var(--amp-radius-leaf-sm);
}

/* 下划线从中间向两侧展开 */
.amp-nav-item a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--amp-yellow), var(--amp-red));
    transform: translateX(-50%);
    transition: width .3s ease;
}

.amp-nav-item a:hover {
    color: var(--amp-red-dark);
}

.amp-nav-item a:hover::after {
    width: 80%;
}

.amp-nav-home a {
    background: var(--amp-red);
    color: #fff9f0;
}

.amp-nav-home a::after {
    display: none;
}

.amp-nav-home a:hover {
    background: var(--amp-red-dark);
    color: #fff9f0;
}

/* -----------------------------------------------------------
   主体容器
----------------------------------------------------------- */
.amp-main {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px 48px;
}

.amp-hero {
    position: relative;
    text-align: center;
    padding: 10px 0 26px;
}

.amp-hero-title {
    font-size: 30px;
    letter-spacing: 2px;
}

.amp-hero-desc {
    margin-top: 8px;
    color: var(--amp-text-soft);
    font-size: 14px;
}

/* 首页/列表/详情 均为 侧栏在左 + 内容在右 */
.amp-home-layout,
.amp-list-layout,
.amp-show-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 26px;
    align-items: start;
}

.amp-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.amp-side-box {
    background: var(--amp-panel);
    border: 1px solid var(--amp-line);
    border-radius: var(--amp-radius-leaf);
    padding: 16px 18px;
    box-shadow: 4px 4px 0 var(--amp-yellow);
}

.amp-side-box-title {
    font-size: 16px;
    padding-bottom: 8px;
    margin-bottom: 10px;
    border-bottom: 2px dashed var(--amp-yellow-dark);
    color: var(--amp-red-dark);
}

.amp-side-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.amp-side-item a {
    display: block;
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.amp-side-list--num {
    counter-reset: amp-rank;
}

.amp-side-list--num .amp-side-item {
    counter-increment: amp-rank;
    display: flex;
    gap: 8px;
    align-items: baseline;
    min-width: 0;
}

.amp-side-list--num .amp-side-item::before {
    content: counter(amp-rank);
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: #fff9f0;
    background: var(--amp-yellow-dark);
    width: 18px;
    height: 18px;
    border-radius: 5px 2px 5px 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.amp-side-list--num .amp-side-item:nth-child(-n+3)::before {
    background: var(--amp-red);
}

.amp-side-list--num .amp-side-item a {
    flex: 1;
    min-width: 0;
}

/* -----------------------------------------------------------
   首页栏目 + 卡片(多层堆叠阴影,最多4列)
----------------------------------------------------------- */
.amp-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 34px;
}

.amp-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    border-bottom: 3px solid var(--amp-red);
    padding-bottom: 8px;
    margin-bottom: 18px;
}

.amp-section-title {
    font-size: 19px;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.amp-section-more {
    flex-shrink: 0;
    font-size: 12.5px;
    color: var(--amp-yellow-dark);
    font-weight: 600;
}

.amp-section-more:hover {
    color: var(--amp-red);
}

.amp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px 18px;
}

.amp-card {
    position: relative;
    background: var(--amp-panel);
    border-radius: var(--amp-radius-leaf);
    box-shadow: 3px 3px 0 var(--amp-yellow-dark), 6px 6px 0 var(--amp-red);
    transition: transform .25s ease, box-shadow .25s ease;
}

.amp-card:nth-child(even) {
    box-shadow: 3px 3px 0 var(--amp-red-dark), 6px 6px 0 var(--amp-yellow);
}

.amp-card:hover {
    transform: translate(-4px, -4px);
}

.amp-card:nth-child(odd):hover {
    box-shadow: 5px 5px 0 var(--amp-yellow-dark), 9px 9px 0 var(--amp-red), 13px 13px 0 var(--amp-red-dark);
}

.amp-card:nth-child(even):hover {
    box-shadow: 5px 5px 0 var(--amp-red-dark), 9px 9px 0 var(--amp-yellow), 13px 13px 0 var(--amp-yellow-dark);
}

.amp-card-link {
    display: block;
    padding: 16px 18px 14px;
    min-width: 0;
}

.amp-card-title {
    font-size: 15.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.amp-card-excerpt {
    margin: 8px 0 0;
    font-size: 12.5px;
    color: var(--amp-text-soft);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.amp-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    font-size: 11.5px;
    color: var(--amp-yellow-dark);
}

/* -----------------------------------------------------------
   面包屑
----------------------------------------------------------- */
.amp-crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--amp-text-soft);
    margin-bottom: 18px;
}

.amp-crumb-home:hover {
    color: var(--amp-red);
}

.amp-crumb-cur {
    color: var(--amp-red-dark);
    font-weight: 600;
}

/* -----------------------------------------------------------
   列表页
----------------------------------------------------------- */
.amp-list-title {
    font-size: 21px;
    border-left: 5px solid var(--amp-red);
    padding-left: 12px;
    margin-bottom: 16px;
}

.amp-list-articles {
    display: flex;
    flex-direction: column;
}

.amp-list-item {
    padding: 14px 0;
    border-bottom: 1px dashed var(--amp-line);
    min-width: 0;
}

.amp-list-item-title {
    font-size: 15.5px;
    font-weight: 600;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.amp-list-item-info {
    margin: 6px 0 0;
    font-size: 12.5px;
    color: var(--amp-text-soft);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.amp-list-item-meta {
    margin-top: 8px;
    display: flex;
    gap: 12px;
    font-size: 11.5px;
    color: var(--amp-yellow-dark);
}

.amp-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.amp-page-btn {
    padding: 7px 13px;
    border: 1px solid var(--amp-line);
    border-radius: var(--amp-radius-leaf-sm);
    font-size: 13px;
    background: var(--amp-panel);
}

.amp-page-btn:hover {
    background: var(--amp-red);
    color: #fff9f0;
    border-color: var(--amp-red);
}

/* -----------------------------------------------------------
   详情页
----------------------------------------------------------- */
.amp-show-title {
    font-size: 24px;
    line-height: 1.5;
}

.amp-show-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--amp-text-soft);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--amp-line);
}

.amp-show-summary {
    margin: 16px 0;
    padding: 12px 16px;
    background: var(--amp-panel);
    border-left: 4px solid var(--amp-yellow-dark);
    border-radius: 0 10px 10px 0;
    font-size: 13.5px;
    color: var(--amp-text-soft);
}

.amp-show-body {
    font-size: 15.5px;
    line-height: 1.9;
}

.amp-show-body img {
    border-radius: var(--amp-radius-leaf-sm);
    margin: 12px auto;
}

.amp-flip {
    margin-top: 30px;
    padding-top: 16px;
    border-top: 3px solid var(--amp-yellow-dark);
}

.amp-flip-title {
    font-size: 14px;
    color: var(--amp-red-dark);
    margin-bottom: 10px;
}

.amp-flip-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.amp-flip-item a {
    display: block;
    font-size: 13.5px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* -----------------------------------------------------------
   页脚
----------------------------------------------------------- */
.amp-footer {
    position: relative;
    background: var(--amp-text);
    color: #f2e4d0;
    margin-top: 36px;
    overflow: hidden;
}

.amp-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 24px;
}

.amp-linkboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(242, 228, 208, .2);
}

.amp-linkgroup-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--amp-yellow);
    margin-bottom: 8px;
}

.amp-linkgroup-body {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    min-width: 0;
}

.amp-linkgroup-body a {
    font-size: 12px;
    color: #d8c3a5;
}

.amp-linkgroup-body a:hover {
    color: var(--amp-yellow);
}

.amp-copyright {
    padding-top: 16px;
    text-align: center;
    font-size: 12px;
    color: #c7b193;
}

.amp-copyright-line {
    margin: 0 0 4px;
}

.amp-beian-line {
    margin: 0 0 4px;
}

/* -----------------------------------------------------------
   响应式:~1024 / ~768 / ~480
----------------------------------------------------------- */
@media (max-width: 1024px) {
    .amp-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .amp-home-layout,
    .amp-list-layout,
    .amp-show-layout {
        grid-template-columns: 220px 1fr;
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .amp-header {
        padding: 14px 18px 0;
    }

    .amp-main {
        padding: 20px 16px 36px;
    }

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

    .amp-home-layout,
    .amp-list-layout,
    .amp-show-layout {
        grid-template-columns: 1fr;
    }

    .amp-side {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .amp-side-box {
        flex: 1 1 240px;
        min-width: 0;
    }

    .amp-linkboard {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media (max-width: 480px) {
    .amp-grid {
        grid-template-columns: 1fr;
    }

    .amp-hero-title {
        font-size: 23px;
    }

    .amp-nav-list {
        gap: 2px 4px;
    }

    .amp-nav-item a {
        padding: 6px 10px;
        font-size: 13px;
    }

    .amp-side {
        flex-direction: column;
    }

    .amp-card-meta {
        gap: 6px;
    }
}
