/* 首页专用样式 */

/* 首页英雄区域 */
.hero {
    text-align: center;
    padding: 3rem 2rem;
    margin: 1rem auto 2rem;
    max-width: 900px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center,
            rgba(99, 102, 241, 0.08) 0%,
            rgba(168, 85, 247, 0.06) 30%,
            transparent 70%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.05) 100%);
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    pointer-events: none;
}

.hero-title {
    font-size: clamp(3.5rem, 8vw, 5.5rem);
    font-weight: 100;
    margin-bottom: 1.8rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
    line-height: 1.2;
    letter-spacing: -0.04em;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
    text-align: center;
}

.welcome-line {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.75em;
    font-weight: 200;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    opacity: 0.8;
}

.typewriter-line {
    display: block;
    text-align: center;
    min-height: 1.2em;
    font-size: 1em;
    line-height: 1.2;
    position: relative;
}

.typewriter {
    color: var(--primary-color);
    font-weight: 500;
    display: inline;
    line-height: inherit;
    font-size: inherit;
    vertical-align: baseline;
}

.cursor {
    color: var(--primary-color);
    animation: blink 1s infinite;
    font-weight: 500;
    display: inline;
    margin-left: 2px;
    line-height: inherit;
    font-size: inherit;
    vertical-align: baseline;
    position: relative;
    top: -0.05em;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 300;
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    letter-spacing: 0.01em;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.6s forwards;
}

.hero-actions {
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.9s forwards;
    margin-top: 1rem;
}

.hero-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 400;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 40px;
    color: white;
    text-decoration: none;
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.25);
    transform: translateY(0);
    letter-spacing: 0.02em;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.hero-actions .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.hero-actions .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #5855f7, #7c3aed);
}

.hero-actions .btn-primary:hover::before {
    left: 100%;
}

.hero-actions .btn-primary:active {
    transform: translateY(-1px);
    transition: all 0.1s ease;
}

/* 动画定义 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* 热门工具区域 */
.featured-tools {
    margin-bottom: var(--spacing-xl);
    scroll-margin-top: 100px;
    /* 为锚点滚动添加偏移 */
}

/* 响应式设计 - 首页 */
@media (max-width: 768px) {
    .hero {
        padding: 2.5rem 2rem;
        margin: 0.5rem 1.5rem 1.5rem;
    }

    .hero::after {
        border-radius: 1.5rem;
    }

    .hero-title {
        font-size: clamp(2.8rem, 10vw, 4rem);
        margin-bottom: 1.5rem;
        line-height: 1.25;
        letter-spacing: -0.02em;
    }

    .welcome-line {
        margin-bottom: 0.5rem;
        font-size: 0.7em;
        letter-spacing: 0.06em;
    }

    .typewriter-line {
        min-height: 1.25em;
        font-size: 0.95em;
    }

    .hero-subtitle {
        font-size: clamp(0.9rem, 4vw, 1.05rem);
        margin-bottom: 2rem;
        max-width: 100%;
        line-height: 1.6;
        padding: 0 0.5rem;
    }

    .hero-actions .btn-primary {
        padding: 0.9rem 2.2rem;
        font-size: 0.95rem;
        border-radius: 40px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2.5rem 1.5rem;
        margin: 0.5rem 1rem 2rem;
    }

    .hero-title {
        font-size: clamp(1.8rem, 10vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .hero-actions .btn-primary {
        padding: 0.875rem 2rem;
        font-size: 0.95rem;
        width: 100%;
        max-width: 240px;
    }
}