/* ============================================================
   Retro 4-Color Theme (for TBlog v1.3.7)
   复古海报风: 米黄底 + 亮黄 header + 红色装饰 + 青绿链接
   配色来源: 用户在 2026-09-22 提供的四色板 (No.12)
   ============================================================ */

:root {
    --rt-yellow: #ffde7d;        /* 主黄（header + 装饰条 + 标签底） */
    --rt-yellow-dark: #f4c44a;   /* 黄色加深（hover/active） */
    --rt-red: #f6416c;           /* 主红（左边装饰条 + strong + 强调） */
    --rt-red-dark: #c92a52;      /* 红色深（hover） */
    --rt-cream: #f8f3d4;         /* 主体米黄背景 */
    --rt-cream-dark: #ebe2c0;    /* 米黄加深（卡片悬停） */
    --rt-teal: #00b8a9;          /* 青绿（链接 / hover / 行动色） */
    --rt-teal-dark: #00897b;     /* 青绿加深（hover） */
    --rt-text: #2d2a26;          /* 主文字（深棕近黑） */
    --rt-text-soft: #6e655c;     /* meta 文字 */
    --rt-text-meta: #b8ad97;     /* 分隔线色 */
    --rt-card-border: #f6416c;   /* 卡片边框（红） */
    --rt-card-bg: #fff8e1;       /* 卡片底色（更浅米黄） */
    --rt-code-bg: #ffeaa1;
    --rt-code-color: #c92a52;
    --rt-footer-bg: #ffde7d;

    --rt-sans: "Inter", "Helvetica Neue", "Microsoft YaHei", "PingFang SC", sans-serif;
    --rt-serif: "Playfair Display", Georgia, "Times New Roman", "Songti SC", serif;
    --rt-display: "Bebas Neue", "Oswald", "Impact", "Songti SC", serif;
    --rt-mono: "Fira Code", Menlo, Monaco, Consolas, monospace;

    --rt-radius: 14px;
    --rt-radius-sm: 10px;
    --rt-radius-lg: 22px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }

body {
    background-color: var(--rt-cream);
    color: var(--rt-text);
    font-family: var(--rt-serif);
    font-size: 90%;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--rt-teal); text-decoration: none; font-weight: 500; transition: color 0.18s; }
a:hover { color: var(--rt-red); }
a:active { color: var(--rt-red-dark); }

/* ---------- layout 12 grid ---------- */
.rt-container {
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
    max-width: 1100px;
}
.rt-row { display: flex; flex-wrap: wrap; margin-left: -10px; margin-right: -10px; }
.rt-col-1,.rt-col-2,.rt-col-3,.rt-col-4,.rt-col-5,.rt-col-6,
.rt-col-7,.rt-col-8,.rt-col-9,.rt-col-10,.rt-col-11,.rt-col-12 {
    position: relative;
    padding-left: 10px;
    padding-right: 10px;
    width: 100%;
}
.rt-col-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
.rt-col-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
.rt-hidden-tb { display: block; }
@media (max-width: 768px) {
    .rt-col-4, .rt-col-8 { flex: 0 0 100%; max-width: 100%; }
    .rt-hidden-tb { display: none; }
}

/* ---------- header ---------- */
#rt-header {
    background: var(--rt-yellow);
    border-bottom: 4px solid var(--rt-text);

}
.rt-site-name { padding: 32px 0 18px; }
#rt-logo {
    font-family: var(--rt-display);
    font-weight: 900;   /* 加粗 */
    font-size: 48px;
    color: var(--rt-text);
    letter-spacing: 0.5px;
    display: inline-block;
    line-height: 1;
    border-bottom: 3px solid var(--rt-red);
}
#rt-logo:hover { color: var(--rt-red); }
.rt-description {
    margin: 8px 0 0;
    font-family: var(--rt-serif);
    font-style: italic;
    font-size: 16px;
    color: var(--rt-text-soft);
}
.rt-site-search { padding-top: 36px; text-align: right; }
#rt-search input.rt-text {
    width: 70%;
    padding: 8px 14px;
    border: 2px solid var(--rt-text);
    border-radius: var(--rt-radius-sm);
    outline-offset: 2px;
    background: var(--rt-cream);
    font-family: var(--rt-sans);
    font-size: 15px;
    outline: none;
}
#rt-search button.rt-submit {
    padding: 8px 18px;
    background: var(--rt-red);
    color: #fff;
    border: 2px solid var(--rt-text);
    border-radius: var(--rt-radius-sm);
    cursor: pointer;
    font-family: var(--rt-sans);
    font-weight: 600;
    letter-spacing: 0.5px;
}
#rt-search button.rt-submit:hover { background: var(--rt-red-dark); }

