/**
 * Copyright: YC-2025Copyright
 * Created: 2025-10-04
 * Description: 全局样式文件 - 参考 ai-bot.cn 设计风格
 */

/* ========================================
   CSS 变量定义 - 仿照 ai-bot.cn 优雅风格
   ======================================== */
:root {
    /* 主色调 - 柔和蓝紫色系 */
    --primary-color: #5B7CFF;
    --primary-dark: #4A6BE8;
    --primary-light: #7A93FF;
    --secondary-color: #FF6B9D;
    --accent-color: #FFB84D;
    --success-color: #52C41A;
    --warning-color: #FAAD14;
    --danger-color: #F5222D;

    /* 中性色 - ai-bot.cn 风格 */
    --text-primary: #282a2d;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-disabled: #BFBFBF;
    --border-color: #E8E8E8;
    --border-light: #F0F0F0;
    --bg-body: #F9F9F9;
    --bg-white: #FFFFFF;
    --bg-gray: #FAFAFA;

    /* 阴影 - 柔和自然 */
    --shadow-card: 0 0 20px -5px rgba(158, 158, 158, 0.2);
    --shadow-hover: 0 4px 24px rgba(158, 158, 158, 0.25);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);

    /* 圆角 - 微圆角设计 */
    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-xxl: 16px;

    /* 间距系统 */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;

    /* 过渡动画 */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 暗色模式变量 */
[data-theme="dark"] {
    --text-primary: #eee;
    --text-secondary: #c6c9cf;
    --text-muted: #999;
    --border-color: #5e6063;
    --bg-light: #2c2e2f;
    --bg-white: #1a1b1c;
}

/* ========================================
   全局样式
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-body);
    line-height: 1.6;
    font-size: 16px;
    transition: background-color var(--transition-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========================================
   页面布局
   ======================================== */
.page-wrapper {
    display: flex;
    min-height: 100vh;
}

/* 左侧导航栏 */
.sidebar-nav {
    width: 260px;
    background: var(--bg-white);
    border-right: 1px solid var(--border-light);
    padding: 1.5rem 0;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1050;
    /* 提高z-index确保在最上层 */
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.05);
    /* 添加阴影增强视觉效果 */
}

.sidebar-brand {
    padding: 0 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* 左对齐以适应更长的文字 */
    min-width: 0;
}

.sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    width: 100%;
    flex-shrink: 0;
}

.sidebar-brand-link span {
    flex-shrink: 0;
    white-space: nowrap;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu-item {
    margin-bottom: 0.25rem;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
    position: relative;
    white-space: nowrap;
    /* 防止文本换行 */
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-menu-link:hover,
.sidebar-menu-link.active {
    color: var(--primary-color);
    background: rgba(89, 97, 249, 0.05);
}

.sidebar-menu-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
}

.sidebar-menu-icon {
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
}

/* 子菜单样式 */
.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    margin: 0.5rem 1rem;
    overflow: hidden;
}

.sidebar-submenu-item {
    border-bottom: 1px solid var(--border-light);
}

.sidebar-submenu-item:last-child {
    border-bottom: none;
}

.sidebar-submenu-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    position: relative;
}

.sidebar-submenu-link:hover,
.sidebar-submenu-link.active {
    color: var(--primary-color);
    background: rgba(89, 97, 249, 0.05);
}

.sidebar-submenu-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
}

.sidebar-menu-divider {
    height: 1px;
    background: var(--border-light);
    margin: 1rem 1.5rem;
}

/* Chevron旋转动画 */
.sidebar-menu-link .bi-chevron-down {
    transition: transform var(--transition-fast);
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 260px;
    width: calc(100% - 260px);
    position: relative;
    /* 确保内容区域正确定位 */
    z-index: 1;
    /* 确保内容在侧边栏下方 */
}

/* ========================================
   导航栏
   ======================================== */
.navbar {
    background: var(--bg-white) !important;
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
    transition: all var(--transition-base);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1040;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

/* 导航栏LOGO样式 */
.navbar-logo {
    height: 32px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    transition: transform var(--transition-fast);
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.05);
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.navbar-nav .nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background: rgba(89, 97, 249, 0.1);
}

/* 主题切换按钮 */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-light);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(20deg);
}

/* ========================================
   按钮
   ======================================== */
