@charset "UTF-8";

/* LightDao alpha: LightSNS-inspired commercial community skin */
:root {
    --ld-primary: #3b82f6;
    --ld-primary-hover: #2563eb;
    --ld-page-bg: #f5f7fb;
    --ld-surface: #ffffff;
    --ld-surface-soft: #f8fafc;
    --ld-border: #edf0f5;
    --ld-text: #111827;
    --ld-muted: #64748b;
    --ld-muted-soft: #94a3b8;
    --ld-line: rgba(226, 232, 240, .78);
    --ld-radius: 10px;
    --ld-radius-lg: 14px;
    --ld-radius-xl: 18px;
    --ld-shadow: 0 8px 24px rgba(15, 23, 42, .04);
    --ld-shadow-hover: 0 14px 36px rgba(15, 23, 42, .08);
    --ld-focus: 0 0 0 .22rem rgba(59, 130, 246, .18);
    --x-page-bg: var(--ld-page-bg);
    --bs-primary: var(--ld-primary);
    --bs-primary-rgb: 59, 130, 246;
    --bs-link-color: var(--ld-primary);
    --bs-link-color-hover: var(--ld-primary-hover);
    --bs-border-radius: var(--ld-radius);
    --bs-border-radius-lg: var(--ld-radius-lg);
}

body {
    color: var(--ld-text);
    background: var(--ld-page-bg);
    letter-spacing: .01em;
}

#body {
    padding-top: 18px;
    padding-bottom: 26px;
}

::selection {
    color: #fff;
    background: rgba(59, 130, 246, .86);
}

body > header.navbar,
#header.navbar {
    min-height: 68px;
    background: rgba(255, 255, 255, .92) !important;
    border-bottom: 1px solid rgba(226, 232, 240, .72);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .05) !important;
    backdrop-filter: blur(14px);
}

.container {
    max-width: 1200px;
}

.row.g-4 {
    --bs-gutter-x: 1.25rem;
    --bs-gutter-y: 1.25rem;
}

.site-logo {
    max-height: 34px;
}

.site-name {
    font-weight: 800;
    letter-spacing: .06em;
    color: #0f172a;
}

.nav-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    color: #475569;
    background: transparent;
    transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.nav-icon-btn:hover,
.nav-icon-btn:focus-visible {
    color: var(--ld-primary) !important;
    background: rgba(59, 130, 246, .10);
}

.nav-icon-btn .ti,
.navbar-nav .nav-link .ti {
    font-size: 18px;
    vertical-align: -2px;
}

.navbar-nav .nav-link {
    border-radius: 999px;
    color: #475569;
    font-weight: 600;
    padding: .48rem .82rem;
    line-height: 1.2;
    transition: color .18s ease, background-color .18s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active,
.navbar-nav [data-active].active > .nav-link {
    color: var(--ld-primary) !important;
    background: rgba(59, 130, 246, .09);
}

.x-card,
.list-mode,
.sidebar-card,
.card {
    border: 1px solid var(--ld-border) !important;
    border-radius: var(--ld-radius-lg) !important;
    background: var(--ld-surface) !important;
    box-shadow: var(--ld-shadow) !important;
}

.sidebar-left.x-card,
.thread-action-bar,
.index-threadlist,
.card-thread,
.card-postlist {
    border-radius: var(--ld-radius-xl) !important;
}

.x-card:hover,
.card:hover,
.sidebar-card:hover {
    box-shadow: var(--ld-shadow-hover) !important;
}

.x-card {
    padding: 14px;
    margin: 14px 0;
}

.sidebar-left.x-card {
    padding: 10px;
}

.side-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.side-nav-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 12px 8px 6px;
    color: var(--ld-muted-soft);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
}

.side-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    margin: 2px 0;
    padding: 8px 10px;
    border-radius: 10px;
    color: #475569;
    font-weight: 650;
    transition: color .18s ease, background-color .18s ease;
}

.side-nav-link:hover,
.side-nav-item.active .side-nav-link,
.side-nav-item[data-active].active .side-nav-link {
    color: var(--ld-primary) !important;
    background: rgba(59, 130, 246, .10);
}

.side-nav-link .menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    color: var(--ld-primary);
    background: rgba(59, 130, 246, .08);
}

.list-mode {
    padding: 0;
    overflow: hidden;
}

.threadlist.x-card {
    padding: 0;
}