#rt-nav-menu {
    background: var(--rt-text);
    border-top: 4px solid var(--rt-text);
    border-radius: var(--rt-radius-sm);   /* 圆角 */
    padding: 14px 10px;   /* 左右 10px 对齐 .rt-col 的 gutter，让色块跟下面文章+侧栏内容等宽 */
}
#rt-nav-menu a {
    color: var(--rt-cream);
    font-family: var(--rt-sans);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 16px;
    margin-right: 4px;
    display: inline-block;
    border: 2px solid transparent;
    transition: all 0.18s;
}
#rt-nav-menu a.current,
#rt-nav-menu a:hover {
    color: var(--rt-text);
    background: var(--rt-yellow);
    border-color: var(--rt-cream);
}

/* ---------- main ---------- */
.rt-main { padding: 32px 0 48px; }

/* ---------- archive / list title ---------- */
.rt-archive-title {
    font-family: var(--rt-display);
    font-size: 36px;
    border-bottom: 5px double var(--rt-red);
    padding-bottom: 12px;
    margin: 0 0 28px;
    color: var(--rt-text);
}

/* ---------- post card ---------- */
.rt-post {
    position: relative;
    background: var(--rt-card-bg);
    border: 2px solid var(--rt-card-border);
    border-left: 8px solid var(--rt-red);
    border-radius: var(--rt-radius-sm);   /* 圆角边框 */
    padding: 28px 32px 24px;
    margin-bottom: 28px;

}
.rt-post::before {
    content: '';
    position: absolute;
    top: -10px; right: -10px;
    width: 20px; height: 20px;
    background: var(--rt-teal);
    border-radius: var(--rt-radius-sm);
    opacity: 0.9;
}
.rt-post:hover { background: var(--rt-cream-dark); }

.rt-post-title {
    font-family: var(--rt-serif);
    font-size: 30px;
    line-height: 1.2;
    margin: 0 0 12px;
    font-weight: 700;
}
.rt-post-title a {
    color: var(--rt-text);
    border-bottom: 3px solid var(--rt-yellow);
}
.rt-post-title a:hover {
    color: var(--rt-red);
    border-bottom-color: var(--rt-red);
}

.rt-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    font-family: var(--rt-sans);
    font-size: 13px;
    color: var(--rt-text-soft);
    margin: 0 0 16px;
    padding: 0;
}
.rt-post-meta li { display: inline-block; }
.rt-post-meta a { color: var(--rt-text-soft); border-bottom: 1px dotted var(--rt-text-meta); }
.rt-post-meta a:hover { color: var(--rt-red); border-bottom-color: var(--rt-red); }
.rt-post-meta time { color: var(--rt-text-soft); }

.rt-post-content {
    font-family: var(--rt-serif);
    font-size: 17px;
    line-height: 1.85;
    color: var(--rt-text);
    margin-bottom: 18px;
}
.rt-post-content p { margin: 0 0 14px; }

.rt-read-more { margin: 0; }
.rt-more-link {
    display: inline-block;
    padding: 8px 18px;
    background: var(--rt-text);
    color: var(--rt-cream);
    font-family: var(--rt-sans);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 13px;
    border: 2px solid var(--rt-text);
}
.rt-more-link:hover { background: var(--rt-red); color: #fff; border-color: var(--rt-text); }

.rt-empty {
    text-align: center;
    padding: 60px 0;
    color: var(--rt-text-soft);
    font-style: italic;
}

/* ---------- single post ---------- */
.rt-single-post {
    background: var(--rt-card-bg);
    border: 2px solid var(--rt-card-border);
    padding: 36px 44px;

    position: relative;
}
.rt-single-post::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 8px;
    border-radius: var(--rt-radius-lg) var(--rt-radius-lg) 0 0;
    background: repeating-linear-gradient(45deg, var(--rt-yellow), var(--rt-yellow) 12px, var(--rt-red) 12px, var(--rt-red) 24px);
}
.rt-single-title {
    font-family: var(--rt-serif);
    font-size: 42px;
    line-height: 1.15;
    margin: 8px 0 18px;
    color: var(--rt-text);
    font-weight: 700;
}
.rt-single-content {
    font-family: var(--rt-serif);
    font-size: 18px;
    line-height: 1.9;
    color: var(--rt-text);
}
.rt-single-content h2 {
    font-family: var(--rt-display);
    font-size: 28px;
    border-left: 6px solid var(--rt-red);
    padding-left: 14px;
    margin: 36px 0 16px;
}
.rt-single-content h3 {
    font-family: var(--rt-serif);
    font-size: 22px;
    color: var(--rt-red);
    border-bottom: 2px dashed var(--rt-yellow-dark);
    padding-bottom: 6px;
}
.rt-single-content blockquote {
    border-left: 5px solid var(--rt-teal);
    background: var(--rt-cream);
    margin: 20px 0;
    padding: 14px 20px;
    font-style: italic;
    color: var(--rt-text-soft);
}
.rt-single-content strong { color: var(--rt-red); font-weight: 700; }
.rt-single-content code {
    background: var(--rt-code-bg);
    color: var(--rt-code-color);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: var(--rt-mono);
    font-size: 0.92em;
}
.rt-single-content pre {
    background: var(--rt-text);
    color: var(--rt-yellow);
    padding: 18px;
    border: 2px solid var(--rt-text);

    overflow-x: auto;
    font-family: var(--rt-mono);
}
.rt-single-content ul, .rt-single-content ol { padding-left: 28px; margin: 14px 0; list-style: disc; }
.rt-single-content ol { list-style: decimal; }
.rt-single-content li { margin-bottom: 6px; }

