/* =====================================================
   集多猫官网 - 主样式表
   目录：
   01. 设计变量    02. 基础重置    03. 通用组件
   04. 导航栏      05. 首屏区域    06. 功能卡片
   07. 用户口碑    08. 界面截图    09. 下载区域
   10. 页脚        11. 返回顶部    12. 滚动显现动画
   13. 响应式适配
   ===================================================== */

/* ---------- 01. 设计变量 ---------- */
:root {
    /* 品牌主色（红色系） */
    --primary-color: #EF4444;
    --primary-light: #F87171;
    --primary-dark: #DC2626;
    --gradient-primary: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);

    /* 中性色 */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* 圆角与间距 */
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* 字号 */
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;

    /* 过渡时长 */
    --duration: 0.3s;
}

/* ---------- 02. 基础重置 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* 锚点跳转时预留固定导航栏的高度 */
    scroll-padding-top: 5rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

main {
    flex: 1 0 auto;
}

/* ---------- 03. 通用组件 ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* 通用按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--duration) ease;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* 标题渐变文字 */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary-color);
}

/* 板块标题通用样式 */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--spacing-md);
}

.section-description {
    font-size: var(--font-size-lg);
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- 04. 导航栏 ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    z-index: 1000;
    transition: box-shadow var(--duration) ease, background var(--duration) ease;
}

/* 页面滚动后为导航栏增加投影 */
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav-link {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: all var(--duration) ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: var(--gray-50);
}

/* 移动端汉堡按钮（桌面端隐藏） */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all var(--duration) ease;
}

/* 汉堡按钮展开为关闭样式 */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ---------- 05. 首屏区域 ---------- */
.hero {
    padding: 6rem 0 4rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    position: relative;
    overflow: hidden;
}

/* 背景装饰圆点纹理 */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 25% 25%, rgba(239, 68, 68, 0.08) 1px, transparent 1px),
                      radial-gradient(circle at 75% 75%, rgba(239, 68, 68, 0.08) 1px, transparent 1px);
    background-size: 100px 100px;
    opacity: 0.5;
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    color: var(--gray-900);
}

.hero-description {
    font-size: var(--font-size-lg);
    color: var(--gray-600);
    margin-bottom: var(--spacing-xl);
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 手机外壳模型 */
.phone-mockup {
    width: 300px;
    height: 600px;
    background: var(--white);
    border-radius: 2rem;
    box-shadow: var(--shadow-xl);
    padding: 1rem;
    overflow: hidden;
}

.app-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1.5rem;
}

/* ---------- 06. 功能卡片 ---------- */
.features {
    padding: var(--spacing-2xl) 0;
    background: var(--white);
}

/* 版本更新板块使用浅灰底色区分 */
.features.version {
    background: var(--gray-50);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.feature-card {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: all var(--duration) ease;
}

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

.feature-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--gray-900);
}

.feature-description {
    color: var(--gray-600);
    line-height: 1.6;
}

/* 常见问题列表：单列窄版布局 */
.faq-list {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
    gap: var(--spacing-lg);
}

/* ---------- 07. 用户口碑 ---------- */
.process-section {
    padding: 64px 0 48px;
    background: var(--white);
    text-align: center;
}

.process-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 40px;
}

.process-cards {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.process-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(239, 68, 68, 0.08);
    border: 1px solid var(--gray-100);
    padding: 32px 24px 28px;
    width: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow var(--duration) ease;
}

.process-card:hover {
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.16);
}

.process-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 10px;
}

.process-card-desc {
    color: var(--gray-600);
    font-size: 1rem;
    line-height: 1.7;
}

/* ---------- 08. 界面截图 ---------- */
.screenshots {
    padding: var(--spacing-2xl) 0;
    background: var(--gray-50);
}

.screenshots-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.screenshot-item {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--duration) ease;
}

.screenshot-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.screenshot-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

/* 悬停时从底部滑出的文字说明 */
.screenshot-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
    padding: var(--spacing-lg);
    transform: translateY(100%);
    transition: transform var(--duration) ease;
}

.screenshot-item:hover .screenshot-overlay,
.screenshot-item:focus-within .screenshot-overlay {
    transform: translateY(0);
}

.screenshot-overlay h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

/* ---------- 09. 下载区域 ---------- */
.download {
    padding: var(--spacing-2xl) 0;
    background: var(--gradient-primary);
    color: var(--white);
}

.download-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.download-text {
    margin: 0 auto;
    max-width: 480px;
    text-align: center;
}

.download-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.download-description {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
    line-height: 1.7;
}

/* 安卓 / 苹果下载按钮组 */
.download-btns-modern {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin: 32px 0 24px;
}

.download-btn-modern {
    display: flex;
    align-items: center;
    background: rgba(34, 34, 34, 0.9);
    border-radius: 18px;
    padding: 18px 36px 18px 24px;
    min-width: 300px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    transition: background var(--duration) ease, transform var(--duration) ease;
}

.download-btn-modern:hover {
    background: #444;
    transform: translateY(-2px) scale(1.03);
}

