/* ================================================
   IO Nav 主题核心样式 v1.1.0
   ================================================ */

/* ==================== CSS变量 ==================== */
:root {
    --theme-color: #f1404b;
    --theme-color-light: #ff6b7a;
    --theme-color-dark: #d63340;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --bg-body: #f5f6f8;
    --bg-card: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.85);
    --bg-gray: #f0f1f3;
    --border-color: #eeeeee;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --header-height: 60px;
    --sidebar-width: 220px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
    --text-primary: #e0e0e0;
    --text-secondary: #aaaaaa;
    --text-muted: #666666;
    --bg-body: #1a1a1a;
    --bg-card: #2d2d2d;
    --bg-header: rgba(30, 30, 30, 0.85);
    --bg-gray: #252525;
    --border-color: #333333;
}

/* ==================== 全局重置 ==================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    margin: 0;
    padding: 0;
}
a { color: var(--theme-color); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--theme-color-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; }
p { margin: 0; }

/* ==================== 图标系统（Unicode） ==================== */
.i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-size: 16px;
    line-height: 1;
}

/* 常用图标 - 使用 emoji 作为默认图标 */
.i-search::before { content: "🔍"; font-size: 14px; }
.i-user::before { content: "👤"; font-size: 14px; }
.i-hot::before { content: "🔥"; font-size: 14px; }
.i-star::before { content: "⭐"; font-size: 14px; }
.i-heart::before { content: "❤️"; font-size: 14px; }
.i-eye::before { content: "👁️"; font-size: 14px; }
.i-clock::before { content: "⏰"; font-size: 14px; }
.i-home::before { content: "🏠"; font-size: 14px; }
.i-link::before { content: "🔗"; font-size: 14px; }
.i-sun::before { content: "☀️"; font-size: 14px; }
.i-moon::before { content: "🌙"; font-size: 14px; }
.i-arrow-up::before { content: "⬆️"; font-size: 14px; }
.i-arrow-down::before { content: "⬇️"; font-size: 14px; }
.i-arrow-left::before { content: "⬅️"; font-size: 14px; }
.i-arrow-right::before { content: "➡️"; font-size: 14px; }
.i-close::before { content: "✕"; font-size: 14px; font-weight: bold; }
.i-menu::before { content: "☰"; font-size: 16px; }
.i-more::before { content: "⋯"; font-size: 14px; }
.i-share::before { content: "📤"; font-size: 14px; }
.i-bookmark::before { content: "🔖"; font-size: 14px; }
.i-thumbs-up::before { content: "👍"; font-size: 14px; }
.i-message::before { content: "💬"; font-size: 14px; }
.i-tag::before { content: "🏷️"; font-size: 14px; }
.i-folder::before { content: "📁"; font-size: 14px; }
.i-globe::before { content: "🌐"; font-size: 14px; }
.i-setting::before { content: "⚙️"; font-size: 14px; }

/* iconfont 兼容（显示方块的兜底） */
.iconfont,
[class^="icon-"],
[class*=" icon-"] {
    font-style: normal;
}
.iconfont.icon-search::before { content: "🔍"; font-size: 14px; }
.iconfont.icon-user::before { content: "👤"; font-size: 14px; }
.iconfont.icon-hot::before { content: "🔥"; font-size: 14px; }
.iconfont.icon-star::before { content: "⭐"; font-size: 14px; }
.iconfont.icon-heart::before { content: "❤️"; font-size: 14px; }
.iconfont.icon-eye::before { content: "👁️"; font-size: 14px; }
.iconfont.icon-clock::before { content: "⏰"; font-size: 14px; }
.iconfont.icon-home::before { content: "🏠"; font-size: 14px; }
.iconfont.icon-link::before { content: "🔗"; font-size: 14px; }
.iconfont.icon-sun::before { content: "☀️"; font-size: 14px; }
.iconfont.icon-moon::before { content: "🌙"; font-size: 14px; }
.iconfont.icon-arrow-up::before { content: "⬆️"; font-size: 14px; }
.iconfont.icon-arrow-down::before { content: "⬇️"; font-size: 14px; }
.iconfont.icon-close::before { content: "✕"; font-size: 14px; }
.iconfont.icon-menu::before { content: "☰"; font-size: 16px; }
.iconfont.icon-share::before { content: "📤"; font-size: 14px; }
.iconfont.icon-bookmark::before { content: "🔖"; font-size: 14px; }
.iconfont.icon-thumbs-up::before { content: "👍"; font-size: 14px; }
.iconfont.icon-message::before { content: "💬"; font-size: 14px; }
.iconfont.icon-tag::before { content: "🏷️"; font-size: 14px; }
.iconfont.icon-folder::before { content: "📁"; font-size: 14px; }
.iconfont.icon-globe::before { content: "🌐"; font-size: 14px; }

