/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
}

/* 顶部导航栏 */
.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 100%;
    margin: 0;
    padding: 15px 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 50px;
    width: auto;
    border-radius: 8px;
}

.logo h1 {
    color: white;
    font-size: 24px;
    font-weight: 600;
}

/* 网站链接 */
.website-link {
    margin: 0 20px;
}

.website-link a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.website-link a:hover {
    text-decoration: underline;
    transform: translateY(-2px);
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 10px;
    width: 400px;
}

.search-bar input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-bar button {
    padding: 12px 24px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-bar button:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 主要内容区域 */
.main-content {
    max-width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
    min-height: calc(100vh - 100px);
}

/* 左侧分类栏 */
.sidebar {
    width: 280px;
    background: white;
    border-radius: 0;
    box-shadow: none;
    padding: 20px;
    height: calc(100vh - 100px);
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    float: none;
    position: static;
    margin: 0;
    flex-shrink: 0;
}

.category-nav ul {
    list-style: none;
}

.category-item {
    margin-bottom: 20px;
}

.category-item h3 {
    color: #4facfe;
    font-size: 18px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0f7fa;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-item h3::before {
    content: '';
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: inline-block;
    background-size: cover;
    background-position: center;
    background-color: #4facfe;
    margin-right: 10px;
    z-index: 1;
}

/* 为每个分类添加不同的图标 */
.category-item:nth-child(1) h3::before { 
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%), url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22white%22%3E%3Cpath d=%22M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z%22/%3E%3C/svg%3E'); 
    background-blend-mode: overlay;
}
.category-item:nth-child(2) h3::before { 
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%), url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22white%22%3E%3Cpath d=%22M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z%22/%3E%3C/svg%3E'); 
    background-blend-mode: overlay;
}
.category-item:nth-child(3) h3::before { 
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%), url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22white%22%3E%3Cpath d=%22M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z%22/%3E%3C/svg%3E'); 
    background-blend-mode: overlay;
}
.category-item:nth-child(4) h3::before { 
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%), url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22white%22%3E%3Cpath d=%22M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z%22/%3E%3C/svg%3E'); 
    background-blend-mode: overlay;
}
.category-item:nth-child(5) h3::before { 
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%), url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22white%22%3E%3Cpath d=%22M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z%22/%3E%3C/svg%3E'); 
    background-blend-mode: overlay;
}
.category-item:nth-child(6) h3::before { 
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%), url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22white%22%3E%3Cpath d=%22M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z%22/%3E%3C/svg%3E'); 
    background-blend-mode: overlay;
}
.category-item:nth-child(7) h3::before { 
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%), url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22white%22%3E%3Cpath d=%22M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z%22/%3E%3C/svg%3E'); 
    background-blend-mode: overlay;
}
.category-item:nth-child(8) h3::before { 
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%), url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22white%22%3E%3Cpath d=%22M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z%22/%3E%3C/svg%3E'); 
    background-blend-mode: overlay;
}

.category-item:hover h3 {
    color: #00f2fe;
    border-bottom-color: #00f2fe;
}

.category-item.active h3 {
    color: #00f2fe;
    border-bottom-color: #00f2fe;
    font-weight: 600;
}

.tool-list {
    list-style: none;
    padding-left: 15px;
}

.tool-item {
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #555;
}

.tool-item:hover {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    transform: translateX(5px);
}

/* 右侧工具内容区 */
.tool-content {
    flex: 1;
    background: white;
    border-radius: 0;
    box-shadow: none;
    padding: 30px;
}

.tool-header {
    text-align: center;
    margin-bottom: 30px;
}

.tool-header h2 {
    color: #4facfe;
    font-size: 32px;
    margin-bottom: 10px;
}

.tool-header p {
    color: #666;
    font-size: 18px;
}

/* 工具卡片网格 */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tool-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, rgba(132, 250, 176, 0.9) 0%, rgba(143, 211, 244, 0.9) 100%);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 1px 0 rgba(255, 255, 255, 0.3);
    color: white;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    transition: left 0.5s ease;
    z-index: 0;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 1px 0 rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.95) 0%, rgba(0, 242, 254, 0.95) 100%);
    color: white;
}

.tool-card:hover::before {
    left: 100%;
}

.tool-card h3,
.tool-card p {
    position: relative;
    z-index: 1;
}

.tool-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.tool-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.tool-card:hover p {
    color: white;
}

/* 右侧悬浮联系按钮 */
.contact-float {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.contact-item {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    position: relative;
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.contact-item img {
    width: 32px;
    height: 32px;
}

/* 微信二维码提示 */
.contact-item.wechat:hover .qrcode {
    display: block;
}

.qrcode {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1000;
}

.qrcode img {
    width: 120px;
    height: 120px;
}

.qrcode p {
    text-align: center;
    margin-top: 10px;
    color: #333;
    font-size: 14px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 12px;
    width: 300px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.modal-content h3 {
    color: #4facfe;
    margin-bottom: 20px;
    font-size: 20px;
}

.qrcode-container {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
    }
    
    .category-nav ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .category-item {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-bar {
        width: 100%;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .contact-float {
        right: 15px;
    }
    
    .contact-item {
        width: 50px;
        height: 50px;
    }
    
    .contact-item img {
        width: 28px;
        height: 28px;
    }
    
    .category-nav ul {
        grid-template-columns: 1fr;
    }
}