/* ============================================================
   Alpha-ty-zwowo 自定义样式
   分区：变量 | 暗模式 | 头部 | 导航 | 布局 | 文章列表 | 日志模式
         评论区 | 侧边栏 | 友情链接 | 分页 | 上下篇 | 移动端 | 表情
   ============================================================ */

/* ==================== CSS变量 ==================== */
:root {
    --bg-primary: #fff;
    --bg-secondary: #f9fafb;
    --bg-card: #fff;
    --bg-bubble: #ebf0f6;
    --bg-body: #f5f5f5;
    --border-color: #d0d5dd;
    --border-light: #f0f0f0;
    --border-accent: #ddd;
    --text-primary: #333;
    --text-secondary: #999;
    --text-muted: #9ca3af;
    --text-heading: #203656;
    --text-link: #6f88ff;
    --text-meta: #727272;
    --text-body: #445166;
    --text-dark: #222831;
    --text-link-light: #b4c6ff;
    --bg-overlay: rgba(0,0,0,.5);
    --bg-input: #ebf0f6;
    --shadow-card: 3px 3px 10px #9a96aa3b;
    --accent-gradient: linear-gradient(to right, #6f88ff 0, #657be5 100%);
}

html.dark {
    --bg-primary: #374151;
    --bg-secondary: rgba(255, 255, 255, 0.05);
    --bg-card: #374151;
    --bg-bubble: rgba(255, 255, 255, 0.1);
    --bg-body: #1f2937;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(255, 255, 255, 0.15);
    --text-primary: #d1d5db;
    --text-secondary: #9ca3af;
    --text-muted: #9ca3af;
    --text-heading: #d1d5db;
    --text-link: #6f88ff;
    --text-meta: #d1d5db;
    --text-body: #d1d5db;
    --text-dark: #d1d5db;
    --text-link-light: #b4c6ff;
    --bg-overlay: rgba(0,0,0,.7);
    --bg-input: rgba(255,255,255,.1);
    --shadow-card: none;
    --accent-gradient: linear-gradient(to right, #6f88ff 0, #657be5 100%);
}

/* ==================== 暗模式覆盖 ==================== */
.dark body {
    background-color: var(--bg-body);
    color: var(--text-primary);
}

/* ==================== 背景颜色预设 ==================== */
body.bg-almond { background: #f5e6c8; }
body.bg-bluegray { background: #ebf0f6; }
body.bg-rouge { background: #f5d5d5; }
body.bg-ocean { background: #d5e8f5; }
body.bg-purple { background: #e0d5f5; }
body.bg-aurora { background: #e0e0e0; }
body.bg-green { background: #d5f5e0; }
body.bg-eyecare { background: #c7edcc; }

.dark body.bg-almond,
.dark body.bg-bluegray,
.dark body.bg-rouge,
.dark body.bg-ocean,
.dark body.bg-purple,
.dark body.bg-aurora,
.dark body.bg-green,
.dark body.bg-eyecare { background: #1f2937; }

.bg-image-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.dark .bg-image-layer {
    display: none;
}

.dark .site-header {
    background-color: var(--bg-body);
}

.dark .header-nav-list a {
    color: var(--text-primary);
}

.dark .header-nav-list li a:hover {
    color: var(--text-link);
}

.dark footer {
    background-color: var(--bg-body);
    border-top-color: var(--border-light);
}

footer {
    margin-top: 24px;
}

footer .footer {
    font-size: 13px;
}

.dark .bloginfo-name {
    color: var(--text-primary);
}

.dark .bloggerinfo-descript {
    color: var(--text-secondary);
}

.sidebar-user .card-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
}

.sidebar-user .card-info-bg {
    width: 100%;
    height: 160px;
    position: relative;
}

.sidebar-user .card-info-avatar {
    display: block;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    margin-top: -36px;
    border: 3px solid var(--bg-card, #fff);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.sidebar-user .card-info-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-user .card-info-text {
    text-align: center;
    padding: 8px 16px 0;
}

.sidebar-user .card-info-text h2 {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    color: var(--text-heading);
}

.sidebar-user .card-info-text p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 4px 0 0;
}

.sidebar-user .card-info-data {
    display: flex;
    width: 100%;
    padding: 12px 16px;
    gap: 0;
}

.sidebar-user .card-info-data-item {
    flex: 1;
    text-align: center;
}

.sidebar-user .card-info-data-item .length-num {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-heading);
}

.sidebar-user .card-info-data-item .headline {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.sidebar-user .card-info-admin {
    display: flex;
    gap: 8px;
    padding: 0 16px 12px;
    font-size: 14px;
}

.sidebar-user .card-info-admin a {
    color: var(--text-link);
    text-decoration: none;
}

.sidebar-user .card-info-admin a:hover {
    text-decoration: underline;
}

.sidebar-user .card-info-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px 12px;
    position: relative;
    z-index: 10;
}

.sidebar-user .card-info-social .sns-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    font-size: 20px;
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
}

.sidebar-user .card-info-social .sns-icon:hover {
    color: #fff;
    transform: translateY(-2px);
}

.sidebar-user .card-info-social .sns-github:hover {
    background: #24292e;
}

.sidebar-user .card-info-social .sns-weibo:hover {
    background: #e6162d;
}

.sidebar-user .card-info-social .sns-qq:hover {
    background: #12b7f5;
}

.sidebar-user .card-info-social .sns-qq .iconfont {
    font-size: 21px;
}

.sidebar-user .card-info-social .sns-weixin:hover {
    background: #07c160;
}

.sidebar-user .card-info-social .sns-email:hover {
    background: #ea580c;
}

.sidebar-user .card-info-social .sns-rss:hover {
    background: #f0883e;
}

.sidebar-user .card-info-social .sns-weixin {
    cursor: pointer;
}

.sidebar-user .card-info-social .sns-weixin .weixin-code {
    display: none;
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 8px;
    min-width: 216px;
    white-space: nowrap;
}

.sidebar-user .card-info-social .sns-weixin .weixin-code img {
    display: block;
    width: 200px;
    height: 200px;
    object-fit: contain;
}

.sidebar-user .card-info-social .sns-weixin:hover .weixin-code {
    display: block;
}

.dark .sidebar-user .card-info-avatar {
    border-color: var(--bg-card, #1e1e1e);
}

.dark .nav-login {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-light);
}

.dark .nav-login p {
    color: var(--text-secondary);
}

.dark .nav-login a {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.dark .information-statistics {
    background: var(--bg-card);
}

.dark .stats-box {
    background-color: rgba(0, 0, 0, 0.1);
}

.dark .stats-text,
.dark .stats-subtext {
    color: var(--text-primary);
}

.dark #site-search input {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
}

#search .searchs:hover {
    transform: scale(1.08);
}

#search .searchs:active {
    transform: scale(0.92);
}

.dark .list-article,
.dark .list-diary {
    background: var(--bg-card);
    box-shadow: none;
}

.dark .list-name,
.dark .list-name a {
    color: #fff;
}

.list-name {
    font-size: 17px;
}

.dark .list-meta,
.dark .list-meta a,
.dark .list-meta i {
    color: var(--text-secondary);
}

.list-meta {
    font-size: 14px;
}

.list-contract p {
    font-size: 16px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dark .article {
    background-color: var(--bg-card);
    box-shadow: none;
}

.dark .essay-list-body {
    color: var(--text-primary);
}

.dark .essay-list-body h1,
.dark .essay-list-body h2,
.dark .essay-list-body h3,
.dark .essay-list-body h4,
.dark .essay-list-body h5,
.dark .essay-list-body h6 {
    color: var(--text-heading);
}

.dark .essay-list-body p {
    color: var(--text-primary);
}

.post-title {
    font-size: 25px;
}

.dark .essay-list-body a {
    color: var(--text-link);
}

.dark .essay-list-body blockquote,
.dark .essay-list-body pre {
    background: rgba(255, 255, 255, 0.1);
}

.dark .essay-list-body code {
    background-color: rgba(255, 255, 255, 0.1);
}

.dark .post-title {
    color: #ebf0f6;
}

.dark .card {
    background-color: var(--bg-card);
    box-shadow: none;
}

.dark .card-header h3 {
    color: var(--text-primary);
}

.card-header h3 {
    font-size: 17px;
}

.dark .card-description,
.dark .card-description p {
    color: var(--text-secondary);
}

.dark .sidebar-link li,
.dark .sidebar-sort li {
    background: rgba(255, 255, 255, 0.1);
}

.dark .nav-indicator {
    background: rgba(255, 255, 255, 0.08);
}

.dark ul.nav-list li:first-child {
    background: transparent;
}

.dark .sidebar-link a,
.dark .sidebar-sort a {
    color: var(--text-primary);
}

.dark .sidebar-archive {
    border: none;
    color: var(--text-primary);
}

.sidebar-archive {
    font-size: 15px;
}

.dark .daytime,
.dark .icon-moon {
    display: none;
}

.dark .night,
.dark .icon-thesun {
    display: block;
}

.dark .scroll-top {
    color: #fff;
    background: rgba(255, 255, 255, 0.32);
}

.dark .mobile-bottom-nav {
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
}

.dark .mobile-bottom-nav a {
    color: var(--text-primary);
}

.dark .switch-nav-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* ==================== 头部 ==================== */
.header-logo .logo-text,
.header-logo .logo-text h1,
.header-logo .logo-text span {
    font-size: 2.7rem;
}

.header-logo .logo-img img {
    max-height: 60px;
    object-fit: contain;
}

@media (max-width: 576px) {
    .header-logo .logo-text,
    .header-logo .logo-text h1,
    .header-logo .logo-text span {
        font-size: 1.8rem;
    }
}

.site-header {
    padding: 2rem 0;
}

/* ==================== 左侧导航 ==================== */
.nva-sidebar .ty-nav-list li a.ty-nav-link {
    font-size: 17px;
}

.ty-nav-list .ty-nav-link .iconfont {
    font-size: 18px;
    margin-right: 8px;
    vertical-align: middle;
    line-height: 1;
    display: inline-block;
    width: 20px;
    text-align: center;
}

.ty-nav-list li {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.ty-nav-list li:hover {
    transform: scale(1.05);
}

.nav-list {
    position: relative;
}

.nav-indicator {
    position: absolute;
    left: 5px;
    width: calc(100% - 10px);
    height: 40px;
    background: #ebf0f6;
    border-radius: 8px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
}

.nav-indicator.active {
    opacity: 1;
}

ul.nav-list li:first-child {
    background: transparent;
}

.nav-list li {
    position: relative;
    z-index: 1;
}

/* ==================== 布局 ==================== */
body.three-home main {
    float: none;
    width: 100%;
}

body.three-home .side-home {
    float: none;
    width: auto;
    padding-left: 1.5rem;
}

body.three-home .side-home .sticky {
    position: sticky;
    top: 20px;
}

div.sticky.no-sticky {
    position: static;
    top: auto;
}

.row.container {
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.list-homes {
    width: 100%;
}

.column-big {
    width: 100%;
}

.switch-nav.nva-sidebar-show .nva-sidebar {
    flex: 0 0 auto;
    position: relative;
    transform: none;
}

@media (min-width: 768px) {
    .row.container .list-homes {
        flex: 0 0 70%;
        max-width: 70%;
    }

    .row.container .column-big {
        flex: 0 0 70%;
        max-width: 70%;
    }

    .row.container #aside {
        padding-right: 1.5rem;
        flex: 0 0 30%;
        max-width: 30%;
    }

    .row.container .side-home {
        padding-left: 1.5rem;
        flex: 0 0 30%;
        max-width: 30%;
    }
}

@media (min-width: 1024px) {
    .one-home .row.container {
        max-width: 910px;
    }

    .one-home .row.container .list-homes,
    .one-home .row.container .column-big {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .one-home .row.container .side-home {
        display: none;
    }

    .three-home .row.container {
        max-width: 1440px;
    }

    .three-home .row.container .list-homes,
    .three-home .row.container .column-big {
        flex: 0 0 60%;
        max-width: 54%;
    }

    .three-home .row.container #aside,
    .three-home .row.container .side-home {
        flex: 0 0 40%;
        max-width: 23%;
    }
}

@media (max-width: 768px) {
    .toggle-sidebar-btn {
        display: none !important;
    }

    .row.container .nva-sidebar,
    .row.container .side-home {
        display: none;
    }

    .row.container .nva-sidebar.active {
        display: block !important;
        transform: translateX(0) !important;
    }

    .switch-nav-overlay.show {
        display: block !important;
    }

    .row.container .list-homes,
    .row.container .column-big {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* 横屏移动端：宽度>768但高度小，隐藏右侧边栏，保留左侧导航 */
@media (min-width: 769px) and (max-height: 500px) {
    .row.container .side-home {
        display: none;
    }

    .row.container .list-homes,
    .row.container .column-big {
        flex: 0 0 70%;
        max-width: 70%;
    }
}

@media (min-width: 768px) {
    .sidebar-hidden .row.container .nva-sidebar,
    .sidebar-hidden .row.container .side-home {
        display: none !important;
    }

    .sidebar-hidden .row.container .list-homes,
    .sidebar-hidden .row.container .column-big {
        flex: 0 0 90% !important;
        max-width: 90% !important;
        margin: 0 auto !important;
    }
}

/* ==================== 背景切换面板 ==================== */
.bg-panel {
    position: fixed;
    right: -280px;
    top: 50%;
    transform: translateY(-50%);
    width: 260px;
    background: var(--bg-card);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
    border-radius: 12px 0 0 12px;
    z-index: 999;
    transition: right 0.3s ease;
    padding: 20px 16px;
}

.bg-panel.show {
    right: 0;
}

.bg-panel-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
}

.bg-panel-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.bg-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s;
}

.bg-item:hover {
    transform: scale(1.08);
}

.bg-preview {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 2px solid transparent;
    margin-bottom: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.bg-preview-default {
    background: linear-gradient(135deg, #f5f5f5 50%, #e8e8e8 50%);
}

.bg-item.active .bg-preview {
    border-color: var(--text-link);
}

.bg-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.bg-item.active .bg-label {
    color: var(--text-link);
    font-weight: 600;
}

/* ==================== 文章列表 ==================== */
.article {
    background-color: var(--bg-card);
    box-shadow: var(--shadow-card);
}

.card {
    background-color: var(--bg-card);
    box-shadow: var(--shadow-card);
}

.card-description,
.card-description p {
    color: #445166;
    font-size: 16px;
    line-height: 1.6;
}

.card-title-bottom {
    font-size: 19px;
}

.card-footer {
    border-top-color: var(--border-light);
}

/* ==================== 小图模式 ==================== */
.list-article-small .card-small {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    overflow: hidden;
    padding: 16px;
}

.list-article-small .card-small-thumb {
    flex: 0 0 260px;
    width: 260px;
    height: 180px;
    overflow: hidden;
    border-radius: 8px;
    flex-shrink: 0;
}

.list-article-small .card-small-thumb a {
    display: block;
    width: 100%;
    height: 100%;
}

.list-article-small .card-small-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.list-article-small .card-small-thumb:hover img {
    transform: scale(1.05);
}

.list-article-small .card-small-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px 0 0 16px;
    overflow: hidden;
    height: 180px;
}

.list-article-small .card-small-title {
    font-size: 18px;
    font-weight: normal;
    letter-spacing: 1px;
    margin: 0 0 8px 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-article-small .card-small-title a {
    color: #203656;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.list-article-small .card-small-title a:hover {
    color: #448EF6;
}

.list-article-small .card-small-desc {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 0;
    flex: 1;
    overflow: hidden;
}

.list-article-small .card-small-desc p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
}

.list-article-small .card-small-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.list-article-small .card-small-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.list-article-small .card-small-meta .meta-item .iconfont {
    font-size: 14px;
    margin-right: 2px;
}

.dark .list-article-small .card-small-title a {
    color: var(--text-heading);
}

.dark .list-article-small .card-small-desc {
    color: var(--text-secondary);
}

@media (max-width: 576px) {
    .list-article-small .card-small {
        flex-direction: column;
        padding: 12px;
    }

    .list-article-small .card-small-thumb {
        flex: none;
        width: 100%;
        height: 0;
        padding-top: 56.25%;
        position: relative;
    }

    .list-article-small .card-small-thumb a {
        position: absolute;
        top: 0;
        left: 0;
    }

    .list-article-small .card-small-body {
        padding: 12px 0 0 0;
    }

    .list-article-small .card-small-title {
        font-size: 15px;
    }
}

.list-footer {
    border-top-color: var(--border-light);
}

.essay-list-body p {
    color: var(--text-primary);
    font-size: 18px;
    line-height: 1.8;
}

.post-title {
    font-size: 25px;
}

.post-nickname a {
    color: var(--text-primary);
}

.post-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 15px;
    color: var(--text-secondary);
}

/* ==================== 日志模式 ==================== */
.list-diary-title {
    font-size: 18px;
    font-weight: normal;
    letter-spacing: 1px;
    margin-top: 12px;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.list-diary-title a {
    color: #203656;
    text-decoration: none;
    transition: color 0.2s;
}

.list-diary-title a:hover {
    color: #448EF6;
}

.ty-diary-avatar {
    float: left;
    margin-right: 8px;
    border-radius: 8px;
    width: 45px;
    height: 45px;
}

.avatar img {
    border-radius: 5px;
    width: 36px;
    height: 36px;
}

.ty-diary-images li {
    width: 33.33%;
}

.ty-diary-images li:only-child {
    width: 33.33%;
}

.ty-diary-images .list-image-50w {
    width: 33.33%;
    flex-basis: 33.33%;
}

.ty-diary-images .list-image-70w {
    width: 33.33%;
}

.ty-diary-images .list-image-body {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.ty-diary-img {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    border-radius: 8px;
}

/* ==================== 评论区 ==================== */
.comment-module,
.comment-list {
    background-color: var(--bg-card);
    border-radius: 10px;
    margin-bottom: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
}

.title-h3 {
    font-size: 1.15rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 6px;
    margin-bottom: 0;
    line-height: 30px;
}

.comment-module .ty-comment-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
}

.comment-module #comment.ty-comment-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    background: var(--bg-secondary);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.3s, background 0.3s;
    box-sizing: border-box;
    display: block;
}

.comment-module #comment.ty-comment-textarea:focus {
    border-color: var(--text-link);
    background: var(--bg-primary);
}

.comment-module .ty-comment-input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.comment-module .ty-comment-input:focus {
    border-color: var(--text-link);
}

.comment-module .ty-comment-input:-webkit-autofill,
.comment-module .ty-comment-input:-webkit-autofill:hover,
.comment-module .ty-comment-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--bg-secondary) inset;
    -webkit-text-fill-color: var(--text-primary);
    transition: background-color 5000s ease-in-out 0s;
}

.comment-module #comment_submit.ty-comment-submit {
    display: inline-block;
    padding: 10px 20px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.3s;
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
}

.comment-module #comment_submit.ty-comment-submit:hover {
    opacity: 0.85;
}

.cancel-comment-reply a {
    background: #728197;
    color: #fff;
    border-radius: 5px;
    font-size: 15px;
    padding: 8px 12px;
    letter-spacing: 1px;
    cursor: pointer;
    text-decoration: none;
    border: none;
    display: inline-block;
}

.guestbook-form .cancel-comment-reply {
    margin-top: 10px;
}

.guestbook-btns {
    margin-top: 10px;
}

.guestbook-btns .guestbook-submit {
    display: inline-block;
    width: 130px;
    padding: 10px 0;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 2px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    text-decoration: none;
    color: #fff;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
    text-align: center;
}

.guestbook-form .guestbook-btns #comment_submit.guestbook-submit {
    font-size: 15px;
    letter-spacing: 2px;
    width: 130px;
    padding: 10px 0;
}

.guestbook-btns #comment_submit.guestbook-submit {
    background: var(--text-link);
}

.guestbook-btns #comment_submit.guestbook-submit:hover {
    background: #5a73e0;
    opacity: 1;
    transform: translateY(-1px);
}

.guestbook-btns #comment_submit.guestbook-submit:active {
    transform: translateY(0);
}

