/*
Theme Name: NavAi导航主题-Pro
Theme URI: https://faxianai.com
Author: 老九
Author URI: https://faxianai.com
Description: A modern directory theme for AI tools and resources, featuring card-based layout, sidebar category navigation, and multi-engine search.
Version: 2.6.25
Theme Slug: navai
Requires at least: 5.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: navai
Domain Path: /languages
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, ai, navigation, directory
*/

/* ========================================
   1. CSS Variables
   ======================================== */
:root {
    --primary-color: #E53935;
    --primary-hover: #C62828;
    --primary-light: #FFEBEE;
    --primary-50: #FFEBEE;
    --primary-100: #FFCDD2;
    --primary-600: #E53935;
    --white: #FFFFFF;
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-400: #BDBDBD;
    --gray-500: #9E9E9E;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --header-height: 60px;
    --sidebar-width: 200px;
    --sidebar-collapsed-width: 56px;
    --container-max-width: 1400px;
}

/* ========================================
   2. Reset & Base
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button, input {
    font-family: inherit;
    border: none;
    outline: none;
    background: transparent;
}

button {
    cursor: pointer;
}

/* ========================================
   3. Layout
   ======================================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 16px;
}

.main-wrapper {
    padding: 24px 0;
    width: 100%;
    max-width: 100%;
}

.site-main {
    width: 100%;
    max-width: 100%;
}

/* ========================================
   4. Header - Mobile First
   ======================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

/* Mobile Header */
.header-mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 4px;
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    color: var(--gray-700);
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.mobile-menu-btn i,
.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

/* SVG 图标及内部子元素不拦截点击，让事件传递到父元素 */
.mobile-menu-btn svg,
.mobile-menu-btn svg *,
.sidebar-collapse svg,
.sidebar-collapse svg *,
.sidebar-collapse span,
.sidebar-collapsed-bar svg,
.sidebar-collapsed-bar svg *,
.collapsed-bar-expand svg,
.collapsed-bar-expand svg * {
    pointer-events: none !important;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex: 1;
    justify-content: center;
}

.logo-text-wrap {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #E53935 0%, #FF6B6B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    line-height: 1.2;
}

.logo-domain {
    font-size: 10px;
    color: var(--gray-500);
    letter-spacing: 1px;
}

.tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    color: var(--gray-700);
    flex-shrink: 0;
}

.tool-btn i {
    width: 22px;
    height: 22px;
}

/* Desktop Header - Hidden by default */
.header-desktop {
    display: none;
}

/* Mobile Search Section */
.mobile-search-section {
    display: block;
    background: var(--white);
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
}

/* Desktop Search Section */
.desktop-search-section {
    display: none;
    background: var(--white);
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 20px;
}

.search-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 12px;
}

.search-tab {
    font-size: 14px;
    color: var(--gray-600);
    cursor: pointer;
    padding-bottom: 4px;
    position: relative;
    background: none;
    border: none;
    font-family: inherit;
}

.search-tab.active {
    color: var(--gray-900);
    font-weight: 500;
}

.search-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--gray-900);
    border-radius: 2px;
}

.mobile-search-box {
    margin-bottom: 12px;
}

.mobile-search-box form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-search-box input {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
}

.mobile-search-box button {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E53935;
    color: var(--white);
    border-radius: 8px;
    flex-shrink: 0;
}

.mobile-search-box button i {
    width: 20px;
    height: 20px;
}

.search-engines {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.search-engine {
    font-size: 13px;
    color: var(--gray-600);
    cursor: pointer;
    text-decoration: none;
}

.search-engine.active {
    color: var(--gray-900);
    font-weight: 500;
}

/* ========================================
   5. Desktop Header (min-width: 769px)
   ======================================== */
@media (min-width: 1025px) {
    .site-header {
        height: 60px;
    }

    .header-container {
        padding: 0 20px;
    }

    .header-mobile-top,
    .mobile-search-section {
        display: none;
    }

    /* 桌面端搜索区域显示 */
    .desktop-search-section {
        display: block;
    }

    .header-desktop {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 100%;
    }

    .header-brand {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .desktop-menu-toggle {
        display: flex;
    }

    /* 详情页：桌面端显示汉堡菜单（用 body 类驱动，按钮不在 .detail-page 内部） */
    body.navai-detail-view .desktop-menu-toggle {
        display: flex;
    }

    .header-brand .header-logo {
        text-decoration: none;
    }

    .header-brand .logo-text {
        font-size: 22px;
        font-weight: 700;
        background: linear-gradient(135deg, #E53935 0%, #FF6B6B 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        white-space: nowrap;
    }

    .header-stats {
        font-size: 13px;
        color: var(--gray-500);
    }

    .header-nav {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 4px;
        background: var(--gray-100);
        border-radius: 24px;
        border: 1px solid var(--gray-200);
    }

    .nav-item {
        display: flex;
        align-items: center;
        padding: 8px 18px;
        font-size: 14px;
        font-weight: 500;
        color: var(--gray-600);
        border-radius: 20px;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        white-space: nowrap;
        position: relative;
        text-decoration: none;
        letter-spacing: 0.01em;
    }

    .nav-item:hover {
        background: var(--white);
        color: var(--gray-900);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        transform: translateY(-1px);
    }

    .nav-item-hot {
        color: var(--primary-color);
        font-weight: 600;
    }

    .nav-item-hot::after {
        content: '';
        display: inline-block;
        width: 6px;
        height: 6px;
        background: var(--primary-color);
        border-radius: 50%;
        margin-left: 6px;
        animation: pulse-dot 2s ease-in-out infinite;
    }

    @keyframes pulse-dot {
        0%, 100% { opacity: 1; transform: scale(1); }
        50% { opacity: 0.6; transform: scale(0.8); }
    }

    .nav-item-hot:hover {
        background: var(--primary-light);
        color: var(--primary-hover);
    }

    .nav-item-current {
        background: var(--white);
        color: var(--gray-900);
        font-weight: 600;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }

    .nav-item-current::before {
        content: '';
        position: absolute;
        bottom: 4px;
        left: 50%;
        transform: translateX(-50%);
        width: 16px;
        height: 3px;
        background: var(--primary-color);
        border-radius: 2px;
    }

    .header-search {
        position: relative;
    }

    .header-search form {
        display: flex;
        align-items: center;
    }

    .header-search input {
        width: 200px;
        padding: 8px 36px 8px 16px;
        font-size: 14px;
        background: var(--gray-100);
        border: 1px solid var(--gray-200);
        border-radius: 20px;
        transition: all 0.2s;
    }

    .header-search input:focus {
        width: 260px;
        background: var(--white);
        border-color: var(--primary-color);
    }

    .header-search button {
        position: absolute;
        right: 4px;
        top: 50%;
        transform: translateY(-50%);
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--gray-500);
        border-radius: 50%;
    }

    .header-search button i {
        width: 16px;
        height: 16px;
    }
}

/* ========================================
   6. Sidebar
   ======================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: calc(var(--header-height) + 16px);
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height) - 16px);
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    transition: transform 0.3s ease;
}

/* 侧边栏收起 - 完全隐藏，由独立图标栏取代 */
.sidebar.collapsed {
    transform: translateX(-100%);
    pointer-events: none;
}

/* 收起状态的图标栏（独立元素，侧边栏收起时显示） */
.sidebar-collapsed-bar {
    display: none;
    position: fixed;
    left: 0;
    top: calc(var(--header-height) + 16px);
    width: var(--sidebar-collapsed-width);
    height: calc(100vh - var(--header-height) - 16px);
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    z-index: 101;
    overflow: hidden;
    padding: 8px 0;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    pointer-events: auto;
}

.sidebar-collapsed-bar.visible {
    display: flex;
}

/* 收起栏顶部：展开按钮（固定，始终可见） */
.collapsed-bar-expand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 4px;
    border-radius: 10px;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.collapsed-bar-expand:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.collapsed-bar-expand i {
    width: 18px;
    height: 18px;
}

/* 收起栏中间：图标列表（可滚动） */
.collapsed-bar-icons {
    flex: 1;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.collapsed-bar-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--gray-600);
    transition: all 0.2s;
    text-decoration: none;
    flex-shrink: 0;
}

.collapsed-bar-item:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.collapsed-bar-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
}

