/* =====================================================================
   《跟着诗词去旅行》前台古风文人水墨样式
   主色：墨黑 / 黛青 / 米白 / 赭石黄
   ===================================================================== */

:root {
    --ink: #2b2b2b;
    --ink-light: #5a5a5a;
    --daqing: #3a5a5a;
    --daqing-light: #6b8b8b;
    --rice: #f5efe0;
    --rice-light: #faf6ec;
    --ochre: #b8860b;
    --ochre-deep: #9a6a0a;
    --line: #d8cdb4;
    --shadow: rgba(43, 43, 43, 0.08);
    --serif: "STKaiti", "KaiTi", "楷体", "SimSun", "宋体", serif;
    --body: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", "宋体", serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--body);
    color: var(--ink);
    background-color: var(--rice);
    background-image:
        radial-gradient(ellipse at 50% -10%, rgba(184, 134, 11, 0.06), transparent 60%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.6 0 0 0 0 0.55 0 0 0 0 0.45 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
    min-height: 100vh;
    line-height: 1.7;
}

a { color: var(--ochre-deep); text-decoration: none; }
a:hover { color: var(--daqing); }

.container { width: 100%; max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* 淡墨远山 */
.ink-mountain {
    position: fixed; bottom: 0; left: 0; right: 0; height: 180px;
    pointer-events: none; z-index: 0; opacity: 0.35;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 200' preserveAspectRatio='none'%3E%3Cpath d='M0 200 L0 150 Q200 60 380 130 T720 90 T1080 140 T1440 80 L1440 200 Z' fill='%233a5a5a' opacity='0.5'/%3E%3Cpath d='M0 200 L0 175 Q300 120 560 165 T1100 140 T1440 150 L1440 200 Z' fill='%232b2b2b' opacity='0.25'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
}

/* 页头 */
.site-header {
    position: relative; z-index: 2;
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 28px;
}
.brand {
    font-family: var(--serif); font-size: 20px; letter-spacing: 2px; color: var(--ink);
    font-weight: 700;
}
.site-header nav a {
    margin-left: 20px; font-size: 15px; color: var(--ink-light);
    position: relative; padding-bottom: 2px;
}
.site-header nav a:hover { color: var(--ochre-deep); }
.site-header nav a::after {
    content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
    background: var(--ochre); transition: width .3s;
}
.site-header nav a:hover::after { width: 100%; }

/* 主体 */
.site-main { position: relative; z-index: 1; min-height: 60vh; }

/* 页脚 */
.site-footer {
    position: relative; z-index: 1; text-align: center;
    padding: 40px 20px 60px; color: var(--ink-light); font-size: 13px;
}
.site-footer .footer-links { margin-bottom: 10px; }
.site-footer .footer-links a { margin: 0 12px; color: var(--ink-light); }
.site-footer .footer-links a:hover { color: var(--ochre-deep); }

/* 首页 hero */
.hero {
    min-height: 74vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center; padding: 40px 20px;
}
.hero .seal {
    width: 46px; height: 46px; margin-bottom: 20px; border-radius: 6px;
    background: linear-gradient(135deg, #a33, #c33); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--serif); font-size: 26px; box-shadow: 0 4px 12px rgba(163, 51, 51, .4);
}
.hero h1 {
    font-family: var(--serif); font-size: 40px; font-weight: 700; letter-spacing: 6px;
    color: var(--ink);
}
.hero .subtitle {
    margin-top: 14px; font-size: 16px; letter-spacing: 4px; color: var(--daqing);
}

/* 搜索框 */
.search-wrap { margin-top: 46px; width: 100%; max-width: 560px; position: relative; }
.search-box {
    display: flex; align-items: center;
    border: 1px solid var(--line); border-radius: 40px;
    background: rgba(255, 255, 255, 0.55); padding: 6px 6px 6px 22px;
    box-shadow: 0 6px 24px var(--shadow);
}
.search-box input {
    flex: 1; border: none; outline: none; background: transparent;
    font-family: var(--body); font-size: 16px; color: var(--ink); height: 44px;
}
.search-box input::placeholder { color: #b0a88f; }
.btn-ink {
    border: none; cursor: pointer; font-family: var(--serif); letter-spacing: 2px;
    background: var(--ink); color: var(--rice-light); border-radius: 34px;
    padding: 11px 26px; font-size: 15px; transition: all .25s;
}
.btn-ink:hover { background: var(--daqing); }
.btn-ink:disabled { opacity: .6; cursor: not-allowed; }

/* 搜索结果 */
.search-result { margin-top: 40px; text-align: left; display: none; width: 100%; max-width: 560px; }

.result-head {
    text-align: center; font-family: var(--serif); color: var(--ochre-deep);
    letter-spacing: 3px; font-size: 18px; font-weight: 700; margin-bottom: 20px;
    position: relative;
}
.result-head::before, .result-head::after {
    content: ""; display: inline-block; vertical-align: middle;
    width: 42px; height: 1px; background: linear-gradient(90deg, transparent, var(--ochre));
    margin: 0 12px;
}
.result-head::after { background: linear-gradient(90deg, var(--ochre), transparent); }

.poem-list { display: flex; flex-direction: column; gap: 16px; }

.poem-list-item {
    position: relative; display: block; text-align: left;
    background-color: var(--rice-light);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 22px 58px 22px 26px;
    color: var(--ink);
    box-shadow: 0 4px 16px var(--shadow);
    overflow: hidden;
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.75 0 0 0 0 0.7 0 0 0 0 0.55 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.poem-list-item::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: linear-gradient(180deg, var(--daqing), var(--ochre));
    opacity: .5;
}
.poem-list-item::after {
    content: "诗";
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px; line-height: 32px; text-align: center;
    font-family: var(--serif); font-size: 17px; color: #fff;
    background: linear-gradient(135deg, #b0402f, #cf4a35);
    border-radius: 5px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.15);
    opacity: .92;
    transition: transform .28s ease, opacity .28s ease;
}
.poem-list-item:hover {
    transform: translateY(-4px);
    border-color: var(--ochre);
    box-shadow: 0 12px 30px rgba(43, 43, 43, .14);
}
.poem-list-item:hover::after { transform: rotate(-6deg); opacity: 1; }

.pl-title { font-family: var(--serif); font-size: 19px; letter-spacing: 1px; color: var(--ink); }
.pl-meta { font-size: 13px; color: var(--daqing); margin-top: 5px; letter-spacing: 1px; }
.pl-ancient { font-size: 12px; color: var(--ink-light); margin-top: 4px; }
.pl-excerpt {
    font-size: 14px; color: #6b6252; margin-top: 12px;
    font-family: var(--serif); line-height: 1.9; letter-spacing: .5px;
}
.pl-arrow {
    position: absolute; right: 22px; bottom: 18px;
    font-size: 26px; color: var(--ochre); font-weight: 300; line-height: 1;
    opacity: .7; transition: transform .28s ease, opacity .28s ease;
}
.poem-list-item:hover .pl-arrow { transform: translateX(4px); opacity: 1; }

/* 搜索限制引导（登录/付费）——醒目提示 */
.notice.gate {
    padding: 40px 26px;
    background: linear-gradient(135deg, #f9f1de, #fdf8ec);
    border: 1px solid #e3c98a;
    border-radius: 14px;
    box-shadow: 0 10px 34px rgba(184, 134, 11, .22);
    position: relative;
    overflow: hidden;
}
.notice.gate::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--ochre), #d9a441, var(--ochre));
}
.gate-seal {
    width: 58px; height: 58px; margin: 0 auto 18px; border-radius: 9px;
    background: linear-gradient(135deg, #a3261c, #c0392b); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--serif); font-size: 30px; box-shadow: 0 6px 18px rgba(163, 38, 28, .45);
    animation: sealPulse 2.2s ease-in-out infinite;
}
.gate-msg {
    font-family: var(--serif); font-size: 19px; font-weight: 700;
    color: #8a5a0a; letter-spacing: 1.5px; line-height: 2.1;
    text-shadow: 0 1px 0 rgba(255,255,255,.6);
}
.gate-actions { margin-top: 26px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.gate-actions .btn-ink { display: inline-block; padding: 13px 32px; font-size: 16px; letter-spacing: 3px; }
.btn-ink.ghost { background: transparent; color: var(--ochre-deep); border: 1px solid var(--ochre); }
.btn-ink.ghost:hover { background: var(--ochre); color: #fff; }

/* 古风确认框 */
.ink-confirm { text-align: center; }
.ink-confirm .gate-seal { margin: 0 auto 18px; }
.confirm-msg {
    font-family: var(--serif); font-size: 16px; color: var(--ink);
    letter-spacing: 1px; line-height: 2; margin-bottom: 26px;
}
.confirm-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.confirm-actions .btn-ink { display: inline-block; padding: 12px 30px; font-size: 15px; letter-spacing: 3px; }

@keyframes sealPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 6px 18px rgba(163, 38, 28, .45); }
    50% { transform: scale(1.06); box-shadow: 0 8px 26px rgba(163, 38, 28, .6); }
}
.poem-card {
    background: var(--rice-light); border: 1px solid var(--line);
    border-radius: 10px; padding: 30px 28px; box-shadow: 0 8px 28px var(--shadow);
    position: relative; overflow: hidden;
}
.poem-card::before {
    content: ""; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.75 0 0 0 0 0.7 0 0 0 0 0.55 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
}
.poem-card > * { position: relative; }
.poem-head { text-align: center; margin-bottom: 20px; }
.poem-head .poem-title { font-family: var(--serif); font-size: 24px; letter-spacing: 2px; }
.poem-head .poem-meta { margin-top: 8px; color: var(--ink-light); font-size: 14px; }
.poem-body { font-size: 16px; line-height: 2.2; text-align: center; margin: 18px 0; white-space: pre-line; }
.poem-section { margin: 16px 0; }
.poem-section h3 {
    font-family: var(--serif); font-size: 15px; color: var(--ochre-deep);
    letter-spacing: 2px; margin-bottom: 6px;
}
.poem-section p { font-size: 14px; color: #444; white-space: pre-line; }

/* 卡片通用 */
.card {
    background: var(--rice-light); border: 1px solid var(--line);
    border-radius: 10px; padding: 28px; box-shadow: 0 6px 22px var(--shadow);
    margin-bottom: 22px;
}

/* 表单 */
.auth-card { max-width: 420px; margin: 60px auto; }
.form-title { font-family: var(--serif); font-size: 26px; text-align: center; letter-spacing: 3px; margin-bottom: 8px; }
.form-sub { text-align: center; color: var(--ink-light); font-size: 13px; margin-bottom: 26px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.form-control {
    width: 100%; height: 44px; padding: 0 14px; font-size: 15px;
    font-family: var(--body); color: var(--ink);
    border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.form-control:focus { outline: none; border-color: var(--ochre); box-shadow: 0 0 0 3px rgba(184,134,11,.12); }
textarea.form-control { height: auto; padding: 12px 14px; resize: vertical; }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row .form-control { flex: 1; }
.captcha-row img { height: 44px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; }
.form-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink-light); }
.form-check input { margin-top: 4px; }
.btn-block { width: 100%; margin-top: 6px; }
.form-tip { text-align: center; font-size: 13px; color: var(--ink-light); margin-top: 18px; }

/* 会员套餐 */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.plan {
    border: 1px solid var(--line); border-radius: 12px; background: var(--rice-light);
    padding: 30px 24px; text-align: center; position: relative;
    transition: transform .25s, box-shadow .25s;
}
.plan:hover { transform: translateY(-4px); box-shadow: 0 12px 30px var(--shadow); }
.plan.hot { border-color: var(--ochre); }
.plan .plan-name { font-family: var(--serif); font-size: 20px; letter-spacing: 2px; }
.plan .plan-price { margin: 14px 0; font-size: 32px; color: var(--ochre-deep); font-weight: 700; }
.plan .plan-price .unit { font-size: 15px; }
.plan .plan-origin { color: #aaa; font-size: 13px; text-decoration: line-through; }
.plan .plan-days { color: var(--ink-light); font-size: 13px; margin: 10px 0 18px; }
.plan .badge {
    position: absolute; top: -10px; right: 16px; background: var(--ochre); color: #fff;
    font-size: 12px; padding: 3px 12px; border-radius: 20px;
}

/* 知识库列表 */
.kb-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 4px; border-bottom: 1px dashed var(--line);
}
.kb-item:last-child { border-bottom: none; }
.kb-item .kb-name { font-family: var(--serif); font-size: 16px; }
.kb-item .kb-meta { font-size: 12px; color: var(--ink-light); margin-top: 3px; }
.kb-item .kb-actions a { margin-left: 14px; font-size: 13px; }

/* 分页（国风上一页/下一页） */
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; }
.pager a, .pager span.disabled {
    padding: 9px 22px; border: 1px solid var(--line); border-radius: 30px;
    font-size: 14px; color: var(--ink-light); background: var(--rice-light);
}
.pager a:hover { border-color: var(--ochre); color: var(--ochre-deep); }
.pager .disabled { opacity: .45; cursor: not-allowed; }

/* 社区文章卡片 */
.article-card { overflow: hidden; margin-bottom: 22px; }
.article-card .cover { width: 100%; height: 180px; object-fit: cover; background: #e8e0cd; }
.article-card .body { padding: 22px; }
.article-card .title { font-family: var(--serif); font-size: 19px; }
.article-card .desc { color: #666; font-size: 14px; margin: 10px 0; }
.article-card .meta { color: var(--ink-light); font-size: 12px; }

/* 文章详情 */
.article-detail .cover { width: 100%; max-height: 340px; object-fit: cover; border-radius: 10px; }
.article-detail .title { font-family: var(--serif); font-size: 26px; text-align: center; margin: 22px 0 8px; }
.article-detail .meta { text-align: center; color: var(--ink-light); font-size: 13px; margin-bottom: 26px; }
.rich-content { font-size: 16px; line-height: 1.9; }
.rich-content p { margin-bottom: 14px; }
.rich-content img { max-width: 100%; border-radius: 8px; }
.rich-content h2, .rich-content h3 { margin: 20px 0 10px; font-family: var(--serif); }

/* 弹窗 */
.modal-mask {
    position: fixed; inset: 0; background: rgba(20, 18, 12, 0.55);
    display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
    background: var(--rice-light); border-radius: 12px; padding: 30px 26px;
    width: 100%; max-width: 380px; box-shadow: 0 20px 50px rgba(0,0,0,.3);
    border: 1px solid var(--line); position: relative;
}
.modal .modal-close {
    position: absolute; top: 12px; right: 16px; font-size: 22px;
    cursor: pointer; color: var(--ink-light); line-height: 1;
}

/* 提示条 */
.notice { text-align: center; padding: 60px 20px; }
.notice h2 { font-family: var(--serif); font-size: 26px; letter-spacing: 3px; }
.notice p { color: var(--ink-light); margin-top: 12px; }

/* 会员状态条 */
.member-banner {
    background: linear-gradient(135deg, #f3e7cf, #efe0bd); border: 1px solid #e0cf9f;
    border-radius: 10px; padding: 18px 22px; margin-bottom: 24px; text-align: center;
}
.member-banner .big { font-family: var(--serif); font-size: 18px; }

/* 响应式 */
@media (max-width: 640px) {
    .hero h1 { font-size: 30px; letter-spacing: 3px; }
    .site-header { padding: 14px 16px; }
    .site-header nav a { margin-left: 12px; font-size: 13px; }
    .brand { font-size: 17px; }
    .poem-body { font-size: 15px; }
}
