:root {
    --bg: #f5f7fa;
    --pane-bg: #fff;
    --border: #e4e7ed;
    --primary: #409eff;
    --text: #303133;
    --error-bg: #fef0f0;
    --error-text: #f56c6c;
    --header-h: 48px;
    --success: #52c41a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
}

.top-bar {
    height: var(--header-h);
    display: flex;
    align-items: center;
    padding: 0 20px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    gap: 24px;
}

.brand {
    font-size: 30px;
    font-weight: 600;
    line-height: 20px;
    color: var(--primary);
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    text-decoration: none;
}

.brand:hover {
    color: #66b1ff;
}

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

.nav-links {
    display: flex;
    align-items: stretch;
    align-self: stretch;
    gap: 20px;
    font-size: 16px;
}

.nav-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: #606266;
    text-decoration: none;
    line-height: 1.4;
    padding: 0 2px;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: transparent;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-active {
    color: var(--primary) !important;
}

.nav-active::after {
    background: var(--primary) !important;
}

.hidden {
    display: none !important;
}

.error-banner {
    margin: 0;
    padding: 10px 12px;
    background: var(--error-bg);
    color: var(--error-text);
    font-size: 13px;
    border-top: 1px solid #fde2e2;
}

.toast {
    position: fixed;
    top: 64px;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 10px 20px;
    background: rgba(48, 49, 51, 0.92);
    color: #fff;
    font-size: 14px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 页脚 SEO 内容 */
.site-footer {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 20px 32px;
    border-top: 1px solid var(--border);
    background: #fff;
}

.site-footer-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.site-footer-text {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.7;
    color: #606266;
}

.site-footer-faq {
    margin-bottom: 20px;
}

.site-footer-faq-list {
    margin: 0;
}

.site-footer-faq-item {
    margin-bottom: 14px;
}

.site-footer-faq-item dt {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.site-footer-faq-item dd {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: #606266;
}

.site-footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
}

.site-footer-nav a {
    color: var(--primary);
    text-decoration: none;
}

.site-footer-nav a:hover {
    text-decoration: underline;
}

.site-footer-sep {
    color: #c0c4cc;
}

.site-footer-copy {
    margin: 0;
    font-size: 12px;
    color: #909399;
}

.site-footer-copy a {
    color: var(--primary);
    text-decoration: none;
}

.page-with-footer .timestamp-workspace,
.page-with-footer .url-workspace {
    min-height: auto;
}

/* 404 / 500 */
.error-page .error-main {
    max-width: 640px;
    margin: 48px auto;
    padding: 0 20px;
    text-align: center;
}

.error-page .error-main h1 {
    margin: 0 0 12px;
    font-size: 24px;
    color: var(--text);
}

.error-page .error-main p {
    margin: 0 0 24px;
    color: #606266;
}

.error-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.error-nav a {
    color: var(--primary);
    text-decoration: none;
    font-size: 15px;
}

.error-nav a:hover {
    text-decoration: underline;
}
