/*
 * PromptForGood - 主页专属样式 (home.css)
 * 模块化设计，注释清晰，便于频繁修改
 * 本文件只作用于主页，不影响全局样式
 */

/* =============================================
   1. HERO SECTION — 全屏首屏英雄区
   ============================================= */

.hero {
    /* 深邃的蓝色渐变，从左到右，营造层次感 */
    background: linear-gradient(135deg, #0F1F5C 0%, #1E3A8A 45%, #1D4ED8 100%);
    color: white;
    padding: 100px 24px 120px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* 背景装饰：几何网格点阵 */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* 背景装饰：右下角光晕 */
.hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(29, 78, 216, 0.5) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

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

/* 主标题：使用大号字号，配合字间距营造分量感 */
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}

.hero-logo {
    max-width: 180px;
    height: auto;
    margin: 0 auto 10px;
}

.hero-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.hero-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0 0 24px;
    color: #ffffff;
}

/* 品牌名高亮：使用下划线渐变效果 */
.hero-title .brand {
    position: relative;
    display: inline-block;
    color: #93C5FD; /* primary-light-7 */
}

.hero-subtitle {
    font-size: 18px;
    line-height: 1.7;
    color: rgba(255,255,255,0.75);
    max-width: 580px;
    margin: 0 auto 40px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* CTA 主按钮：白色实心，强视觉重量 */
.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: var(--primary);
    padding: 14px 32px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    color: var(--primary);
}

/* CTA 次要按钮：幽灵风格 */
.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: rgba(255,255,255,0.9);
    padding: 14px 32px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid rgba(255,255,255,0.35);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hero-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-2px);
    color: white;
}

/* 英雄区底部数据统计栏 */
.hero-stats {
    position: relative;
    z-index: 1;
    margin-top: 64px;
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.hero-stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
}


/* =============================================
   2. SECTION WRAPPER — 通用区块容器
   ============================================= */

.home-section {
    padding: 80px 24px;
}

.home-section.alt-bg {
    /* 交替背景色，增加页面节奏感 */
    background: var(--bg);
}

.home-section.white-bg {
    background: var(--surface);
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 56px;
}

.section-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(24px, 3.5vw, 36px);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 16px;
}

.section-desc {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}


/* =============================================
   3. FEATURES GRID — 功能特性卡片区
   ============================================= */

.features-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: default;
}

/* 卡片悬浮效果 */
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -8px rgba(30, 58, 138, 0.12);
    border-color: var(--primary-light);
}

/* 卡片顶部色条 */
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-hover));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
    transition: background 0.3s ease;
}

.feature-card:hover .feature-icon-wrap {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
}

.feature-card:hover .feature-icon-wrap .el-icon {
    color: white;
}

.feature-icon-wrap .el-icon {
    font-size: 22px;
    color: var(--primary);
    transition: color 0.3s ease;
}

.feature-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px;
}

.feature-card-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 24px;
}

.feature-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: gap 0.2s ease;
}

.feature-card-link:hover {
    gap: 10px;
}


/* =============================================
   4. COMPARISON — 提示词对比区
   ============================================= */

.comparison-wrap {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: center;
}

@media (max-width: 768px) {
    .comparison-wrap { grid-template-columns: 1fr; }
}

.comparison-panel {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
}

/* 对比面板顶部标签栏 */
.comparison-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.comparison-header.bad {
    background: #FEF2F2;
    color: #991B1B;
    border-bottom: 1px solid #FECACA;
}

.comparison-header.good {
    background: #ECFDF5;
    color: #065F46;
    border-bottom: 1px solid #A7F3D0;
}

/* 提示词内容区：模拟代码编辑器 */
.comparison-body {
    background: #0F172A;
    padding: 24px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.7;
    color: #CBD5E1;
    min-height: 180px;
}

.comparison-body .prompt-text {
    white-space: pre-wrap;
    word-break: break-word;
}

/* 好的提示词的高亮结构块 */
.comparison-body .prompt-label {
    color: #93C5FD; /* 蓝色 - 字段名 */
    font-weight: 600;
}

.comparison-body .prompt-value {
    color: #A5F3FC; /* 青色 - 值 */
}

/* 对比区下方的评估标签 */
.comparison-tags {
    padding: 14px 20px;
    background: var(--surface);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
}

/* 中间的 VS 分割符 */
.comparison-vs {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .comparison-vs { display: none; }
}

.vs-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.35);
}


/* =============================================
   5. JOURNEY STEPS — 学习路径三步走
   ============================================= */

.journey-steps {
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    position: relative;
}

/* 步骤间连接线 */
.journey-steps::before {
    content: '';
    position: absolute;
    top: 32px;
    left: calc(16.6% + 16px);
    right: calc(16.6% + 16px);
    height: 2px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary), var(--primary-light));
    z-index: 0;
}

@media (max-width: 768px) {
    .journey-steps { grid-template-columns: 1fr; }
    .journey-steps::before { display: none; }
}

.journey-step {
    text-align: center;
    padding: 0 24px;
    position: relative;
    z-index: 1;
    animation: km-fadeIn 0.6s ease-out backwards;
}

.journey-step:nth-child(1) { animation-delay: 0.1s; }
.journey-step:nth-child(2) { animation-delay: 0.25s; }
.journey-step:nth-child(3) { animation-delay: 0.4s; }

.journey-step-num {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.3);
    border: 4px solid var(--bg);
}

.journey-step-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px;
}

.journey-step-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}


/* =============================================
   6. FINAL CTA — 底部行动召唤区
   ============================================= */

.final-cta {
    background: linear-gradient(135deg, var(--primary) 0%, #1D4ED8 100%);
    padding: 80px 24px;
    text-align: center;
    color: white;
}

.final-cta-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
    color: white;
}

.final-cta-desc {
    font-size: 17px;
    color: rgba(255,255,255,0.78);
    margin: 0 0 40px;
    line-height: 1.6;
}

/* === 响应式规则补充 === */
@media (max-width: 768px) {
    .hero {
        padding: 60px 20px 80px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-stats {
        gap: 24px;
        margin-top: 40px;
    }
    
    .hero-stat-number {
        font-size: 24px;
    }
    
    .home-section {
        padding: 48px 20px;
    }
    
    .section-header {
        margin-bottom: 36px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .feature-card {
        padding: 24px;
    }
    
    .comparison-wrap {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .journey-steps {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .journey-steps::before {
        display: none;
    }
    
    .final-cta {
        padding: 48px 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-hero-primary,
    .btn-hero-secondary {
        justify-content: center;
    }
}

/* =============================================
   6. UTILITIES
   ============================================= */
.final-cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
