/* ================================================
   工具页面通用样式
   ================================================ */

/* CSS变量定义 */
:root {
    /* 主要颜色 - 更柔和的绿色调 */
    --primary-green: #4a9c01;
    --primary-green-light: #5fb101;
    --primary-green-dark: #3a7a01;
    --primary-green-soft: #6bb501;
    --primary-green-alpha: rgba(74, 156, 1, 0.1);
    
    /* 辅助颜色 - 降低饱和度 */
    --accent-blue: #4f8fc7;
    --accent-blue-light: #6ba3d4;
    --accent-red: #d9534f;
    --accent-red-light: #e67e70;
    
    /* 中性色 - 更温和的灰色调 */
    --gray-50: #fafbfc;
    --gray-100: #f5f6f7;
    --gray-200: #eaebed;
    --gray-300: #d6d9dd;
    --gray-400: #a7abb0;
    --gray-500: #737880;
    --gray-600: #525862;
    --gray-700: #404954;
    --gray-800: #2a2f3a;
    --gray-900: #1a1f2a;
    
    /* neutral-gray 变量（与首页保持一致） */
    --neutral-gray-50: #f8fafc;
    --neutral-gray-100: #f1f5f9;
    --neutral-gray-200: #e2e8f0;
    --neutral-gray-300: #cbd5e1;
    --neutral-gray-400: #94a3b8;
    --neutral-gray-500: #64748b;
    --neutral-gray-600: #475569;
    --neutral-gray-700: #334155;
    --neutral-gray-800: #1e293b;
    --neutral-gray-900: #0f172a;
    
    /* 背景颜色 */
    --bg-primary: #ffffff;
    --bg-secondary: #fafbfc;
    --bg-tertiary: #f3f5f8;
    
    /* 文字颜色 - 更柔和的对比度 */
    --text-primary: #2a2f3a;
    --text-secondary: #737880;
    --text-muted: #a7abb0;
    
    /* 边框 */
    --border-light: #eaebed;
    --border-medium: #d6d9dd;
    
    /* 阴影 - 更柔和的阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(42, 47, 58, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(42, 47, 58, 0.08), 0 2px 4px -1px rgba(42, 47, 58, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(42, 47, 58, 0.08), 0 4px 6px -2px rgba(42, 47, 58, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(42, 47, 58, 0.08), 0 10px 10px -5px rgba(42, 47, 58, 0.03);
    
    /* 圆角 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* 过渡 */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
    
    /* 玻璃效果 */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 8px 32px 0 rgba(42, 47, 58, 0.08);
}

/* 暗色主题 */
[data-theme="dark"] {
    --bg-primary: #1f2937;
    --bg-secondary: #111827;
    --bg-tertiary: #0f172a;
    
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    
    --border-light: #374151;
    --border-medium: #4b5563;
    
    --glass-bg: rgba(31, 41, 55, 0.8);
    --glass-border: rgba(75, 85, 99, 0.2);
    
    /* 暗色主题下的neutral-gray变量 */
    --neutral-gray-50: #334155;
    --neutral-gray-100: #475569;
    --neutral-gray-200: #64748b;
    --neutral-gray-300: #94a3b8;
    --neutral-gray-400: #cbd5e1;
    --neutral-gray-500: #e2e8f0;
    --neutral-gray-600: #f1f5f9;
    --neutral-gray-700: #f8fafc;
    --neutral-gray-800: #f8fafc;
    --neutral-gray-900: #f8fafc;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* 工具容器 */
.tools-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航栏 */
.tools-header {
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem 1rem 0rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

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

.brand-title a {
    color: #4a9c01;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.brand-title a:hover {
    color: var(--primary-green);
}

.brand-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--neutral-gray-700);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    color: var(--primary-green);
}

/* 主题切换按钮 */
.theme-toggle .dark-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .light-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .dark-icon {
    display: block;
}

/* 工具导航 */
.tools-nav {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    position: relative;
    min-height: 48px;
}

.nav-tab:not(.disabled):hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.nav-tab.active {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-light));
    color: white;
    box-shadow: var(--shadow-md);
}

.nav-tab.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.nav-tab small {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: -0.125rem;
}

/* 主内容区域 */
.tools-main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0rem 0.75rem;
    width: 100%;
}

/* 工具面板 */
.tool-panel {
    display: none;
}

.tool-panel.active {
    display: block;
}

/* 即将上线状态 */
.coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.coming-soon-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.coming-soon-icon i {
    font-size: 2rem;
    color: white;
}

