/* ========================================
   Top导航主题 - Main Stylesheet (Modernized)
   ======================================== */

:root {
    --theme-color: #4f6ef7;
    --theme-color-rgb: 79, 110, 247;
    --hover-color: #3b5de7;
    --bg-color: #f0f2f5;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-secondary: #f5f7fa;
    --text-color: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8c8ca1;
    --border-color: #e4e7ed;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
    --main-radius: 16px;
    --main-radius-sm: 10px;
    --sidebar-width: 160px;
    --header-height: 52px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dark-mode {
    --bg-color: #0f1117;
    --bg-card: #1a1d2e;
    --bg-sidebar: #1a1d2e;
    --bg-secondary: #252836;
    --text-color: #e8e8f0;
    --text-secondary: #b0b0c8;
    --text-muted: #6b6b8a;
    --border-color: #2a2d3e;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.25);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.35);
}

/* ============ Base ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #e8ecf4 0%, #f0f2f5 30%, #e6eaf5 60%, #f0eef5 100%);
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.6;
    padding-top: var(--header-height);
    /* 移除body的transition，避免滚动时触发重绘 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.dark-mode {
    background: linear-gradient(135deg, #0a0c15 0%, #0f1117 30%, #0d0f1a 60%, #100f1a 100%);
}

/* 有banner时body不需要padding-top，banner自己会留出header空间 */
body.has-banner {
    padding-top: 0;
}

a { color: var(--text-color); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--theme-color); }
img { max-width: 100%; height: auto; }

::selection {
    background: rgba(var(--theme-color-rgb), 0.15);
    color: var(--theme-color);
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ============ Header ============ */
.main-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--header-height);
}

.header-nav {
    background: transparent;
    border-bottom: 1px solid transparent;
    height: 100%;
    transition: background 0.25s, border-bottom-color 0.25s;
}