.collapsed-bar-item i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* 展开按钮 - 已由收起状态图标栏取代，始终隐藏 */
.sidebar-expand-btn {
    display: none !important;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

/* Sidebar Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-weight: 500;
    text-decoration: none;
}

.sidebar-item:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.sidebar-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar-item i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-item span {
    flex: 1;
    font-size: 14px;
}

.sidebar-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
    color: var(--gray-400);
}

/* Submenu - hidden by default, absolute positioned to avoid layout shift */
.sidebar-submenu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    padding-left: 28px;
    padding-right: 12px;
    margin-left: 0;
    border-left: 2px solid var(--gray-200);
    background: var(--white);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.sidebar-item-wrapper {
    position: relative;
}

.sidebar-item-wrapper.open .sidebar-submenu {
    display: block;
    padding-top: 4px;
    padding-bottom: 4px;
}

.sidebar-item-wrapper.open .sidebar-arrow {
    transform: rotate(180deg);
}

.sidebar-submenu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-radius: 8px;
    color: var(--gray-500);
    font-size: 13px;
    transition: all 0.2s;
    text-decoration: none;
}

.sidebar-submenu-item:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.sidebar-submenu-item.active {
    color: var(--primary-color);
}

.sidebar-submenu-item i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Sidebar Collapse Button */
.sidebar-collapse {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    margin-top: 8px;
    border-top: none;
    color: var(--gray-500);
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
    white-space: nowrap;
}

.sidebar-collapse:hover {
    color: var(--gray-700);
}

.sidebar-collapse i {
    width: 18px;
    height: 18px;
}

/* Sidebar Action Buttons - 底部操作按钮 */
.sidebar-actions {
    display: flex;
    flex-direction: row;
    gap: 6px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

.sidebar-action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px;
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-action-btn i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.sidebar-action-btn span {
    font-size: 11px;
    line-height: 1;
}

.sidebar-action-login,
.sidebar-action-register,
.sidebar-action-submit,
.sidebar-action-logout,
.sidebar-action-member {
    background: transparent;
    color: var(--gray-600);
}

.sidebar-action-login:hover,
.sidebar-action-register:hover,
.sidebar-action-submit:hover,
.sidebar-action-logout:hover,
.sidebar-action-member:hover {
    background: var(--gray-100);
    color: var(--gray-900);
    text-decoration: none;
}

/* 移动端隐藏收起状态图标栏 */
@media (max-width: 1024px) {
    .sidebar-collapsed-bar {
        display: none !important;
    }
}

/* 横屏小屏幕自动隐藏侧边栏 */
@media (max-width: 1024px) and (orientation: landscape) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: var(--shadow-lg);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: var(--shadow-lg);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        /* 底部留白：避免最后一张卡片被固定底栏遮挡 */
        padding-bottom: 72px;
    }
}

@media (min-width: 1025px) {
    .main-content {
        margin-left: var(--sidebar-width);
        margin-right: 0;
        max-width: calc(100% - var(--sidebar-width));
        width: calc(100% - var(--sidebar-width));
    }

    /* 侧边栏收起时主内容左边距调整 */
    body.sidebar-collapsed .main-content {
        margin-left: var(--sidebar-collapsed-width);
        max-width: calc(100% - var(--sidebar-collapsed-width));
        width: calc(100% - var(--sidebar-collapsed-width));
    }

    /* 详情页：桌面端主内容无左边距（侧边栏为覆盖式） */
    .detail-page {
        margin-left: 0;
    }

    /* 无论侧边栏是否收起，详情页主内容始终全宽（覆盖式侧边栏不挤压内容） */
    body.navai-detail-view .main-content.detail-page {
        margin-left: 0;
        max-width: 100%;
        width: 100%;
    }

    /* 详情页：桌面端侧边栏默认隐藏（用 body 类驱动，避免依赖 DOM 顺序导致"弹不出来/位置错乱"） */
    body.navai-detail-view .sidebar {
        transform: translateX(-100%);
    }
    body.navai-detail-view.navai-detail-open .sidebar {
        transform: translateX(0) !important;
    }
}