.guestbook-btns .cancel-reply-btn {
    background: #e74c3c;
}

.guestbook-btns .cancel-reply-btn:hover {
    background: #c0392b;
    opacity: 1;
    transform: translateY(-1px);
}

.guestbook-btns .cancel-reply-btn:active {
    transform: translateY(0);
}

.comment-list ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    background: none;
    border: none;
    box-shadow: none;
}

.comment-list ol {
    list-style: none;
    padding-left: 0;
    margin: 0;
    background: none;
    border: none;
    box-shadow: none;
}

.comment {
    margin: 0.5rem 0;
}

.comment:first-child {
    margin-top: 0;
}

.comment-list .comment:last-child {
    margin-bottom: 0;
}

.comment-user-info {
    display: flex;
    align-items: center;
    margin-bottom: 0.4rem;
}

.user-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-meta .meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-meta .mr-05 {
    margin-right: 0.5rem;
    font-size: 16px;
}

.avatar {
    margin-right: 0.5rem;
}

.comment-time {
    font-size: 14px;
    color: var(--text-secondary);
}

.comment-reply {
    display: inline-flex;
    align-items: center;
    margin-top: -2px;
}

.comment-reply a {
    background: transparent;
    color: #6f88ff;
    border: 1px solid #6f88ff;
    font-size: 14px;
    border-radius: 5px;
    padding: 2px 8px;
    line-height: 14px;
    cursor: pointer;
    text-decoration: none;
}