/* ==================== 布局容器 ==================== */
.container-body {
    padding-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

.switch-container {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 20px;
}

.wrapper {
    display: flex;
    gap: 20px;
}

/* ==================== 头部样式 ==================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
}

.header-nav {
    height: var(--header-height);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-header);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.container-header {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
}

.nav-top {
    display: flex;
    align-items: center;
    height: 100%;
}

.header-center {
    justify-content: flex-start;
}

.navbar-logo {
    display: flex;
    align-items: center;
    margin-right: 24px;
}

.navbar-logo img {
    height: 32px;
    width: auto;
}

.logo-expanded {
    display: flex;
    align-items: center;
    text-decoration: none;
}

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

/* 头部菜单 */
.navbar-header-menu {
    flex: 1;
    display: flex;
    align-items: center;
}

.navbar-header {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-header > li {
    position: relative;
    margin: 0;
}

.navbar-header > li > a {
    display: flex;
    align-items: center;
    height: var(--header-height);
    padding: 0 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.navbar-header > li > a:hover,
.navbar-header > li.current-menu-item > a,
.navbar-header > li.current_page_item > a {
    color: var(--theme-color);
    border-bottom-color: var(--theme-color);
}

.navbar-header > li > a i {
    margin-right: 6px;
    font-size: 16px;
}

/* 子菜单 */
.navbar-header li.menu-item-has-children .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    display: none;
    list-style: none;
    z-index: 100;
}

.navbar-header li.menu-item-has-children:hover .sub-menu {
    display: block;
}

.navbar-header .sub-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    transition: var(--transition);
}

.navbar-header .sub-menu li a:hover {
    background: var(--bg-gray);
    color: var(--theme-color);
}

/* 头部右侧 */
.header-right {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 8px;
}

.btn-user-login,
.btn-search-toggle,
.btn-dark-mode {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.btn-user-login:hover,
.btn-search-toggle:hover,
.btn-dark-mode:hover {
    background: var(--bg-gray);
    color: var(--theme-color);
}

.user-entry,
.user-info {
    display: flex;
    align-items: center;
}

.btn-user-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* ==================== 主内容区 ==================== */
.site-main {
    padding: 20px 0 40px;
}

.main-content {
    flex: 1;
    min-width: 0;
}

/* ==================== 左侧侧边栏 ==================== */
.sidebar-left {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--header-height) + 20px);
    height: calc(100vh - var(--header-height) - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
}

.aside-body {
    position: relative;
}

.aside-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.aside-ul {
    list-style: none;
    padding: 10px;
    margin: 0;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.aside-item {
    margin-bottom: 2px;
}

.aside-btn {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-size: 14px;
}

.aside-btn:hover {
    background-color: var(--bg-gray);
    color: var(--theme-color);
}

.aside-btn.active {
    background-color: rgba(241, 64, 75, 0.1);
    color: var(--theme-color);
    font-weight: 500;
}

.aside-btn i {
    width: 22px;
    text-align: center;
    margin-right: 10px;
    font-size: 16px;
}

.aside-sub {
    list-style: none;
    padding: 0 0 0 32px;
    margin: 4px 0;
}

.aside-sub .aside-btn {
    padding: 8px 12px;
    font-size: 13px;
}

/* 移动端侧边栏 */
.mobile-sidebar-toggle {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-bottom: 12px;
}

@media (max-width: 991.98px) {
    .sidebar-left {
        display: none;
    }
    
    .mobile-sidebar-toggle {
        display: flex;
    }
    
    .mobile-sidebar-open .sidebar-left {
        display: block;
        position: fixed;
        left: 0;
        top: var(--header-height);
        bottom: 0;
        z-index: 999;
        background: var(--bg-body);
        width: 260px;
        padding: 10px;
        box-shadow: var(--shadow-lg);
        height: calc(100vh - var(--header-height));
    }
    
    .mobile-sidebar-overlay {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }
    
    .mobile-sidebar-open .mobile-sidebar-overlay {
        display: block;
    }
}

/* ==================== 搜索模块 ==================== */
.search-module {
    margin-bottom: 24px;
}

.search-box-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.search-group {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.search-group::-webkit-scrollbar {
    display: none;
}

.search-term {
    padding: 10px 18px;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    font-size: 14px;
    margin-bottom: -1px;
    flex-shrink: 0;
}

.search-term:hover {
    color: var(--theme-color);
}

.search-term.active {
    color: var(--theme-color);
    border-bottom-color: var(--theme-color);
    font-weight: 500;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.search-key {
    flex: 1;
    height: 46px;
    padding: 0 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--bg-body);
    color: var(--text-primary);
    transition: var(--transition);
}

.search-key:focus {
    outline: none;
    border-color: var(--theme-color);
    box-shadow: 0 0 0 3px rgba(241, 64, 75, 0.1);
    background: var(--bg-card);
}

.search-submit-btn {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.search-submit-btn:hover {
    background: var(--theme-color-dark);
    transform: translateY(-1px);
}

/* 搜索建议 */
.search-smart-tips {
    position: absolute;
    top: 100%;
    left: 0;
    right: 56px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 6px;
    z-index: 100;
    display: none;
    overflow: hidden;
}

.search-smart-tips.show {
    display: block;
}

.search-smart-tips ul {
    list-style: none;
    padding: 4px 0;
    margin: 0;
}

.search-smart-tips li {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.search-smart-tips li:hover,
.search-smart-tips li.selected {
    background: var(--bg-gray);
    color: var(--theme-color);
}

/* ==================== 热门标签 ==================== */
.hot-tags-module {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.hot-tags-module .tag-label {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 13px;
}

.hot-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-card);
    border-radius: 999px;
    font-size: 12px;
    color: var(--text-secondary);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.hot-tag:hover {
    background: var(--theme-color);
    color: #fff;
}

.btn-hot-entry {
    margin-left: auto;
    color: var(--theme-color);
    font-size: 13px;
}

/* ==================== 模块标题 ==================== */
.module-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.module-title,
.tab-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.module-title i {
    font-size: 18px;
}

.module-more {
    margin-left: auto;
}

.btn-more {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-more:hover {
    color: var(--theme-color);
}

/* Tab 切换 */
.module-tabs {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.sort-btn,
.tab-btn {
    padding: 6px 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sort-btn:hover,
.tab-btn:hover {
    color: var(--theme-color);
    background: var(--bg-gray);
}

.sort-btn.active,
.tab-btn.active {
    color: var(--theme-color);
    font-weight: 500;
}

/* ==================== 网址卡片网格 ==================== */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

@media (max-width: 1400px) {
    .sites-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 1200px) {
    .sites-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 992px) {
    .sites-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .sites-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 576px) {
    .sites-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==================== 网址卡片 - 默认样式 ==================== */
.sites-item {
    position: relative;
}

.sites-body {
    display: block;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 14px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.sites-body:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.sites-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.item-media {
    position: relative;
    flex-shrink: 0;
}

.blur-img-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    opacity: 0.5;
    z-index: 0;
}

.item-image {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    overflow: hidden;
    z-index: 1;
    background: var(--bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sites-icon,
.fill-cover {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.item-body {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.item-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* 行数限制 */
.line1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line2 {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 卡片底部 */
.item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.item-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.item-actions {
    display: flex;
    gap: 4px;
}

.like-btn,
.favorite-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.like-btn:hover,
.favorite-btn:hover,
.like-btn.active,
.favorite-btn.active {
    color: var(--theme-color);
    background: rgba(241, 64, 75, 0.1);
}

/* ==================== 网址卡片 - 大图样式 ==================== */
.site-card-max {
    display: block;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

.site-card-max:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.site-card-max .card-thumb {
    position: relative;
    padding-top: 60%;
    background: var(--bg-gray);
    overflow: hidden;
}

.site-card-max .card-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.site-card-max:hover .card-thumb img {
    transform: scale(1.05);
}

.site-card-max .card-body {
    padding: 12px;
}

.site-card-max .card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}

.site-card-max .card-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

/* ==================== 分类模块 ==================== */
.module-section {
    margin-bottom: 36px;
}

.module-section .module-body {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

/* ==================== 右侧工具栏 ==================== */
.tools-right {
    position: fixed;
    right: 24px;
    bottom: 120px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tools-left {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 100;
}

.btn-tools {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.btn-tools:hover {
    box-shadow: var(--shadow-md);
    color: var(--theme-color);
    transform: translateY(-2px);
}

.go-to-up {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
}

.go-to-up.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.switch-dark-mode .mode-ico {
    transition: transform 0.3s ease;
}

.switch-dark-mode:hover .mode-ico {
    transform: rotate(180deg);
}

/* 用户头像按钮 */
.btn-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    padding: 0;
}

.btn-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==================== 页脚 ==================== */
.main-footer {
    background: var(--bg-card);
    padding: 40px 0 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .footer-widgets {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

.footer-logo {
    margin-bottom: 12px;
}

.footer-logo img {
    height: 36px;
}

.footer-about p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.footer-social {
    display: flex;
    gap: 8px;
}

.social-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gray);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-btn:hover {
    background: var(--theme-color);
    color: #fff;
    transform: translateY(-2px);
}

.footer-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

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

.footer-nav-list li {
    margin-bottom: 8px;
}

.footer-nav-list a {
    color: var(--text-secondary);
    font-size: 13px;
    transition: var(--transition);
}

.footer-nav-list a:hover {
    color: var(--theme-color);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--text-muted);
}

.footer-bottom a:hover {
    color: var(--theme-color);
}

/* ==================== 小工具 ==================== */
.widget {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 关于网站小工具 */
.widget-about-cover {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    padding: 20px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--theme-color), var(--theme-color-dark));
    color: #fff;
}

.widget-about-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    background: #fff;
}

.widget-about-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.widget-about-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.widget-about-desc {
    font-size: 12px;
    opacity: 0.9;
}

.widget-social {
    display: flex;
    justify-content: space-around;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* 排行榜小工具 */
.widget-ranking li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.widget-ranking li:last-child {
    border-bottom: none;
}

.ranking-num {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.ranking-num.top-1 { background: #ff4d4f; color: #fff; }
.ranking-num.top-2 { background: #ff7a45; color: #fff; }
.ranking-num.top-3 { background: #faad14; color: #fff; }

.ranking-body {
    flex: 1;
    min-width: 0;
}

.ranking-title {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.ranking-meta {
    font-size: 11px;
    color: var(--text-muted);
}

/* 标签云小工具 */
.widget-tag-cloud .tag-item {
    display: inline-block;
    padding: 6px 12px;
    background: var(--bg-gray);
    border-radius: 999px;
    margin: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.widget-tag-cloud .tag-item:hover {
    background: var(--theme-color);
    color: #fff;
    transform: translateY(-1px);
}

/* ==================== 按钮样式 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
}

.btn-primary,
.btn-vc {
    background: var(--theme-color);
    color: #fff;
    border-color: var(--theme-color);
}

.btn-primary:hover,
.btn-vc:hover {
    background: var(--theme-color-dark);
    border-color: var(--theme-color-dark);
    color: #fff;
}

.btn-outline-secondary {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-outline-secondary:hover {
    border-color: var(--theme-color);
    color: var(--theme-color);
}

.btn-outline-primary {
    background: transparent;
    border-color: var(--theme-color);
    color: var(--theme-color);
}

.btn-outline-primary:hover {
    background: var(--theme-color);
    color: #fff;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.vc-theme {
    background: var(--theme-color);
    color: #fff;
}

.vc-theme:hover {
    background: var(--theme-color-dark);
    color: #fff;
}

/* ==================== 分页 ==================== */
.pagination-wrapper {
    text-align: center;
    margin-top: 30px;
}

.page-numbers {
    display: inline-flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-numbers li a,
.page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.page-numbers li a:hover,
.page-numbers li span.current {
    background: var(--theme-color);
    color: #fff;
}

/* ==================== 模态框 ==================== */
.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 20px;
}

.btn-close {
    filter: none;
    opacity: 0.5;
}

body.dark-mode .btn-close {
    filter: invert(1);
}

/* 登录表单 */
.login-form .form-group {
    margin-bottom: 16px;
}

.login-form .form-control {
    height: 44px;
}

.login-form .text-sm {
    font-size: 13px;
}

/* ==================== 表单 ==================== */
.form-control {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--bg-body);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--theme-color);
    box-shadow: 0 0 0 3px rgba(241, 64, 75, 0.1);
    background: var(--bg-card);
}

.form-group {
    margin-bottom: 16px;
}

.form-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==================== 详情页 ==================== */
.single-layout {
    display: flex;
    gap: 20px;
}

.single-main {
    flex: 1;
    min-width: 0;
}

.single-sidebar {
    width: 300px;
    flex-shrink: 0;
}

@media (max-width: 992px) {
    .single-layout {
        flex-direction: column;
    }
    
    .single-sidebar {
        width: 100%;
    }
}

.site-header {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.site-header-top {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.site-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-gray);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.site-info {
    flex: 1;
    min-width: 0;
}

.site-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.site-url {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    word-break: break-all;
}

.site-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* SEO 权重 */
.seo-weights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.seo-weight {
    padding: 6px 12px;
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
}

.seo-weight strong {
    color: var(--theme-color);
    font-weight: 600;
    margin-left: 4px;
}

/* 文章内容 */
.site-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.entry-content {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-primary);
}

.entry-content p {
    margin-bottom: 16px;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

/* 相关推荐 */
.related-sites {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.related-sites h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

/* ==================== 分类页 ==================== */
.archive-header {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.archive-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.archive-description {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 子分类 */
.sub-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.sub-cat-item {
    padding: 6px 14px;
    background: var(--bg-gray);
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.sub-cat-item:hover,
.sub-cat-item.active {
    background: var(--theme-color);
    color: #fff;
}

/* ==================== 搜索结果页 ==================== */
.search-header {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.search-results-title {
    font-size: 16px;
    font-weight: 600;
}

.search-results-title strong {
    color: var(--theme-color);
}

/* ==================== 404页面 ==================== */
.error-404 {
    text-align: center;
    padding: 80px 20px;
}

.error-404 .code {
    font-size: 120px;
    font-weight: 700;
    color: var(--theme-color);
    line-height: 1;
    margin-bottom: 20px;
}

.error-404 h1 {
    font-size: 24px;
    margin-bottom: 12px;
}

.error-404 p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ==================== 工具类 ==================== */
.text-hide {
    font: 0/0 a;
    color: transparent;
    text-shadow: none;
    background-color: transparent;
    border: 0;
}

.d-none { display: none !important; }
.d-flex { display: flex !important; }
.d-block { display: block !important; }

.flex-fill { flex: 1 1 auto !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }

.ml-auto { margin-left: auto !important; }
.mr-auto { margin-right: auto !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }
.mb-4 { margin-bottom: 32px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }

.me-2 { margin-right: 8px !important; }
.ms-2 { margin-left: 8px !important; }

.text-center { text-align: center !important; }
.text-muted { color: var(--text-muted) !important; }
.text-danger { color: var(--theme-color) !important; }
.text-primary { color: var(--theme-color) !important; }
.text-sm { font-size: 12px !important; }

.h-100 { height: 100% !important; }
.w-100 { width: 100% !important; }

.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }

.no-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.no-scrollbar::-webkit-scrollbar { display: none; }

.overflow-y-auto { overflow-y: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-hidden { overflow: hidden; }

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==================== 懒加载 ==================== */
.lazy,
.lazy-bg {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy.loaded,
.lazy-bg.loaded {
    opacity: 1;
}

/* ==================== 动画 ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.4s ease forwards;
}

/* ==================== 毛玻璃效果 ==================== */
.blur-bg {
    background-color: var(--bg-header);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}

/* ==================== 响应式显示 ==================== */
@media (min-width: 992px) {
    .d-lg-block { display: block !important; }
    .d-lg-none { display: none !important; }
    .d-lg-flex { display: flex !important; }
}

@media (min-width: 768px) {
    .d-md-block { display: block !important; }
    .d-md-none { display: none !important; }
    .d-md-flex { display: flex !important; }
}

@media (min-width: 576px) {
    .d-sm-block { display: block !important; }
    .d-sm-none { display: none !important; }
}