/* 横屏小屏幕：侧边栏收起时主内容无左边距 */
@media (max-width: 1024px) and (orientation: landscape) {
    .sidebar.collapsed ~ .main-content,
    .main-content {
        margin-left: 0;
    }
}

/* ========================================
   7. Main Content
   ======================================== */
.category-section {
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--gray-800);
    border-radius: 8px;
    color: var(--white);
    flex-shrink: 0;
}

.section-icon i {
    width: 16px;
    height: 16px;
}

.section-more {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--gray-500);
}

.section-more i {
    width: 16px;
    height: 16px;
}

/* Site Count */
.site-count {
    font-size: 13px;
    color: var(--gray-500);
    white-space: nowrap;
}

/* Subcategory Tabs */
.subcategory-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.subcategory-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    font-size: 14px;
    color: var(--gray-600);
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.subcategory-tab:hover {
    background: var(--gray-200);
}

.subcategory-tab.active {
    background: var(--primary-color);
    color: var(--white);
}

.subcategory-tab.active .section-icon {
    background: rgba(255, 255, 255, 0.25);
}

.subcategory-tab.tab-parent {
    font-weight: 600;
}

.subcategory-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
    flex-shrink: 0;
}

.subcategory-more:hover {
    background: var(--primary-light);
}

/* Sites Grid - 左右结构布局 */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

/* Card Grid - 搜索/AJAX加载 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

/* 卡片最小宽度约束 + 内容裁切，防止长标题/描述撑破布局 */
.ai-card {
    min-width: 0;
    overflow: hidden;
}

@media (min-width: 1025px) and (max-width: 1300px) {
    .sites-grid,
    .card-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

    .ai-card-right {
        padding-right: 26px;
    }
}

.ai-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    transition: all 0.2s;
    text-decoration: none;
}

.ai-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.ai-card-left {
    flex-shrink: 0;
}

.ai-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    overflow: hidden;
}

.ai-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ai-card-icon.no-bg {
    background: var(--gray-100);
    color: var(--gray-600);
}

.ai-card-icon.no-bg span {
    color: var(--gray-600);
}