.comment-reply a:hover {
    background-color: #6f88ff;
    color: #fff;
}

.comment-content {
    margin-top: 0;
    line-height: 1.5;
    color: var(--text-primary);
    font-size: 16px;
    padding: 10px;
    border-radius: 5px;
    background-color: var(--bg-bubble);
}

.comment-content p {
    margin: 0;
    padding: 0;
    font-size: inherit;
    line-height: inherit;
}

.comment-content img {
    margin: 0 3px;
    vertical-align: middle;
}

.ty-comment-badge {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    padding: 0 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: baseline;
    line-height: 18px;
}

.ty-badge-admin {
    color: #fff;
    background: #435eeb;
}

.comment-children {
    margin-left: 2rem;
    position: relative;
    margin-top: 0;
}

.comment-children .comment {
    margin: 0.75rem 0;
}

.comment-children::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 0;
    bottom: 0;
    width: 1px;
    background-image: repeating-linear-gradient(to bottom, var(--border-accent) 0px, var(--border-accent) 5px, transparent 5px, transparent 10px);
}

.comment-children .comment-children {
    margin-left: 2rem;
}

.comment-children .comment-children::before {
    left: -1rem;
}

.comment-children .comment-content {
    border-left: 2px solid var(--bg-bubble);
    background-color: var(--bg-bubble);
    margin-right: -2rem;
}

