/* 全局宽度控制（所有内容居中、两边留白） */
.page-width {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航条背景（全屏白色） */
.top-nav-bar {
    background: var(--color-bg-container);
    /* box-shadow: var(--shadow-sm); */
    /* border-bottom: 1px solid #e5e7eb; */
    border-bottom: 1px solid var(--color-border-light);
}

/* 一级导航内容 */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 2px;
}

.logo a {
    text-decoration: none;
}

.logo-blue {
    color: #165DFF;
}

.logo-black {
    color: #1f2937;
}

.tool-icon {
    font-size: 22px;
    color: #3b82f6;
    /* 网站蓝色主色调，直接用这个值 */
}

.top-menu {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-left: 30px;
}

.top-menu a {
    text-decoration: none;
    color: #374151;
    color: var(--color-text-secondary);
    font-size: 15px;
    font-weight: 500;
}

.top-menu a.active {
    color: #165DFF;
}

.top-menu a:hover {
    color: #165DFF;
}

.top-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 16px;
    border-radius: 6px;
}

.icon-btn:hover {
    background: #f3f4f6;
    color: #165DFF;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #6b7280;
}

/* 二级导航内容 */
.sub-nav {
    display: flex;
    align-items: center;
    height: 44px;
    gap: 4px;
}

.nav-item {
    position: relative;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: none;
    border: none;
    font-size: 15px;
    color: var(--color-text-secondary);
    cursor: pointer;
    border-radius: 8px;
    white-space: nowrap;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-btn a {
    text-decoration: none;
    /* color: #000000; */
    color: var(--color-text-secondary);
}

.nav-btn.active {
    background: #165DFF;
    color: #fff;
    box-shadow: 0 0 8px rgba(22, 93, 255, 0.2);
}

.nav-btn:hover:not(.active) {
    background: #f3f4f6;
    background: var(--color-bg-secondary);
    color: #111827;
    color: var(--color-text-secondary);
}

.nav-icon {
    font-size: 14px;
}

.nav-item:hover .dropdown {
    display: block;
}

/* 主内容容器：从上到下纵向排列 3个板块 */
.main-container {
    max-width: 1140px;
    margin: 30px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    /* 板块之间的间距 */
    min-height: calc(100vh - 320px);
}

/* ==================== 1. 工具区（最上方） ==================== */
.tool-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

.tool-header svg {
    width: 20px;
    height: 20px;
    color: #165DFF;
}

.tool-header h1 {
    font-size: 20px;
}

.star-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 18px;
    margin-left: 8px;
}

.star-btn:hover {
    color: #f59e0b;
}

.tool-container {
    /* padding: 10px; */
}

/* 广告条 */
.ad-bar {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.ad-bar a {
    color: #dc2626;
    font-weight: 500;
    text-decoration: none;
    margin-right: 12px;
}

.ad-bar a.blue {
    color: #165DFF;
}

/* 双输入框布局 */
.input-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.input-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-box textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    background: #f9fafb;
}

.input-box textarea:focus {
    outline: none;
    border-color: #165DFF;
    box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
}

/* 操作按钮组 */
.btn-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tool-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #165DFF;
    color: #fff;
}

.btn-primary:hover {
    background: #0f48cc;
}

.btn-outline {
    background: #fff;
    color: #165DFF;
    border: 1px solid #165DFF;
}

.btn-outline:hover {
    background: #f0f5ff;
}

.btn-gray {
    background: #f3f4f6;
    color: #6b7280;
}

.btn-gray:hover {
    background: #e5e7eb;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #6b7280;
    margin-left: 8px;
}

/* 标签云 */
.tag-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    padding: 4px 10px;
    background: #f0f5ff;
    color: #165DFF;
    border-radius: 20px;
    font-size: 13px;
}

/* ==================== 2. 说明区（中间） ==================== */
.info-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.info-header {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.info-content {
    font-size: 14px;
    line-height: 1.8;
    color: #4b5563;
}

.info-content p {
    margin-bottom: 12px;
}

.info-content a {
    color: #165DFF;
    text-decoration: none;
    font-weight: 500;
}

.info-content a:hover {
    text-decoration: underline;
}

.info-list {
    padding-left: 20px;
    margin: 12px 0;
}

.info-list li {
    margin-bottom: 6px;
}

/* ==================== 3. 推荐区（最下方） ==================== */
.recommend-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.recommend-header {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
    text-align: center;
}

.recommend-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.recommend-card {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.recommend-card:hover {
    background: #f0f5ff;
    transform: translateY(-2px);
}

.recommend-grid-a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.card-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
}

.icon-blue {
    background: #165DFF;
}

.icon-green {
    background: #10b981;
}

.icon-red {
    background: #ef4444;
}

.icon-orange {
    background: #f59e0b;
}

.card-name {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

/* 底部样式 原生CSS */
.footer {
    background: var(--color-bg-container);
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05);
    padding: 16px 0;
    margin-top: 8px;
}

.footer-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    font-size: 14px;
    color: #6b7280;
    color: var(--color-text-tertiary);
}

.footer p {
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.footer a {
    color: #165DFF;
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: #0f48cc;
}

/* 优化后的二级导航样式 - 更大气 */
.sub-nav-bar {
    background: var(--color-bg-container);
    /* border-bottom: 1px solid var(--color-border-light); */
    box-shadow: var(--shadow-sm);
}

.sub-nav {
    display: flex;
    align-items: center;
    height: 50px;
    gap: 8px;
}

/* 核心修复：给父元素增加内边距，让鼠标移动无缝隙 */
.nav-item {
    position: relative;
    padding: 0 4px;
    /* 关键修复：底部留空间，让鼠标移动不会断开 */
    padding-bottom: 6px;
}



.dropdown-icon {
    font-size: 12px;
    color: inherit;
    transition: transform 0.2s ease;
}

.nav-item:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* 核心修复：消除菜单与按钮之间的缝隙 */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--color-bg-container);
    border: 1px solid var(--color-border-light);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    padding: 8px 0;
    z-index: 999;
    display: none;

    /* 关键修复：让菜单紧贴上方，无缝隙 */
    margin-top: 0px !important;
}

/* 核心修复：使用 opacity + visibility 代替 display，不会闪断 */
.nav-item:hover .dropdown {
    display: block;
    opacity: 1;
    visibility: visible;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--color-text-secondary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item.active {
    background: var(--color-bg-secondary);
    color: var(--color-primary);
    padding-left: 22px;
}

/* 响应式适配：小屏调整布局 */
@media (max-width: 768px) {
    .input-wrap {
        grid-template-columns: 1fr;
        /* 输入框变为纵向 */
    }

    .recommend-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 推荐卡片变为2列 */
    }
}