/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部 */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem 0;
    text-align: center;
    color: white;
    position: relative;
}

/* 语言切换 */
.language-switch {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: flex;
    gap: 0.5rem;
    z-index: 100;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* 主内容 */
.main {
    padding: 3rem 0;
}

/* 搜索区域 */
.search-section {
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 1.1rem;
}

#searchInput {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: none;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    font-size: 1.1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* 分类网格 */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* 分类卡片 */
.category-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.category-header i {
    font-size: 2rem;
    color: #667eea;
}

.category-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

/* 链接列表 */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.sub-category {
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    margin: 1rem 0 0.5rem 0;
    padding-left: 0.5rem;
    border-left: 3px solid #667eea;
}

/* 工具链接 */
.tool-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    text-decoration: none;
    color: #333;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

/* 语言切换动画 */
[data-zh][data-en] {
    transition: all 0.3s ease;
}

/* 语言切换时的动画效果 */
.lang-switching {
    opacity: 0.7;
    transform: scale(0.98);
}

.tool-link:hover {
    background: #e3f2fd;
    border-left-color: #667eea;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.tool-link i {
    font-size: 1.3rem;
    color: #667eea;
    width: 24px;
    text-align: center;
}

.tool-link span {
    font-weight: 500;
    font-size: 1rem;
}

.tool-link small {
    color: #666;
    font-size: 0.85rem;
    margin-left: auto;
}

/* 隐藏元素 */
.hidden {
    display: none !important;
}

/* 底部 */
.footer {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

.footer p {
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-card {
        padding: 1.5rem;
        margin: 0 10px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .header {
        padding: 1.5rem 0;
    }
    
    .language-switch {
        top: 1.5rem;
        right: 1rem;
    }
    
    .lang-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .main {
        padding: 2rem 0;
    }
    
    .search-section {
        margin-bottom: 2rem;
    }
    
    .tool-link {
        padding: 0.8rem;
    }
    
    .tool-link span {
        font-size: 0.9rem;
    }
    
    .tool-link small {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .category-card {
        padding: 1rem;
        margin: 0 5px;
    }
    
    .logo {
        font-size: 1.8rem;
    }
    
    .language-switch {
        position: relative;
        top: auto;
        right: auto;
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .lang-btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.75rem;
    }
    
    .category-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .category-header i {
        font-size: 1.5rem;
    }
    
    .category-header h3 {
        font-size: 1.3rem;
    }
}

/* 搜索高亮 */
.highlight {
    background-color: #ffeb3b;
    padding: 2px 4px;
    border-radius: 3px;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
} 