.coming-soon h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.coming-soon p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    text-align: center;
    max-width: 300px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-primary);
    font-weight: 500;
}

/* ================================================
   现代化查询等待效果
   ================================================ */

/* 查询等待遮罩 */
.query-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.query-loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 查询等待内容容器 */
.query-loading-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    padding: 3rem 2.5rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.query-loading-overlay.show .query-loading-content {
    transform: scale(1);
}

/* 背景装饰效果 */
.query-loading-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(74, 156, 1, 0.1),
        transparent,
        rgba(74, 156, 1, 0.1),
        transparent
    );
    animation: rotate 3s linear infinite;
    z-index: -1;
}

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

/* 主加载动画 */
.query-loading-animation {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
}

/* 外圈旋转环 */
.query-loading-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid var(--primary-green);
    border-radius: 50%;
    animation: query-spin 1.5s linear infinite;
}

.query-loading-ring:nth-child(2) {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border-top-color: var(--accent-blue);
    animation: query-spin 1.2s linear infinite reverse;
}

.query-loading-ring:nth-child(3) {
    width: 40%;
    height: 40%;
    top: 30%;
    left: 30%;
    border-top-color: var(--primary-green-light);
    animation: query-spin 0.8s linear infinite;
}

@keyframes query-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 中心图标 */
.query-loading-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    color: var(--primary-green);
    animation: pulse 2s ease-in-out infinite;
}

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

/* 加载文本 */
.query-loading-text {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.025em;
}

.query-loading-subtext {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 400;
    opacity: 0.8;
}

/* 进度条 */
.query-loading-progress {
    width: 100%;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    margin-top: 1.5rem;
    overflow: hidden;
    position: relative;
}

.query-loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-blue));
    border-radius: 2px;
    width: 0%;
    animation: progress 2s ease-in-out infinite;
    position: relative;
}

.query-loading-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 暗色主题适配 */
[data-theme="dark"] .query-loading-content {
    background: rgba(31, 41, 55, 0.9);
    border-color: rgba(75, 85, 99, 0.3);
}

[data-theme="dark"] .query-loading-content::before {
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(74, 156, 1, 0.2),
        transparent,
        rgba(74, 156, 1, 0.2),
        transparent
    );
}

[data-theme="dark"] .query-loading-progress {
    background: var(--gray-700);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .query-loading-content {
        padding: 2rem 1.5rem;
        max-width: 320px;
    }
    
    .query-loading-animation {
        width: 60px;
        height: 60px;
        margin-bottom: 1.5rem;
    }
    
    .query-loading-icon {
        width: 20px;
        height: 20px;
    }
    
    .query-loading-text {
        font-size: 1rem;
    }
    
    .query-loading-subtext {
        font-size: 0.8rem;
    }
}

/* 成功完成动画 */
.query-loading-overlay.completing .query-loading-animation {
    animation: success-bounce 0.6s ease-out;
}

@keyframes success-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.query-loading-overlay.completing .query-loading-icon {
    animation: success-check 0.6s ease-out;
}

@keyframes success-check {
    0% { transform: translate(-50%, -50%) scale(0); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    padding: 1rem;
    /* 移除蒙版的过渡效果，保持直接显示/隐藏 */
}

.modal-container {
    background: var(--bg-primary);
    border-radius: 20px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.15),
        0 8px 20px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 90vw;
    max-height: 90vh;
    min-width: 35vw;
    overflow: auto;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay:not([style*="display: none"]) .modal-container {
    transform: translateY(0) scale(1);
}

/* 弹窗头部样式 */
.modal-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    padding: 1.5rem 2rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 15px 15px 0 0;
}

[data-theme="dark"] .modal-header {
    background: var(--bg-tertiary);
    border-bottom-color: var(--border-medium);
}

.modal-title {
    color: var(--gray-100);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 1rem;
    position: relative;
    z-index: 10;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--accent-red);
    transform: scale(1.1);
}

.modal-close:active {
    transform: scale(0.95);
}

[data-theme="dark"] .modal-close {
    color: var(--text-secondary);
}

[data-theme="dark"] .modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-red);
}

