/* ============================================================
   AI家庭图片管家 官网样式表
   设计风格：现代简约，蓝紫渐变主色调
   响应式：桌面端 + 平板 + 手机适配
   ============================================================ */

/* ---------- CSS 变量：统一管理主题色和间距 ---------- */
:root {
    --primary: #6C5CE7;          /* 主品牌色：蓝紫 */
    --primary-dark: #5A4BD1;     /* 深色变体：按钮 hover */
    --primary-light: #A29BFE;    /* 浅色变体：背景点缀 */
    --accent: #00CEC9;           /* 辅助色：青绿（高亮/免费标签） */
    --dark: #2D3436;             /* 深色文字 */
    --gray: #636E72;             /* 次级文字 */
    --light-gray: #DFE6E9;       /* 分割线/边框 */
    --bg-light: #F5F6FA;         /* 浅色背景 */
    --white: #FFFFFF;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);      /* 常规阴影 */
    --shadow-hover: 0 8px 30px rgba(108, 92, 231, 0.2); /* hover 阴影 */
    --radius: 12px;              /* 常规圆角 */
    --radius-lg: 20px;           /* 大圆角 */
    --max-width: 1100px;         /* 内容最大宽度 */
}

/* ---------- 全局重置 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;     /* 锚点跳转平滑滚动 */
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ---------- 通用按钮样式 ---------- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

/* 主按钮：渐变背景 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(108, 92, 231, 0.4);
}

/* 描边按钮 */
.btn-outline {
    border-color: var(--white);
    color: var(--white);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* 按钮尺寸：大号 */
.btn-lg {
    padding: 16px 40px;
    font-size: 18px;
}

/* 通栏按钮（定价卡片用） */
.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ============================================================
   导航栏
   ============================================================ */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

/* 滚动后导航栏加深阴影 */
#navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo + 应用名 */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
}

.nav-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

/* 导航链接 */
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--gray);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

/* 导航栏内下载按钮 */
.nav-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white) !important;
    padding: 8px 24px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(108, 92, 231, 0.3);
}

.nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

/* ============================================================
   Hero 首屏区域
   ============================================================ */
#hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

/* 渐变背景层 */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 50%, #00CEC9 100%);
    z-index: -1;
}

/* 装饰性半透明圆（增加层次感） */
.hero-bg::before,
.hero-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.hero-bg::before {
    width: 500px;
    height: 500px;
    top: -200px;
    right: -100px;
}

.hero-bg::after {
    width: 400px;
    height: 400px;
    bottom: -150px;
    left: -100px;
}

.hero-content {
    max-width: 700px;
    padding: 120px 24px 80px;
    color: var(--white);
}

.hero-content h1 {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.hero-tagline {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 24px;
    opacity: 0.95;
}

.hero-desc {
    font-size: 18px;
    line-height: 2;
    margin-bottom: 36px;
    opacity: 0.9;
}

/* 高亮文字 */
.hero-highlight {
    color: var(--accent);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 32px;
}

/* Hero 定价标签 */
.hero-price {
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 28px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
}

.price-current {
    font-size: 36px;
    font-weight: 800;
    color: var(--white);
}

.price-original {
    font-size: 20px;
    text-decoration: line-through;
    opacity: 0.6;
}

.price-tag {
    background: var(--accent);
    color: var(--dark);
    font-size: 13px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

/* ============================================================
   通用区块标题
   ============================================================ */
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
    padding: 0 24px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 12px;
}

.section-header p {
    font-size: 18px;
    color: var(--gray);
}

/* ============================================================
   功能展示区
   ============================================================ */
#features {
    padding: 100px 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

/* 单个功能项：左右交替布局 */
.feature-item {
    display: flex;
    align-items: center;
    gap: 60px;
}

/* 反向布局（图片在左，文字在右） */
.feature-item.reverse {
    flex-direction: row-reverse;
}

.feature-text {
    flex: 1;
}

.feature-text h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 16px 0 12px;
    color: var(--dark);
}

.feature-text p {
    font-size: 16px;
    color: var(--gray);
    line-height: 1.8;
}

/* 功能标签（免费/付费） */
.feature-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

.badge-free {
    background: rgba(0, 206, 201, 0.15);
    color: var(--accent);
}

.badge-pro {
    background: rgba(108, 92, 231, 0.15);
    color: var(--primary);
}

/* 功能截图容器 */
.feature-screenshot {
    flex: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-screenshot:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-hover);
}

.feature-screenshot img {
    width: 100%;
    height: auto;
}

/* ---------- 截图轮播（多图功能区块用） ---------- */