.download-btn-modern .download-btn-icon {
    width: 48px;
    height: 48px;
    margin-right: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.download-btn-modern .download-btn-title {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 1px;
    line-height: 1.1;
}

.download-btn-modern.android .icon {
    fill: #6fff6f;
}

.download-btn-modern.ios .icon {
    fill: var(--white);
}

/* ---------- 10. 页脚 ---------- */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: var(--spacing-lg) 0;
    flex-shrink: 0;
    margin-top: auto;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: #b0b3b8;
    text-align: center;
}

.footer-bottom a {
    color: #b0b3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: var(--primary-light);
}

/* ---------- 11. 右侧悬浮工具 ---------- */
.sidebar-kf {
    position: fixed;
    right: 12px;
    bottom: 12%;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-service {
    width: 60px;
    min-height: 60px;
    padding: 8px 4px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 12px;
    line-height: 1.2;
    text-decoration: none;
    transition: all var(--duration) ease;
}

.contact-service:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.contact-service svg {
    width: 25px;
    height: 25px;
}

.back-to-top {
    width: 60px;
    height: 60px;
    background: var(--primary-dark);
    color: var(--white);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration) ease;
    /* 默认隐藏，滚动超过一屏后由脚本显示 */
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.back-to-top svg {
    width: 28px;
    height: 28px;
    fill: var(--white);
}

/* ---------- 12. 滚动显现动画 ----------
   仅在脚本可用且未开启"减少动态效果"时生效，
   无 JS 环境下所有内容直接可见，保证可访问性。 */
html.js .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js .reveal.in-view {
    opacity: 1;
    transform: none;
}

/* 同组卡片依次入场，形成节奏感 */
html.js .features-grid .reveal:nth-child(2),
html.js .process-cards .reveal:nth-child(2),
html.js .screenshots-gallery .reveal:nth-child(2) {
    transition-delay: 0.1s;
}

html.js .features-grid .reveal:nth-child(3),
html.js .process-cards .reveal:nth-child(3),
html.js .screenshots-gallery .reveal:nth-child(3) {
    transition-delay: 0.2s;
}

html.js .features-grid .reveal:nth-child(4) {
    transition-delay: 0.1s;
}

html.js .features-grid .reveal:nth-child(5) {
    transition-delay: 0.2s;
}

html.js .features-grid .reveal:nth-child(6) {
    transition-delay: 0.3s;
}

/* 用户开启"减少动态效果"时关闭所有过渡动画 */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ---------- 13. 响应式适配 ---------- */

/* 平板横屏及以下 */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .process-cards {
        gap: 18px;
    }

    .process-card {
        padding: 24px 12px 20px;
    }
}

/* 平板竖屏 / 大屏手机 */
@media (max-width: 768px) {
    /* 导航切换为抽屉菜单 */
    .nav-menu {
        position: fixed;
        top: 64px;
        right: 12px;
        width: 80vw;
        max-width: 340px;
        min-width: 180px;
        max-height: 80vh;
        overflow-y: auto;
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        padding: 16px 0 12px;
        border-radius: 18px;
        box-shadow: var(--shadow-xl);
        z-index: 1200;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity var(--duration) ease, transform var(--duration) ease;
    }

    .nav-menu.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-menu .nav-link {
        padding: 10px 18px;
        font-size: 0.98rem;
        border-bottom: 1px solid var(--gray-200);
        border-radius: 0;
        text-align: left;
    }

    .nav-menu .nav-link:last-child {
        border-bottom: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 4.5rem 0 2rem;
    }

    /* 小屏下隐藏手机模型，突出文字内容 */
    .hero-image {
        display: none;
    }

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .section-title {
        font-size: var(--font-size-3xl);
    }

    .download-title {
        font-size: var(--font-size-3xl);
    }

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

    .screenshots-gallery {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .process-title {
        font-size: 1.8rem;
        margin-bottom: 28px;
    }

    .download-btns-modern {
        flex-direction: column;
        gap: 16px;
    }

    .download-btn-modern {
        min-width: 160px;
        max-width: 260px;
        width: 100%;
        padding: 14px 18px 14px 14px;
        margin: 0 auto;
    }

    .download-btn-modern .download-btn-title {
        font-size: 1.15rem;
    }

    .download-btn-modern .download-btn-icon {
        width: 32px;
        height: 32px;
        margin-right: 8px;
    }
}

/* 手机竖屏 */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: var(--font-size-2xl);
    }

    .section-title {
        font-size: var(--font-size-2xl);
    }

    .download-title {
        font-size: var(--font-size-2xl);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 320px;
    }

    .process-cards {
        gap: 16px;
    }

    .process-card {
        width: 100%;
        max-width: 320px;
    }

    .back-to-top {
        right: 1rem;
        bottom: 1rem;
        width: 48px;
        height: 48px;
    }

    .sidebar-kf {
        right: 1rem;
        bottom: 1rem;
    }

    .contact-service {
        width: 48px;
        min-height: 48px;
        font-size: 10px;
    }

    .contact-service svg {
        width: 21px;
        height: 21px;
    }

    .back-to-top svg {
        width: 22px;
        height: 22px;
    }
}