.btn {
    border-radius: var(--radius-lg);
    font-weight: 600;
    padding: 0.625rem 1.75rem;
    transition: all var(--transition-fast);
    border: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white !important;
    border: none;
    box-shadow: 0 4px 12px rgba(89, 97, 249, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #3a4fd8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(89, 97, 249, 0.4);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color) !important;
    background: transparent;
    position: relative;
    z-index: 1;
}

.btn-outline-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
    z-index: -1;
    border-radius: var(--radius-lg);
}

.btn-outline-primary:hover {
    color: white !important;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(89, 97, 249, 0.25);
}

.btn-outline-primary:hover::after {
    width: 100%;
}

.btn-secondary {
    background: var(--border-color);
    color: var(--text-secondary) !important;
}

.btn-secondary:hover {
    background: var(--text-muted);
    color: white !important;
    transform: translateY(-1px);
}

/* ========================================
   卡片
   ======================================== */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all var(--transition-base);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.card:hover {
    box-shadow: 0 8px 24px rgba(89, 97, 249, 0.15);
    transform: translateY(-6px);
    border-color: var(--primary-color);
}

.card:hover::before {
    opacity: 1;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
}

.card-img-top {
    transition: transform var(--transition-base);
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.card-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.card-text {
    line-height: 1.6;
}

/* ========================================
   工具卡片 - 紧凑网格布局(参考AI工具集)
   ======================================== */
.tool-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: none;
    transition: all var(--transition-base);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border: 1px solid var(--border-light);
    opacity: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.tool-card:hover {
    background: var(--bg-light);
    box-shadow: var(--shadow-sm);
    border-color: var(--border-color);
}

/* Logo圆形设计 */
.tool-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-fast);
    background: var(--bg-white);
}

.tool-card:hover .tool-logo {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(89, 97, 249, 0.15);
}

/* 工具信息区 */
.tool-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.tool-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-description {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.875rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   分类卡片
   ======================================== */
.category-card {
    background: var(--bg-white);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color);
    opacity: 1;
    /* 🔧 修复：默认可见，防止 FOUC */
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: grayscale(0.3);
    transition: all var(--transition-base);
}

.category-card:hover .category-icon {
    filter: grayscale(0);
    transform: scale(1.1);
}

.category-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.5rem 0;
    color: var(--text-primary);
}

.category-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ========================================
   标签
   ======================================== */
.badge {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-weight: 400;
    font-size: 0.75rem;
    display: inline-block;
}

.tag-item {
    padding: 0.5rem 1.25rem;
    background: var(--bg-white);
    border-radius: 2rem;
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: inline-block;
}

.tag-item:hover {
    background: var(--primary-color);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

/* ========================================
   输入框
   ======================================== */
.form-control {
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(89, 97, 249, 0.1);
}

/* ========================================
   交互动画和微交互
   ======================================== */

/* 页面加载淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 卡片堆叠动画 */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 延迟动画类 */
.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}

.animate-delay-4 {
    animation-delay: 0.4s;
}

.animate-delay-5 {
    animation-delay: 0.5s;
}

/* 脉冲动画 - 用于强调元素 */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* 摇晃动画 - 用于错误提示 */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* 旋转动画 - 用于加载状态 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 1s linear infinite;
}

/* 光泽扫过效果 */
@keyframes shine {
    0% {
        background-position: -100% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.shine {
    position: relative;
    overflow: hidden;
}

.shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.3) 50%,
            transparent 100%);
    background-size: 200% 100%;
    animation: shine 3s ease-in-out infinite;
}

/* 波纹效果 */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s, opacity 0.6s;
}

.ripple-effect:active::before {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
}

/* 滚动渐显动画 */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Badge 闪烁动画 */
@keyframes badge-glow {

    0%,
    100% {
        box-shadow: 0 0 5px currentColor;
    }

    50% {
        box-shadow: 0 0 15px currentColor;
    }
}

.badge-glow {
    animation: badge-glow 2s ease-in-out infinite;
}