/* 轮播容器：与单图容器同视觉规格（圆角/阴影/弹性占位） */
.feature-carousel {
    flex: 1;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
}

.feature-carousel:hover {
    box-shadow: var(--shadow-hover);
}

/* 图片堆叠：active 图用 relative 撑起容器高度，其余绝对定位叠放 */
.carousel-slides img {
    width: 100%;
    height: auto;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.5s ease;
    display: block;
}

.carousel-slides img.active {
    opacity: 1;
    position: relative;
}

/* 左右切换箭头：悬浮于图片两侧，半透明背景 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: var(--white);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.carousel-prev {
    left: 12px;
}

.carousel-next {
    right: 12px;
}

/* 鼠标悬停轮播区域时显示箭头 */
.feature-carousel:hover .carousel-btn {
    opacity: 1;
}

/* 底部指示点：当前项高亮 */
.carousel-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.carousel-dots .dot.active {
    background: var(--white);
    transform: scale(1.2);
}

/* ============================================================
   定价区域
   ============================================================ */
#pricing {
    background: var(--bg-light);
    padding: 100px 24px;
}

/* 定价卡片居中 */
.pricing-card {
    max-width: 480px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

/* 限时特价角标 */
.pricing-badge {
    position: absolute;
    top: 24px;
    right: -32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    padding: 6px 40px;
    font-size: 14px;
    font-weight: 700;
    transform: rotate(35deg);
}

.pricing-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dark);
}

.pricing-price {
    margin-bottom: 12px;
}

.pricing-price .price-current {
    font-size: 56px;
    color: var(--primary);
}

.pricing-price .price-original {
    font-size: 24px;
    color: var(--light-gray);
}

.pricing-desc {
    color: var(--gray);
    margin-bottom: 32px;
}

/* 功能列表 */
.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 36px;
}

.pricing-features li {
    padding: 10px 0;
    font-size: 16px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 勾选标记 */
.check {
    color: var(--accent);
    font-weight: 800;
    font-size: 18px;
}

.pricing-note {
    margin-top: 16px;
    font-size: 14px;
    color: var(--gray);
}

/* ============================================================
   下载区域
   ============================================================ */
#download {
    padding: 100px 24px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
}

.download-content h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
}

.download-content > p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 40px;
    line-height: 1.8;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}

/* 下载按钮覆盖主按钮样式（白底） */
#download .btn-primary {
    background: var(--white);
    color: var(--primary);
}

#download .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.download-icon {
    font-size: 20px;
    margin-right: 8px;
}

.download-info {
    margin-top: 16px;
}

.download-info p {
    font-size: 14px;
    opacity: 0.7;
    line-height: 1.8;
}

/* ============================================================
   底部
   ============================================================ */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 48px 24px;
    text-align: center;
}

.footer-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    margin: 0 auto 16px;
}

.footer-content p {
    font-size: 15px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.footer-content .copyright {
    font-size: 13px;
    opacity: 0.5;
    margin-top: 12px;
}

/* ICP备案号：页脚链接样式 */
.footer-content .icp {
    margin-top: 8px;
}

.footer-content .icp a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-content .icp a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================================
   响应式适配：平板（≤768px）
   ============================================================ */
@media (max-width: 768px) {
    /* Hero 缩小字号 */
    .hero-content h1 {
        font-size: 36px;
    }

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

    .hero-desc {
        font-size: 15px;
    }

    /* 功能项改为纵向堆叠 */
    .feature-item,
    .feature-item.reverse {
        flex-direction: column;
        gap: 30px;
    }

    /* 小屏时箭头常显（触屏无 hover），并缩小尺寸 */
    .carousel-btn {
        opacity: 1;
        width: 34px;
        height: 34px;
        font-size: 22px;
    }

    .feature-text {
        text-align: center;
    }

    .feature-text h3 {
        font-size: 22px;
    }

    /* 导航链接隐藏（移动端简化） */
    .nav-links a:not(.nav-btn) {
        display: none;
    }

    /* 区块标题缩小 */
    .section-header h2 {
        font-size: 28px;
    }

    /* 定价卡片缩小内边距 */
    .pricing-card {
        padding: 36px 24px;
    }

    .pricing-price .price-current {
        font-size: 44px;
    }

    /* Hero 按钮纵向排列 */
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* ============================================================
   响应式适配：手机（≤480px）
   ============================================================ */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 28px;
    }

    .price-current {
        font-size: 28px;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 16px;
    }
}

/* ============================================================
   滚动入场动画（配合 JS IntersectionObserver）
   ============================================================ */

/* 初始隐藏 */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* 进入视口后显示 */
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