.modal-body {
    padding: 0;
    overflow: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-title {
        font-size: 1rem;
    }
    
    .modal-close {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    .header-content {
        padding: 0 0.75rem;
        height: 60px;
    }
    
    .brand-logo {
        width: 32px;
        height: 32px;
    }
    
    .brand-title {
        font-size: 1.125rem;
    }
    
    .brand-subtitle {
        font-size: 0.75rem;
    }
    
    .action-btn {
        width: 40px;
        height: 40px;
    }
    
    .nav-container {
        padding: 0 0.75rem;
    }
    
    .nav-tab {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    .tools-main {
        padding: 1rem 0.75rem;
    }
    
    .coming-soon {
        padding: 3rem 1rem;
    }
    
    .coming-soon-icon {
        width: 60px;
        height: 60px;
    }
    
    .coming-soon-icon i {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 0.75rem 1rem;
    }
    
    .modal-title {
        font-size: 0.875rem;
    }
    
    .modal-close {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
        padding: 0.25rem;
    }
    
    .nav-tab {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
        padding: 0.5rem 0.75rem;
    }
    
    .nav-tab small {
        margin-top: 0;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--gray-800);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--gray-600);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* 用户状态显示样式 - 与首页保持一致 */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 0.25rem 0.5rem;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-light) 100%);
    color: white;
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
}

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

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0; /* 允许缩小 */
    flex-shrink: 1; /* 允许在空间不够时缩小 */
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--neutral-gray-800);
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    color: var(--neutral-gray-600);
    line-height: 1.2;
}



.user-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.user-actions .action-btn {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
}

.login-actions {
    display: flex;
    align-items: center;
}

.login-actions .login-btn {
    width: auto;
    height: 40px;
    padding: 0 1rem;
    border-radius: 22px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--neutral-gray-700);
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-actions .login-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    color: var(--primary-green);
}

.login-btn span {
    font-size: 0.9rem;
}

/* 暗色主题适配 */
[data-theme="dark"] .user-info {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .user-info:hover {
    background: rgba(30, 41, 59, 0.9);
}

[data-theme="dark"] .user-name {
    color: var(--neutral-gray-200);
}

[data-theme="dark"] .user-role {
    color: var(--neutral-gray-400);
}

[data-theme="dark"] .action-btn {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--neutral-gray-200);
}

[data-theme="dark"] .action-btn:hover {
    background: rgba(30, 41, 59, 0.9);
    color: var(--primary-green-light);
}

[data-theme="dark"] .login-actions .login-btn {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--neutral-gray-200);
}

[data-theme="dark"] .login-actions .login-btn:hover {
    background: rgba(30, 41, 59, 0.9);
    color: var(--primary-green-light);
}

/* 内联工具导航样式 */
.tools-nav-inline {
    display: flex;
    align-items: center;
    margin: 0 2rem;
}

/* 导航下拉菜单样式 */
.nav-tab-dropdown {
    position: relative;
    display: inline-block;
}

.nav-tab-dropdown .nav-tab {
    position: relative;
}

.dropdown-arrow {
    font-size: 0.75rem;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.nav-tab-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 0;
    backdrop-filter: blur(10px);
}

.nav-tab-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: var(--radius-md);
    margin: 0 0.5rem 0.25rem;
    font-weight: 500;
    font-size: 0.8rem;
    position: relative;
    overflow: hidden;
}

.nav-dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-green-alpha), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: -1;
}

.nav-dropdown-item:hover {
    color: var(--primary-green);
    text-decoration: none;
    transform: translateX(4px);
}

.nav-dropdown-item:hover::before {
    opacity: 1;
}

.nav-dropdown-item.active {
    background: var(--primary-green);
    color: white;
    font-weight: 600;
}

.nav-dropdown-item.active::before {
    opacity: 0;
}

.nav-dropdown-item i {
    margin-right: 0.75rem;
    width: 16px;
    text-align: center;
    font-size: 0.9rem;
}

.nav-dropdown-item:last-child {
    margin-bottom: 0;
}

.tools-nav-inline .nav-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    background: transparent;
    border-radius: 10px;
    color: var(--neutral-gray-600);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    white-space: nowrap;
}

.tools-nav-inline .nav-tab:hover:not(.disabled) {
    background: rgba(74, 156, 1, 0.1);
    color: var(--primary-green);
}

.tools-nav-inline .nav-tab.active {
    background: var(--primary-green);
    color: white;
}

.tools-nav-inline .nav-tab.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}

.tools-nav-inline .nav-tab small {
    font-size: 0.7rem;
    opacity: 0.8;
}

[data-theme="dark"] .tools-nav-inline .nav-tab {
    color: var(--neutral-gray-400);
}

[data-theme="dark"] .tools-nav-inline .nav-tab:hover:not(.disabled) {
    background: rgba(74, 156, 1, 0.2);
    color: var(--primary-green-light);
}