.comment-children .comment-children .comment-content {
    margin-right: -4rem;
}

.comment-children .comment-children .comment-children .comment-content {
    margin-right: -6rem;
}

/* 暗模式 - 评论区 */
.dark .comment-module,
.dark .comment-list {
    background: #374151;
    box-shadow: none;
}

.dark .comment-list .title-h3 {
    color: #d1d5db;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.dark .comment-user-info {
    color: #d1d5db;
}

.dark .user-meta span,
.dark .user-meta a {
    color: #d1d5db;
}

.dark .comment-list .comment-content {
    color: #d1d5db;
    background-color: #4b5563;
}

.dark .comment-children .comment-content {
    color: #e2e8f0;
    border-left-color: #4b5563;
    background-color: #4b5563;
}

.dark .comment-children::before {
    background-image: repeating-linear-gradient(to bottom, #6b7280 0px, #6b7280 5px, transparent 5px, transparent 10px);
}

.dark .comment-module #comment.ty-comment-textarea,
.dark .comment-module .ty-comment-input {
    background-color: #4b5563;
    color: #fff;
    border: 0;
}

.dark .comment-list textarea,
.dark .comment-list input {
    background-color: #1f2937;
}

.dark .comment-module #comment_submit {
    background-color: #6c6ce9;
}

