/*
Theme Name: USD Fan Theme
Theme URI: https://usd.fan/
Author: OpenAI Codex
Description: Rebuilt WordPress theme with sample-site-inspired shell, sidebars, and content cards.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: usdfan-theme
*/

:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --panel-soft: #f8fbff;
    --line: #e6edf5;
    --line-strong: #d7e1ec;
    --text: #233044;
    --muted: #728198;
    --primary: #18b8df;
    --primary-strong: #0ea7d4;
    --blue-card: linear-gradient(180deg, #80b8ff 0%, #5e9cf0 100%);
    --shadow: 0 10px 30px rgba(34, 53, 83, 0.08);
    --shadow-soft: 0 8px 20px rgba(34, 53, 83, 0.05);
    --radius: 20px;
    --shell-width: 1210px;
    --header-height: 64px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.92) 0, rgba(255, 255, 255, 0.92) 220px, transparent 221px),
        linear-gradient(180deg, #f6f8fc 0%, #eef3f9 100%);
    color: var(--text);
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.75;
    padding-top: calc(var(--header-height) + 18px);
}

a {
    color: #2b5fad;
    text-decoration: none;
}

a:hover {
    color: #17498e;
}

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

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

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.card-block,
.post-item,
.single-post-hero,
.single-post-content,
.single-post-summary-box,
.single-post-footer,
.archive-header,
.error-404-page,
.comments-shell,
.widget,
.home-compose-card,
.feed-toolbar,
.site-footer {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.header-content {
    width: min(calc(100% - 28px), var(--shell-width));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    color: #1b2432;
    font-weight: 800;
    font-size: 14px;
}

.custom-logo-wrap img {
    max-height: 42px;
    width: auto;
}

.logo-badge {
    min-width: 52px;
    height: 36px;
    padding: 0 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ef4242 0%, #d11f1f 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 18px rgba(209, 31, 31, 0.18);
}

.site-logo-text {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.search-box {
    flex: 1;
    max-width: 360px;
    position: relative;
}

.search-form {
    position: relative;
}

.search-input,
.status-input,
.frontend-post-form input,
.frontend-post-form select,
.frontend-post-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #f7f9fc;
    border-radius: 999px;
    padding: 11px 16px 11px 42px;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.frontend-post-form textarea {
    min-height: 220px;
    resize: vertical;
    border-radius: 24px;
    padding: 14px 16px;
}

.search-input:focus,
.status-input:focus,
.frontend-post-form input:focus,
.frontend-post-form select:focus,
.frontend-post-form textarea:focus {
    background: #fff;
    border-color: #93c8ea;
    box-shadow: 0 0 0 4px rgba(24, 184, 223, 0.12);
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #9cafc2;
    font-size: 15px;
    pointer-events: none;
}

.search-submit {
    display: none;
}

.nav-menu ul {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-menu a {
    color: #304056;
    font-size: 16px;
    font-weight: 600;
}

.site-shell {
    width: min(calc(100% - 28px), var(--shell-width));
    margin: 0 auto 18px;
}

.main-layout {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) 280px;
    gap: 18px;
    align-items: start;
}

.left-navigation {
    position: sticky;
    top: calc(var(--header-height) + 18px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.left-nav-card {
    min-height: 62px;
    padding: 0 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid #dce8f3;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    gap: 12px;
    color: #324053;
    font-weight: 700;
    font-size: 14px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.left-nav-card:hover {
    transform: translateY(-1px);
    border-color: #cfe0ef;
    box-shadow: 0 12px 24px rgba(31, 52, 82, 0.08);
}

.left-nav-card.active {
    border-color: #cfe6ff;
    background: linear-gradient(180deg, #ffffff 0%, #f4faff 100%);
    box-shadow: 0 12px 24px rgba(90, 162, 230, 0.12);
}

.left-nav-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 19px;
    line-height: 1;
    font-weight: 700;
    background: transparent;
}

.left-nav-icon-home {
    color: #3f8fdb;
}

.left-nav-icon-latest {
    color: #4b81bd;
}

.left-nav-icon-hot {
    color: #eea330;
}

.left-nav-icon-recommended {
    color: #efca57;
}

.main-content {
    min-width: 0;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.home-compose-card,
.feed-toolbar,
.archive-header,
.single-post-hero,
.single-post-summary-box,
.single-post-content,
.single-post-footer,
.comments-shell {
    padding: 22px 26px;
}

.home-compose-card {
    margin-bottom: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
    padding: 16px 22px 14px;
}

.compose-status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.user-avatar img,
.author-hero-avatar img,
.post-avatar img,
.sidebar-user-mini img {
    border-radius: 50%;
}

.guest-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #53c23f 0%, #2fb23d 100%);
    color: #fff;
    font-size: 18px;
    box-shadow: 0 6px 14px rgba(47, 178, 61, 0.18);
}

.user-input {
    flex: 1;
}

.compose-status-row .user-avatar img {
    width: 38px;
    height: 38px;
}

.action-buttons-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
}

.action-buttons-four {
    margin-top: 8px;
}

.action-btn {
    min-height: 54px;
    padding: 0 10px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    color: #233652;
    background: transparent;
    box-shadow: none;
    position: relative;
}

.action-btn:hover {
    background: #f9fbfe;
}

.btn-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    font-weight: 800;
}

.btn-icon-purple {
    color: #9650b9;
}

.btn-icon-blue {
    color: #3b98df;
}

.btn-icon-red {
    color: #c44432;
}

.btn-icon-green {
    color: #1fa056;
}

.compose-status-row .status-input {
    height: 40px;
    padding-top: 0;
    padding-bottom: 0;
    background: #edf2f7;
    border-color: #e4ebf3;
    font-size: 14px;
}

.action-buttons-four .action-btn {
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border: 0;
}

.action-buttons-four .action-btn:hover {
    border-color: transparent;
}

.action-buttons-four .action-btn + .action-btn::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 1px;
    background: #edf1f6;
}

.action-buttons-four .action-btn span:last-child {
    font-size: 14px;
    color: #2a3f5f;
}

.action-btn-feed .btn-icon {
    color: #a25bc4;
}

.action-btn-article .btn-icon {
    color: #3493df;
}

.action-btn-question .btn-icon {
    color: #ce4b35;
}

.action-btn-coop .btn-icon {
    color: #26a75f;
}

.feed-toolbar {
    margin-bottom: 16px;
}

.feed-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 15px;
    font-weight: 700;
}

.feed-toolbar-compact,
.archive-header-compact {
    padding-top: 18px;
    padding-bottom: 18px;
}

.toolbar-link {
    position: relative;
    color: #4a5a72;
    padding-bottom: 6px;
}

.toolbar-link.active {
    color: #1699c6;
}

.toolbar-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--primary);
}