/* 中等屏幕优化 - 969px-1009px宽度区间 */
@media (min-width: 969px) and (max-width: 1009px) {
    .header-content {
        padding: 0 1rem; /* 减少左右内边距 */
    }
    
    .brand-area {
        gap: 0.5rem; /* 减少logo和文字间的间距 */
    }
    
    .brand-title {
        font-size: 1.1rem; /* 稍微减小字体大小 */
        white-space: nowrap; /* 防止文字换行 */
    }
    
    .tools-nav-inline {
        margin: 0 0.75rem; /* 减少导航区域左右边距 */
    }
    
    .tools-nav-inline .nav-tab {
        padding: 0.75rem 1rem; /* 减少导航按钮内边距 */
        font-size: 0.8rem; /* 稍微减小导航按钮字体 */
    }
    
    .user-info {
        padding: 0.4rem 0.75rem; /* 减少用户信息区域内边距 */
        margin-right: 0.25rem; /* 减少右边距 */
    }
    
    .user-name {
        font-size: 0.85rem; /* 稍微减小用户名字体 */
        white-space: nowrap; /* 防止用户名换行 */
        overflow: hidden; /* 隐藏溢出内容 */
        text-overflow: ellipsis; /* 显示省略号 */
        max-width: 100px; /* 限制最大宽度 */
    }
    
    .user-role {
        font-size: 0.7rem; /* 减小用户级别字体 */
        white-space: nowrap; /* 防止用户级别换行 */
        overflow: hidden; /* 隐藏溢出内容 */
        text-overflow: ellipsis; /* 显示省略号 */
        max-width: 80px; /* 限制最大宽度 */
    }
    
    .user-actions .action-btn {
        width: 28px; /* 减小用户操作按钮尺寸 */
        height: 28px;
        font-size: 0.8rem;
    }
    
    .action-btn {
        width: 40px; /* 减小普通操作按钮尺寸 */
        height: 40px;
    }
}

/* 极窄屏幕优化 - 1000px-1010px临界宽度 */
@media (min-width: 1000px) and (max-width: 1010px) {
    .header-content {
        padding: 0 0.75rem; /* 进一步减少内边距 */
    }
    
    .tools-nav-inline {
        margin: 0 0.5rem; /* 进一步减少导航边距 */
    }
    
    .tools-nav-inline .nav-tab {
        padding: 0.7rem 0.8rem; /* 进一步减少导航按钮内边距 */
        font-size: 0.75rem; /* 进一步减小字体 */
    }
    
    .user-info {
        padding: 0.3rem 0.6rem; /* 进一步减少用户信息内边距 */
    }
    
    .user-name {
        max-width: 80px; /* 进一步限制用户名宽度 */
        font-size: 0.8rem;
    }
    
    .user-role {
        max-width: 70px; /* 进一步限制用户级别宽度 */
        font-size: 0.65rem;
    }
}

/* 响应式调整 */
@media (max-width: 968px) {
    .tools-nav-inline {
        margin: 0 1rem;
    }
    
    .tools-nav-inline .nav-tab span {
        display: none;
    }
    
    .tools-nav-inline .nav-tab {
        padding: 0.75rem;
        min-width: 44px;
        justify-content: center;
    }
    
    .tools-nav-inline .nav-tab small {
        display: none;
    }
}

@media (max-width: 768px) {
    .user-details {
        display: none;
    }
    
    .user-info {
        padding: 0.5rem;
    }
    
    .login-btn span {
        display: none;
    }
    
    .login-actions .login-btn {
        width: 40px;
        padding: 0;
    }
    
    .tools-nav-inline {
        display: none;
    }
    
    .nav-dropdown-menu {
        position: fixed;
        left: 1rem;
        right: 1rem;
        top: auto;
        width: auto;
        min-width: auto;
        transform: translateX(0) translateY(-5px);
    }
    
    .nav-tab-dropdown:hover .nav-dropdown-menu {
        transform: translateX(0) translateY(0);
    }
}


@media (max-width: 480px) {
    .user-info {
        padding: 0.25rem 0.5rem;
    }
    
    .user-avatar {
        width: 24px;
        height: 24px;
    }
    
    .user-name {
        font-size: 0.75rem;
        max-width: 60px;
    }
    
    .user-role {
        font-size: 0.65rem;
        padding: 0.075rem 0.25rem;
    }
    
    .login-btn span {
        display: none;
    }
    
    .login-btn {
        padding: 0.375rem;
        min-width: 40px;
        justify-content: center;
    }
} 

