* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #f1f5f9;
    height: 100vh;
    overflow: hidden;
}

.navbar{
	height:80px !important;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background: #f8f9fa; /* 与侧边栏背景一致 */
}
/* ========= 左侧导航区域 ========= */
.sidebar {
	
    background: #f8f9fa;
    color: #e2e8f0;
    transition: width 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    overflow: hidden; 
    overflow-y: auto;
    z-index: 999;
    display: flex;
    flex-direction: column;
    width: 250px;
    /* 移除所有可能的边框 */
    border: 0;
    outline: 0;
    box-shadow: none;
}
/* 如果侧边栏有右边框 */
.sidebar {
    border-right: none !important;
}

/* 收起状态 */
.sidebar.collapsed {
    width: 72px;
}

.sidebar::-webkit-scrollbar {
    width: 0px;
}
.sidebar::-webkit-scrollbar-track {
    background: #ccc;
}
.sidebar::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 8px;
}

/* 侧边栏头部 - 固定在顶部 */
.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;  /* 防止被压缩 */
    background: #0D6EFD;
    height: 80px !important;
    position: sticky;
    top: 0;
    z-index: 15;
}
.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    white-space: nowrap;
	
}
.logo-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    flex-shrink: 0;
}
.logo-text {
	
    font-weight: 700;
    font-size: 28px;
    color: #fff;
    transition: opacity 0.2s;
	margin-left:14px;
}
.sidebar.collapsed .logo-text {
    opacity: 0;
    width: 0;
    display: none;
}
.toggle-btn {
    background: rgba(255,255,255,0.08);
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.2s;
    flex-shrink: 0;
}
.toggle-btn:hover {
    background: rgba(255,255,255,0.2);
    color: white;
    transform: scale(0.96);
}

/* 导航菜单容器 */
.nav-menu {
    flex: 1;
    padding: 8px 12px;
	/* overflow-y: auto;  
    overflow-x: hidden;  菜单区域可滚动*/
}

/* 美化菜单区域的滚动条 */
.nav-menu::-webkit-scrollbar {
    width: 5px;
}
.nav-menu::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 5px;
}
.nav-menu::-webkit-scrollbar-thumb {
    background: #d4d4d8;
    border-radius: 5px;
}
.nav-menu::-webkit-scrollbar-thumb:hover {
    background: #a1a1aa;
}
/* 分类区块 */
.category-block {
    margin-bottom: 8px;
}

/* 分类标题 - 可点击展开/收起 */
.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.category-header:hover {
    background: rgba(255,255,255,0.08);
}
.category-title {
    font-size: 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}
.category-icon {
    font-size: 16px;
    flex-shrink: 0;
}
.category-name {
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 展开/收起箭头 */
.category-arrow {
    font-size: 14px;
    color: #94a3b8;
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 8px;
}
.category-arrow.expanded {
    transform: rotate(90deg);
}
/* 收起时箭头隐藏？不，但宽度控制 */
.sidebar.collapsed .category-arrow {
    display: none;
}
.sidebar.collapsed .category-header {
    justify-content: center;
    padding: 10px 0;
}
.sidebar.collapsed .category-title {
    justify-content: center;
}
.sidebar.collapsed .category-name {
    display: none;
}

/* 工具列表容器 - 支持展开收起动画 */
.tools-list-wrapper {
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.tools-list-wrapper.collapsed {
    max-height: 0 !important;
}
.tools-list {
    list-style: none;
    margin-left: 8px;
    border-left: 0px solid rgba(255,255,255,0.06);
    padding: 4px 0 4px 0;
}
.tool-item {
    margin: 2px 0;
}
.tool-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 12px;
    color: #777;
    text-decoration: none;
    font-size: 14px;
    font-weight: 450;
    transition: all 0.2s;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
}
.tool-link:hover {
    background: rgba(255,255,255,0.12);
  
    transform: translateX(2px);
}
.tool-link.active {
    background: #0D6EFD;
     color: white;
    box-shadow: 0 2px 6px rgba(59,130,246,0.3);
}
/* 图标图片样式 */
.tool-icon-img {
    width: 20px;
    height: 20px;
	background: rgba(255, 255, 255, 0.8);
    object-fit: contain;
    flex-shrink: 0;
	border-radius: 3px;
}
.tool-icon-emoji {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}
.tool-name {
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 收起模式 */
.sidebar.collapsed .tool-name {
    display: none;
}
.sidebar.collapsed .tool-link {
    justify-content: center;
    padding: 8px 0;
}
.sidebar.collapsed .tools-list {
    margin-left: 0;
    border-left: none;
}
.sidebar.collapsed .tools-list-wrapper {
    /* 收起侧边栏时强制隐藏工具列表区域，避免高度问题 */
    max-height: 0 !important;
}

/* 加载状态 */
.loading-placeholder, .error-placeholder {
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: #cbd5e6;
}
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========= 右侧内容区域 ========= */
.main-content {
    flex: 1;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}
.content-header {
    background: white;
    border-bottom: 1px solid #e9eef3;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    z-index: 5;
}
.current-tool-badge {
    background: #f1f5f9;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.current-tool-badge span:first-child {
    color: #64748b;
}
.current-tool-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}
.open-new-tab {
    margin-left: auto;
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 24px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}
.open-new-tab:hover {
    background: #f8fafc;
    border-color: #3b82f6;
    color: #1e40af;
}
.iframe-container {
    flex: 1;
    position: relative;
    background: #fefefe;
    overflow: auto;
}
iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
.iframe-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #fafcff;
    color: #334155;
    font-size: 16px;
    gap: 20px;
}
.iframe-placeholder .welcome-icon {
    font-size: 64px;
    opacity: 0.5;
}
@media (max-width: 640px) {
    .sidebar {
         position: fixed; 
        height: 100%;
        transition: transform 0.2s;
        z-index: 20;
    }
    .sidebar.collapsed {
        transform: translateX(-100%);
        width: 260px;
    }
	
	
	  /* 移动端收起时，显示一个悬浮的展开按钮 */
    .mobile-toggle-btn {
        position: fixed;
        top: 90px;
        left: 20px;
        width: 44px;
        height: 44px;
        background: #0D6EFD;
        border: none;
        border-radius: 12px;
        color: white;
        font-size: 24px;
        cursor: pointer;
        z-index: 30;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        display: none;  /* 默认隐藏 */
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }
    
    .mobile-toggle-btn:hover {
        background: #0b5ed7;
        transform: scale(0.96);
    }
    
    /* 侧边栏收起时显示悬浮按钮 */
    .sidebar.collapsed ~ .mobile-toggle-btn {
        display: flex;
    }
	
}





/* SEO 隐藏内容不影响视觉 */
.seo-friendly-content {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}