/* ---------- pagination ---------- */
.rt-page-navigator {
    margin: 32px 0;
    padding: 18px 0;
    text-align: center;
    border-top: 3px double var(--rt-red);
    border-bottom: 3px double var(--rt-red);
    font-family: var(--rt-sans);
}
.rt-page-navigator a, .rt-page-navigator .rt-current {
    display: inline-block;
    margin: 0 4px;
    padding: 6px 14px;
    border: 2px solid var(--rt-text);
    border-radius: var(--rt-radius-sm);
    color: var(--rt-text);
    background: var(--rt-cream);
    font-weight: 600;
    transition: all 0.18s;
}
.rt-page-navigator a:hover {
    background: var(--rt-yellow);
    color: var(--rt-text);
}
.rt-page-navigator .rt-current {
    background: var(--rt-red);
    color: #fff;
    border-color: var(--rt-text);
}

/* ---------- sidebar widgets ---------- */
.rt-widget {
    background: var(--rt-cream-dark);
    border: 2px solid var(--rt-text);
    border-radius: var(--rt-radius-sm);   /* 圆角 */
    padding: 18px 22px;
    margin-bottom: 22px;
    overflow: hidden;   /* 让 title 负 margin 不会突破圆角 */

}
.rt-widget-title {
    font-family: var(--rt-display);
    font-size: 20px;
    margin: 0 0 14px;
    padding: 4px 12px;
    background: var(--rt-text);
    color: var(--rt-yellow);
    letter-spacing: 1px;
    margin-left: -22px;
    margin-right: -22px;
    margin-top: -18px;
}
.rt-widget-list { list-style: none; padding: 0; margin: 0; }
.rt-widget-list li {
    padding: 6px 0;
    border-bottom: 1px dashed var(--rt-text-meta);
    font-family: var(--rt-sans);
    font-size: 14px;
}
.rt-widget-list li:last-child { border-bottom: 0; }
.rt-widget-list a {
    color: var(--rt-text);
    border-bottom: 2px solid transparent;
}
.rt-widget-list a:hover {
    color: var(--rt-red);
    border-bottom-color: var(--rt-red);
}

/* ---------- comments ---------- */
#rt-comments { margin-top: 36px; padding-top: 24px; border-top: 4px solid var(--rt-yellow); }
.rt-comment-form input, .rt-comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--rt-text);
    border-radius: var(--rt-radius-sm);
    background: var(--rt-cream);
    font-family: var(--rt-sans);
    margin-bottom: 10px;
    outline: none;
}
.rt-comment-form button {
    padding: 10px 26px;
    background: var(--rt-teal);
    color: #fff;
    border: 2px solid var(--rt-text);
    font-family: var(--rt-sans);
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
}
.rt-comment-form button:hover { background: var(--rt-teal-dark); }
.rt-comment { border-left: 3px solid var(--rt-yellow); padding: 14px 18px; margin: 14px 0; background: rgba(255,255,255,0.5); }
.rt-comment-author { font-family: var(--rt-sans); font-weight: 700; color: var(--rt-red); }

/* ---------- footer ---------- */
#rt-footer {
    background: var(--rt-footer-bg);
    border-top: 4px solid var(--rt-text);
    text-align: center;
    padding: 24px 16px;
    font-family: var(--rt-sans);
    font-size: 14px;
    color: var(--rt-text);
}
#rt-footer p { margin: 4px 0; }
#rt-footer a { color: var(--rt-text); border-bottom: 2px solid var(--rt-red); }
#rt-footer a:hover { background: var(--rt-text); color: var(--rt-yellow); border-bottom-color: transparent; }
.rt-footer-meta { font-size: 12px; color: var(--rt-text-soft); }

/* ---------- responsive ---------- */
@media (max-width: 600px) {
    #rt-logo { font-size: 36px; }
    .rt-site-search { padding-top: 14px; text-align: left; }
    #rt-nav-menu a { padding: 6px 8px; font-size: 12px; }
    .rt-post { padding: 18px 16px; }
    .rt-post-title { font-size: 22px; }
    .rt-single-title { font-size: 28px; }
    .rt-single-post { padding: 24px 20px; }
}