/* 新增：中等屏幕优化 - 1011px-1014px临界宽度 */
@media (min-width: 1011px) and (max-width: 1014px) {
    .header-content {
        padding: 0 0.9rem;
    }

    .brand-area {
        gap: 0.5rem;
    }

    .brand-title {
        font-size: 1.15rem;
        white-space: nowrap;
    }

    .tools-nav-inline {
        margin: 0 0.75rem;
    }

    .tools-nav-inline .nav-tab {
        padding: 0.7rem 1rem;
        font-size: 0.8rem;
    }

    .user-info {
        padding: 0.4rem 0.75rem;
    }

    .user-name,
    .user-role {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .user-name { max-width: 110px; }
    .user-role { max-width: 90px; }
}

/* iPad Pro 和移动端浏览器优化 - 1015px-1056px宽度范围 */
@media (min-width: 1015px) and (max-width: 1056px) {
    .header-content {
        padding: 0 1rem; /* 减少左右内边距 */
        height: 64px; /* 确保高度一致 */
    }
    
    .brand-area {
        gap: 0.6rem; /* 减少logo和文字间的间距 */
        flex-shrink: 0; /* 防止logo区域被压缩 */
    }
    
    .brand-logo {
        width: 42px; /* 稍微减小logo尺寸 */
        height: 42px;
    }
    
    .brand-title {
        font-size: 1.1rem; /* 减小标题字体 */
        white-space: nowrap; /* 防止文字换行 */
    }
    
    .brand-text {
        min-width: 0; /* 允许文字区域缩小 */
    }
    
    .tools-nav-inline {
        margin: 0 0.5rem; /* 减少导航区域左右边距 */
        flex-shrink: 1; /* 允许导航区域在空间不足时缩小 */
    }
    
    .tools-nav-inline .nav-tab {
        padding: 0.65rem 0.9rem; /* 减少导航按钮内边距 */
        font-size: 0.8rem; /* 减小导航按钮字体 */
        gap: 0.4rem; /* 减少图标和文字间距 */
    }
    
    .tools-nav-inline .nav-tab span {
        white-space: nowrap; /* 防止导航文字换行 */
    }
    
    .header-actions {
        gap: 0.4rem; /* 减少操作按钮间距 */
        flex-shrink: 0; /* 防止操作区域被压缩 */
    }
    
    .user-info {
        padding: 0.4rem 0.7rem; /* 减少用户信息区域内边距 */
        margin-right: 0.3rem; /* 减少右边距 */
        gap: 0.6rem; /* 减少内部元素间距 */
        border-radius: 22px; /* 稍微减小圆角 */
        max-width: 180px; /* 限制最大宽度 */
    }
    
    .user-avatar {
        width: 22px; /* 稍微减小头像尺寸 */
        height: 22px;
        flex-shrink: 0; /* 防止头像被压缩 */
    }
    
    .user-details {
        min-width: 0; /* 允许用户详情区域缩小 */
        flex-shrink: 1; /* 允许在空间不够时缩小 */
    }
    
    .user-name {
        font-size: 0.85rem; /* 减小用户名字体 */
        white-space: nowrap; /* 防止用户名换行 */
        overflow: hidden; /* 隐藏溢出内容 */
        text-overflow: ellipsis; /* 显示省略号 */
        max-width: 90px; /* 限制最大宽度 */
    }
    
    .user-role {
        font-size: 0.7rem; /* 减小用户级别字体 */
        white-space: nowrap; /* 防止用户级别换行 */
        overflow: hidden; /* 隐藏溢出内容 */
        text-overflow: ellipsis; /* 显示省略号 */
        max-width: 80px; /* 限制最大宽度 */
    }
    
    .user-actions {
        gap: 0.2rem; /* 减少用户操作按钮间距 */
    }
    
    .user-actions .action-btn {
        width: 30px; /* 减小用户操作按钮尺寸 */
        height: 30px;
        font-size: 0.8rem;
    }
    
    .action-btn {
        width: 42px; /* 稍微减小普通操作按钮尺寸 */
        height: 42px;
        font-size: 0.9rem;
    }
    
    .login-actions .login-btn {
        height: 38px; /* 减小登录按钮高度 */
        padding: 0 0.9rem; /* 减少内边距 */
        border-radius: 20px; /* 调整圆角 */
        font-size: 0.85rem; /* 减小字体 */
    }
    
    .login-btn span {
        font-size: 0.85rem; /* 确保登录文字字体一致 */
        white-space: nowrap; /* 防止登录文字换行 */
    }
} 