@charset "UTF-8";
/* ============================================================
   duoduo-theme-skin - 原创主题皮肤
   混合模式：覆盖原生 Bootstrap + xiuno 组件的设计令牌与视觉
   - 设计令牌基于原生 data-bs-theme(明暗) + data-theme(主题色)
   - 品牌色单一入口：--theme-brand-color（后台设置覆盖，hook 注入）
   - 纯原创 CSS，无外部资源依赖
   ============================================================ */

/* ---------- 设计令牌（浅色） ---------- */
:root {
    --theme-brand: var(--theme-brand-color, #4f6bff);
    --theme-brand-rgb: 79, 107, 255;
    --theme-brand-hover: #3d57e0;
    --theme-brand-soft: rgba(var(--theme-brand-rgb), 0.08);

    --theme-radius: 10px;
    --theme-radius-lg: 16px;
    --theme-nav-h: 56px;
    --theme-transition: 0.18s ease;

    /* 覆盖原生 Bootstrap 主题色 */
    --bs-primary: var(--theme-brand);
    --bs-primary-rgb: var(--theme-brand-rgb);
    --bs-link-color: var(--theme-brand);
    --bs-link-color-hover: var(--theme-brand-hover);

    /* 页面背景 */
    --x-page-bg: #f5f6fa;
    --theme-shadow: 0 1px 3px rgba(17, 24, 39, 0.04), 0 4px 16px rgba(17, 24, 39, 0.04);
}

/* ---------- 设计令牌（暗色） ---------- */
[data-bs-theme="dark"] {
    --theme-brand-hover: #6b84ff;
    --theme-brand-soft: rgba(var(--theme-brand-rgb), 0.16);
    --theme-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ---------- 全局基础 ---------- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: var(--theme-brand-soft);
    color: var(--theme-brand);
}

/* ---------- 顶部导航 ---------- */
.navbar.bg-body {
    backdrop-filter: saturate(180%) blur(12px);
    background-color: rgba(255, 255, 255, 0.85) !important;
    border-bottom: 1px solid var(--bs-border-color);
}
[data-bs-theme="dark"] .navbar.bg-body {
    background-color: rgba(18, 20, 26, 0.85) !important;
}

.navbar .nav-link {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    transition: background-color var(--theme-transition), color var(--theme-transition);
}
.navbar .nav-link:hover {
    background-color: var(--theme-brand-soft);
    color: var(--theme-brand) !important;
}

.navbar .site-name {
    font-weight: 700;
    letter-spacing: 0.3px;
    background: linear-gradient(120deg, var(--theme-brand), #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* 导航内的按钮按钮组统一样式 */
.navbar .btn-primary {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(var(--theme-brand-rgb), 0.35);
}
.navbar .btn-outline-primary {
    border-radius: 8px;
}

/* ---------- 卡片组件 ---------- */
.x-card {
    border-radius: var(--theme-radius-lg);
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--theme-shadow);
    transition: box-shadow var(--theme-transition), transform var(--theme-transition);
}

/* ---------- 帖子信息流 ---------- */
.threadlist .thread-list-item {
    padding: 1rem 1.25rem;
    transition: background-color var(--theme-transition);
    border-radius: 8px;
}
.threadlist .thread-list-item:hover {
    background-color: var(--theme-brand-soft);
}
.threadlist .thread-list-item + .thread-list-item {
    border-top: 1px dashed var(--bs-border-color);
}

.threadlist .subject a {
    font-size: 1.05rem;
    font-weight: 500;
}
.threadlist .subject a:hover {
    color: var(--theme-brand) !important;
}

/* 版块标签 chip */
.threadlist .thread-list-meta a.bg-body-tertiary {
    background-color: var(--theme-brand-soft) !important;
    color: var(--theme-brand) !important;
    font-weight: 500;
    transition: opacity var(--theme-transition);
}
.threadlist .thread-list-meta a.bg-body-tertiary:hover {
    opacity: 0.8;
}

/* 交互数据区 */
.thread-list-interact span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
}
.thread-list-interact span + span {
    margin-left: 0.75rem;
}

/* 头像圆角化 */
.threadlist .avatar,
.threadlist img.rounded,
.post-list .avatar,
.x-avatar {
    border-radius: 12px;
}

/* ---------- 分页 ---------- */
.pagination-boxed .page-link {
    border: none;
    border-radius: 8px;
    margin: 0 2px;
    font-weight: 500;
    min-width: 34px;
    text-align: center;
    transition: all var(--theme-transition);
}
.pagination-boxed .page-link:hover {
    background-color: var(--theme-brand-soft);
    color: var(--theme-brand);
}
.pagination-boxed .page-item.active .page-link {
    background-color: var(--theme-brand);
    border-color: var(--theme-brand);
    box-shadow: 0 2px 8px rgba(var(--theme-brand-rgb), 0.35);
}

/* 无限滚动加载指示器 */
.pagination-infinite {
    border-radius: var(--theme-radius);
    margin-top: 0.5rem;
}

/* ---------- 按钮 ---------- */
.btn-primary {
    background-color: var(--theme-brand);
    border-color: var(--theme-brand);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--theme-brand-hover);
    border-color: var(--theme-brand-hover);
}
.btn-outline-primary {
    color: var(--theme-brand);
    border-color: var(--theme-brand);
}
.btn-outline-primary:hover {
    background-color: var(--theme-brand);
    border-color: var(--theme-brand);
}