/* ==================== 侧边栏 ==================== */
.sidebar-list span {
    width: 30px;
    height: 30px;
    line-height: 30px;
    font-size: 15px;
    border-radius: 8px;
}

.hot-list .hot-icon {
    flex-shrink: 0;
    vertical-align: middle;
    margin-right: 8px;
}

.recent-list .recent-icon {
    flex-shrink: 0;
    vertical-align: middle;
    margin-right: 8px;
}

.guestbook-intro {
    padding: 12px;
    margin-top: 12px;
    margin-bottom: 0;
    background: #f7f7f9;
    border-radius: 12px;
    border: 1px solid #e3e8f7;
    box-shadow: 0 8px 16px -4px rgba(44, 45, 48, 0.047);
}

.guestbook-intro p {
    margin: 0;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.guestbook .guestbook-intro {
    padding: 12px;
    margin-bottom: 0;
}

.gi-header {
    margin-bottom: 10px !important;
    color: #465CEB !important;
    text-align: left !important;
    display: flex !important;
    align-items: center !important;
    font-weight: bold !important;
    font-size: 17px !important;
}

.gi-header svg {
    margin-right: 8px;
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

.gi-text-container {
    background: #fff;
    border-radius: 8px;
    padding: 12px 15px;
    border: 1px solid #e3e8f7;
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 1.7;
    color: #333;
}

.gi-hidden-text {
    display: none;
}

.gi-typewriter-text {
    display: inline;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.gi-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: #465CEB;
    margin-left: 3px;
    animation: gi-blink 0.7s infinite;
    vertical-align: middle;
}

@keyframes gi-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.gi-footer {
    font-size: 13px !important;
    color: rgba(60, 60, 67, 0.65) !important;
    font-style: italic !important;
    margin-bottom: 0 !important;
    padding: 0 5px !important;
    text-align: left !important;
    margin-top: 10px !important;
}

html.dark .guestbook-intro {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: #d1d1d1;
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.15);
}

html.dark .gi-text-container {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #d1d1d6;
}

html.dark .gi-header {
    color: #7c89f1 !important;
}

html.dark .gi-cursor {
    background-color: #7c89f1;
}

html.dark .gi-footer {
    color: rgba(200, 200, 200, 0.6) !important;
}

.guestbook-list .guestbook-form {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    margin-bottom: 1rem;
    margin-top: 0;
}

.guestbook-form .ty-comment-form {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.guestbook-form #comment.ty-comment-textarea {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    min-height: 100px;
}

.guestbook-form #comment.ty-comment-textarea:focus {
    border-color: var(--text-link);
    box-shadow: 0 0 0 3px rgba(111, 136, 255, 0.1);
}

