/* ==========================================================================
   吃货美食记 · 样式表
   纯手写 CSS，不依赖任何外部资源（无外部字体、CDN、外链图片）
   ========================================================================== */

:root {
    --bg:        #fdf8f1;
    --surface:   #ffffff;
    --ink:       #33271f;
    --ink-soft:  #6b5a4c;
    --ink-faint: #a08d7c;
    --line:      #f0e2d3;
    --accent:    #e5622f;
    --accent-2:  #f0a622;
    --accent-bg: #fdefe6;
    --radius:    14px;
    --wrap:      1040px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
    font-size: 16px;
    line-height: 1.85;
    -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

/* ---------- 顶部 ---------- */
.site-header {
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(8px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 74px;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }

.brand-icon {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 21px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 6px 16px rgba(229, 98, 47, .25);
}

.brand-name { display: block; font-size: 19px; font-weight: 800; letter-spacing: 2px; }
.brand-sub  { display: block; font-size: 12px; color: var(--ink-faint); letter-spacing: 1px; }

.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }

.site-nav a {
    display: block; padding: 8px 16px; border-radius: 999px;
    font-size: 14.5px; color: var(--ink-soft); transition: .2s;
}
.site-nav a:hover { background: var(--accent-bg); color: var(--accent); text-decoration: none; }
.site-nav a.active { background: var(--accent); color: #fff; }

/* ---------- 首屏 ---------- */
main { display: block; padding: 34px 0 56px; }

.hero {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 36px 32px;
    margin: 8px 0 42px;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: ""; position: absolute; right: -60px; top: -60px;
    width: 200px; height: 200px; border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 166, 34, .18), transparent 70%);
}
.hero h1 { margin: 0 0 14px; font-size: 27px; letter-spacing: 2px; }
.hero p { margin: 0; color: var(--ink-soft); font-size: 15.5px; max-width: 640px; }
.hero .hero-note {
    margin-top: 14px; font-size: 13.5px; color: var(--ink-faint);
    border-left: 3px solid var(--accent-2); padding-left: 12px;
}