.feed-toolbar-subline,
.archive-description {
    margin-top: 14px;
    color: var(--muted);
    font-size: 14px;
}

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

.post-item {
    padding: 22px 22px 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.post-avatar {
    width: 44px;
    flex-shrink: 0;
}

.post-content {
    flex: 1;
    min-width: 0;
}

.post-content-vertical {
    display: flex;
    flex-direction: column;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.post-author {
    color: #2a68aa;
    font-weight: 700;
    font-size: 14px;
}

.post-title {
    margin: 0 0 10px;
    line-height: 1.45;
    font-size: 28px;
    font-weight: 800;
}

.feed-list .post-title {
    font-size: 17px;
}

.post-title-list {
    margin-bottom: 14px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.post-title a {
    color: #1d2d45;
}

.post-excerpt {
    color: #45556e;
    font-size: 15px;
    line-height: 1.85;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-thumbnail-card {
    overflow: hidden;
    border-radius: 8px;
    background: #f2f6fb;
    border: 1px solid #ebf1f7;
}

.post-thumbnail-card-top {
    margin-bottom: 14px;
    width: 260px;
    max-width: 100%;
}

.post-thumbnail {
    width: 100%;
    height: 132px;
    object-fit: cover;
}

.post-thumbnail-top {
    height: 232px;
}

.post-meta {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.post-meta-list {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eef2f7;
}

.post-meta-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.post-meta-right {
    color: var(--muted);
    font-size: 13px;
}

.post-author-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #5b6d83;
}

.post-avatar-inline {
    width: 28px;
    height: 28px;
    display: inline-flex;
}

.post-avatar-inline img {
    width: 28px;
    height: 28px;
}

.post-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--muted);
    font-size: 13px;
}

.post-categories a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f2f7fc;
    color: #466583;
    font-size: 12px;
    margin-left: 8px;
}

.pagination {
    padding: 16px 22px;
}

.pagination .nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    min-width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: #fff;
    color: #4b5d73;
}

.pagination .current {
    background: #e8f7fb;
    border-color: #bce8f3;
    color: #149bc8;
}

.progress-widget,
.author-hero-card,
.login-promo-card,
.stats-widget,
.widget-hot-posts,
.tags-widget {
    padding: 18px;
}

.progress-widget,
.stats-widget,
.widget-hot-posts,
.tags-widget {
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
}

.progress-widget-bar {
    display: flex;
    align-items: center;
    gap: 14px;
}

