/* 首页专属样式 */

/* 顶部横幅区域 */
.hero-banner {
    position: relative;
    width: 100%;
    height: 20vh;
    min-height: 200px;
    overflow: hidden;
    margin-top: 60px;
    outline: none;
    cursor: default;
}

.hero-banner:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: -3px;
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    pointer-events: none;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 23, 42, 0.1) 0%,
        rgba(15, 23, 42, 0.5) 40%,
        rgba(15, 23, 42, 0.95) 100%
    );
}

.banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    text-align: center;
    animation: fadeInUp 1s ease;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
}

.banner-content h1 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 50%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.banner-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* 论坛推荐区域 */
.forum-section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.forum-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    max-width: 800px;
    margin: 3rem auto 0;
}

.forum-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.forum-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: rgba(102, 126, 234, 0.3);
}

.forum-card:hover::before {
    transform: scaleX(1);
}

.forum-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.forum-content {
    flex: 1;
}

.forum-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.forum-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.forum-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.forum-arrow {
    margin-left: auto;
    color: var(--primary);
    font-weight: 600;
    transition: transform 0.3s;
}

.forum-card:hover .forum-arrow {
    transform: translateX(5px);
}

/* 工具卡片区域 */
.tools-section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

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

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: rgba(102, 126, 234, 0.3);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.tool-icon.blue { background: rgba(102, 126, 234, 0.2); color: #667eea; }
.tool-icon.purple { background: rgba(118, 75, 162, 0.2); color: #764ba2; }
.tool-icon.pink { background: rgba(240, 147, 251, 0.2); color: #f093fb; }
.tool-icon.red { background: rgba(245, 87, 108, 0.2); color: #f5576c; }
.tool-icon.green { background: rgba(76, 175, 80, 0.2); color: #4CAF50; }
.tool-icon.orange { background: rgba(255, 152, 0, 0.2); color: #FF9800; }

.tool-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.tool-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* 故事推荐区域 */
.stories-section {
    padding: 6rem 2rem;
    background: rgba(255, 255, 255, 0.02);
}

.stories-container {
    max-width: 1400px;
    margin: 0 auto;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.story-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    overflow: hidden;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(240, 147, 251, 0.3);
}

.story-card:hover::before {
    transform: scaleX(1);
}

.story-episode {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.75rem;
}

.story-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.story-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.story-highlight {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #fbbf24;
    font-weight: 600;
}

.story-arrow {
    transition: transform 0.3s;
}

.story-card:hover .story-arrow {
    transform: translateX(5px);
}

/* 外部链接区域 */
.links-section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
}

.link-item:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateX(5px);
}

.link-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.2);
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.link-text {
    flex: 1;
}

.link-text h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.link-text span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.link-arrow {
    color: var(--text-secondary);
    transition: transform 0.3s;
}

.link-item:hover .link-arrow {
    transform: translateX(5px);
    color: var(--primary);
}

/* 推荐区域 */
.recommend-section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.recommend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.recommend-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
}

.recommend-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.recommend-image {
    height: 180px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.recommend-content {
    padding: 1.5rem;
}

.recommend-content h3 {
    margin-bottom: 0.5rem;
}

.recommend-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 响应式 */
@media (max-width: 768px) {
    .hero-banner {
        height: 30vh;
        min-height: 180px;
    }

    .banner-content {
        padding: 1.5rem 1rem;
    }

    .banner-content h1 {
        font-size: 1.5rem;
    }

    .banner-content p {
        font-size: 0.85rem;
    }

    .stats-bar {
        gap: 2rem;
    }

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

    .recommend-grid {
        grid-template-columns: 1fr;
    }

    .stories-grid {
        grid-template-columns: 1fr;
    }
}
