/* 主题补充变量 */
:root {
    --rt-accent-color: #0078d4;
}

/* 加载/错误/空状态样式 */
.rt-loading,
.rt-error,
.rt-empty {
    display: grid;
    place-items: center;
    min-height: 60vh;
    text-align: center;
    color: #555;
    padding: 24px;
}

.rt-loading__spinner {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #1d5080;
    animation: rt-spin 0.9s linear infinite;
    margin-bottom: 14px;
}

.rt-loading__text,
.rt-error__text,
.rt-empty__text {
    margin: 0;
    font-size: 15px;
}

.rt-error__title {
    margin: 0 0 8px;
    font-size: 22px;
    color: #1a1a1a;
}

.rt-error__action {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 124px;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid #1d5080;
    color: #1d5080;
    text-decoration: none;
    font-weight: 600;
}

.rt-error__action:hover {
    background: #1d5080;
    color: #fff;
}

/* Page 模板样式 */
.rt-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 24px;
}

.rt-page__inner {
    width: 100%;
}

.rt-page__header {
    text-align: center;
    margin-bottom: 32px;
}

.rt-page__title {
    font-size: 2.4rem;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.3;
}

.rt-page__excerpt {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.rt-page__feature {
    margin: 0 0 32px;
}

.rt-page__feature img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.rt-page__content {
    line-height: 1.7;
}

html.darking .rt-page__excerpt {
    color: #aaa;
}

/* 导航栏 logo（文章页、页面）*/
.rt-nav-brand__svg {
    display: inline-block;
    height: auto;
    max-height: 28px;
    width: auto;
}

html.darking .rt-nav-brand__svg path[fill="#1A1A1A"] {
    fill: #fff;
}

/* 修复：文章页导航logo不应有文字logo的top偏移 */
.gh-navigation-logo:has(.rt-nav-brand__svg) {
    top: 0 !important;
}

/* 修复：文章页导航与内容区左对齐 */
body.post-template .gh-navigation-inner {
    max-width: 1070px;
    position: relative;
    left: 160px;
}

@media (max-width: 1200px) {
    body.post-template .gh-navigation-inner {
        left: 0;
        max-width: var(--container-width, 1320px);
    }
}

@media (max-width: 1024px) {
    body.post-template .gh-navigation-inner {
        left: 0;
        max-width: var(--container-width, 1320px);
    }
}

/* TOC 暗色颜色修复 */
html.darking .rt-error__title {
    color: oklch(0.9296 0.007 106.53);
}

/* TOC transition */
.rt-post__toc-title {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #666;
    transition: color 0.3s ease;
}

html.darking .rt-post__toc-title {
    color: oklch(0.9296 0.007 106.53);
}

/* 暗色模式通用 */
html.darking .rt-error,
html.darking .rt-empty,
html.darking .rt-loading {
    color: #d0d0d0;
}

html.darking .rt-error__action {
    border-color: #8ab4ff;
    color: #8ab4ff;
}

html.darking .rt-error__action:hover {
    background: #8ab4ff;
    color: #0f0f0f;
}

/* lightbox 图片可点击提示 */
.gh-content img,
.rt-post__content img,
.rt-page__content img {
    cursor: zoom-in;
}

/* 修复：theme toggle 背景色（screen.css 硬编码了 transparent，这里用变量覆盖） */
.rt-theme-toggle {
    background: var(--rt-theme-toggle-bg, #f2f2f2) !important;
}

@keyframes rt-spin {
    to {
        transform: rotate(360deg);
    }
}