.progress-bar {
    flex: 1;
    height: 36px;
    padding: 5px;
    border-radius: 15px;
    background: #e9f4fb;
}

.progress-bar span {
    display: block;
    height: 100%;
    border-radius: 12px;
    background: linear-gradient(90deg, #16b7df 0%, #44d3ef 100%);
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.06);
}

.progress-widget-percent {
    color: #17a8d4;
    font-size: 18px;
    font-weight: 800;
}

.progress-widget-meta {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #495a72;
    font-size: 14px;
}

.progress-widget-meta strong {
    font-size: 16px;
}

.author-hero-card {
    background: var(--blue-card);
    color: #fff;
    border: 0;
    min-height: 176px;
    box-shadow: 0 16px 28px rgba(86, 147, 231, 0.22);
}

.sidebar .login-promo-card {
    position: relative;
    overflow: hidden;
    padding: 16px 18px 16px;
    min-height: 172px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.08) 100%),
        url("https://h5.sinaimg.cn/upload/1005/526/2021/08/23/bg.jpg") center top / cover no-repeat;
    border: 1px solid #f3ead8;
    box-shadow: 0 12px 26px rgba(214, 159, 88, 0.14);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sidebar .login-promo-art {
    display: none;
}

.sidebar .login-promo-title {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #ff8c00;
    font-size: 18px;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: 0.5px;
    margin: 0 0 18px;
    text-shadow: 0 2px 0 rgba(255, 255, 255, 0.75);
}

.sidebar .login-promo-button {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    width: 156px;
    margin: 0 auto;
    border-radius: 999px;
    background: linear-gradient(180deg, #29cb82 0%, #17b669 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(23, 182, 105, 0.24);
}

.sidebar .login-promo-meta {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-top: 12px;
    color: #25374d;
    font-size: 13px;
    font-weight: 600;
}

.sidebar .login-promo-meta a {
    color: #11b06a;
    font-weight: 700;
}

.author-hero-name {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 10px;
}

.author-hero-main {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 12px;
    align-items: start;
}

.author-hero-avatar img {
    width: 56px;
    height: 56px;
    border: 3px solid rgba(255, 255, 255, 0.26);
}

.author-hero-bio {
    margin: 0;
    color: rgba(255, 255, 255, 0.94);
    font-size: 13px;
    line-height: 1.85;
}

.login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, #1bb8df 0%, #0ea9d6 100%);
    color: #fff;
    font-weight: 700;
    border: 0;
    cursor: pointer;
}

.widget-title {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 800;
    color: #203149;
}

.stats-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.stats-tabs .active {
    color: #13a9d4;
    position: relative;
}

.stats-tabs .active::after {
    content: "";
    position: absolute;
    left: 12%;
    bottom: -13px;
    width: 76%;
    height: 2px;
    background: #13a9d4;
    border-radius: 999px;
}

.stats-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    text-align: center;
}

.stats-grid strong {
    display: block;
    color: #13abd7;
    font-size: 24px;
    line-height: 1.1;
}

.stats-grid span {
    font-size: 13px;
    color: var(--muted);
}

.sidebar-post-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar .widget {
    margin: 0;
}

.sidebar-post-link {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 10px;
    align-items: center;
    min-height: 72px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.sidebar-post-link:hover {
    transform: translateY(-1px);
    border-color: #d8e7f6;
    box-shadow: 0 10px 20px rgba(35, 54, 82, 0.06);
}

.sidebar-thumb {
    width: 78px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    background: #edf3f8;
}

.sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-post-title-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #24364d;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.45;
}

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

.tag-cloud a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    color: #566980;
    font-size: 12px !important;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.tag-cloud a:hover {
    border-color: #cfe2f2;
    background: #f4f9fd;
    color: #2f5f9f;
}

.archive-title,
.single-post-title {
    margin: 0;
    color: #1d2d45;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.4;
}

.single-post-meta {
    margin-top: 14px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 14px;
}

.single-post-summary-box {
    margin-top: 14px;
    text-align: center;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
}

.single-post-summary-box p {
    margin: 0;
    color: #7b8596;
    font-size: 15px;
}

.single-post-summary-count {
    margin-top: 16px;
    font-size: 16px;
    font-weight: 800;
    color: #17b765;
}