/* 悬停放大效果 */
.hover-scale {
    transition: transform var(--transition-base);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* 悬停阴影效果 */
.hover-shadow {
    transition: box-shadow var(--transition-base);
}

.hover-shadow:hover {
    box-shadow: 0 8px 24px rgba(89, 97, 249, 0.2);
}

/* ========================================
   响应式适配优化
   ======================================== */

/* 平板设备 (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .stats-row {
        gap: 30px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .tool-card {
        padding: 1.25rem;
    }
}

/* 移动设备 (最大768px) */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
        --spacing-xxl: 2.5rem;
    }

    /* 隐藏侧边栏 */
    .sidebar-nav {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 1100;
        /* 确保侧边栏在最上层 */
    }

    .sidebar-nav.show {
        transform: translateX(0);
    }

    /* 主内容全宽 */
    .main-content {
        margin-left: 0;
        width: 100%;
        position: relative;
        z-index: 1;
        /* 确保内容在侧边栏下方 */
    }

    /* 导航栏优化 */
    .navbar {
        padding: 0.75rem 0;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    /* 英雄区优化 */
    .hero-section {
        padding: 60px 0 40px;
    }

    .hero-title {
        font-size: 2.25rem;
        margin-bottom: 12px;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 24px;
    }

    .search-box {
        max-width: 100%;
    }

    .search-input {
        padding: 14px 20px;
        font-size: 1rem;
    }

    .stats-row {
        gap: 15px;
        justify-content: space-between;
    }

    .stat-item {
        padding: 12px 15px;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    /* 浮动卡片隐藏 */
    .floating-card {
        display: none;
    }

    /* 分类网格优化 */
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .category-card {
        padding: 1.25rem 0.875rem;
    }

    .category-icon {
        font-size: 2.5rem;
    }

    .category-name {
        font-size: 1rem;
    }

    /* 工具卡片优化 */
    .tool-card {
        padding: 1rem;
    }

    .tool-logo {
        width: 42px;
        height: 42px;
    }

    .tool-name {
        font-size: 0.95rem;
    }

    .tool-description {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }

    /* 工具卡片网格 */
    .row.g-3>* {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* 区块间距 */
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 20px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .tools-section {
        padding: 40px 0;
    }

    .tags-section {
        padding: 40px 0;
    }

    /* 标签云优化 */
    .tags-cloud {
        gap: 10px;
    }

    .tag-item {
        padding: 0.4rem 1rem;
        font-size: 0.875rem;
    }

    /* 页脚优化 */
    .footer {
        padding: 30px 0;
    }
}

/* 小屏幕移动设备 (最大576px) */
@media (max-width: 576px) {

    /* 英雄区 */
    .hero-title {
        font-size: 1.875rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .stats-row {
        flex-wrap: wrap;
        gap: 10px;
    }

    .stat-item {
        flex: 1 1 calc(33.333% - 10px);
        min-width: 90px;
        padding: 10px 12px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    /* 分类网格 */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 工具卡片 */
    .tool-card {
        padding: 1rem;
    }

    .tool-header {
        gap: 0.75rem;
    }

    .tool-logo {
        width: 44px;
        height: 44px;
    }

    /* 区块标题 */
    .section-title {
        font-size: 1.5rem;
    }

    .section-title::after {
        width: 40px;
        height: 3px;
    }
}

/* ========================================
   首页专属样式
   ======================================== */
.hero-section {
    background: linear-gradient(135deg, rgba(89, 97, 249, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
    color: var(--text-primary);
    padding: 80px 0 60px;
    margin-bottom: 48px;
    border-bottom: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(89, 97, 249, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.gradient-text {
    background: linear-gradient(45deg, #FFD700, #FFA500, #ee9ae5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        filter: hue-rotate(0deg);
    }

    50% {
        filter: hue-rotate(20deg);
    }
}

.hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: 32px;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.7;
}

.search-box {
    position: relative;
    z-index: 2;
}

.search-input {
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    border-radius: var(--radius-lg) !important;
    border: 2px solid var(--border-light);
    background: var(--bg-white);
    transition: all var(--transition-fast);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(89, 97, 249, 0.1);
    outline: none;
    background: white;
}

.search-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.input-group-text {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg) !important;
    padding: 0 1rem;
    border: 2px solid var(--border-light);
    border-right: none;
    background: var(--bg-white);
    color: var(--text-muted);
    font-size: 1.125rem;
    transition: all var(--transition-fast);
}

.search-box:focus-within .input-group-text {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    margin-top: 12px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.search-suggestions.show {
    display: block;
}

.dropdown-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.suggestion-item {
    padding: 12px 20px;
    display: flex;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: var(--bg-light);
}

.suggestion-item img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.suggestion-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.suggestion-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stats-row {
    display: flex;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.stat-item {
    display: flex;
    flex-direction: column;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-base);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: 5px;
}

.hero-image {
    position: relative;
    height: 450px;
}

.floating-card {
    position: absolute;
    background: white;
    color: #5961f9;
    padding: 18px 28px;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(89, 97, 249, 0.2);
    font-weight: 600;
    font-size: 1.1rem;
    animation: float 4s ease-in-out infinite;
    border: 2px solid rgba(89, 97, 249, 0.1);
    transition: all var(--transition-base);
}

.floating-card:hover {
    transform: translateY(-24px) scale(1.05);
    box-shadow: 0 16px 48px rgba(89, 97, 249, 0.3);
}

.floating-card:nth-child(1) {
    top: 8%;
    left: 10%;
}

.floating-card:nth-child(2) {
    top: 28%;
    right: 8%;
    animation-delay: 0.6s;
}

.floating-card:nth-child(3) {
    top: 58%;
    left: 5%;
    animation-delay: 1.2s;
}

.floating-card:nth-child(4) {
    bottom: 8%;
    right: 12%;
    animation-delay: 1.8s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-25px);
    }
}

.categories-section {
    margin-bottom: 60px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* 分区标题 - 简洁设计 */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.section-title::before {
    content: '';
    width: 5px;
    height: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(89, 97, 249, 0.3);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.section-header .btn {
    font-size: 0.875rem;
    padding: 0.625rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.section-header .btn:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(89, 97, 249, 0.2);
}

.tools-section {
    padding: 3rem 0;
}

.bg-section {
    background: transparent;
}

.learning-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: all var(--transition-base);
}

.learning-section:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* 工具网格 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.tags-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

.footer {
    background: linear-gradient(135deg, rgba(89, 97, 249, 0.02) 0%, rgba(118, 75, 162, 0.02) 100%);
    padding: 3rem 0;
    border-top: 2px solid var(--border-light);
    margin-top: 4rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 0 0 3px 3px;
}

.footer p {
    font-weight: 500;
    letter-spacing: 0.3px;
}

.footer-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 10px;
}

.footer-desc {
    color: var(--text-secondary);
}

/* ========================================
   加载动画
   ======================================== */
.loading-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid var(--border-color);
    border-bottom-color: var(--primary-color);
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 图标样式 */
.logo-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.logo-text {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.tool-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.tool-title-wrapper {
    flex: 1;
    min-width: 0;
}

.tool-meta {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.tool-card:hover .meta-item {
    color: var(--text-primary);
}

.meta-icon {
    font-size: 1.1rem;
    filter: grayscale(0.3);
    transition: filter var(--transition-fast);
}

.tool-card:hover .meta-icon {
    filter: grayscale(0);
}

.tool-footer {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
}

/* ========================================
   暗色模式下的搜索建议
   ======================================== */
[data-theme="dark"] .search-suggestions {
    background: var(--bg-white);
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-item:hover {
    background: var(--bg-light);
}

/* 欢迎横幅优化 */
.welcome-banner {
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25);
    transition: all var(--transition-base);
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.welcome-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(102, 126, 234, 0.35);
}

.welcome-banner h1 {
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.welcome-banner p {
    position: relative;
    z-index: 1;
}

/* 进度条美化 */
.progress {
    background-color: rgba(89, 97, 249, 0.1);
    border-radius: 1rem;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--success-color), #7cb342);
    border-radius: 1rem;
    transition: width 0.6s ease;
}

/* Badge 优化 */
.badge {
    font-weight: 500;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.badge.bg-success {
    background: linear-gradient(135deg, #52c41a, #7cb342) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #faad14, #ffc53d) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #f5222d, #ff4d4f) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #1890ff, #40a9ff) !important;
}

/* 响应式 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .stats-row {
        gap: 20px;
        flex-wrap: wrap;
    }

    .stat-number {
        font-size: 2rem;
    }

    .floating-card {
        font-size: 0.9rem;
        padding: 12px 18px;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .tool-card {
        padding: 1.25rem;
    }

    .learning-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .welcome-banner {
        padding: 1.5rem !important;
    }

    .welcome-banner h1 {
        font-size: 1.5rem !important;
    }

    .welcome-banner p {
        font-size: 0.9rem !important;
    }
}

/* ========================================
   工具详情页样式
   ======================================== */
.tool-detail-page {
    background: var(--bg-light);
    padding: 2rem 0 4rem;
    min-height: calc(100vh - 200px);
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin-bottom: 2rem;
    list-style: none;
    background: transparent;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.breadcrumb-item+.breadcrumb-item {
    padding-left: 0.5rem;
}

.breadcrumb-item+.breadcrumb-item::before {
    display: inline-block;
    padding-right: 0.5rem;
    color: var(--text-muted);
    content: "/";
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

/* 工具头部 - 增强版 */
.tool-detail-header {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

/* 顶部装饰渐变 */
.tool-detail-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.tool-main-info {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.tool-logo-large {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-xl);
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(89, 97, 249, 0.15);
    flex-shrink: 0;
    background: var(--bg-light);
    padding: 4px;
    transition: all var(--transition-base);
}

.tool-logo-large:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(89, 97, 249, 0.25);
}

.tool-title-section {
    flex: 1;
}

.tool-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.tool-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tool-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tool-badges .badge {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
}

/* 快速统计 */
.tool-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stat-box {
    text-align: center;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 操作按钮 - 增强版 */
.tool-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.tool-actions .btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 140px;
    justify-content: center;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.tool-actions .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.tool-actions .btn:hover::before {
    width: 300px;
    height: 300px;
}

.tool-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    box-shadow: 0 4px 15px rgba(89, 97, 249, 0.3);
}

.tool-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(89, 97, 249, 0.4);
}

.tool-actions .btn-outline-secondary {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.tool-actions .btn-outline-secondary:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.tool-actions .btn svg {
    transition: transform var(--transition-fast);
}

.tool-actions .btn:hover svg {
    transform: scale(1.1);
}

/* 内容区块 */
.content-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.content-section .section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.content-section .section-title::after {
    display: none;
}

.tool-description-full {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* 功能列表 - 增强版 */
.features-list {
    display: grid;
    gap: 0.875rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.125rem 1.25rem;
    background: linear-gradient(135deg, rgba(89, 97, 249, 0.03), rgba(255, 255, 255, 0));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.feature-item:hover {
    background: linear-gradient(135deg, rgba(89, 97, 249, 0.08), rgba(255, 255, 255, 0));
    border-color: var(--primary-color);
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(89, 97, 249, 0.1);
}

.feature-item:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(89, 97, 249, 0.2);
    transition: all var(--transition-fast);
}

.feature-item:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 12px rgba(89, 97, 249, 0.3);
}

/* 使用场景 - 增强版 */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.use-case-card {
    padding: 1.5rem 1.25rem;
    background: linear-gradient(135deg, rgba(89, 97, 249, 0.03), rgba(255, 255, 255, 0));
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.use-case-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.use-case-card:hover {
    background: linear-gradient(135deg, rgba(89, 97, 249, 0.08), rgba(112, 120, 251, 0.05));
    border-color: var(--primary-color);
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(89, 97, 249, 0.15);
}

.use-case-card:hover::before {
    transform: scaleX(1);
}

.use-case-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.875rem;
    filter: grayscale(0.3);
    transition: all var(--transition-base);
}

.use-case-card:hover .use-case-icon {
    filter: grayscale(0);
    transform: scale(1.15) rotate(-5deg);
}

.use-case-text {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 标签 */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-link {
    padding: 0.5rem 1.25rem;
    background: var(--bg-light);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 2rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.tag-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 侧边栏 - 增强版 */
.sidebar-sticky {
    position: sticky;
    top: 2rem;
}

.sidebar-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
}

.sidebar-card:hover {
    box-shadow: 0 8px 24px rgba(89, 97, 249, 0.12);
    border-color: var(--border-color);
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 2px solid var(--border-light);
    position: relative;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.sidebar-card .card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

/* 相关工具卡片 */
.related-tool {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-fast);
    margin-bottom: 0.75rem;
}

.related-tool:hover {
    background: var(--bg-light);
    transform: translateX(4px);
}

.related-tool img {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.related-tool-info {
    flex: 1;
}

.related-tool-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.related-tool-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 详情页响应式优化 */

/* 平板设备 (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .tool-detail-header {
        padding: 2rem;
    }

    .tool-logo-large {
        width: 100px;
        height: 100px;
    }

    .tool-title {
        font-size: 2.25rem;
    }

    .tool-stats {
        gap: 1.25rem;
    }

    .use-cases-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* 移动设备 (最大991px) */
@media (max-width: 991px) {
    .tool-detail-page {
        padding: 1.5rem 0 3rem;
    }

    .tool-detail-header {
        padding: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .tool-main-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .tool-title {
        font-size: 2rem;
    }

    .tool-subtitle {
        font-size: 1rem;
    }

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

    .tool-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        padding: 1.25rem 0;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .tool-actions {
        flex-direction: column;
    }

    .tool-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .content-section {
        padding: 1.75rem;
        margin-bottom: 1.25rem;
    }

    .content-section .section-title {
        font-size: 1.35rem;
    }

    .features-list {
        gap: 0.75rem;
    }

    .feature-item {
        padding: 1rem;
    }

    .sidebar-sticky {
        position: static;
        margin-top: 2rem;
    }

    .sidebar-card {
        padding: 1.5rem;
    }
}

/* 小屏幕移动设备 (最大576px) */
@media (max-width: 576px) {
    .tool-detail-header {
        padding: 1.25rem;
    }

    .tool-logo-large {
        width: 80px;
        height: 80px;
    }

    .tool-title {
        font-size: 1.625rem;
    }

    .tool-subtitle {
        font-size: 0.95rem;
    }

    .tool-stats {
        grid-template-columns: 1fr;
        gap: 0.875rem;
        padding: 1rem 0;
    }

    .stat-box {
        padding: 0.75rem;
        background: var(--bg-light);
        border-radius: var(--radius-md);
    }

    .stat-value {
        font-size: 1.375rem;
    }

    .tool-actions {
        gap: 0.75rem;
    }

    .tool-actions .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    .content-section {
        padding: 1.25rem;
        border-radius: var(--radius-md);
    }

    .content-section .section-title {
        font-size: 1.25rem;
        margin-bottom: 1.25rem;
        padding-bottom: 0.625rem;
    }

    .tool-description-full {
        font-size: 1rem;
        line-height: 1.7;
    }

    .feature-item {
        padding: 0.875rem 1rem;
        gap: 0.875rem;
    }

    .feature-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .use-cases-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .use-case-card {
        padding: 1.25rem 1rem;
    }

    .use-case-icon {
        font-size: 2rem;
        margin-bottom: 0.625rem;
    }

    .use-case-text {
        font-size: 0.9rem;
    }

    .tags-list {
        gap: 0.625rem;
    }

    .tag-link {
        padding: 0.4rem 1rem;
        font-size: 0.875rem;
    }

    .sidebar-card {
        padding: 1.25rem;
    }

    .breadcrumb {
        font-size: 0.8rem;
        margin-bottom: 1.5rem;
    }
}

/* ========================================
   学习中心菜单 - 子菜单和分隔线
   ======================================== */

/* 子菜单样式 */
.sidebar-submenu {
    list-style: none;
    padding-left: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.3s ease;
    opacity: 0;
}

.sidebar-menu-item:hover .sidebar-submenu,
.sidebar-menu-item.active .sidebar-submenu {
    max-height: 1000px;
    /* 增加最大高度确保内容完全显示 */
    opacity: 1;
}

.sidebar-submenu-item {
    margin: 0;
}

.sidebar-submenu-link {
    display: flex;
    align-items: center;
    padding: 8px 16px 8px 48px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    white-space: nowrap;
    /* 防止文本换行 */
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-submenu-link i {
    margin-right: 8px;
    font-size: 0.875rem;
}

.sidebar-submenu-link:hover {
    color: var(--primary-color);
    background: rgba(91, 124, 255, 0.08);
    padding-left: 52px;
}

/* 菜单分隔线 */
.sidebar-menu-divider {
    height: 1px;
    background: var(--border-light);
    margin: 12px 16px;
    list-style: none;
}

/* 带子菜单的菜单项图标旋转 */
.sidebar-menu-link .bi-chevron-down {
    transition: transform var(--transition-fast);
    font-size: 0.75rem;
}

.sidebar-menu-item:hover .bi-chevron-down,
.sidebar-menu-item.active .bi-chevron-down {
    transform: rotate(180deg);
}

/* 小屏幕设备优化 */
@media (max-width: 768px) {
    .sidebar-nav {
        width: 280px;
        /* 在小屏幕上稍微加宽侧边栏 */
    }

    .sidebar-brand-link {
        font-size: 0.95rem;
    }

    .sidebar-menu-link {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }

    .sidebar-submenu-link {
        padding: 0.625rem 1.25rem 0.625rem 3rem;
        font-size: 0.95rem;
    }
}

/* 移动设备菜单切换按钮 */
#mobileMenuToggle {
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
}

#mobileMenuToggle:hover {
    background-color: var(--bg-light);
}

#mobileMenuToggle i {
    font-size: 1.25rem;
}

/* 暗色模式下的菜单切换按钮 */
[data-theme="dark"] #mobileMenuToggle {
    border-color: var(--border-light);
    color: var(--text-primary);
}

[data-theme="dark"] #mobileMenuToggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 暗色模式下的侧边栏子菜单 */
[data-theme="dark"] .sidebar-submenu {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .sidebar-submenu-link:hover {
    background: rgba(91, 124, 255, 0.15);
}