.thread-list-item {
    padding: 16px 18px;
    border-bottom: 1px solid var(--ld-border);
    transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.thread-list-item:last-child {
    border-bottom: 0;
}

.thread-list-item:hover {
    background: #fbfdff;
}

.thread-list-interact {
    color: var(--ld-muted);
    font-variant-numeric: tabular-nums;
}

.thread-list-interact .ti,
.thread-list-meta .ti {
    color: var(--ld-muted-soft);
}

.thread-list-item .avatar,
.thread-list-item img.avatar {
    box-shadow: 0 0 0 3px #fff, 0 5px 16px rgba(15, 23, 42, .08);
}

.thread-list-item .subject a {
    color: #111827;
    font-size: 15px;
    font-weight: 700;
}

.thread-list-item .subject a:hover {
    color: var(--ld-primary) !important;
}

.thread-list-meta,
.thread-list-meta .text-secondary,
.thread-list-meta a {
    color: var(--ld-muted) !important;
}

.thread-list-meta a.bg-body-tertiary {
    background: var(--ld-surface-soft) !important;
    border: 1px solid #eef2f7;
    color: #64748b !important;
    font-weight: 600;
}

.thread-nav-tabs {
    gap: 6px;
    padding: 8px 8px 4px;
}

.index-threadlist > .py-1,
.list-mode > .py-1 {
    background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .72));
    border-bottom: 1px solid var(--ld-line);
}

.thread-nav-tabs .nav-link {
    border-radius: 999px;
    color: #64748b;
    font-weight: 700;
    padding: .48rem .88rem;
}

.thread-nav-tabs .nav-link.active,
.thread-nav-tabs .nav-link:hover {
    color: var(--ld-primary) !important;
    background: rgba(59, 130, 246, .10);
}

.btn {
    border-radius: 8px;
    font-weight: 700;
    min-height: 38px;
    transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus-visible,
.nav-link:focus-visible,
.dropdown-item:focus-visible,
a:focus-visible {
    outline: 0;
    box-shadow: var(--ld-focus);
}

.btn-primary {
    background: var(--ld-primary);
    box-shadow: 0 8px 18px rgba(59, 130, 246, .22);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--ld-primary-hover);
}

.btn-outline-secondary {
    background: #f8fafc;
    border-color: #e5e7eb;
    color: #475569;
}

.btn-outline-secondary:hover,
.btn-outline-secondary.active {
    color: var(--ld-primary) !important;
    background: rgba(59, 130, 246, .10) !important;
    border-color: rgba(59, 130, 246, .18) !important;
}

.announcement-badge {
    border-radius: 999px;
    background: rgba(59, 130, 246, .10);
    color: var(--ld-primary);
    font-weight: 800;
    padding: 5px 10px;
}

.announcement-link {
    color: #475569;
    font-weight: 600;
}

.forum-section .fw-semibold,
.card-title,
.card-header .fw-semibold {
    color: #0f172a;
    font-weight: 800 !important;
}

.forum-section .badge,
.badge.bg-light,
.badge.bg-secondary.bg-opacity-10,
.badge.bg-primary.bg-opacity-10 {
    border: 1px solid rgba(148, 163, 184, .18);
    font-weight: 700;
}

.sub-forum-icon,
.forum-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: var(--ld-primary);
    background: linear-gradient(135deg, rgba(59, 130, 246, .14), rgba(14, 165, 233, .08));
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .08);
}