.cat-chips { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.cat-chips a {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13.5px; color: var(--ink-soft);
    background: var(--accent-bg); border: 1px solid #f7dcc9;
    padding: 6px 14px; border-radius: 999px; transition: .2s;
}
.cat-chips a:hover { text-decoration: none; color: #fff; background: var(--accent); border-color: var(--accent); }
.cat-chips em {
    font-style: normal; font-size: 11.5px; color: var(--accent);
    background: #fff; border-radius: 999px; padding: 0 7px;
}
.cat-chips a:hover em { color: var(--accent); }

/* ---------- 区块标题 ---------- */
.section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 12px; margin: 0 0 20px; padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.section-head h2 { margin: 0; font-size: 19px; letter-spacing: 2px; }
.section-head .more { font-size: 13.5px; color: var(--ink-faint); }

/* ---------- 菜谱卡片 ---------- */
.recipe-grid {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.recipe-grid li { min-width: 0; }

.recipe-card {
    display: flex; flex-direction: column; height: 100%;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden; color: inherit;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.recipe-card:hover {
    text-decoration: none; transform: translateY(-4px);
    border-color: #f3cdb2;
    box-shadow: 0 14px 32px rgba(160, 90, 40, .12);
}

.cover {
    display: flex; align-items: center; justify-content: center;
    height: 128px; font-size: 52px; line-height: 1;
    text-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}

.card-body { display: block; padding: 16px 18px 18px; }
.card-title { display: block; font-size: 17px; font-weight: 700; letter-spacing: 1px; }
.card-summary {
    display: block; margin-top: 8px; font-size: 13.5px;
    color: var(--ink-soft); line-height: 1.8; min-height: 49px;
}
.card-meta {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-top: 12px; font-size: 12.5px; color: var(--ink-faint);
}
.card-meta .tag {
    color: var(--accent); background: var(--accent-bg);
    padding: 2px 10px; border-radius: 999px;
}

/* ---------- 分类筛选 ---------- */
.filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filter a {
    font-size: 13.5px; padding: 6px 16px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
}
.filter a:hover { text-decoration: none; border-color: #f3cdb2; color: var(--accent); }
.filter a.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- 详情页 ---------- */
.crumb { font-size: 13.5px; color: var(--ink-faint); margin-bottom: 18px; }
.crumb span { margin: 0 8px; color: #d9c9b8; }
.crumb em { font-style: normal; color: var(--ink-soft); }

.recipe { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

.recipe-head { padding: 34px 34px 30px; color: #fff; text-align: center; }
.recipe-head .head-icon { font-size: 46px; line-height: 1; display: block; margin-bottom: 10px; }
.recipe-head h1 {
    margin: 0 0 10px; font-size: 27px; letter-spacing: 3px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .22);
}
.recipe-head p {
    margin: 0 auto; max-width: 560px; font-size: 14.5px; line-height: 1.85;
    color: rgba(255, 255, 255, .94);
}

.meta-bar {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(5, 1fr);
    border-bottom: 1px solid var(--line);
}
.meta-bar li {
    padding: 14px 10px; text-align: center; font-size: 14px;
    border-right: 1px solid var(--line);
}
.meta-bar li:last-child { border-right: none; }
.meta-bar b { display: block; font-size: 11.5px; font-weight: 400; color: var(--ink-faint); margin-bottom: 3px; }

.recipe-cols { display: grid; grid-template-columns: 300px 1fr; gap: 0; border-bottom: 1px solid var(--line); }

.box { padding: 26px 30px; }
.box h2 {
    margin: 0 0 16px; font-size: 16.5px; letter-spacing: 1px;
    display: flex; align-items: center; gap: 9px;
}
.box h2::before {
    content: ""; width: 4px; height: 16px; border-radius: 3px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.ingredients { border-right: 1px solid var(--line); background: #fffdfa; }
.ingredients ul { list-style: none; margin: 0; padding: 0; }
.ingredients li {
    padding: 9px 0; font-size: 14.5px; color: var(--ink-soft);
    border-bottom: 1px dashed var(--line);
}
.ingredients li:last-child { border-bottom: none; }
.ingredients li::before { content: "·"; color: var(--accent); font-weight: 800; margin-right: 8px; }

.steps ol { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
    position: relative; padding: 0 0 20px 42px; font-size: 15px; color: var(--ink-soft);
    counter-increment: step;
}
.steps li::before {
    content: counter(step);
    position: absolute; left: 0; top: 2px;
    width: 26px; height: 26px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 4px 10px rgba(229, 98, 47, .22);
}
.steps li::after {
    content: ""; position: absolute; left: 13px; top: 32px; bottom: 4px;
    width: 1px; background: var(--line);
}
.steps li:last-child { padding-bottom: 4px; }
.steps li:last-child::after { display: none; }

.tips { background: #fffaf4; }
.tips h2::before { background: linear-gradient(180deg, var(--accent-2), #ffd08a); }
.tips ul { list-style: none; margin: 0; padding: 0; }
.tips li {
    position: relative; padding: 9px 0 9px 26px; font-size: 14.5px; color: var(--ink-soft);
}
.tips li::before {
    content: "✓"; position: absolute; left: 0; top: 8px;
    color: var(--accent); font-weight: 800; font-size: 13px;
}

.pager {
    display: grid; grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--line);
}
.pager-item { padding: 18px 26px; }
.pager-item.right { text-align: right; border-left: 1px solid var(--line); }
.pager-item small { display: block; font-size: 12px; color: var(--ink-faint); margin-bottom: 4px; }
.pager-item strong { font-size: 15px; font-weight: 700; color: var(--ink); }
.pager-item a:hover strong { color: var(--accent); }
.pager-item .muted strong { color: var(--ink-faint); font-weight: 400; }

.recipe-foot {
    margin: 0; padding: 20px 30px 26px; font-size: 13.5px;
    color: var(--ink-faint); border-top: 1px solid var(--line); line-height: 2;
}

/* ---------- 关于页 ---------- */
.page { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 42px 36px; }
.page h1 { margin: 0 0 20px; font-size: 25px; letter-spacing: 2px; }
.page h2 {
    margin: 32px 0 12px; font-size: 17px; letter-spacing: 1px;
    padding-left: 12px; line-height: 1.4;
    border-left: 4px solid var(--accent);
}
.page p { margin: 0 0 1.1em; font-size: 15.5px; color: var(--ink-soft); }

.info-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.info-table th, .info-table td {
    text-align: left; padding: 12px 4px; border-bottom: 1px solid var(--line); vertical-align: top;
}
.info-table th { width: 120px; font-weight: 400; color: var(--ink-faint); }

/* ---------- 提示 ---------- */
.notice {
    background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
    padding: 50px 30px; text-align: center; color: var(--ink-soft);
}
.notice h1 { margin: 0 0 12px; font-size: 21px; color: var(--ink); }
.notice-link { margin-top: 16px; }

/* ---------- 页脚 ---------- */
.site-footer {
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 30px 0 34px; text-align: center;
}
.footer-statement {
    margin: 0 auto 14px; max-width: 680px; font-size: 13px; line-height: 1.95;
    color: var(--ink-soft); background: var(--accent-bg);
    border-radius: 10px; padding: 13px 20px;
}
.footer-meta, .footer-beian {
    margin: 0 0 6px; font-size: 13px; color: var(--ink-faint); line-height: 2;
}
.footer-beian a { color: var(--ink-soft); }
.footer-beian a:hover { color: var(--accent); }
.dot { margin: 0 8px; color: #e2d3c4; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .recipe-grid { grid-template-columns: repeat(2, 1fr); }
    .recipe-cols { grid-template-columns: 1fr; }
    .ingredients { border-right: none; border-bottom: 1px solid var(--line); }
    .meta-bar { grid-template-columns: repeat(3, 1fr); }
    .meta-bar li { border-bottom: 1px solid var(--line); }
}

@media (max-width: 620px) {
    .wrap { padding: 0 18px; }
    .hero { padding: 26px 22px; }
    .hero h1 { font-size: 22px; }
    .recipe-grid { grid-template-columns: 1fr; }
    .recipe-head { padding: 26px 20px 24px; }
    .box { padding: 22px 20px; }
    .page { padding: 28px 22px; }
    .pager { grid-template-columns: 1fr; }
    .pager-item.right { border-left: none; border-top: 1px solid var(--line); text-align: left; }
    .meta-bar { grid-template-columns: repeat(2, 1fr); }
}
