/* ==================== 全局样式 ==================== */
:root {
    /* 主色调 */
    --primary-color: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #3B82F6;
    
    /* 辅助色 */
    --accent-orange: #F59E0B;
    --accent-green: #10B981;
    --accent-purple: #8B5CF6;
    --accent-cyan: #06B6D4;
    
    /* 中性色 */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-tertiary: #F1F5F9;
    --border-color: #E2E8F0;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-tertiary: #94A3B8;
    
    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);
    
    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* 过渡 */
    --transition: all 0.3s ease;
}

/* 暗色主题 */
body.dark-theme {
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    --border-color: #334155;
    --text-primary: #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-tertiary: #94A3B8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* ==================== 顶部导航栏 ==================== */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

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

.logo i {
    font-size: 28px;
}

.main-nav {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.nav-item {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    color: white;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: var(--text-tertiary);
}

.search-box input {
    padding: 8px 12px 8px 36px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 14px;
    width: 200px;
    transition: var(--transition);
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.search-box input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    width: 260px;
}

/* 快捷键提示 */
.search-shortcut-hint {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
    transition: opacity 0.2s;
}

.search-box input:focus ~ .search-shortcut-hint {
    opacity: 0;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(15deg);
}

/* ==================== 通用工具组件样式 ==================== */
/* 模式切换标签 */
.mode-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 3px;
}

.mode-tab {
    flex: 1;
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: calc(var(--radius-md) - 2px);
    transition: var(--transition);
    white-space: nowrap;
}

.mode-tab.active {
    background: var(--bg-primary);
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mode-tab:hover:not(.active) {
    color: var(--text-primary);
}

/* 输入标签 */
.input-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* 文本域 */
.input-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.input-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 结果面板 */
.result-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}

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

.result-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.result-actions {
    display: flex;
    gap: 6px;
}

/* 结果项 */
.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

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

.result-item:hover {
    background: var(--bg-tertiary);
}

.result-value {
    font-weight: 600;
    color: var(--text-primary);
}

.result-count {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.result-list {
    max-height: 360px;
    overflow-y: auto;
}

.result-item.highlight {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* 按钮变体 */
.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ==================== 主体布局 ==================== */
.main-container {
    display: flex;
    max-width: 1920px;
    margin: 0 auto;
    min-height: calc(100vh - 64px);
}

/* ==================== 侧边栏 ==================== */
.sidebar {
    width: 280px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    transition: var(--transition);
}

.sidebar-content {
    padding: 20px 0;
}

.recent-tools {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.favorite-tools {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.favorite-empty {
    padding: 12px 20px;
    color: var(--text-tertiary);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorite-empty i {
    font-size: 16px;
    color: var(--accent-orange);
}

/* ==================== 右侧边栏（最近使用） ==================== */
.sidebar-right {
    width: 260px;
    flex-shrink: 0;
    border-left: 1px solid var(--border-color);
    background: var(--bg-sidebar);
    overflow-y: auto;
    height: calc(100vh - 56px);
    position: sticky;
    top: 56px;
}

.sidebar-right-content {
    padding: 16px 0;
}

.sidebar-right .recent-tools {
    padding: 0;
}

.sidebar-right .tool-item {
    font-size: 13px;
}

.sidebar-right .recent-empty {
    padding: 12px 20px;
    color: var(--text-tertiary);
    font-size: 13px;
}

.sidebar-right .category-title {
    padding: 12px 20px;
}

.category-title {
    padding: 12px 20px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 二级分类标题样式 */
.subcategory-title {
    font-size: 12px;
    padding: 10px 20px;
    color: var(--text-tertiary);
    text-transform: none;
    letter-spacing: 0.3px;
    margin-top: 8px;
}

.subcategory-title i {
    font-size: 12px;
    opacity: 0.8;
}

.tool-item {
    padding: 12px 20px;
    margin: 2px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    text-decoration: none;
}

.tool-item i {
    width: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.tool-item:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.tool-item:hover i {
    color: var(--primary-color);
}

.tool-item.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.tool-item.active i {
    color: white;
}

/* 更多工具按钮样式 */
.tool-item.more-tools {
    color: var(--text-tertiary);
    font-size: 13px;
    font-style: italic;
}

.tool-item.more-tools:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

/* ==================== 主内容区 ==================== */
.content-area {
    flex: 1;
    background: var(--bg-secondary);
    overflow-y: auto;
}

.tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* ==================== 首页内容 ==================== */
.welcome-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 48px 32px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 32px;
    box-shadow: var(--shadow-lg);
}

.welcome-banner h1 {
    font-size: 36px;
    margin-bottom: 12px;
}

.welcome-banner p {
    font-size: 18px;
    opacity: 0.9;
}

.quick-access,
.features {
    margin-bottom: 40px;
}

.quick-access h2,
.features h2 {
    font-size: 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.tool-card {
    background: var(--bg-primary);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

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

.tool-card i {
    font-size: 36px;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.tool-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.tool-card p {
    font-size: 13px;
    color: var(--text-secondary);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--bg-primary);
    padding: 32px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}

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

.feature-card i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ==================== 工具面板样式 ==================== */
.tool-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-header {
    margin-bottom: 24px;
}

.tool-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tool-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 面板子区（兼容 panel-header/panel-body 模式） */
.panel-header {
    margin-bottom: 20px;
}

.panel-header h2 {
    font-size: 20px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-header h2 i {
    font-size: 18px;
    opacity: 0.7;
}

.panel-header p {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0;
}

.panel-body {
    /* 面板内容容器 */
}

.tool-panel {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
    font-family: 'Consolas', 'Monaco', monospace;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-success {
    background: var(--accent-green);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 信息提示框 */
.info-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-top: 20px;
}

.info-box h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.info-box h4 i {
    color: var(--primary-color);
}

.info-box ul {
    margin: 0;
    padding-left: 18px;
}

.info-box li {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2px;
}

/* 分类页面空状态占位 */
.category-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    text-align: center;
}

.category-placeholder i {
    font-size: 56px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    opacity: 0.5;
}

.category-placeholder h2 {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.category-placeholder p {
    font-size: 14px;
    color: var(--text-tertiary);
}

/* ==================== Toast 提示 ==================== */
.toast {
    position: fixed;
    top: 80px;
    right: 24px;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    animation: slideIn 0.3s ease;
}

.toast.show {
    display: flex;
}

.toast.success {
    border-left: 4px solid var(--accent-green);
}

.toast.error {
    border-left: 4px solid #EF4444;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.hiding {
    animation: slideOut 0.3s ease forwards;
}

/* ==================== 面包屑导航 ==================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    margin-bottom: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    flex-wrap: wrap;
}

.breadcrumb-item {
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.breadcrumb-item[data-nav]:hover {
    color: var(--primary-color);
}

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

.breadcrumb-separator {
    color: var(--text-tertiary);
    user-select: none;
}

/* 收藏按钮 */
.favorite-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.favorite-btn:hover {
    color: var(--accent-orange);
    transform: scale(1.15);
}

.favorite-btn.active {
    color: var(--accent-orange);
}

.favorite-btn.active:hover {
    color: #D97706;
}

/* 离线横幅 */
.offline-banner {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #EF4444;
    color: white;
    padding: 8px 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==================== 骨架屏 ==================== */
/* 分类分组间距 */
.tool-category {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.tool-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

:root {
    --skeleton-base: #E2E8F0;
    --skeleton-shine: #F1F5F9;
}

body.dark-theme {
    --skeleton-base: #334155;
    --skeleton-shine: #475569;
}

.skeleton-line {
    height: 16px;
    margin-bottom: 12px;
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg,
        var(--skeleton-base) 25%,
        var(--skeleton-shine) 50%,
        var(--skeleton-base) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-block {
    border-radius: var(--radius-md);
    background: var(--skeleton-base);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-title {
    height: 24px;
    width: 40%;
    margin-bottom: 16px;
}

.skeleton-panel {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==================== 错误边界 ==================== */
.error-boundary {
    text-align: center;
    padding: 80px 24px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.error-boundary .error-icon {
    font-size: 64px;
    color: var(--accent-orange);
    margin-bottom: 16px;
}

.error-boundary h2 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.error-boundary p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 14px;
}

.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== 平板横屏响应式优化 ==================== */
@media (min-width: 1024px) and (max-width: 1280px) {
    .sidebar {
        width: 240px;
    }
    
    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* ==================== 移动端适配 ==================== */
/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 88px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    z-index: 998;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 999;
    font-size: 20px;
}

@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 64px;
        height: calc(100vh - 64px);
        z-index: 998;
        box-shadow: var(--shadow-lg);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 16px;
    }
    
    .main-nav {
        display: none;
    }
    
    .search-box {
        display: none;
    }
    
    .tool-container {
        padding: 20px 16px;
    }
    
    .welcome-banner {
        padding: 32px 20px;
    }
    
    .welcome-banner h1 {
        font-size: 24px;
    }
    
    .welcome-banner p {
        font-size: 14px;
    }
    
    .tool-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== 工具特定样式 ==================== */
.split-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.panel-section {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: var(--radius-md);
}

.panel-section h3 {
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 16px;
}

.result-display {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    min-height: 100px;
    font-family: 'Consolas', 'Monaco', monospace;
    white-space: pre-wrap;
    word-break: break-all;
}

.qrcode-display {
    text-align: center;
    padding: 24px;
}

.qrcode-display canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
}

.upload-area i {
    font-size: 48px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.preview-container {
    margin-top: 20px;
    text-align: center;
}

.preview-container img {
    max-width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .split-panel {
        grid-template-columns: 1fr;
    }
}

/* ==================== V3.5 生活工具通用样式 ==================== */

/* 模式切换 Tab */
.mode-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 4px;
    flex-wrap: wrap;
}

.mode-tab {
    flex: 1;
    min-width: 80px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.mode-tab:hover {
    color: var(--text-primary);
}

.mode-tab.active {
    background: var(--bg-primary);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.mode-panel {
    animation: fadeIn 0.25s ease;
}

/* 表单控件 */
.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-input,
.form-select,
.form-textarea,
.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 结果卡片 */
.result-card {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    animation: fadeIn 0.3s ease;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.result-item {
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-item.highlight {
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.result-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.result-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Radio 组 */
.radio-group {
    display: flex;
    gap: 24px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
}

.radio-label input[type="radio"] {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

/* 安全提示 */
.notice-box {
    padding: 12px 16px;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.notice-box i {
    color: var(--primary-color);
    font-size: 16px;
}

/* btn-lg 大按钮 */
.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

/* ==================== BMI 计算器样式 ==================== */
.bmi-score {
    text-align: center;
    padding: 16px 0;
}

.bmi-number {
    font-size: 52px;
    font-weight: 700;
    display: block;
    line-height: 1.2;
    color: var(--text-primary);
}

.bmi-label {
    font-size: 18px;
    font-weight: 600;
    margin-top: 4px;
    display: block;
}

.bmi-bar-container {
    margin: 16px 0;
    padding: 0 4px;
}

.bmi-bar-track {
    position: relative;
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    overflow: visible;
}

.bmi-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s ease, background 0.4s;
    background: var(--primary-color);
}

.bmi-bar-marker {
    position: absolute;
    top: -4px;
    width: 20px;
    height: 20px;
    background: var(--bg-primary);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    transform: translateX(-50%);
    transition: left 0.6s ease;
    box-shadow: var(--shadow-sm);
}

.bmi-bar-labels {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: center;
}

.bmi-details {
    margin-top: 12px;
    text-align: center;
}

.bmi-info-item {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 8px;
}

.bmi-info-key {
    color: var(--text-tertiary);
    font-size: 13px;
}

.bmi-info-val {
    color: var(--text-primary);
    font-size: 13px;
}

.bmi-ideal {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* ==================== 硬币动画 ==================== */
.coin-container {
    display: flex;
    justify-content: center;
    margin: 16px 0 24px;
}

.coin {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FBBF24, #F59E0B);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    transition: transform 0.1s;
    position: relative;
    cursor: pointer;
    user-select: none;
}

.coin .coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
}

.coin .coin-face.front {
    background: linear-gradient(135deg, #FBBF24, #F59E0B);
}

.coin .coin-face.front i {
    font-size: 40px;
    color: #92400E;
}

.coin .coin-face.back {
    background: linear-gradient(135deg, #D97706, #B45309);
    font-size: 40px;
    font-weight: 700;
    color: #FDE68A;
    transform: rotateY(180deg);
}

.coin.flipping {
    animation: coinFlip 1.5s ease-out;
}

@keyframes coinFlip {
    0% { transform: rotateY(0) scale(1); }
    25% { transform: rotateY(360deg) scale(1.15); }
    50% { transform: rotateY(720deg) scale(1.2); }
    75% { transform: rotateY(1080deg) scale(1.1); }
    100% { transform: rotateY(1260deg) scale(1); }
}

.coin.result-front .front { animation: coinResult 0.4s ease; }
.coin.result-back .back { animation: coinResult 0.4s ease; }

@keyframes coinResult {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.coin-result-text {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    animation: fadeIn 0.4s ease;
}

/* ==================== 骰子样式 ==================== */
.dice-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dice-input-group label {
    font-size: 13px;
    color: var(--text-secondary);
}

.dice-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.dice-faces {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 8px 0;
}

.dice-dot {
    width: 60px;
    height: 60px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    transition: all 0.1s;
}

.dice-dot.final {
    width: 72px;
    height: 72px;
    font-size: 28px;
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    animation: dicePop 0.4s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

@keyframes dicePop {
    0% { transform: scale(0.5); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.dice-sum {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    padding: 8px;
    color: var(--text-primary);
}

/* ==================== 随机抽取样式 ==================== */
.random-pick-result {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pick-item {
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    animation: fadeIn 0.3s ease;
}

/* ==================== 身份证结果样式 ==================== */
.idcard-status {
    text-align: center;
    padding: 12px;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
}

.idcard-status i {
    margin-right: 6px;
}

/* ==================== 房贷计算器样式 ==================== */
.mortgage-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.mortgage-table th,
.mortgage-table td {
    padding: 8px 10px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.mortgage-table th {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.mortgage-table td {
    color: var(--text-primary);
}

.mortgage-table tbody tr:hover {
    background: var(--bg-tertiary);
}

/* ==================== 秒表/计时器样式 ==================== */
.stopwatch-display {
    text-align: center;
    padding: 24px 16px;
}

.stopwatch-time {
    font-size: 56px;
    font-weight: 700;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: var(--text-primary);
    letter-spacing: 2px;
}

.stopwatch-laps {
    max-height: 220px;
    overflow-y: auto;
}

.lap-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    font-family: 'Consolas', 'Monaco', monospace;
    color: var(--text-secondary);
}

.lap-row:first-child {
    color: var(--primary-color);
    font-weight: 600;
}

.countdown-inputs {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 16px;
}

.countdown-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.countdown-field label {
    font-size: 13px;
    color: var(--text-secondary);
}

.countdown-field input {
    width: 80px;
    text-align: center;
}

/* ==================== 随机点名器样式 ==================== */
.name-picker-animation {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.name-picker-roller {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    transition: transform 0.05s;
}

.name-picker-roller.rolling {
    animation: nameRollPulse 0.1s ease infinite alternate;
    color: var(--text-secondary);
}

.name-picker-roller.finish {
    animation: namePickFinal 0.5s ease;
    color: var(--primary-color);
}

@keyframes nameRollPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

@keyframes namePickFinal {
    0% { transform: scale(2); opacity: 0; }
    60% { transform: scale(0.95); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.name-pick-big {
    animation: namePickBig 0.6s ease;
}

@keyframes namePickBig {
    0% { transform: scale(0) rotate(-20deg); }
    60% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* ==================== 时区转换样式 ==================== */
/* 时区下拉框 */
#timezone-from,
#timezone-to {
    font-size: 13px;
}

#timezone-result-grid .result-item:first-child {
    background: rgba(20, 184, 166, 0.08);
    border: 1px solid rgba(20, 184, 166, 0.2);
}

/* ==================== 世界时钟卡片样式 ==================== */
.wc-clock-card {
    flex: 1 1 240px;
    min-width: 220px;
    max-width: 280px;
    border-radius: var(--radius-md);
    padding: 20px 16px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.3s ease;
}

.wc-night-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

.wc-clock-city {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.wc-clock-time {
    font-size: 32px;
    font-weight: 700;
    font-family: 'Consolas', 'Monaco', monospace;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.wc-clock-date {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 6px;
    position: relative;
    z-index: 1;
}

.wc-clock-offset {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
    position: relative;
    z-index: 1;
}

.wc-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
}

.wc-clock-card:hover .wc-remove-btn {
    opacity: 1;
}

.wc-remove-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* ==================== 摩斯密码样式 ==================== */
.mc-reference-table {
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    max-height: 200px;
    overflow-y: auto;
}

/* ==================== 昵称生成器样式 ==================== */
.ng-nickname-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.ng-nickname-item:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.ng-nickname-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.ng-nickname-tag {
    font-size: 10px;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.ng-copy-one {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.ng-nickname-item:hover .ng-copy-one {
    opacity: 1;
}

.ng-copy-one:hover {
    background: var(--bg-tertiary);
}

/* ==================== 个税计算器样式 ==================== */
#tax-result-grid .result-item.highlight {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ==================== 万年历样式 ==================== */
.cv-day-cell:hover {
    background: rgba(37, 99, 235, 0.06);
    border-radius: 4px;
}

/* ==================== 垃圾分类样式 ==================== */
.pl-quick-btn {
    transition: all 0.2s;
}
.pl-quick-btn:hover {
    background: var(--primary-color) !important;
    color: #fff !important;
}

/* V3.5 响应式 */
@media (max-width: 768px) {
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .input-row,
    .dice-row {
        grid-template-columns: 1fr;
    }
    
    .mode-tabs {
        flex-direction: column;
    }
    
    .mode-tab {
        text-align: center;
    }
    
    .dice-dot.final {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }
    
    .bmi-number {
        font-size: 40px;
    }
    
    .bmi-bar-labels {
        font-size: 10px;
    }
    
    .sidebar-right {
        display: none;
    }
}
