/* ============================================================
   AI金融计算器 - 首页样式
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 背景装饰 */
.hero-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 480px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    z-index: -1;
}

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

/* 装饰圆 */
.hero-bg::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -40px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── 头部 ── */
header {
    text-align: center;
    color: white;
    padding: 60px 20px 50px;
}

.logo {
    font-size: 4rem;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.tagline {
    font-size: 1.15rem;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 1px;
}

.update-badge {
    display: inline-block;
    margin-top: 20px;
    padding: 6px 18px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    font-size: 0.85rem;
    backdrop-filter: blur(4px);
}

/* ── 工具卡片网格 ── */

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: -20px;
    margin-bottom: 50px;
}

/* 第5张卡片跨两列居中 */
.tool-card:last-child {
    grid-column: auto;
    max-width: none;
    justify-self: stretch;
}

.tool-card {
    display: flex;
    align-items: stretch;
    background: white;
    border-radius: 18px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: cardIn 0.6s ease forwards;
}

.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }
.tool-card:nth-child(4) { animation-delay: 0.4s; }
.tool-card:nth-child(5) { animation-delay: 0.5s; }

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

.tool-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}

.tool-card:hover .card-arrow {
    transform: translateX(4px);
    opacity: 1;
}

.tool-card:hover .card-icon {
    transform: scale(1.08);
}

/* 左侧图标 */
.card-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    transition: transform 0.35s ease;
}

.card-icon span {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

/* 中间内容 */
.card-body {
    flex: 1;
    min-width: 0;
}

.card-body h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.card-desc {
    font-size: 0.88rem;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 12px;
}

.card-features {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.feature-tag {
    display: inline-block;
    padding: 3px 10px;
    background: #f0f2ff;
    color: #667eea;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* 右侧箭头 */
.card-arrow {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    color: #ccc;
    margin-left: 12px;
    transition: all 0.3s ease;
    opacity: 0.5;
    flex-shrink: 0;
}

/* ── 特色说明 ── */
.features-section {
    background: white;
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 40px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.features-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-item {
    text-align: center;
    padding: 12px 8px;
}

.feature-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.feature-item h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.feature-item p {
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.5;
}

/* ── 广告位 ── */
.ad-slot {
    width: 100%;
    max-width: 728px;
    height: 90px;
    margin: 30px auto;
    background: #f5f5f5;
    border: 1px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-ad {
    margin: 20px auto 0;
}

.ad-label {
    color: #bbb;
    font-size: 0.8rem;
}

/* ── FAQ ── */
.faq-section {
    background: white;
    border-radius: 20px;
    padding: 40px 36px;
    margin-bottom: 40px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.faq-section h2 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 28px;
}

.faq-item {
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.faq-item p {
    font-size: 0.88rem;
    color: #6c757d;
    line-height: 1.7;
}

/* ── 页脚 ── */
footer {
    background: linear-gradient(135deg, #4a3f8a 0%, #5a3d7a 100%);
    margin-top: 20px;
    padding: 0 20px;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 36px 0 28px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-brand {
    color: white;
    flex-shrink: 0;
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: 700;
}

.footer-brand p {
    color: rgba(255,255,255,0.55);
    font-size: 0.88rem;
    margin-top: 6px;
    white-space: nowrap;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    margin-left: 40px;
}

.footer-links h4 {
    color: rgba(255,255,255,0.85);
    font-size: 0.85rem;
    width: 100%;
    margin-bottom: 4px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 0 32px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
}

/* ── 响应式 ── */
@media (max-width: 768px) {
    header {
        padding: 40px 16px 36px;
    }

    .logo {
        font-size: 3rem;
    }

    header h1 {
        font-size: 2.2rem;
    }

    .tagline {
        font-size: 1rem;
    }

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

    .tool-card:last-child {
        max-width: 100%;
    }

    .card-icon {
        width: 52px;
        height: 52px;
        margin-right: 16px;
    }

    .card-icon span {
        font-size: 1.5rem;
    }

    .card-body h2 {
        font-size: 1.1rem;
    }

    .card-desc {
        font-size: 0.84rem;
    }

    .features-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .features-section,
    .faq-section {
        padding: 28px 24px;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
    }

    .footer-links {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .tool-card {
        padding: 18px;
    }

    .card-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        margin-right: 14px;
    }

    .card-arrow {
        display: none;
    }
}