.forum-section .x-card,
.forum-section + .pb-3 .x-card {
    min-height: 72px;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.forum-section + .pb-3 .x-card:hover {
    border-color: rgba(59, 130, 246, .22) !important;
    transform: translateY(-1px);
}

.forum-section,
.card-header {
    border-bottom: 0 !important;
}

.card-thread,
.card-postlist {
    padding: 0;
}

.card-thread .card-body,
.card-postlist .card-body {
    padding: 22px;
}

.message,
.post-message,
.aie-content {
    color: #1f2937;
    line-height: 1.78;
}

.card-thread h1,
.card-thread h2,
.card-thread h3,
.aie-content h1,
.aie-content h2,
.aie-content h3 {
    color: #0f172a !important;
    font-weight: 850;
    letter-spacing: -.02em;
}

.aie-content p,
.aie-content li {
    color: #334155;
}

.aie-content img {
    border-radius: 14px !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

.aie-content code,
.message code {
    padding: .16rem .36rem;
    border-radius: 6px;
    color: #0f172a;
    background: #eef4ff;
    border: 1px solid rgba(59, 130, 246, .12);
}

.aie-content pre,
.message pre {
    border-radius: 14px !important;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.attach-filelist .border,
.attach-filelist [aid] {
    border-color: var(--ld-line) !important;
    border-radius: 14px !important;
    background: #fbfdff;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.attach-filelist [aid]:hover {
    border-color: rgba(59, 130, 246, .24) !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.thread-actions,
.thread-action-bar {
    color: var(--ld-muted);
}

.thread-action-bar {
    padding: 6px 0;
    background: rgba(255, 255, 255, .88);
    border: 1px solid var(--ld-border);
    box-shadow: var(--ld-shadow);
}

.thread-sidebar-btn,
.thread-action-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border-radius: 999px;
    color: #64748b !important;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.thread-sidebar-btn:hover,
.thread-action-chip:hover {
    color: var(--ld-primary) !important;
    background: rgba(59, 130, 246, .10);
    border-color: rgba(59, 130, 246, .20);
}

.dropdown-menu {
    border: 1px solid var(--ld-border) !important;
    border-radius: 12px;
    box-shadow: 0 16px 38px rgba(15, 23, 42, .10) !important;
}

.dropdown-item {
    border-radius: 8px;
    font-weight: 600;
}

.form-control,
.form-select,
.form-check-input {
    border-color: #e2e8f0;
    border-radius: 9px;
}

.input-group-search {
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.input-group-search .form-control,
.input-group-search .btn {
    border: 0;
    background: transparent;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: rgba(59, 130, 246, .55);
    box-shadow: var(--ld-focus);
}

.bottom-nav {
    border-top: 1px solid rgba(226, 232, 240, .82);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(14px);
}

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

.bottom-nav-item {
    min-height: 52px;
}

[data-bs-theme="dark"] {
    --ld-page-bg: #0f172a;
    --ld-surface: #111827;
    --ld-surface-soft: #1e293b;
    --ld-border: #243044;
    --ld-text: #e5e7eb;
    --ld-muted: #94a3b8;
    --ld-muted-soft: #64748b;
    --ld-line: rgba(51, 65, 85, .82);
    --x-page-bg: var(--ld-page-bg);
}

[data-bs-theme="dark"] body > header.navbar,
[data-bs-theme="dark"] #header.navbar,
[data-bs-theme="dark"] .bottom-nav {
    background: rgba(17, 24, 39, .92) !important;
    border-color: rgba(36, 48, 68, .9);
}

[data-bs-theme="dark"] .thread-list-item:hover {
    background: #162033;
}

[data-bs-theme="dark"] .thread-list-item .subject a,
[data-bs-theme="dark"] .site-name {
    color: #f8fafc;
}

[data-bs-theme="dark"] .side-nav-link,
[data-bs-theme="dark"] .navbar-nav .nav-link,
[data-bs-theme="dark"] .nav-icon-btn,
[data-bs-theme="dark"] .aie-content p,
[data-bs-theme="dark"] .aie-content li,
[data-bs-theme="dark"] .message,
[data-bs-theme="dark"] .post-message,
[data-bs-theme="dark"] .aie-content {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .forum-section .fw-semibold,
[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] .card-header .fw-semibold,
[data-bs-theme="dark"] .card-thread h1,
[data-bs-theme="dark"] .card-thread h2,
[data-bs-theme="dark"] .card-thread h3,
[data-bs-theme="dark"] .aie-content h1,
[data-bs-theme="dark"] .aie-content h2,
[data-bs-theme="dark"] .aie-content h3 {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .input-group-search,
[data-bs-theme="dark"] .thread-sidebar-btn,
[data-bs-theme="dark"] .thread-action-chip,
[data-bs-theme="dark"] .attach-filelist [aid],
[data-bs-theme="dark"] .attach-filelist .border {
    background: #172033;
    border-color: #263246 !important;
}

[data-bs-theme="dark"] .aie-content code,
[data-bs-theme="dark"] .message code,
[data-bs-theme="dark"] .aie-content pre,
[data-bs-theme="dark"] .message pre {
    color: #dbeafe;
    background: #172033 !important;
    border-color: #263246 !important;
}

@media screen and (max-width: 767.98px) {
    body > header.navbar,
    #header.navbar {
        min-height: 58px;
    }

    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .x-card {
        border-radius: 12px !important;
        margin: 10px 0;
        padding: 12px;
    }

    #body {
        padding-top: 10px;
        padding-bottom: 78px;
    }

    .row.g-4 {
        --bs-gutter-x: .75rem;
        --bs-gutter-y: .75rem;
    }

    .thread-list-item {
        padding: 14px 12px;
    }

    .thread-list-item .subject a {
        font-size: 15px;
    }

    .btn,
    .nav-link,
    .dropdown-item {
        min-height: 44px;
    }

    .nav-icon-btn {
        width: 44px;
        height: 44px;
    }

    .thread-nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .thread-nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .thread-nav-tabs .nav-link {
        white-space: nowrap;
    }

    .forum-section + .pb-3 .row {
        --bs-gutter-x: .65rem;
        --bs-gutter-y: .65rem;
    }

    .card-thread .card-body,
    .card-postlist .card-body {
        padding: 16px;
    }

    .bottom-nav {
        padding-bottom: max(6px, env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