.ai-card-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ai-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.ai-card-desc {
    font-size: 11px;
    color: var(--gray-500);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

/* Icon Colors - 黑白色系 */
.color-1 { background: #333333; }
.color-2 { background: #555555; }
.color-3 { background: #777777; }
.color-4 { background: #999999; }
.color-5 { background: #444444; }
.color-6 { background: #666666; }
.color-7 { background: #888888; }
.color-8 { background: #aaaaaa; }

/* More Sites Button */
.more-sites {
    margin-top: 20px;
    text-align: center;
}

.btn-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    font-size: 14px;
    color: var(--gray-600);
    background: var(--gray-100);
    border-radius: 20px;
    transition: all 0.2s;
}

.btn-more:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.btn-more i {
    width: 16px;
    height: 16px;
}

/* Loading Spinner */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Empty States */
.no-sites,
.no-categories {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.no-sites p,
.no-categories p {
    font-size: 16px;
}

.no-categories i {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: var(--gray-400);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.2s;
}

.pagination a:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.pagination .current {
    background: var(--primary-color);
    color: var(--white);
}

.pagination i {
    width: 16px;
    height: 16px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.no-results i {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: var(--gray-400);
}

.no-results p {
    font-size: 16px;
}

/* ========================================
   8. Detail Page
   ======================================== */
.detail-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* Detail Header */
.detail-header {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.detail-header-main {
    flex: 1;
    min-width: 240px;
}

.detail-title-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.detail-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
    /* 标题超长时单行截断，超出部分省略，不换行 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 详情页主操作行：[打开网站] [收藏] [星级评分] 同一行 */
.detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.detail-actions .navai-rating-wrap {
    min-width: 200px;
}

.detail-actions .navai-rating-wrap .navai-rating-text {
    white-space: nowrap;
}

/* 详情页次操作行：[举报失效] [复制链接] [嵌入代码] [微博] */
.detail-actions-secondary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.detail-actions-secondary .detail-btn-plain {
    margin-left: 0;
}

/* 统一次操作行所有按钮的字体大小和图标尺寸 */
.detail-actions-secondary .navai-share-btn,
.detail-actions-secondary .navai-report-btn,
.detail-actions-secondary .detail-btn-plain {
    font-size: 13px;
    padding: 7px 14px;
}

.detail-actions-secondary .navai-share-btn i,
.detail-actions-secondary .navai-share-btn svg,
.detail-actions-secondary .navai-report-btn i,
.detail-actions-secondary .navai-report-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.detail-actions-secondary .navai-share-wrap {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.detail-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--gray-500);
}

.detail-meta-item i {
    width: 14px;
    height: 14px;
}

.detail-subtitle {
    font-size: 16px;
    font-weight: 400;
    color: var(--gray-600);
    margin: 12px 0 16px;
    line-height: 1.5;
}

.detail-info-table {
    margin-bottom: 16px;
}

.detail-info-row {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--gray-600);
}

.detail-info-label {
    color: var(--gray-500);
    margin-right: 4px;
}

.detail-info-value {
    color: var(--gray-700);
}

.detail-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.detail-btn-primary:hover {
    background: var(--primary-hover);
    color: var(--white);
}

.detail-btn-primary i {
    width: 16px;
    height: 16px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 分类 + 标签同行排布：默认紧贴成一行，仅当总宽度超过可用占位宽度时才换行 */
.detail-tags-inline {
    flex-wrap: wrap;
    row-gap: 8px;
    min-width: 0;
    position: relative;
}

/* 文字承载器：去掉图标后，层级/语义改由字体与颜色表达 */
.detail-tag-label {
    line-height: 1;
}

.detail-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 6px;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.detail-tag:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

/* 详情页专用：分类/站点标签紧贴排布 + 去图标后用文字字体/颜色表达层级（不影响 Tag 总览页） */
.detail-tags-inline .detail-tag {
    padding: 2px 8px;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.detail-tags-inline .detail-cat-tag {
    background: var(--gray-100);
}
.detail-tags-inline .detail-cat-tag .detail-tag-label {
    color: var(--gray-700);
    font-weight: 600;
}
.detail-tags-inline .detail-cat-tag:hover .detail-tag-label {
    color: var(--gray-900);
}

.detail-tags-inline .detail-site-tag {
    background: var(--brand-light, #eef4ff);
    color: var(--brand, #1d4ed8);
}
.detail-tags-inline .detail-site-tag .detail-tag-label {
    color: var(--brand, #1d4ed8);
    font-weight: 600;
}
.detail-tags-inline .detail-site-tag:hover {
    background: var(--brand, #1d4ed8);
    color: #ffffff;
}
.detail-tags-inline .detail-site-tag:hover .detail-tag-label {
    color: #ffffff;
}

.detail-tag i {
    width: 14px;
    height: 14px;
}

/* 兼容旧版：.detail-site-tags 容器里的标签 */
.detail-site-tags .detail-site-tag .detail-tag-label {
    color: var(--brand, #1a56db);
    font-weight: 600;
}

/* Detail Preview */
.detail-preview {
    width: 320px;
    flex-shrink: 0;
    min-width: 0;
}

.detail-preview-body {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.detail-favicon {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 13px;
    color: var(--gray-600);
    min-width: 0;
}

.detail-favicon img,
.detail-favicon i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border-radius: 4px;
}

.detail-favicon span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.detail-screenshot {
    position: relative;
    aspect-ratio: 456/300;
    background: var(--gray-100);
    overflow: hidden;
}

.detail-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-screenshot-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.detail-preview-btn {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 20px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--radius-full);
    font-size: 13px;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
}

.detail-preview-btn:hover {
    background: var(--primary-hover);
    color: var(--white);
}

/* Detail Content */
.detail-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

/* 右侧预览图+广告容器 */
.detail-preview-wrap {
    display: flex;
    flex-direction: row;
    gap: 16px;
    flex-shrink: 0;
    align-items: center;
}

/* 广告位 */
.detail-header-ad {
    width: 320px;
    height: 248px;
    flex-shrink: 0;
    min-width: 0;
}

.detail-header-ad-inner {
    width: 100%;
    height: 100%;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-header-ad-inner > * {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-header-ad-inner img,
.detail-header-ad-inner iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

.detail-article {
    font-size: 15px;
    line-height: 1.8;
    color: var(--gray-700);
}

.detail-article h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-200);
}

.detail-article h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 24px 0 12px;
}

.detail-article p {
    margin-bottom: 12px;
}

.detail-article a {
    color: var(--primary-color);
    text-decoration: none;
}

.detail-article a:hover {
    text-decoration: underline;
}

/* Detail Related */
.detail-related {
    margin-bottom: 24px;
}

.detail-related-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.detail-related-title i {
    width: 20px;
    height: 20px;
}

.detail-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.detail-related-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 12px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: all 0.2s;
    min-width: 0;
    width: 100%;
}

.detail-related-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.detail-related-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.detail-related-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-related-icon span {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-600);
}

.detail-related-icon.no-bg {
    background: var(--gray-100);
}

.detail-related-body {
    width: 100%;
    min-width: 0;
}

.detail-related-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.detail-related-desc {
    font-size: 12px;
    color: var(--gray-500);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Detail Body Layout */
.detail-body {
    display: flex;
    gap: 24px;
}

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

.detail-sidebar {
    width: 280px;
    flex-shrink: 0;
}

/* Detail Ranking */
.detail-ranking {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.detail-ranking-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.detail-ranking-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.detail-ranking-title i {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.detail-ranking-list {
    padding: 8px 0;
}

.detail-ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    transition: background 0.15s;
}

.detail-ranking-item:hover {
    background: var(--gray-50);
}

.detail-ranking-num {
    width: 20px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-400);
    flex-shrink: 0;
}

.detail-ranking-item:nth-child(1) .detail-ranking-num { color: #f59e0b; }
.detail-ranking-item:nth-child(2) .detail-ranking-num { color: #9ca3af; }
.detail-ranking-item:nth-child(3) .detail-ranking-num { color: #b45309; }

.detail-ranking-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.detail-ranking-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-ranking-icon span {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
}

.detail-ranking-icon.no-bg {
    background: var(--gray-100);
}

/* Detail Sidebar Sticky Wrapper */
.detail-sidebar-sticky {
    position: sticky;
    top: 80px;
}

/* Detail Sidebar Ad */
.detail-sidebar-ad {
    margin-top: 16px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.detail-sidebar-ad:empty {
    display: none;
}

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

.detail-ranking-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-900);
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-ranking-desc {
    font-size: 11px;
    color: var(--gray-500);
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Detail Comments */
.detail-comments {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-top: 24px;
}

.detail-comments-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 20px;
}

.detail-comments-title i {
    width: 20px;
    height: 20px;
}

.detail-comments-count {
    font-size: 14px;
    font-weight: 400;
    color: var(--gray-500);
}

.detail-comments-closed {
    text-align: center;
    color: var(--gray-500);
    padding: 20px;
}

/* Comments Area */
.comments-area {
    margin-top: 16px;
}

.comments-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

/* Comment List - flat list for top level */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.comment-list > .comment {
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-200);
}

.comment-list > .comment:last-child {
    border-bottom: none;
}

/* Nested children list */
.comment-list .children {
    list-style: none;
    padding: 0;
    margin: 0 0 0 48px;
}

.comment-list .children > .comment {
    padding: 12px 0;
    border-bottom: none;
    border-top: none;
}

/* Depth-based background tinting for nesting */
.comment-list .depth-1 {
    /* top level - no tint */
}

.comment-list .children .depth-2 {
    background: rgba(0, 0, 0, 0.015);
    border-radius: 8px;
    padding: 12px 12px;
    margin-top: 4px;
}

.comment-list .children .children .depth-3 {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    padding: 12px 12px;
    margin-top: 4px;
}

.comment-list .children .children .children .depth-4 {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    padding: 12px 12px;
    margin-top: 4px;
}

.comment-list .children .children .children .children .depth-5 {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 12px 12px;
    margin-top: 4px;
}

/* Comment Body */
.comment-body {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

/* Avatar + Author name column */
.comment-author-info {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 40px;
}

/* Avatar */
.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background: var(--gray-100);
}

.comment-author-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-800);
    font-style: normal;
    word-break: break-all;
    text-align: center;
    max-width: 48px;
    line-height: 1.3;
}

/* Comment main area (content + info bar) */
.comment-main {
    flex: 1;
    min-width: 0;
}

/* Comment Content */
.comment-content {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.7;
}

.comment-content p {
    margin: 0 0 6px;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.comment-content a {
    color: var(--primary-color);
    word-break: break-all;
}

/* Info bar below content: date, UA, location, reply */
.comment-awaiting-moderation {
    font-size: 13px;
    color: var(--primary-color);
    font-style: italic;
    margin-bottom: 8px;
}

.comment-info-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--gray-400);
    line-height: 1.5;
}

.comment-info-bar::before {
    content: '';
    display: inline-block;
    width: 1px;
    height: 12px;
    background: var(--gray-300);
    margin-right: 0;
}

.comment-date {
    color: var(--gray-400);
    text-decoration: none;
}

.comment-date:hover {
    color: var(--gray-600);
}

.comment-ua {
    color: var(--gray-400);
}

.comment-location {
    color: var(--gray-400);
}

.comment-location::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--gray-400);
    border-radius: 50%;
    margin-right: 3px;
    vertical-align: middle;
    opacity: 0.5;
}

.edit-link {
    font-size: 12px;
}

.edit-link a {
    color: var(--gray-400);
    text-decoration: none;
}

.reply-link a {
    color: var(--primary-color);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.reply-link a:hover {
    opacity: 1;
    text-decoration: none;
}

/* Comment Form */
.comment-respond {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.comment-reply-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 16px;
}

.comment-reply-title small {
    margin-left: 8px;
    font-size: 13px;
    font-weight: 400;
}

.comment-reply-title small a {
    color: var(--gray-500);
    text-decoration: none;
}

.reply-context {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-left: 3px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 16px;
}

.reply-context-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.reply-context-label svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.reply-context-author {
    color: var(--gray-900);
    font-weight: 600;
}

.reply-context-content {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.5;
    padding-left: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-form-comment textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.comment-form-comment textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

/* Comment form row - nickname and email side by side */
.comment-form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
}

.comment-form-row .comment-form-author,
.comment-form-row .comment-form-email {
    flex: 1;
    margin: 0;
}

.comment-form-row label {
    display: block;
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.comment-form-row .required {
    color: #e53e3e;
}

.comment-form-row input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.comment-form-row input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

/* Logged in user message */
.comment-form-logged-in {
    margin-bottom: 12px;
    padding: 10px 12px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.comment-form-logged-in p {
    margin: 0;
    font-size: 14px;
    color: var(--gray-600);
}

.comment-form-logged-in a {
    color: var(--primary-color);
    text-decoration: none;
}

.comment-form-logged-in a:hover {
    text-decoration: underline;
}

.form-submit {
    display: flex;
    justify-content: flex-end;
}

.form-submit .submit {
    padding: 10px 24px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.form-submit .submit:hover {
    background: var(--primary-hover);
}

.no-comments {
    text-align: center;
    color: var(--gray-500);
    padding: 20px;
}

/* Comment Login Notice - 重定向回来的提示条 */
.navai-comment-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: var(--primary-light);
    border: 1px solid var(--primary-100);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--primary-hover);
}

.navai-comment-notice svg {
    flex-shrink: 0;
    color: var(--primary-color);
}

.navai-comment-notice span {
    flex: 1;
}

.navai-comment-notice-login {
    flex-shrink: 0;
    padding: 6px 16px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.navai-comment-notice-login:hover {
    background: var(--primary-hover);
    color: var(--white);
    text-decoration: none;
}

/* Comment Must Login - 登录提示卡片 */
.comment-must-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 24px;
    text-align: center;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.comment-must-login-icon {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
    opacity: 0.8;
}

.comment-must-login-text {
    font-size: 15px;
    color: var(--gray-600);
    margin-bottom: 20px;
    line-height: 1.5;
}

.comment-must-login-btn {
    display: inline-block;
    padding: 10px 32px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
    min-width: 120px;
}

.comment-must-login-btn:hover {
    background: var(--primary-hover);
    color: var(--white);
    text-decoration: none;
}

.comment-must-login-register {
    margin-top: 12px;
    font-size: 13px;
    color: var(--gray-500);
    text-decoration: none;
    transition: color 0.2s;
}

.comment-must-login-register:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Mobile comment styles */
@media (max-width: 768px) {
    .comment-list .children {
        margin-left: 24px;
    }

    .comment-list .children .children {
        margin-left: 20px;
    }

    .comment-form-row {
        flex-direction: column;
        gap: 8px;
    }

    .comment-avatar {
        width: 32px;
        height: 32px;
    }

    .comment-list .children {
        margin-left: 32px;
    }
}

/* ========================================
   10. ai_tag 标签归档页（/navai-tag/{slug}/）
   ======================================== */
.tag-cloud {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.tag-cloud-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.tag-cloud-title svg {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.tag-cloud-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--gray-600);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.tag-cloud-item svg {
    width: 13px;
    height: 13px;
    color: var(--gray-400);
}

.tag-cloud-item em {
    font-style: normal;
    font-size: 11px;
    color: var(--gray-400);
    margin-left: 2px;
}

.tag-cloud-item:hover {
    background: var(--white);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tag-cloud-item.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.tag-cloud-item.active svg {
    color: var(--white);
}

.tag-cloud-item.active em {
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
    .tag-cloud {
        padding: 12px;
    }
    .tag-cloud-list {
        gap: 6px;
    }
}

/* 中等屏幕：全部上下排列，广告和缩略图自适应 */
@media (max-width: 960px) {
    .detail-header {
        flex-direction: column;
    }

    .detail-header-ad {
        width: 100%;
        height: auto;
    }

    .detail-header-ad-inner {
        width: 100%;
        height: auto;
        aspect-ratio: 456/300;
    }

    .detail-preview-wrap {
        width: 100%;
        flex-direction: column;
    }

    .detail-preview {
        width: 100%;
    }
}

/* Responsive Detail */
@media (max-width: 768px) {
    .detail-header {
        flex-direction: column;
        padding: 16px;
    }

    .detail-preview-wrap {
        width: 100%;
        max-width: 100%;
        margin: 0;
        flex-direction: column;
    }

    .detail-header-ad {
        width: 100%;
        height: auto;
    }

    .detail-header-ad-inner {
        width: 100%;
        height: auto;
        aspect-ratio: 456/300;
    }

    .detail-preview {
        width: 100%;
        max-width: 100%;
    }

    .detail-body {
        flex-direction: column;
    }

    .detail-sidebar {
        width: 100%;
    }

    .detail-ranking {
        position: static;
    }

    .detail-title {
        font-size: 20px;
    }

    .detail-content {
        padding: 20px;
    }

    .detail-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   9. Footer
   ======================================== */
.site-footer {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 20px 0 16px;
    margin-top: 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    text-align: center;
}

/* Logo区域 */
.footer-logo-section {
    margin-bottom: 16px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.footer-logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo-name {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #E53935 0%, #FF6B6B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    line-height: 1.2;
}

.footer-logo-domain {
    font-size: 10px;
    color: var(--gray-500);
    letter-spacing: 1px;
}

/* 描述文字 */
.footer-desc {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 16px;
}

/* 导航链接 */
.footer-nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-nav-links a {
    font-size: 14px;
    color: var(--gray-600);
    transition: color 0.2s;
}

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

.footer-dot {
    color: var(--gray-400);
    font-size: 14px;
}

/* 版权信息 */
.footer-copyright {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-500);
    flex-wrap: wrap;
}

.footer-copyright a {
    color: var(--gray-500);
    transition: color 0.2s;
}

.footer-copyright a:hover {
    color: var(--primary-color);
}

/* ========================================
   9. Single Page
   ======================================== */
.tool-header {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
}

.tool-icon-large {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--white);
    flex-shrink: 0;
}

.tool-info h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.tool-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--gray-500);
    font-size: 14px;
}

.tool-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

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

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

/* ========================================
   10. Components
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 999;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* 按钮内 SVG 不拦截点击 */
.back-to-top svg,
.back-to-top svg * {
    pointer-events: none !important;
}

/* 移动端：回到顶部按钮上移，避免遮挡底部导航栏 */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 90px !important;
        right: 16px;
        width: 42px;
        height: 42px;
    }
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    background: var(--gray-900);
    color: var(--white);
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s;
    z-index: 10000;
}

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

/* ========================================
   11. Mobile Menu
   ======================================== */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--white);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.mobile-menu-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.mobile-menu-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--gray-600);
    cursor: pointer;
}

.mobile-menu-close i {
    width: 20px;
    height: 20px;
}

.mobile-menu-nav {
    padding: 16px;
}

.mobile-menu-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-list li a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--gray-700);
    font-size: 15px;
    transition: all 0.2s;
}

.mobile-menu-list li a:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   12. Membership System
   ======================================== */

/* Header user menu */
.header-user-menu {
    position: relative;
    margin-left: 16px;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: var(--white);
    color: var(--gray-700);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-menu-toggle:hover {
    background: var(--gray-50);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.user-menu-toggle svg {
    width: 18px;
    height: 18px;
}

.user-menu-toggle .user-menu-arrow {
    width: 14px;
    height: 14px;
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s;
    z-index: 1000;
}

.header-user-menu:hover .user-menu-dropdown,
.header-user-menu.user-menu-open .user-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-toggle[aria-expanded="true"] .user-menu-arrow {
    transform: rotate(180deg);
}

.user-menu-item,
.user-menu-login,
.user-menu-register {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: var(--gray-700);
    font-size: 14px;
    transition: all 0.2s;
}

.user-menu-item:hover,
.user-menu-login:hover,
.user-menu-register:hover {
    background: var(--gray-50);
    color: var(--primary-color);
}

.user-menu-item:first-child,
.user-menu-login:first-child,
.user-menu-register:first-child {
    border-radius: 8px 8px 0 0;
}

.user-menu-item:last-child {
    border-radius: 0 0 8px 8px;
}

.user-menu-login,
.user-menu-register {
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    padding: 8px 12px;
    text-decoration: none;
}

/* Mobile user menu */
.mobile-user-menu {
    position: relative;
}

.mobile-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 150px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s;
    z-index: 1000;
}

.mobile-user-menu.user-menu-open .mobile-user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-user-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: var(--gray-700);
    font-size: 14px;
    white-space: nowrap;
}

.mobile-user-item:hover {
    background: var(--gray-50);
    color: var(--primary-color);
}

.mobile-user-item:first-child {
    border-radius: 8px 8px 0 0;
}

.mobile-user-item:last-child {
    border-radius: 0 0 8px 8px;
}

/* Contribute visibility options */
.visibility-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.visibility-options .radio-label {
    align-items: flex-start;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    transition: all 0.2s;
}

.visibility-options .radio-label:hover {
    border-color: var(--primary-light);
    background: var(--primary-light);
}

.visibility-options .radio-label input:checked ~ .visibility-name {
    color: var(--primary-color);
}

.visibility-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 8px;
}

.visibility-name strong {
    font-size: 15px;
    font-weight: 600;
}

.visibility-name small {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 400;
}

/* Member center */
.member-center-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

.member-center-header {
    margin-bottom: 24px;
}

.member-center-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.member-center-subtitle {
    color: var(--gray-500);
    font-size: 14px;
}

.member-profile-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.member-avatar img {
    border-radius: 50%;
    border: 3px solid var(--primary-light);
}

.member-info {
    flex: 1;
    min-width: 200px;
}

.member-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.member-email {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 4px;
}

/* ========================================
   前台「+ 修正标签」面板样式
   ======================================== */

/* + 号按钮：与站点标签同排布，蓝色虚线风格以区分普通标签 */
.detail-tags-inline .detail-fix-tag {
    background: transparent;
    color: var(--brand, #1d4ed8);
    border: 1px dashed var(--brand, #1d4ed8);
}
.detail-tags-inline .detail-fix-tag .plus {
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
}
.detail-tags-inline .detail-fix-tag:hover {
    background: var(--brand, #1d4ed8);
    color: #fff;
}
.detail-tags-inline .detail-fix-tag.loading {
    opacity: 0.6;
    cursor: wait;
}

/* 半透明遮罩层：点击面板外部区域自动关闭修正标签弹窗 */
.navai-fix-overlay {
    position: fixed;
    inset: 0;
    z-index: 15;
    background: rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(1px);
}

/* 面板：JS 动态定位在视口合适位置（桌面端 fixed），移动端铺满文档流 */
.detail-tags-inline .navai-tag-fix-panel {
    position: fixed;
    z-index: 20;
    min-width: 280px;
    max-width: 380px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--gray-200, #e0e0e0);
    border-radius: var(--radius-md, 8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
@media (max-width: 640px) {
    .detail-tags-inline {
        position: relative;
    }
    .detail-tags-inline .navai-tag-fix-panel {
        position: static;
        min-width: 0;
        max-width: none;
        width: 100%;
        margin-top: 10px;
        box-shadow: none;
    }
    /* 移动端铺满文档流，不启用遮罩层 */
    .navai-fix-overlay {
        display: none;
    }
}

/* 标题行（含 X 关闭按钮） */
.navai-tag-fix-panel .navai-fix-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.navai-tag-fix-panel .navai-fix-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900, #222);
    margin-bottom: 12px;
}
.navai-tag-fix-panel .navai-fix-close {
    flex: none;
    width: 24px;
    height: 24px;
    padding: 0;
    margin-right: -4px;
    border: none;
    background: var(--gray-100, #f0f0f0);
    color: var(--gray-600, #666);
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s;
}
.navai-tag-fix-panel .navai-fix-close:hover {
    background: var(--primary-color, #E53935);
    color: #fff;
}

/* 分段标签 */
.navai-tag-fix-panel .navai-fix-label {
    display: inline-block;
    font-size: 12px;
    color: var(--gray-500, #888);
    margin: 10px 0 6px;
    white-space: nowrap;
}
.navai-tag-fix-panel .navai-fix-label:first-child {
    margin-top: 0;
}
.navai-tag-fix-panel .navai-fix-current {
    /* 「已有：」标签与现有 chip 同行显示，不换行 */
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
}
/* 「已有」标签在已有区里去掉上下 margin，让 flex 居中基线对齐 */
.navai-tag-fix-panel .navai-fix-current > .navai-fix-label {
    margin: 0;
    line-height: 1.6; /* 与 chip 行高一致，视觉居中 */
}

/* 已有标签 chip（可删） */
.navai-tag-fix-panel .navai-fix-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    margin: 2px;
    background: var(--gray-100, #f0f0f0);
    border-radius: 999px;
    font-size: 12px;
    color: var(--gray-800, #333);
}
.navai-tag-fix-panel .navai-fix-chip-x {
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    background: var(--gray-300, #ccc);
    color: #fff;
    cursor: pointer;
    font-style: normal;
    font-size: 12px;
}
.navai-tag-fix-panel .navai-fix-chip-x:hover {
    background: var(--primary-color, #E53935);
}

/* 候选库 chip（可加） */
.navai-tag-fix-panel .navai-fix-cand {
    display: inline-block;
    padding: 3px 10px;
    margin: 2px;
    background: var(--brand-light, #eef4ff);
    color: var(--brand, #1d4ed8);
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
}
.navai-tag-fix-panel .navai-fix-cand:hover {
    background: var(--brand, #1d4ed8);
    color: #fff;
}
.navai-tag-fix-panel .navai-fix-cand.done {
    opacity: 0.5;
    pointer-events: none;
}

/* 总类 → 子类 两列布局 */
.navai-tag-fix-panel .navai-fix-groups {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 10px;
    /* align-items:stretch 让左右两列等高，右列高度跟随左列（总类）撑满，不再下方留白 */
    align-items: stretch;
}
/* 左列：总类 */
.navai-tag-fix-panel .navai-fix-gcat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.navai-tag-fix-panel .navai-fix-cat {
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--gray-700, #555);
    cursor: pointer;
    text-align: center;
    background: var(--gray-100, #f5f5f5);
    border: 1px solid transparent;
    transition: all 0.15s;
    user-select: none;
}
.navai-tag-fix-panel .navai-fix-cat:hover {
    background: var(--brand-light, #eef4ff);
    color: var(--brand, #1d4ed8);
}
.navai-tag-fix-panel .navai-fix-cat.active {
    background: var(--brand, #1d4ed8);
    color: #fff;
}
/* 右列：子类 */
.navai-tag-fix-panel .navai-fix-gsub {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-content: flex-start;
    min-height: 28px;
    /* 问题1：高度跟随左列总类（grid stretch 使两列等高），右列超出左列高度时出现内部滚动条，不撑破面板 */
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    padding-right: 4px;
}
.navai-tag-fix-panel .navai-fix-ghost {
    font-size: 12px;
    color: var(--gray-400, #aaa);
    padding: 6px 0;
}
@media (max-width: 640px) {
    .navai-tag-fix-panel .navai-fix-groups {
        grid-template-columns: 70px 1fr;
        gap: 8px;
    }
    .navai-tag-fix-panel .navai-fix-cat {
        font-size: 11px;
        padding: 4px 6px;
    }
    /* 移动端铺满模式：右列不再受左列高度约束，自然高度 + 内容超长才滚动 */
    .navai-tag-fix-panel .navai-fix-gsub {
        height: auto;
        max-height: 320px;
    }
}

/* 自定义输入 */
.navai-tag-fix-panel .navai-fix-custom {
    display: flex;
    align-items: center;
    gap: 8px;
}
.navai-tag-fix-panel .navai-fix-input {
    flex: 1;
    min-width: 0;
    padding: 6px 10px;
    border: 1px solid var(--gray-300, #ccc);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}
.navai-tag-fix-panel .navai-fix-input:focus {
    border-color: var(--brand, #1d4ed8);
    box-shadow: 0 0 0 2px var(--brand-light, #eef4ff);
}
.navai-tag-fix-panel .navai-fix-addbtn {
    padding: 6px 14px;
    background: var(--brand, #1d4ed8);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.navai-tag-fix-panel .navai-fix-addbtn:hover {
    background: var(--primary-hover, #C62828);
}

/* 消息行 */
.navai-tag-fix-panel .navai-fix-msg {
    margin-top: 10px;
    font-size: 12px;
    color: var(--gray-500, #888);
    min-height: 14px;
}
.navai-tag-fix-panel .navai-fix-msg.ok {
    color: #2e7d32;
}

.member-registered {
    font-size: 13px;
    color: var(--gray-500);
}

.member-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.member-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.member-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.member-stat-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 2px;
}

.member-center-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.member-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 24px;
}

.member-section h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 20px;
}

.member-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.member-section-header h2 {
    margin-bottom: 0;
}

.btn-submit-small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-submit-small:hover {
    background: var(--primary-hover);
    color: var(--white);
}

.member-urls-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.member-url-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    transition: all 0.2s;
}

.member-url-item:hover {
    border-color: var(--primary-light);
    background: var(--gray-50);
}

.member-url-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.member-url-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.member-url-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.member-url-title a {
    color: var(--gray-900);
    text-decoration: none;
}

.member-url-title a:hover {
    color: var(--primary-color);
}

.member-url-desc {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 8px;
    line-height: 1.4;
}

.member-url-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
}

.visibility-badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.visibility-badge.public {
    background: #e3f2fd;
    color: #1565c0;
}

.visibility-badge.private {
    background: #fff3e0;
    color: #e65100;
}

.status-badge.publish {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.pending {
    background: #fff8e1;
    color: #f9a825;
}

.status-badge.draft {
    background: #fce4ec;
    color: #c2185b;
}

.url-date {
    color: var(--gray-400);
}

.member-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}

.member-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    color: var(--gray-300);
}

.member-empty p {
    margin-bottom: 16px;
}

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

.member-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.member-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
}

.member-form input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ========================================
   13. Responsive
   ======================================== */
@media (max-width: 1024px) {
    .desktop-search-section {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    .sites-grid,
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .ai-card {
        padding: 10px 12px;
    }

    .ai-card-social {
        right: 4px;
        top: 6px;
        bottom: 6px;
    }

    .ai-card-right {
        padding-right: 22px;
    }

    .ai-card-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .ai-card-name {
        font-size: 13px;
    }

    .ai-card-desc {
        font-size: 10px;
    }

    .tool-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .tool-actions {
        justify-content: center;
    }

    /* 移动端搜索区域居中 */
    .search-tabs,
    .search-engines {
        justify-content: center !important;
    }

    /* 会员中心响应式 */
    .member-center-page {
        padding: 16px;
    }

    .member-profile-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .member-stats {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }

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

    .member-center-grid {
        grid-template-columns: 1fr;
    }

    .member-url-item {
        flex-wrap: wrap;
    }

    .member-url-info {
        width: 100%;
    }
}

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

    .ai-card-right {
        padding-right: 18px;
    }

    .ai-card-social {
        right: 3px;
        top: 4px;
        bottom: 4px;
        gap: 3px;
        font-size: 9px;
    }

    .ai-card-fav,
    .ai-card-rating {
        padding: 1px 4px;
    }
}

/* ========================================
   14. Floating Menu (FAB)
   ======================================== */
.floating-menu {
    position: fixed;
    bottom: 98px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* 确保浮动菜单容器不占用额外空间 */
.floating-menu > * {
    margin: 0;
}

/* 菜单展开时，菜单项从按钮上方弹出 */
.floating-menu .floating-menu-items {
    order: -1;
    margin-bottom: 8px;
}

.floating-menu-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 24px;
}

.floating-menu-toggle:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.floating-menu-toggle.active {
    transform: rotate(45deg);
    background: var(--gray-700);
}

.floating-menu-toggle i,
.floating-menu-toggle svg {
    pointer-events: none;
}

.floating-menu-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    z-index: 9999;
}

.floating-menu.active .floating-menu-items {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: var(--gray-700);
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.floating-menu-item:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateX(-4px);
}

.floating-menu-item i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.floating-menu-label {
    font-size: 13px;
}

/* Mobile floating menu */
@media (max-width: 768px) {
    .floating-menu {
        bottom: 98px;
        right: 16px;
    }

    .floating-menu-items {
        bottom: calc(100% + 10px);
        right: 0;
    }

    .floating-menu-toggle {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .floating-menu-item {
        padding: 8px 12px;
        font-size: 13px;
    }

    .floating-menu-label {
        font-size: 12px;
    }
}

/* ========================================
   13. WordPress Specific
   ======================================== */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.aligncenter {
    display: block;
    margin: 0 auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 14px;
    color: var(--gray-500);
    text-align: center;
    margin-top: 8px;
}