/* ---------- 链接 ---------- */
a {
    transition: color var(--theme-transition);
}
a.hover-text-primary:hover,
a[class*="hover-text"]:hover {
    color: var(--theme-brand) !important;
}

/* ---------- 帖子详情页 ---------- */
.thread-main .x-card {
    border-radius: var(--theme-radius-lg);
}

/* 点赞/收藏按钮（chip 样式） */
.thread-action-chip,
.post-list .btn-outline-danger,
.post-list .btn-outline-primary {
    border-radius: 999px;
    transition: all var(--theme-transition);
}

/* ---------- 用户主页 ---------- */
.user-card,
.user-profile-card {
    border-radius: var(--theme-radius-lg);
    overflow: hidden;
}

/* ---------- 表单与编辑器 ---------- */
.form-control,
.form-select {
    border-radius: 8px;
    transition: border-color var(--theme-transition), box-shadow var(--theme-transition);
}
.form-control:focus,
.form-select:focus {
    border-color: var(--theme-brand);
    box-shadow: 0 0 0 0.2rem rgba(var(--theme-brand-rgb), 0.15);
}

/* 发帖编辑器卡片 */
.post-editor .x-card,
#post-msg .x-card {
    border-radius: var(--theme-radius-lg);
}

/* ---------- 侧栏 ---------- */
.thread-sidebar .x-card,
.sidebar .x-card {
    border-radius: var(--theme-radius-lg);
}

/* 侧栏热门条目 hover */
.thread-sidebar .hot-item:hover,
.sidebar .list-group-item:hover {
    background-color: var(--theme-brand-soft);
}

/* ---------- 页脚 ---------- */
.footer,
footer {
    border-top: 1px solid var(--bs-border-color);
    background-color: var(--bs-body-bg);
}

/* ---------- 返回顶部 / 悬浮操作 ---------- */
.floating-action .btn {
    border-radius: 50%;
    box-shadow: var(--theme-shadow);
}

/* ---------- 加载动画 / 过渡 ---------- */
.threadlist .thread-list-item {
    animation: theme-fade-in 0.25s ease both;
}
@keyframes theme-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- 降级：不支持 CSS 变量的老浏览器 ---------- */
@supports not (display: grid) {
    body {
        background-color: #f5f6fa;
    }
    .navbar.bg-body {
        background-color: #fff !important;
    }
}