.guestbook-fields {
    display: flex;
    gap: 10px;
    width: 100%;
}

.guestbook-form .ty-comment-input {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    padding: 10px 14px;
}

.guestbook-form .ty-comment-input:focus {
    border-color: var(--text-link);
    box-shadow: 0 0 0 3px rgba(111, 136, 255, 0.1);
}

.guestbook-submit {
    background: var(--text-link);
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 2px;
    transition: background 0.2s, transform 0.15s;
}

.guestbook-submit:hover {
    background: #5a73e0;
    opacity: 1;
    transform: translateY(-1px);
}

.guestbook-submit:active {
    transform: translateY(0);
}

.guestbook-list .comment {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

.guestbook-list .page-navigator,
.comment-list .page-navigator {
    text-align: center;
    font-size: 14px;
    margin-top: 1rem;
    padding: 0;
}

.guestbook-list .page-navigator a,
.comment-list .page-navigator a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    padding: 0;
    margin: 0 5px;
    border-radius: 8px;
    background: #6f88ff;
    color: #fff;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.guestbook-list .page-navigator a:hover,
.comment-list .page-navigator a:hover {
    background: linear-gradient(to right, #5a7ee6, #4a6fd9);
    transform: translateY(-1px);
}

.guestbook-list .page-navigator a.current,
.comment-list .page-navigator a.current {
    background: #ddd;
    color: #fff;
    cursor: default;
}

.guestbook-list .page-navigator a.prev,
.guestbook-list .page-navigator a.next,
.comment-list .page-navigator a.prev,
.comment-list .page-navigator a.next {
    width: auto;
    padding: 0 14px;
}

.guestbook-list .page-navigator > span,
.comment-list .page-navigator > span {
    display: inline-block;
    line-height: 40px;
    margin: 0 5px;
    color: var(--text-secondary);
}

.dark .guestbook-list .page-navigator a.current,
.dark .comment-list .page-navigator a.current {
    background: #4b5563;
}

.guestbook-list .comment:last-child {
    border-bottom: none;
}

.guestbook-list .comment-children {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guestbook-list .comment > .comment-list {
    padding: 0;
    padding-left: 2rem;
    margin-top: 0;
    margin-right: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
}

.guestbook-list .comment.comment-children {
    border-bottom: none;
    border-top: none;
    padding: 2px 0;
    margin: 0;
}

.guestbook-list .comment-content {
    background: none;
    padding: 4px 0;
    border-radius: 0;
    border: none;
}

.guestbook-list .comment.comment-children .comment-content {
    background: none;
    border-left: 2px solid var(--text-link);
    padding: 4px 0 4px 12px;
    border-radius: 0;
    margin: 0;
}

.guestbook-list .comment.comment-children:first-child {
    margin-top: 8px;
}

.sidebar-list li a {
    font-size: 16px;
}

.sidebar-link .ty-sidebar-link {
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-link .ty-sidebar-link .iconfont {
    font-size: 14px;
    margin-right: 6px;
    vertical-align: middle;
    line-height: 1;
    display: inline-block;
    width: 18px;
    text-align: center;
}

.sidebar-link-li {
    padding: 2px 0;
}

.sidebar-link-span {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 1px 8px;
    border-radius: 10px;
    flex-shrink: 0;
    margin-left: 8px;
    min-width: 24px;
    text-align: center;
}

.widget-comments .comment-item {
    padding: 7px 0;
    margin: 0;
}

.widget-comments .avatar {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    margin-right: 5px;
}

.widget-comments .size14 {
    color: var(--text-primary);
    font-size: 15px;
}

.widget-comments .size14 a {
    color: var(--text-primary);
    text-decoration: none;
}

.widget-comments .size14 a:hover {
    color: var(--text-primary);
}

.widget-comments small {
    border-radius: 4px;
    padding: 6px 10px;
}

.widget-comments small {
    font-size: 14px;
}

.widget-comments small img {
    max-width: 16px;
    max-height: 16px;
    vertical-align: middle;
    display: inline;
}

.dark .widget-comments small {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.dark .widget-comments small::before {
    display: none;
}

/* ==================== 友情链接 ==================== */
ul.ty-friend-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

li.ty-friend-link-item {
    background: var(--bg-bubble);
    border-radius: 6px;
    padding: 0;
    overflow: hidden;
}

li.ty-friend-link-item a {
    display: flex;
    align-items: center;
    padding: 4px 6px;
    gap: 4px;
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
    background: transparent;
    width: 100%;
    box-sizing: border-box;
}

.ty-friend-link-icon {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
    object-fit: contain;
}

.ty-friend-link-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    flex: 1;
    min-width: 0;
}

.card-footer .d-flex,
.page-header.d-flex {
    justify-content: flex-start;
}

.page-header .article-author a {
    padding-left: 0;
}

.author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    vertical-align: middle;
    object-fit: cover;
}

.article-author-avatar {
    padding: 0 !important;
    line-height: 1;
}

.page-header .card-meta-bottom {
    gap: 4px;
}

.guestbook .page-header {
    border-bottom: none;
    padding-bottom: 0;
}

.card-meta-bottom .meta-item {
    font-size: 15px;
}

/* ==================== 分页 ==================== */
.pagenavi-bottom {
    display: flex;
    justify-content: center;
}

.pagenavi-bottom .page-navigator {
    text-align: center;
    font-size: 14px;
    margin-top: 1rem;
    padding: 0;
}

.pagenavi-bottom .page-navigator a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    padding: 0;
    margin: 0 5px;
    border-radius: 8px;
    background: #6f88ff;
    color: #fff;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagenavi-bottom .page-navigator a:hover {
    background: linear-gradient(to right, #5a7ee6, #4a6fd9);
    transform: translateY(-1px);
}

.pagenavi-bottom .page-navigator a.current {
    background: #ddd;
    color: #fff;
    cursor: default;
}

.pagenavi-bottom .page-navigator a.prev,
.pagenavi-bottom .page-navigator a.next {
    width: auto;
    padding: 0 14px;
}

.pagenavi-bottom .page-navigator > span {
    display: inline-block;
    line-height: 40px;
    margin: 0 5px;
    color: var(--text-secondary);
}

.dark .pagenavi-bottom .page-navigator a.current {
    background: #4b5563;
    color: #fff;
}

/* ==================== 上下篇导航 ==================== */
.post-nav {
    display: flex;
    justify-content: space-between;
    padding: 0;
    margin-top: 1rem;
    gap: 12px;
}

.post-nav-item {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    transition: background-color 0.2s, border-color 0.2s;
}

.post-nav-item:hover {
    background: rgba(67, 94, 235, 0.04);
    border-color: rgba(67, 94, 235, 0.2);
}

.post-nav-next {
    text-align: right;
}

.post-nav-item a {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    line-height: 1.4;
    transition: color 0.3s;
}

.post-nav-item a:hover {
    color: var(--text-link);
}

.post-nav-label {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 2px;
    line-height: 1.2;
}

.post-nav-label .iconfont {
    font-size: 14px;
}

.post-nav-item:not(:has(a)) {
    opacity: 0.5;
}

/* ==================== 移动端 ==================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

.mobile-bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    font-size: 11px;
    color: inherit;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.mobile-bottom-nav a:hover,
.mobile-bottom-nav a:active {
    opacity: 1;
}

.mobile-bottom-nav a i {
    font-size: 20px;
}

@media (max-width: 768px) {
    .mobile-bottom-nav.show {
        display: block;
    }

    body {
        padding-bottom: 60px;
    }

    .guestbook-fields {
        flex-direction: column;
        gap: 8px;
    }

    .guestbook-list .comment > .comment-list {
        padding: 0;
        padding-left: 0.8rem;
        margin-right: -0.8rem;
        margin-top: -8px;
    }

    .guestbook-list .comment-children {
        margin-left: 0;
    }

    .guestbook-list .comment > .comment-list .comment > .comment-list {
        padding: 0;
        padding-left: 0.5rem;
        margin-right: -0.5rem;
    }

    .guestbook-list .comment > .comment-list .comment > .comment-list .comment > .comment-list {
        padding: 0;
        padding-left: 0;
        margin-right: 0;
    }

    .guestbook-list .comment.comment-children .comment-content {
        padding-left: 8px;
    }

    .guestbook-btns .guestbook-submit {
        width: auto;
        flex: 1;
    }

    .guestbook-btns {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .guestbook-btns .guestbook-submit {
        flex: 1;
        width: 0;
        min-width: 0;
        box-sizing: border-box;
    }
}

/* ==================== 表情 ==================== */
.emoji-toolbar {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.emoji-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 20px;
    background: var(--bg-bubble);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    padding: 0;
}

.emoji-btn:hover {
    background: var(--border-light);
    transform: scale(1.1);
}

.emoji-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 20px;
    background: var(--bg-bubble);
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
