/* 基础样式 */
body {
    font-family: 'Comic Sans MS', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 25%, #e0e0e0 50%, #d8d8d8 75%, #d0d0d0 100%);
    margin: 0;
    min-height: 100vh;
    color: #5a4d41;
    background-attachment: fixed;
}

/* 中性配色方案 */
:root {
    --color-primary: linear-gradient(135deg, #8b7355, #6d5d4f);
    --color-secondary: linear-gradient(135deg, #a1887f, #8d6e63);
    --color-accent: linear-gradient(135deg, #795548, #6d4c41);
    --color-success: linear-gradient(135deg, #689f38, #558b2f);
    --color-warning: linear-gradient(135deg, #f57c00, #e65100);
    --color-info: linear-gradient(135deg, #0288d1, #0277bd);
    
    /* 中性元素颜色 */
    --neutral-shadow: 0 8px 25px rgba(139, 115, 85, 0.15);
    --neutral-border: 2px solid rgba(255, 255, 255, 0.9);
    --neutral-text: #5a4d41;
    --neutral-highlight: #795548;
    --neutral-bg: rgba(255, 255, 255, 0.95);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 中性头部样式 */
.header {
    text-align: center;
    padding: 40px 20px;
    background: 
        radial-gradient(circle at 20% 30%, rgba(139, 115, 85, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(109, 93, 79, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(90, 77, 65, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, #8b7355 0%, #6d5d4f 25%, #5a4d41 50%, #6d5d4f 75%, #8b7355 100%);
    color: white;
    border-radius: 0 0 30px 30px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--neutral-shadow);
    border: var(--neutral-border);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="3" fill="rgba(255,255,255,0.4)"/><circle cx="80" cy="30" r="2.5" fill="rgba(255,255,255,0.4)"/><circle cx="40" cy="70" r="4" fill="rgba(255,255,255,0.4)"/><circle cx="70" cy="80" r="3" fill="rgba(255,255,255,0.4)"/><rect x="10" y="50" width="6" height="6" fill="rgba(255,255,255,0.4)" transform="rotate(45 13 53)"/><rect x="60" y="20" width="5" height="5" fill="rgba(255,255,255,0.4)" transform="rotate(45 62.5 22.5)"/></svg>'),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><polygon points="50,15 65,50 50,85 35,50" fill="rgba(255,255,255,0.3)"/></svg>');
    background-size: 150px 150px, 100px 100px;
    background-position: 10% 20%, 80% 60%;
    background-repeat: no-repeat;
    opacity: 0.6;
    animation: floatBackground 20s ease-in-out infinite;
}

@keyframes floatBackground {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-8px) rotate(120deg); }
    66% { transform: translateY(8px) rotate(240deg); }
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    font-family: 'Comic Sans MS', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    color: white;
    letter-spacing: 1px;
    position: relative;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 中性Tab导航样式 */
.tabs-container {
    background: var(--neutral-bg);
    border-radius: 15px;
    padding: 12px;
    margin-bottom: 25px;
    box-shadow: var(--neutral-shadow);
    border: var(--neutral-border);
    backdrop-filter: blur(8px);
}

.tabs-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(108, 117, 125, 0.2);
    flex-wrap: wrap;
    gap: 8px;
}

.tab-btn {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--neutral-text);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 12px;
    margin: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-family: 'Comic Sans MS', 'Microsoft YaHei', sans-serif;
}

.tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51, 154, 240, 0.3);
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border-color: #adb5bd;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--color-accent));
    color: green;
    border: 1px solid #1971c2;
    box-shadow: 0 4px 12px rgba(51, 154, 240, 0.4);
    transform: translateY(-1px);
    text-shadow: 0 3px 3px rgba(82, 4, 4, 0.3);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: white;
    border-radius: 1px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 中性工具卡片样式 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.tool-card {
    background: var(--neutral-bg);
    border-radius: 12px;
    padding: 15px;
    box-shadow: var(--neutral-shadow);
    border: var(--neutral-border);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    position: relative;
    overflow: hidden;
    height: 120px;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(139, 115, 85, 0.2);
    text-decoration: none;
    color: inherit;
}

.tool-illustration {
    width: 100px;
    height: 100px;
    margin-right: 15px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.tool-illustration::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(139, 115, 85, 0.1), rgba(109, 93, 79, 0.1));
    opacity: 0.6;
}

.tool-illustration img {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.tool-card:hover .tool-illustration img {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

/* 图标颜色循环 */
.tool-card:nth-child(1) .tool-icon { background: var(--color-red); }
.tool-card:nth-child(2) .tool-icon { background: var(--color-blue); }
.tool-card:nth-child(3) .tool-icon { background: var(--color-green); }
.tool-card:nth-child(4) .tool-icon { background: var(--color-yellow); }
.tool-card:nth-child(5) .tool-icon { background: var(--color-purple); }
.tool-card:nth-child(6) .tool-icon { background: var(--color-pink); }
.tool-card:nth-child(7) .tool-icon { background: var(--color-orange); }
.tool-card:nth-child(8) .tool-icon { background: var(--color-cyan); }
.tool-card:nth-child(9) .tool-icon { background: var(--color-red); }
.tool-card:nth-child(10) .tool-icon { background: var(--color-green); }

.tool-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
    min-height: 0;
}

.tool-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--neutral-text);
    font-family: 'Comic Sans MS', 'Microsoft YaHei', sans-serif;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-description {
    color: #8d6e63;
    line-height: 1.4;
    font-size: 0.85rem;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    flex-shrink: 0;
}

.tool-link {
    color: var(--neutral-highlight);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
    padding: 6px 12px;
    transition: all 0.3s ease;
    border: 1px solid var(--neutral-highlight);
    border-radius: 6px;
    background: rgba(51, 154, 240, 0.1);
    align-self: flex-start;
    opacity: 0;
    transform: translateY(10px);
    margin-top: auto;
}

.tool-card:hover .tool-link {
    opacity: 1;
    transform: translateY(0);
}

.tool-link:hover {
    text-decoration: none;
    background: var(--neutral-highlight);
    color: white;
    transform: translateY(-1px);
}

/* 导航栏样式 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 10px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-item {
    margin: 0 10px;
}

.nav-item a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-item a:hover {
    background: #3498db;
    color: white;
}

.nav-item.current a {
    background: #3498db;
    color: white;
}

/* Tab导航按钮布局调整 */
.tabs-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 8px 8px 0 0;
    flex: 1;
    min-width: 120px;
    max-width: 200px;
}

/* 可爱响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-item {
        margin: 5px 0;
    }
    
    .tabs-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .tab-btn {
        width: calc(50% - 10px);
        margin: 0;
        border-radius: 15px;
        font-size: 0.9rem;
        padding: 10px 12px;
        min-width: auto;
        flex: 1;
    }
    
    .tab-btn.active::after {
        display: none;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .header h1 {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    
    .header h1::before,
    .header h1::after {
        display: none;
    }
    
    .header p {
        font-size: 1.1rem;
    }
    
    .container {
        padding: 12px;
    }
    
    .tabs-container {
        padding: 12px;
        border-radius: 20px;
    }
    
    .tool-card {
        padding: 15px;
        border-radius: 15px;
    }
    
    .tool-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .tool-title {
        font-size: 1.1rem;
    }
    
    .tool-description {
        font-size: 0.9rem;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .tab-btn {
        width: 100%;
        margin: 2px 0;
        font-size: 0.85rem;
        padding: 8px 10px;
        border-radius: 12px;
    }
    
    .header {
        padding: 40px 15px;
        border-radius: 0 0 30px 30px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .tools-grid {
        gap: 10px;
    }
    
    .tool-card {
        padding: 12px;
    }
    
    .tool-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* 页脚样式 */
.footer {
    text-align: center;
    margin-top: 60px;
    padding: 30px 20px;
    color: white;
    background: linear-gradient(135deg, #8b7355 0%, #6d5d4f 25%, #5a4d41 50%, #6d5d4f 75%, #8b7355 100%);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(139, 115, 85, 0.1);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.footer-social {
    margin-bottom: 15px;
}

.footer-social a {
    color: white;
    text-decoration: none;
    margin: 0 5px;
    font-weight: 500;
}

.footer-social a:hover {
    text-decoration: underline;
    color: #74c0fc;
    transform: translateY(-1px);
}

.footer p {
    margin: 5px 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer a:hover {
    text-decoration: underline;
    color: #74c0fc;
    transform: translateY(-1px);
}