/* Global Styles */
* {
    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-color: #f5f7fa;
    overflow-x: hidden;
}

.header-left{
    text-decoration: none;
}

/* Mobile Header */
.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: none;
}

.active .logo-section {
    opacity: 0;
    display: block;
    height: 60px;
    overflow: hidden;
}

.site-title {
    font-size: 1.5rem;
    color: #3498db;
    font-weight: 700;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    padding: 5px;
}

/* Container */
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: #fff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 900;
}

.logo-section {
    cursor: pointer;
    text-decoration: none;
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.site-logo {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 5px;
}

.site-description {
    font-size: 0.9rem;
    color: #666;
}

.search-section {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #eee;
    border-radius: 30px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
}

.search-button {
    display: none;
}

/* Navigation Menu */
.nav-menu ul {
    list-style: none;
}

.nav-category {
    border-bottom: 1px solid #eee;
}

.category-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.category-title:hover {
    background-color: #f8f9fa;
}

.category-title i:first-child {
    margin-right: 12px;
    color: #3498db;
    width: 20px;
    text-align: center;
}

.toggle-icon {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.sub-menu {
    background-color: #f8f9fa;
    display: none;
}

.sub-menu.active {
    display: block;
}

.sub-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px 12px 52px;
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.sub-menu li a:hover {
    background-color: #e9ecef;
    color: #3498db;
    padding-left: 58px;
}

.sub-menu li a i {
    margin-right: 10px;
    width: 18px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
    min-height: 100vh;
}

/* Welcome Section */
.welcome-section {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 60px 40px;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.2);
    text-align: center;
}

.welcome-section h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.welcome-section p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Featured Tools */
.featured-tools {
    margin-bottom: 60px;
}

.featured-tools h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #2c3e50;
    position: relative;
    padding-bottom: 10px;
}

.featured-tools h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: #3498db;
    border-radius: 2px;
}

.tool-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.tool-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 360px; /* 固定高度，确保所有卡片大小一致 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.tool-icon {
    width: 70px;
    height: 70px;
    background-color: #f0f8ff;
    color: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 20px;
}

.tool-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #2c3e50;
    height: 40px; /* 固定标题高度 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-card p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1; /* 让描述文本占据剩余空间 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-link {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.tool-link:hover {
    background-color: #2980b9;
}

/* Categories Overview */
.categories-overview h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #2c3e50;
    position: relative;
    padding-bottom: 10px;
}

.categories-overview h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: #3498db;
    border-radius: 2px;
}

.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.category-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 240px; /* 固定高度，确保所有卡片大小一致 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-top: 3px solid #3498db;
}

.category-icon {
    width: 60px;
    height: 60px;
    background-color: #f0f8ff;
    color: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 15px;
}

.category-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #2c3e50;
    height: 30px; /* 固定标题高度 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card p {
    font-size: 0.85rem;
    color: #666;
    flex-grow: 1; /* 让描述文本占据剩余空间 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 40px 0;
    margin-left: 280px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-info, .footer-links, .footer-social {
    flex: 1;
    min-width: 200px;
    margin-bottom: 30px;
}

.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #3498db;
}

.footer-info p {
    color: #bdc3c7;
    font-size: 0.95rem;
}

.footer-links h4, .footer-social h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after, .footer-social h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: #3498db;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: #3498db;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #34495e;
    color: #bdc3c7;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: #3498db;
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Tool Page Template */
.tool-page {
    background-color: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.tool-header {
    margin-bottom: 30px;
}

.tool-header h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.tool-header h1 i {
    margin-right: 15px;
    color: #3498db;
}

.tool-description {
    color: #666;
    font-size: 1rem;
    margin-bottom: 30px;
    padding-left: 40px;
}

.tool-content {
    margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content, .footer {
        margin-left: 0;
    }
    
    .mobile-header {
        display: flex;
    }
    
    .welcome-section {
        margin-top: 70px;
        padding: 40px 30px;
    }
    
    .welcome-section h1 {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .tool-cards {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .category-cards {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .footer-content {
        flex-direction: column;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .tool-cards, .category-cards {
        grid-template-columns: 1fr;
    }
    
    .welcome-section h1 {
        font-size: 1.8rem;
    }
    
    .welcome-section p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .mobile-header {
        padding: 10px 15px;
    }
    
    .site-title {
        font-size: 1.2rem;
    }
    
    .menu-toggle {
        font-size: 1.2rem;
    }
    
    .welcome-section {
        padding: 30px 20px;
        margin-top: 60px;
    }
    
    .welcome-section h1 {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .tool-card, .category-card {
        padding: 20px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card, .category-card, .welcome-section {
    animation: fadeIn 0.5s ease-out;
}

/* Search Results */
.search-results {
    background-color: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-top: 40px;
}

.search-results h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #2c3e50;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #95a5a6;
}

.no-results p {
    font-size: 1.1rem;
}