/* 全局样式重置 */
* {
    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: #f5faff;
}

/* 导航栏样式 */
.nav-container {
    background: linear-gradient(135deg, #e6f7ff 0%, #b3e0ff 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #0077cc;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    color: #005fa3;
}

.nav-links {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.nav-links a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4fc3f7;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-links a:hover {
    background-color: #29b6f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.nav-links a:active {
    transform: translateY(0);
}

/* 英雄区域样式 */
.hero-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 100px 20px;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveStars 60s linear infinite;
}

@keyframes moveStars {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    font-weight: bold;
    color: #0077cc;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 20px;
    color: #555;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.2s both;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background-color: #0077cc;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 1s ease 0.4s both;
}

.cta-button:hover {
    background-color: #005fa3;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 工具卡片区域样式 */
.tools-section {
    padding: 0 20px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: bold;
    color: #0077cc;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background-color: #4fc3f7;
    margin: 15px auto 0;
    border-radius: 2px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.tool-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #4fc3f7, #29b6f6, #03a9f4);
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.tool-icon {
    font-size: 60px;
    margin-bottom: 20px;
    color: #4fc3f7;
    transition: all 0.3s ease;
    position: relative;
}

.tool-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.tool-description {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.tool-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4fc3f7;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-link:hover {
    background-color: #29b6f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.tool-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.tool-link:hover::before {
    width: 300px;
    height: 300px;
}

/* 字符串转换工具特效 */
.tool-converter {
    background: linear-gradient(135deg, #f5f9ff 0%, #e6f0ff 100%);
    position: relative;
    overflow: hidden;
}

.tool-converter::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 200%;
    height: 200%;
    background-image: 
        radial-gradient(white, transparent 70%),
        radial-gradient(white, transparent 70%),
        radial-gradient(white, transparent 70%),
        radial-gradient(white, transparent 70%),
        radial-gradient(white, transparent 70%);
    background-size: 50px 50px, 30px 30px, 40px 40px, 60px 60px, 25px 25px;
    background-position: 0 0, 25px 25px, 50px 50px, 75px 75px, 100px 100px;
    animation: snowfall 10s linear infinite;
    opacity: 0.6;
    pointer-events: none;
}

@keyframes snowfall {
    0% {
        transform: translateY(-100%) rotate(0deg);
    }
    100% {
        transform: translateY(100%) rotate(360deg);
    }
}

.tool-converter .tool-icon {
    animation: exchangeAnimation 3s ease-in-out infinite;
}

@keyframes exchangeAnimation {
    0%, 100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg);
    }
}

.tool-converter:hover .tool-icon {
    color: #1976d2;
    transform: scale(1.2) rotate(180deg);
}

/* 二维码生成器特效 */
.tool-qrcode {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    position: relative;
    overflow: hidden;
}

.tool-qrcode::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(79, 195, 247, 0.2), transparent);
    animation: scanAnimation 2s ease-in-out infinite;
    pointer-events: none;
}

.tool-qrcode::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4fc3f7, transparent);
    animation: meteorAnimation 3s linear infinite;
    pointer-events: none;
}

@keyframes scanAnimation {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

@keyframes meteorAnimation {
    0% {
        transform: translateX(-100%) translateY(0);
    }
    100% {
        transform: translateX(100%) translateY(200px);
    }
}

.tool-qrcode:hover .tool-icon {
    color: #0288d1;
    transform: scale(1.2);
    filter: drop-shadow(0 0 15px rgba(79, 195, 247, 0.6));
}

/* 图标生成器特效 */
.tool-icon-generator {
    background: linear-gradient(135deg, #f0f8ff 0%, #e0f7fa 100%);
    position: relative;
    overflow: hidden;
}

.tool-icon-generator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(79, 195, 247, 0.1), 
        rgba(38, 198, 218, 0.1), 
        rgba(100, 181, 246, 0.1), 
        rgba(77, 208, 225, 0.1), 
        rgba(79, 195, 247, 0.1)
    );
    background-size: 300% 300%;
    animation: gradientFlow 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.tool-icon-generator .tool-icon {
    animation: colorChange 4s ease-in-out infinite;
}

@keyframes colorChange {
    0% {
        color: #4fc3f7;
    }
    25% {
        color: #26c6da;
    }
    50% {
        color: #64b5f6;
    }
    75% {
        color: #4dd0e1;
    }
    100% {
        color: #4fc3f7;
    }
}

.tool-icon-generator:hover .tool-icon {
    transform: scale(1.2);
    filter: drop-shadow(0 0 15px rgba(38, 198, 218, 0.6));
}

/* 文本差异对比特效 */
.tool-diff {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.tool-diff::before {
    content: '01010101\A10101010\A01010101\A10101010';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.2;
    color: rgba(37, 99, 235, 0.2);
    white-space: pre;
    animation: codeFlow 10s linear infinite;
    pointer-events: none;
}

@keyframes codeFlow {
    0% {
        transform: translateX(-100%) translateY(0);
    }
    100% {
        transform: translateX(100%) translateY(-50%);
    }
}

.tool-diff .tool-icon {
    animation: branchAnimation 3s ease-in-out infinite;
}

@keyframes branchAnimation {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
}

.tool-diff:hover .tool-icon {
    color: #2563eb;
    transform: scale(1.2) rotate(10deg);
}

/* 哈希计算工具特效 */
.tool-hash {
    background: linear-gradient(135deg, #f0f9ff 0%, #dbeafe 100%);
    position: relative;
    overflow: hidden;
}

.tool-hash::before {
    content: '0123456789ABCDEF';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-family: monospace;
    font-size: 14px;
    color: rgba(59, 130, 246, 0.1);
    animation: numberFlow 8s linear infinite;
    pointer-events: none;
}

@keyframes numberFlow {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

.tool-hash::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #93c5fd);
}

.tool-hash .tool-icon {
    animation: pulseAnimation 2s ease-in-out infinite;
}

@keyframes pulseAnimation {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.tool-hash:hover .tool-icon {
    color: #3b82f6;
    transform: scale(1.2);
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.6));
}

/* 加密解密工具特效 */
.tool-crypto {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.tool-crypto::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(30, 64, 175, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: rippleAnimation 3s ease-out infinite;
    pointer-events: none;
}

@keyframes rippleAnimation {
    0% {
        width: 0;
        height: 0;
        opacity: 0.5;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

.tool-crypto .tool-icon {
    animation: lockAnimation 3s ease-in-out infinite;
}

@keyframes lockAnimation {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
}

.tool-crypto:hover .tool-icon {
    color: #1e40af;
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 0 15px rgba(30, 64, 175, 0.6));
}

/* 页脚样式 */
.footer {
    background: linear-gradient(135deg, #e6f7ff 0%, #b3e0ff 100%);
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid #d1ecff;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-text {
    color: #555;
    font-size: 14px;
    margin-bottom: 10px;
}

.footer-copyright {
    color: #777;
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 20px 10px;
    }

    .nav-links {
        margin-top: 20px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .nav-links a {
        padding: 8px 16px;
        font-size: 14px;
    }

    .hero-section {
        padding: 80px 15px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .tools-section {
        padding: 0 15px 60px;
    }

    .section-title {
        font-size: 28px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tool-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .cta-button {
        padding: 12px 24px;
        font-size: 16px;
    }
}
