/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主色调 - 浅色主题 */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    
    /* 背景色 - 白色主题 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    /* 文字颜色 */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    
    /* 边框和阴影 */
    --border-color: #e2e8f0;
    --border-color-hover: #cbd5e1;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* 渐变色 */
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    
    /* Windows 和 Mac 主题色 */
    --windows-color: #0078d4;
    --windows-bg: #e7f3ff;
    --mac-color: #007aff;
    --mac-bg: #f0f5ff;
    
    /* 间距 */
    --sidebar-width: 280px;
    --topbar-height: 70px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', 'Helvetica', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==================== 背景装饰 ==================== */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: float 25s infinite ease-in-out;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: var(--gradient-1);
    top: -300px;
    left: -300px;
    animation-delay: 0s;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--gradient-3);
    bottom: -250px;
    right: -250px;
    animation-delay: -10s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: var(--gradient-2);
    top: 40%;
    right: -200px;
    animation-delay: -20s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(40px, -60px) rotate(120deg); }
    66% { transform: translate(-30px, 30px) rotate(240deg); }
}

/* ==================== 侧边栏 ==================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: white;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-md);
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
    background: white;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.nav-section {
    margin-bottom: 30px;
}

.nav-title {
    padding: 0 20px;
    margin-bottom: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--bg-secondary);
    color: var(--primary);
    font-weight: 600;
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.nav-label {
    flex: 1;
}

.nav-count {
    padding: 2px 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
}

.nav-item.active .nav-count {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: white;
}

.footer-stats {
    margin-bottom: 12px;
}

.stats-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.badge-icon {
    font-size: 1.1rem;
}

.badge-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.footer-copyright {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.copyright-text {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}

.copyright-link {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.copyright-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ==================== 主内容区 ==================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 0;
    background: transparent;
}

/* ==================== 顶部栏 ==================== */
.top-bar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    gap: 20px;
    z-index: 90;
    box-shadow: var(--shadow-sm);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.top-bar-center {
    flex: 1;
    max-width: 600px;
}

.search-box-modern {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.search-box-modern:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: white;
}

.search-icon {
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
}

.search-box-modern input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.search-box-modern input::placeholder {
    color: var(--text-tertiary);
}

.search-kbd {
    padding: 4px 8px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-family: monospace;
    box-shadow: var(--shadow-sm);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.system-switcher {
    display: flex;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.system-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.system-btn:hover {
    background: white;
    color: var(--text-primary);
}

.system-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.system-text {
    font-size: 0.95rem;
}

/* ==================== 统计卡片 ==================== */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 30px;
}

.stat-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-xl);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.stat-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ==================== 快捷键区域 ==================== */
.shortcuts-section {
    padding: 0 30px 30px 30px;
}

.shortcuts-container {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.shortcuts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    position: sticky;
    top: var(--topbar-height);
    z-index: 10;
}

.shortcuts-header.windows {
    background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
}

.shortcuts-header.mac {
    background: linear-gradient(135deg, #007aff 0%, #0051d5 100%);
}

.header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon {
    font-size: 1.8rem;
}

.header-title h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
}

.header-count {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
}

.shortcuts-grid {
    padding: 20px;
    display: grid;
    gap: 12px;
}

.category-group {
    margin-bottom: 20px;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.category-icon {
    font-size: 1.5rem;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.shortcuts-list {
    display: grid;
    gap: 10px;
}

.shortcut-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.shortcut-card:hover {
    background: white;
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.shortcut-keys {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: fit-content;
}

.key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 5px 10px;
    background: white;
    border: 1px solid var(--border-color);
    border-bottom: 3px solid var(--border-color-hover);
    border-radius: 6px;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.shortcut-card:hover .key {
    background: var(--primary);
    border-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.key-separator {
    color: var(--text-tertiary);
    font-size: 0.8rem;
    font-weight: 600;
}

.shortcut-desc {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==================== 无结果 ==================== */
.no-results {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-top: 20px;
}

.no-results-animation {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.no-results-animation svg {
    width: 50px;
    height: 50px;
    color: var(--text-tertiary);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.no-results p {
    font-size: 1rem;
    color: var(--text-tertiary);
}

/* ==================== Toast 提示 ==================== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-xl);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast svg {
    width: 20px;
    height: 20px;
    color: #10b981;
}

.toast span {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 250px;
    }
    
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .top-bar {
        padding: 0 15px;
    }
    
    .top-bar-center {
        max-width: 400px;
    }
    
    .page-title {
        display: none;
    }
    
    .search-kbd {
        display: none;
    }
    
    .system-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
        padding: 20px 15px;
    }
    
    .shortcuts-section {
        padding: 0 15px 20px 15px;
    }
    
    .shortcut-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-color-hover);
}

/* ==================== 选中文本样式 ==================== */
::selection {
    background: var(--primary);
    color: white;
}

/* 相关工具推荐 - 隐藏显示但保留SEO链接 */
.related-tools-seo {
    display: none;
    /* SEO优化：保留HTML中的链接供搜索引擎抓取，但不在页面上显示 */
}

/* 友情链接美化 */
.footer-links-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.3);
}


/* 专业级导航图标优化 */
.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.1);
}

.nav-icon svg {
    width: 20px;
    height: 20px;
    stroke: #6366f1;
    transition: all 0.3s ease;
}

.nav-item:hover .nav-icon {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-item:hover .nav-icon svg {
    stroke: white;
}

.nav-item.active .nav-icon {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.nav-item.active .nav-icon svg {
    stroke: white;
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
    .nav-icon {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    }
    .nav-icon svg {
        stroke: #818cf8;
    }
}