.single-post-content {
    margin-top: 14px;
    font-size: 17px;
    color: #33445a;
    background: linear-gradient(180deg, #ffffff 0%, #fdfefe 100%);
}

.single-post-content p:first-child {
    margin-top: 0;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
    color: #1f2f45;
    line-height: 1.45;
}

.single-post-content img {
    margin: 18px auto;
    border-radius: 16px;
}

.single-post-content blockquote {
    margin: 18px 0;
    padding: 16px 18px;
    border-left: 4px solid var(--primary);
    background: #f7fbfd;
    color: #4c5f77;
    border-radius: 0 16px 16px 0;
}

.single-post-content pre {
    overflow: auto;
    padding: 18px;
    border-radius: 16px;
    background: #111827;
    color: #eff3f7;
}

.single-post-footer {
    margin-top: 14px;
}

.tags-label {
    font-weight: 700;
}

.post-tags a {
    margin-right: 10px;
}

.post-recommend-card {
    border: 1px solid #e8eef5;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: var(--shadow-soft);
}

.post-recommend-inline {
    margin: 24px 0;
    padding: 18px;
}

.post-recommend-footer {
    padding: 4px;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.post-recommend-title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 800;
    color: #1f3250;
}

.post-recommend-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.post-recommend-inline .post-recommend-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-recommend-item {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 12px;
    align-items: center;
    min-height: 78px;
    padding: 10px;
    border: 1px solid #e7edf4;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.post-recommend-item:hover {
    transform: translateY(-1px);
    border-color: #d8e6f3;
    box-shadow: 0 10px 20px rgba(35, 54, 82, 0.06);
}

.post-recommend-thumb {
    width: 88px;
    height: 58px;
    overflow: hidden;
    border-radius: 10px;
    background: #eef4f8;
}

.post-recommend-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-recommend-text {
    color: #20324c;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.comments-shell {
    margin-top: 14px;
}

.error-404-page {
    padding: 56px 32px;
    text-align: center;
}

.error-404-page h1 {
    margin: 0;
    font-size: 58px;
    line-height: 1;
}

.error-404-page h2 {
    margin: 12px 0 10px;
    font-size: 24px;
}

.empty-state {
    margin: 0;
    padding: 36px 24px;
    text-align: center;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.frontend-post-form-wrap {
    padding: 20px 0 0;
}

.frontend-post-form .form-row {
    margin-bottom: 16px;
}

.frontend-post-form .form-row-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.frontend-post-form label {
    display: block;
    margin-bottom: 8px;
    color: #314055;
    font-size: 14px;
    font-weight: 700;
}

.frontend-post-form input[type="file"] {
    padding-left: 16px;
    border-radius: 20px;
}

.frontend-post-lock {
    padding: 20px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
}

.site-footer {
    margin-top: 18px;
    padding: 18px 24px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.site-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--muted);
    font-size: 14px;
}

.site-footer-copy {
    color: var(--muted);
    font-size: 13px;
}

body.is-scrolled .site-header {
    box-shadow: 0 8px 22px rgba(20, 36, 61, 0.08);
}

@media (max-width: 1160px) {
    .main-layout {
        grid-template-columns: 120px minmax(0, 1fr) 260px;
    }

    .feed-list .post-title {
        font-size: 18px;
    }

    .post-thumbnail-top {
        height: 204px;
    }

    .post-thumbnail-card-top {
        width: 240px;
    }
}

@media (max-width: 980px) {
    .nav-menu {
        display: none;
    }

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

    .left-navigation {
        position: static;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .sidebar {
        grid-row: 3;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: calc(var(--header-height) + 12px);
    }

    .site-shell,
    .header-content {
        width: min(calc(100% - 20px), var(--shell-width));
    }

    .header-content {
        gap: 12px;
    }

    .search-box {
        max-width: none;
    }

    .site-logo-text {
        font-size: 20px;
    }

    .left-navigation {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .action-buttons-grid,
    .frontend-post-form .form-row-inline,
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .post-thumbnail-top {
        height: 184px;
    }

    .post-thumbnail-card-top {
        width: 100%;
    }

    .post-recommend-inline .post-recommend-list {
        grid-template-columns: 1fr;
    }

    .sidebar-post-link {
        grid-template-columns: 72px 1fr;
    }

    .sidebar-thumb {
        width: 72px;
        height: 56px;
    }

    .home-compose-card,
    .feed-toolbar,
    .archive-header,
    .single-post-hero,
    .single-post-summary-box,
    .single-post-content,
    .single-post-footer,
    .comments-shell {
        padding: 20px;
    }
}

@media (max-width: 560px) {
    .search-box {
        display: none;
    }

    .action-buttons-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .left-nav-card {
        min-height: 62px;
        padding: 0 16px;
        font-size: 15px;
    }

    .feed-list .post-title,
    .single-post-title,
    .archive-title {
        font-size: 22px;
    }

    .site-footer-inner {
        align-items: flex-start;
    }
}