/* 没有banner的页面，默认就显示半透明背景 */
body:not(.has-banner) .header-nav {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* 滚动时的阴影效果 */
.main-header.header-scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* 有banner的页面，滚动后导航栏变为半透明 */
body.has-banner.scrolled .header-nav {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.dark-mode .header-nav {
    background: transparent;
    border-bottom-color: transparent;
}

/* 暗色模式 - 没有banner的页面默认半透明 */
body:not(.has-banner).dark-mode .header-nav,
.dark-mode body:not(.has-banner) .header-nav {
    background: rgba(26, 29, 46, 0.92);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* 暗色模式 - 有banner页面滚动后半透明 */
body.has-banner.scrolled .dark-mode .header-nav,
body.has-banner.scrolled.dark-mode .header-nav {
    background: rgba(26, 29, 46, 0.92);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.header-nav nav {
    height: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
}

.navbar-logo .logo-link {
    display: flex;
    align-items: center;
    height: 32px;
}

.navbar-logo .logo-text {
    font-size: 18px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--theme-color), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.navbar-menu .nav {
    list-style: none;
    display: flex;
    gap: 2px;
    margin: 0;
    padding: 0;
}

.navbar-menu .nav-item .nav-link {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    position: relative;
}

.navbar-menu .nav-item .nav-link:hover {
    background: rgba(var(--theme-color-rgb), 0.08);
    color: var(--theme-color);
}

.navbar-menu .nav-item .nav-link.active {
    color: var(--theme-color);
    background: rgba(var(--theme-color-rgb), 0.08);
}

.header-tools {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.header-tools a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 18px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.header-tools a:hover {
    background: rgba(var(--theme-color-rgb), 0.08);
    color: var(--theme-color);
    transform: scale(1.05);
}

/* ============ 透明导航栏时文字白色（首页有banner时） ============ */
body.has-banner .navbar-menu .nav-link,
body.has-banner .navbar-logo .logo-text,
body.has-banner .header-tools a,
body.has-banner .header-user-btn .user-toggle {
    color: rgba(255, 255, 255, 0.9);
}

body.has-banner .navbar-menu .nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

body.has-banner .header-tools a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

body.has-banner .menu-btn .menu-bar {
    background: #ffffff;
}

/* 滚动后恢复深色文字 */
body.has-banner.scrolled .navbar-menu .nav-link,
body.has-banner.scrolled .navbar-logo .logo-text,
body.has-banner.scrolled .header-tools a,
body.has-banner.scrolled .header-user-btn .user-toggle {
    color: var(--text-secondary);
}

body.has-banner.scrolled .navbar-menu .nav-link:hover {
    color: var(--theme-color);
    background: rgba(var(--theme-color-rgb), 0.08);
}

body.has-banner.scrolled .header-tools a:hover {
    color: var(--theme-color);
    background: rgba(var(--theme-color-rgb), 0.08);
}

body.has-banner.scrolled .menu-btn .menu-bar {
    background: var(--text-color);
}

/* ============ Header - User Dropdown ============ */
.header-user-btn { position: relative; }

.header-user-btn .user-toggle {
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color var(--transition-fast);
}

.header-user-btn .user-toggle:hover { color: var(--theme-color); }

.user-dropdown {
    position: absolute;
    top: calc(100% + 12px); right: 0;
    width: 300px;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.12);
    border: 1px solid var(--border-color);
    padding: 20px;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: all var(--transition-normal);
}

.header-user-btn:hover .user-dropdown,
.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.user-dropdown::before {
    content: '';
    position: absolute;
    top: -6px; right: 16px;
    width: 12px; height: 12px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
    transform: rotate(45deg);
}

.user-card {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.user-card .user-avatar {
    width: 52px; height: 52px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    transition: border-color var(--transition-fast);
}

.user-card .user-avatar:hover {
    border-color: var(--theme-color);
}

.user-card .user-avatar img,
.user-card .user-avatar svg {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

.user-card .user-detail b {
    font-size: 15px;
    display: block;
    color: var(--text-color);
}

.user-card .user-detail .text-xs {
    font-size: 12px;
    margin-top: 2px;
}

.user-actions {
    display: flex;
    gap: 8px;
}

.user-actions .btn-user {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: all var(--transition-fast);
    letter-spacing: 0.3px;
}

.user-actions .btn-user:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
    color: #fff;
}

.user-actions .btn-user i { font-size: 15px; }

.btn-login { background: linear-gradient(135deg, var(--theme-color), #6c5ce7); }
.btn-login:hover { background: linear-gradient(135deg, var(--hover-color), #5b4bd6); }

.btn-register { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.btn-register:hover { background: linear-gradient(135deg, #27ae60, #219a52); }

.btn-reset { background: linear-gradient(135deg, #f39c12, #e67e22); }
.btn-reset:hover { background: linear-gradient(135deg, #e67e22, #d35400); }

.btn-admin { background: linear-gradient(135deg, #4f6ef7, #6c5ce7); }
.btn-admin:hover { background: linear-gradient(135deg, #3b5de7, #5b4bd6); }

.btn-center { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.btn-center:hover { background: linear-gradient(135deg, #27ae60, #219a52); }

.btn-logout { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.btn-logout:hover { background: linear-gradient(135deg, #c0392b, #a93226); }

/* ============ Header - Mobile ============ */
.menu-btn {
    cursor: pointer;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-btn .menu-bar {
    display: block;
    width: 22px; height: 2px;
    background: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s;
}

/* 汉堡菜单激活状态 - 变成 X */
.menu-btn.active .menu-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-btn.active .menu-bar:nth-child(2) {
    opacity: 0;
}
.menu-btn.active .menu-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-header {
    display: none;
    position: fixed;
    top: var(--header-height); left: 0; right: 0;
    max-height: calc(100vh - var(--header-height) - 40px);
    z-index: 99;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0 0 16px 16px;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top: none;
    animation: slideDown 0.25s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dark-mode .mobile-header {
    background: rgba(26, 29, 46, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
}

.mobile-header.active { display: block; }

.mobile-nav .menu-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.mobile-nav .menu-item {
    margin: 0;
    width: 100%;
    max-width: 400px;
}

.mobile-nav .menu-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    transition: all var(--transition-fast);
    text-decoration: none;
    background: rgba(var(--theme-color-rgb), 0.04);
    border: 1px solid rgba(var(--theme-color-rgb), 0.08);
    white-space: nowrap;
}

.mobile-nav .menu-item a:hover {
    background: rgba(var(--theme-color-rgb), 0.1);
    color: var(--theme-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--theme-color-rgb), 0.15);
}

/* ============ Search Banner ============ */
.header-banner {
    background: #020409;
    padding: calc(var(--header-height) + 30px) 0 30px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 440px;
}

.header-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(1600px at 70% 120%, rgba(33,39,80,0.3) 10%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.header-banner::after {
    display: none;
}

/* 星空粒子动画 iframe 背景 */
.banner-fx-iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 0;
    pointer-events: none;
}

.header-banner .container {
    position: relative;
    z-index: 2;
}

.big-title h2 {
    color: #ffffff !important;
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: relative;
    z-index: 3;
}

.search-list-menu {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    justify-content: center;
}

.search-menu {
    padding: 7px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 3;
}

.search-menu:hover,
.search-menu.active {
    background: rgba(255,255,255,0.2);
    color: #ffffff;
    border-color: rgba(255,255,255,0.3);
}

.search-box-big {
    max-width: 620px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    gap: 0;
}

.search-form .form-control {
    border: none;
    border-radius: 8px 0 0 8px;
    padding: 8px 14px;
    font-size: 14px;
    outline: none;
    box-shadow: none;
    background: var(--bg-card);
    color: var(--text-color);
    position: relative;
    z-index: 3;
    height: 50px;
}

.search-form .form-control::placeholder {
    color: var(--text-muted);
}

.search-form .form-control:focus { box-shadow: none; }

.search-tools {
    display: flex;
}

.search-submit-btn {
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 0 18px;
    height: 50px;
    background: linear-gradient(135deg, var(--theme-color), #7c3aed);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 14px rgba(var(--theme-color-rgb), 0.3);
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.search-submit-btn:hover {
    background: linear-gradient(135deg, var(--hover-color), #6c5ce7);
    box-shadow: 0 6px 20px rgba(var(--theme-color-rgb), 0.4);
}

/* ============ Layout ============ */
.main-content {
    min-height: calc(100vh - var(--header-height));
    flex: 1;
}

.layout-container {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
    gap: 20px;
}

.layout-container.no-sidebar .content-wrap {
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

.layout-container.no-right-sidebar .content-wrap {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - var(--sidebar-width) - 20px);
}

/* ============ Left Sidebar ============ */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    padding-top: 20px;
    position: sticky;
    top: calc(var(--header-height) + 20px);
    height: calc(100vh - var(--header-height) - 30px);
}

.aside-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--main-radius);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: box-shadow var(--transition-normal);
}

.dark-mode .aside-card {
    background: rgba(26, 29, 46, 0.92);
    border-color: rgba(255, 255, 255, 0.06);
}

.aside-card:hover {
    box-shadow: var(--shadow-lg);
}

.aside-head {
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(180deg, rgba(var(--theme-color-rgb), 0.08), rgba(var(--theme-color-rgb), 0.02));
}

.dark-mode .aside-head {
    border-bottom-color: rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(var(--theme-color-rgb), 0.14), rgba(var(--theme-color-rgb), 0.03));
}

.aside-head-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-color);
}

.aside-head-tip {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.aside-ul {
    list-style: none;
    padding: 12px 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.aside-item {
    margin: 0 8px 8px;
}

.aside-row {
    display: block;
}

.aside-item .aside-btn {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    padding: 11px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    background: transparent;
}

.aside-item .aside-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    background: var(--theme-color);
    border-radius: 0 3px 3px 0;
    transition: transform var(--transition-fast);
}

.aside-item .aside-btn:hover {
    background: rgba(var(--theme-color-rgb), 0.08);
    color: var(--theme-color);
    transform: translateX(2px);
}

.aside-item .aside-btn:hover::before,
.aside-item .aside-btn.active::before {
    transform: translateY(-50%) scaleY(1);
}

.aside-item .aside-btn.active,
.aside-item.is-open > .aside-row .aside-btn {
    background: rgba(var(--theme-color-rgb), 0.1);
    color: var(--theme-color);
}


.aside-sort-img {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    object-fit: cover;
    flex-shrink: 0;
    margin-right: 8px;
}

.aside-sort-letter {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: rgba(var(--theme-color-rgb), 0.12);
    color: var(--theme-color);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.aside-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.aside-count {
    margin-left: 8px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(var(--theme-color-rgb), 0.12);
    color: var(--theme-color);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ml-2 { margin-left: 10px; }

.aside-sub {
    list-style: none;
    padding: 6px 0 0 0;
    margin: 0 0 0 10px;
    display: none;
    position: relative;
}

.aside-item.is-open .aside-sub {
    display: block;
}



.aside-sub::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 4px;
    bottom: 8px;
    width: 1px;
    background: rgba(var(--theme-color-rgb), 0.12);
}



.aside-sub li {
    position: relative;
}

.aside-sub li .aside-btn {
    padding: 8px 12px 8px 24px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    background: transparent;
}

.aside-sub li .aside-btn:hover {
    color: var(--theme-color);
    background: rgba(var(--theme-color-rgb), 0.04);
}

.aside-sub li .aside-btn::before {
    display: none;
}

.aside-sub-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(var(--theme-color-rgb), 0.28);
    margin-right: 10px;
    flex-shrink: 0;
}

.aside-sub li .aside-btn:hover .aside-sub-dot,
.aside-sub li .aside-btn.active .aside-sub-dot {
    background: var(--theme-color);
}

.aside-bottom {
    border-top: 1px solid var(--border-color);
    padding: 10px 8px;
    flex-shrink: 0;
}

.aside-bottom .aside-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.aside-bottom .aside-btn:hover { color: var(--theme-color); }

/* Sidebar collapsed */
.sidebar.collapsed { width: 68px; }

.sidebar.collapsed .aside-head-tip,
.sidebar.collapsed .aside-label,
.sidebar.collapsed .aside-count,
.sidebar.collapsed .aside-sub,
.sidebar.collapsed .aside-bottom span {
    display: none !important;
}

.sidebar.collapsed .aside-head {
    padding: 14px 8px 10px;
    text-align: center;
}

.sidebar.collapsed .aside-head-title {
    font-size: 12px;
}

.sidebar.collapsed .aside-item {
    margin: 0 8px 8px;
}

.sidebar.collapsed .aside-item .aside-btn {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .aside-item .aside-btn::before { display: none; }

/* ============ Content ============ */
.content-wrap {
    flex: 1;
    min-width: 0;
    padding-top: 20px;
    padding-bottom: 40px;
}

.content-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--main-radius);
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: box-shadow var(--transition-normal);
}

.dark-mode .content-card {
    background: rgba(26, 29, 46, 0.92);
    border-color: rgba(255, 255, 255, 0.06);
}

.content-card:hover {
    box-shadow: var(--shadow-md);
}

.card-header-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.card-header-bar.has-tabs {
    flex-direction: column;
    align-items: flex-start;
}

@media (min-width: 768px) {
    .card-header-bar.has-tabs {
        flex-direction: row;
        align-items: center;
    }
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: var(--theme-color);
    font-size: 18px;
}

.slider-tab {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 6px;
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 3px;
    position: relative;
    z-index: 2;
}

.tab-item {
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    position: relative;
    z-index: 3;
}


.tab-item:hover,
.tab-item.active {
    background: var(--bg-card);
    color: var(--theme-color);
    box-shadow: var(--shadow-sm);
}

.btn-more {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    padding: 4px 12px;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.btn-more:hover {
    color: var(--theme-color);
    background: rgba(var(--theme-color-rgb), 0.06);
}

/* ============ Site Cards ============ */
.posts-row { margin: 0 -8px; }

.posts-row > [class*="col-"] {
    padding: 0 8px;
    margin-bottom: 16px;
}

.site-card {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 10px;
    transition: box-shadow var(--transition-normal), border-color var(--transition-normal), transform var(--transition-normal);
    height: 100%;
    overflow: hidden;
}

.dark-mode .site-card {
    background: rgba(26, 29, 46, 0.95);
    border-color: rgba(255, 255, 255, 0.06);
}

.site-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-color), #7c3aed);
    opacity: 0;
    transition: opacity var(--transition-fast);
    display: none;
}

.site-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 24px rgba(var(--theme-color-rgb), 0.1);
    transform: translateY(-4px);
}

.dark-mode .site-card:hover {
    border-color: rgba(255, 255, 255, 0.06);
}

.site-card:hover::before {
    opacity: 0;
}

.site-card .site-body {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 12px;
}

/* 卡片头部：图标+模糊背景 */
.item-header {
    position: relative;
    flex-shrink: 0;
}

.blur-img-bg {
    position: absolute;
    top: -6px; left: -6px; right: -6px; bottom: -6px;
    background-size: cover;
    background-position: center;
    filter: blur(10px) saturate(1.2);
    opacity: 0.35;
    border-radius: 16px;
    z-index: 0;
    transition: opacity var(--transition-fast);
}

.site-card:hover .blur-img-bg {
    opacity: 0.35;
}

.item-media {
    width: 44px; height: 44px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg-secondary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    position: relative;
    z-index: 1;
}

.item-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.item-media .site-icon-letter {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    border-radius: 12px;
}

.item-body {
    overflow: hidden;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.site-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color var(--transition-fast);
}

.site-card:hover .site-title {
    color: var(--text-color);
}

.site-title b { font-weight: 700; }

.site-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.site-goto {
    position: absolute;
    top: 10px; right: 10px;
}

.site-goto a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-muted);
    opacity: 0;
    transition: all var(--transition-fast);
    background: var(--bg-secondary);
}

.site-card:hover .site-goto a { opacity: 0; }

.site-goto a:hover {
    background: rgba(var(--theme-color-rgb), 0.1);
    color: var(--theme-color);
    transform: scale(1.1);
}

/* Grid columns */
.col-2a { flex: 0 0 50%; max-width: 50%; }
.col-sm-2a { }
.col-md-2a { }
.col-lg-2a { flex: 0 0 33.333%; max-width: 33.333%; }
.col-xl-4a { flex: 0 0 25%; max-width: 25%; }
.col-xxl-5a { flex: 0 0 20%; max-width: 20%; }

@media (min-width: 576px) { .col-sm-2a { flex: 0 0 50%; max-width: 50%; } }
@media (min-width: 768px) { .col-md-2a { flex: 0 0 50%; max-width: 50%; } }
@media (min-width: 992px) { .col-lg-2a { flex: 0 0 33.333%; max-width: 33.333%; } }
@media (min-width: 1200px) { .col-xl-4a { flex: 0 0 25%; max-width: 25%; } }
@media (min-width: 1400px) { .col-xxl-5a { flex: 0 0 20%; max-width: 20%; } }

/* ============ Single Article ============ */
.single-content { max-width: 1300px; margin: 0 auto; }

/* ============ Comments ============ */
.article-comments { margin-top: 20px; }

.comment-list-wrap {
    background: var(--bg-card);
    border-radius: var(--main-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.comment-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.comment-list { list-style: none; padding: 0; margin: 0; }

.comment-list > .comment-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--border-color);
}
.comment-list > .comment-item:last-child { border-bottom: none; }

.comment-item { display: flex; flex-wrap: wrap; gap: 12px; }
.comment-item .comment-avatar {
    width: 42px; height: 42px;
    border-radius: 12px; overflow: hidden; flex-shrink: 0;
}
.comment-item .comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-item .comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.comment-author { font-weight: 600; font-size: 14px; color: var(--text-color); }
.comment-date { font-size: 12px; color: var(--text-muted); }
.comment-content { font-size: 14px; line-height: 1.7; color: var(--text-color); word-break: break-word; }
.comment-actions { margin-top: 4px; }
.comment-reply-btn { font-size: 12px; color: var(--theme-color); text-decoration: none; font-weight: 500; }
.comment-reply-btn:hover { text-decoration: underline; }

.comment-children {
    list-style: none; padding: 0; margin: 0;
    width: 100%; padding-left: 54px;
    margin-top: 8px;
}
.comment-children .comment-item { padding: 12px 0; border-bottom: none; }
.comment-children .comment-avatar { width: 34px; height: 34px; }

.comment-children .comment-children { padding-left: 46px; }

.comment-pagination { margin-top: 18px; text-align: center; }
.comment-pagination a { color: var(--theme-color); }

.comment-post-wrap {
    background: var(--bg-card);
    border-radius: var(--main-radius);
    padding: 24px;
    margin-top: 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.comment-form .comment-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-color);
    font-size: 14px;
    outline: none;
    transition: all var(--transition-fast);
}
.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--theme-color);
    box-shadow: 0 0 0 3px rgba(var(--theme-color-rgb), 0.1);
    background: var(--bg-card);
}

.comment-form textarea {
    min-height: 100px;
    resize: vertical;
}

.comment-submit-bar {
    display: flex; align-items: center; gap: 10px; margin-top: 12px;
}
.comment-submit-bar .cancel-reply a { font-size: 13px; color: var(--text-muted); }
.comment-submit-bar .btn {
    font-size: 14px;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
}

/* ============ Right Sidebar ============ */
.sidebar-right {
    width: 300px;
    flex-shrink: 0;
    padding-top: 20px;
}

.sidebar-widget {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--main-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: box-shadow var(--transition-normal);
}

.dark-mode .sidebar-widget {
    background: rgba(26, 29, 46, 0.92);
    border-color: rgba(255, 255, 255, 0.06);
}

.sidebar-widget:hover {
    box-shadow: var(--shadow-md);
}

.sidebar-widget .card {
    border: none;
    background: transparent;
}

.sidebar-widget .card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
}

.sidebar-widget .card-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-widget .card-header h3 i {
    color: var(--theme-color);
    font-size: 16px;
}

.sidebar-widget .card-body {
    padding: 16px 20px;
}

/* Blogger widget */
.sidebar-widget .rounded-circle {
    border: 3px solid var(--border-color);
    transition: border-color var(--transition-fast);
}

.sidebar-widget .rounded-circle:hover {
    border-color: var(--theme-color);
}

.sidebar-widget .fw-bold {
    color: var(--text-color);
    font-size: 14px;
}

/* Search widget */
.sidebar-search { display: flex; gap: 8px; }

.sidebar-search .form-control {
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-color);
    font-size: 13px;
    padding: 10px 14px;
    transition: all var(--transition-fast);
}

.sidebar-search .form-control:focus {
    border-color: var(--theme-color);
    box-shadow: 0 0 0 3px rgba(var(--theme-color-rgb), 0.1);
    outline: none;
    background: var(--bg-card);
}

.sidebar-search .btn {
    border-radius: 10px;
    background: linear-gradient(135deg, var(--theme-color), #7c3aed);
    color: #fff;
    border: none;
    padding: 10px 16px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.sidebar-search .btn:hover {
    box-shadow: 0 4px 12px rgba(var(--theme-color-rgb), 0.3);
    transform: translateY(-1px);
}

/* Recent list (newlog, hotlog, newcom, sort) */
.recent-list { list-style: none; padding: 0; margin: 0; }

.recent-list li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
    transition: all var(--transition-fast);
}

.recent-list li:last-child { border-bottom: none; }

.recent-list li:hover {
    padding-left: 4px;
}

.recent-list li a {
    font-size: 13px;
    color: var(--text-secondary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    transition: color var(--transition-fast);
    line-height: 1.5;
}

.recent-list li a:hover {
    color: var(--theme-color);
}

/* Tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

.tag-item {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(var(--theme-color-rgb), 0.06);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid rgba(var(--theme-color-rgb), 0.08);
}

.tag-item:hover {
    background: rgba(var(--theme-color-rgb), 0.12);
    color: var(--theme-color);
    border-color: rgba(var(--theme-color-rgb), 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(var(--theme-color-rgb), 0.1);
}

/* Archive list */
.archive-list { list-style: none; padding: 0; margin: 0; }
.archive-list li { padding: 8px 0; }
.archive-list li a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}
.archive-list li a:hover { color: var(--theme-color); padding-left: 4px; }

/* ============ Footer ============ */
.main-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    position: relative;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-color), #7c3aed, #ec4899, var(--theme-color));
    background-size: 200% 100%;
    animation: gradientSlide 8s linear infinite;
}

@keyframes gradientSlide {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.footer-copyright { font-size: 13px; color: var(--text-muted); }
.footer-copyright a { color: var(--text-secondary); font-weight: 500; }
.footer-copyright a:hover { color: var(--theme-color); }

/* ============ Footer Tools ============ */
.footer-tools {
    position: fixed;
    right: 16px; bottom: 16px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.btn-tools {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-secondary);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-top: 8px;
    font-size: 16px;
    transition: all var(--transition-fast);
    text-decoration: none;
    line-height: 1;
    flex-shrink: 0;
    box-sizing: border-box;
}

.btn-tools:hover {
    color: var(--theme-color);
    border-color: rgba(var(--theme-color-rgb), 0.3);
    box-shadow: 0 6px 20px rgba(var(--theme-color-rgb), 0.15);
    transform: translateY(-2px);
}

.btn-tools i {
    font-size: 16px;
    width: 16px;
    height: 16px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle;
    line-height: 1;
    margin: 0;
    padding: 0;
    position: relative;
    top: 0;
    left: 0;
}

/* Go-up button: 默认隐藏，滚动后显示 */
.go-up {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.go-up.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.dark-mode .btn-tools {
    background: #1a1d2e;
    border-color: rgba(255, 255, 255, 0.1);
}

/* 确保按钮图标居中 */
#footerTools .btn-tools {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
}

#footerTools .btn-tools i {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
}

/* ============ Search Modal ============ */
.search-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 200;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: flex-start;
    padding-top: 100px;
}

.search-modal.active { display: flex; }

.search-body {
    width: 90%;
    max-width: 620px;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.2);
    animation: searchModalIn 0.3s ease;
}

@keyframes searchModalIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-body .search-box { display: flex; gap: 0; }

.search-body .form-control {
    border: 2px solid var(--border-color);
    border-radius: 14px 0 0 14px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    color: var(--text-color);
    font-size: 15px;
    transition: all var(--transition-fast);
}

.search-body .form-control:focus {
    border-color: var(--theme-color);
    background: var(--bg-card);
}

.search-body .search-submit {
    border: none;
    border-radius: 0 14px 14px 0;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--theme-color), #7c3aed);
    color: #fff;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.search-body .search-submit:hover {
    box-shadow: 0 4px 14px rgba(var(--theme-color-rgb), 0.3);
}

/* ============ 404 Page ============ */
.error-page { padding: 80px 0; }

.error-code {
    font-size: 120px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--theme-color), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.error-title { font-size: 24px; margin: 16px 0 8px; }
.error-desc { color: var(--text-muted); }

/* ============ Pagination ============ */
.pagination-wrap { padding: 20px 0; }

.pagination-wrap a,
.pagination-wrap span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 50px;
    padding: 0 14px;
    margin: 0 4px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.pagination-wrap a:hover {
    border-color: var(--theme-color);
    color: var(--theme-color);
    background: rgba(var(--theme-color-rgb), 0.04);
}

.pagination-wrap span.current {
    background: linear-gradient(135deg, var(--theme-color), #7c3aed);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(var(--theme-color-rgb), 0.3);
}

/* ============ Entrance Animations ============ */

/* ============ Responsive ============ */
@media (max-width: 991px) {
    .sidebar-right { display: none; }

    .layout-container.no-right-sidebar .content-wrap {
        max-width: 100%;
    }

    .sidebar {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100%;
        width: 240px;
        z-index: 98;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: rgba(255, 255, 255, 0.98);
        padding: 70px 16px 16px;
        overflow-y: auto;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar .aside-card {
        background: transparent;
        box-shadow: none;
        border: none;
        height: auto;
    }

    .sidebar .aside-item .aside-btn {
        padding: 10px 12px;
        font-size: 13px;
        margin: 3px 0;
        border-radius: 10px;
        background: rgba(var(--theme-color-rgb), 0.04);
        border: 1px solid rgba(var(--theme-color-rgb), 0.08);
    }

    .sidebar .aside-item .aside-btn:hover {
        background: rgba(var(--theme-color-rgb), 0.1);
        transform: translateX(4px);
    }

    .sidebar .aside-sort-img {
        width: 22px;
        height: 22px;
    }

    .sidebar .aside-sort-letter {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .dark-mode .sidebar {
        background: rgba(26, 29, 46, 0.98);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    }

    .sidebar .aside-bottom {
        display: none;
    }

    /* 侧边栏遮罩 */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 97;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .layout-container { padding: 0 12px; }
    .content-card { padding: 16px; }
}

@media (max-width: 767px) {
    body { padding-top: var(--header-height); }

    .big-title h2 { font-size: 20px; }

    .header-banner {
        min-height: 280px;
        padding-top: calc(var(--header-height) + 16px);
        padding-bottom: 16px;
    }

    .search-list-menu {
        justify-content: flex-start;
        padding-bottom: 4px;
    }

    .card-header-bar.has-tabs {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-form .form-control {
        padding: 6px 12px;
        font-size: 14px;
        height: 44px;
    }

    .search-submit-btn {
        padding: 0 14px;
        height: 44px;
        font-size: 13px;
    }

    /* 手机端卡片：每行1个，更宽松 */
    .posts-row { margin: 0 -6px; }
    .posts-row > [class*="col-"] {
        padding: 0 6px;
        margin-bottom: 12px;
    }
    .posts-row > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .site-card { padding: 8px; border-radius: 10px; }
    .site-card .site-body { gap: 8px; }
    .item-media { width: 36px; height: 36px; border-radius: 10px; }
    .item-media img { border-radius: 10px; }
    .item-media .site-icon-letter { font-size: 15px; border-radius: 10px; }
    .blur-img-bg { top: -4px; left: -4px; right: -4px; bottom: -4px; border-radius: 12px; filter: blur(8px); }
    .site-title { font-size: 13px; }
    .site-desc { font-size: 11px; -webkit-line-clamp: 1; }
    .site-goto { width: 22px; height: 22px; }

    /* 推荐区手机端每行2个 */
    .posts-row > .col-12,
    .posts-row > .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .content-card { padding: 14px; }
    .card-header-bar { margin-bottom: 10px !important; }
    .card-title { font-size: 15px; }
    .btn-more { font-size: 12px; }
}

@media (max-width: 575px) {
    .col-2a,
    .col-sm-2a,
    .col-md-2a {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 374px) {
    .site-card .site-body { gap: 6px; }
    .site-title { font-size: 12px; }
}

/* 手机端用户下拉菜单适配 */
@media (max-width: 767px) {
    .user-dropdown {
        width: 260px;
        right: -10px;
        padding: 14px;
    }
    .user-dropdown::before {
        right: 20px;
    }
    .user-card {
        padding-bottom: 10px;
        margin-bottom: 10px;
    }
    .user-card .user-avatar {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
    .user-card .user-detail b {
        font-size: 13px;
    }
    .user-actions .btn-user {
        padding: 8px 6px;
        font-size: 11px;
        gap: 4px;
    }
    .user-actions .btn-user i {
        font-size: 13px;
    }
}

/* ============ Page Template ============ */
.page-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0 40px;
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.page-breadcrumb a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.page-breadcrumb a:hover {
    color: var(--theme-color);
}

.page-breadcrumb .current {
    color: var(--text-secondary);
    font-weight: 500;
}

.page-breadcrumb i.bi-chevron-right {
    font-size: 10px;
    opacity: 0.5;
}

.page-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--main-radius);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 24px;
}

.dark-mode .page-card {
    background: rgba(26, 29, 46, 0.92);
    border-color: rgba(255, 255, 255, 0.06);
}

.page-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-color);
    margin: 0 0 12px;
    line-height: 1.4;
}

.page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.page-meta i {
    font-size: 14px;
}

.page-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.page-content h2,
.page-content h3,
.page-content h4 {
    color: var(--text-color);
    margin: 32px 0 16px;
    font-weight: 700;
}

.page-content h2 { font-size: 22px; }
.page-content h3 { font-size: 18px; }
.page-content h4 { font-size: 16px; }

.page-content p {
    margin: 0 0 16px;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 16px 0;
    box-shadow: var(--shadow-sm);
}

.page-content a {
    color: var(--theme-color);
    text-decoration: underline;
    text-decoration-color: rgba(var(--theme-color-rgb), 0.3);
    text-underline-offset: 3px;
    transition: all var(--transition-fast);
}

.page-content a:hover {
    text-decoration-color: var(--theme-color);
}

.page-content blockquote {
    border-left: 4px solid var(--theme-color);
    padding: 16px 20px;
    margin: 20px 0;
    background: rgba(var(--theme-color-rgb), 0.04);
    border-radius: 0 10px 10px 0;
    color: var(--text-secondary);
}

.page-content pre {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid var(--border-color);
}

.page-content code {
    background: rgba(var(--theme-color-rgb), 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--theme-color);
}

.page-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.page-content ul,
.page-content ol {
    padding-left: 24px;
    margin: 16px 0;
}

.page-content li {
    margin-bottom: 8px;
}

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.page-content th,
.page-content td {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.page-content th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-color);
}

.page-content hr {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: 32px 0;
}

/* 评论区 */
.page-comments {
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--main-radius);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode .page-comments {
    background: rgba(26, 29, 46, 0.92);
    border-color: rgba(255, 255, 255, 0.06);
}

.comments-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.comments-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

/* 响应式 */
@media (max-width: 767px) {
    .page-container {
        padding: 12px 0 24px;
    }
    
    .page-card {
        padding: 24px 16px;
        border-radius: 12px;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .page-meta {
        gap: 12px;
        font-size: 12px;
    }
    
    .page-content {
        font-size: 14px;
    }
    
    .page-comments {
        padding: 20px 16px;
        border-radius: 12px;
    }
}
