/* ---------- 核心变量预设 ---------- */
:root {
    /* 阳光主题色板 */
    --sun-primary: #FF8C00;
    /* 暖阳橙 */
    --sun-secondary: #FFD700;
    /* 金黄 */
    --sun-accent: #FF5722;
    /* 活力红橙 */
    --sun-bg-light: #FFF9F2;
    /* 温柔米白 */
    --sun-bg-darker: #FFEED9;
    /* 暖沙色 */

    /* 文字颜色 */
    --text-main: #2D3748;
    --text-muted: #718096;
    --text-light: #FFFFFF;

    /* 玻璃质感配置 */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(255, 140, 0, 0.1);

    /* 贝塞尔曲线过渡 */
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-bouncy: all 0.6s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

/* ---------- 基础重置 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-overflow-scrolling: touch;
    /* 修复 iOS 滑动不流畅 */
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--text-main);
    background-color: var(--sun-bg-light);
    line-height: 1.6;
    /* 取消 body 和 html 上的层叠 overflow 避免滑动卡顿 */
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--sun-bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--sun-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--sun-accent);
}

/* ---------- 动态背景元素 ---------- */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: floatShape 15s infinite alternate ease-in-out;
}

.shape1 {
    top: -10%;
    left: -5%;
    width: 50vw;
    height: 50vw;
    background: rgba(255, 215, 0, 0.3);
    animation-delay: 0s;
}

.shape2 {
    top: 40%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: rgba(255, 140, 0, 0.25);
    animation-delay: -5s;
}

.shape3 {
    bottom: -15%;
    left: 20%;
    width: 60vw;
    height: 60vw;
    background: rgba(255, 87, 34, 0.2);
    animation-delay: -10s;
}

@keyframes floatShape {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    50% {
        transform: translate(50px, -50px) scale(1.1) rotate(45deg);
    }

    100% {
        transform: translate(-30px, 30px) scale(0.9) rotate(90deg);
    }
}

/* ---------- 公共类名 ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
    position: relative;
}

.text-gradient {
    background: linear-gradient(135deg, var(--sun-accent), var(--sun-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* 玻璃态 */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(255, 140, 0, 0.08);
}

/* 渐变背景 */
.bg-gradient-1 {
    background: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 99%, #FECFEF 100%);
}

.bg-gradient-2 {
    background: linear-gradient(120deg, #F6D365 0%, #FDA085 100%);
}

.bg-gradient-3 {
    background: linear-gradient(120deg, #F093FB 0%, #F5576C 100%);
}

.bg-gradient-4 {
    background: linear-gradient(120deg, #84FAB0 0%, #8FD3F4 100%);
}

/* 按钮通用 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: var(--transition-bouncy);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--sun-primary), var(--sun-accent));
    color: var(--text-light);
    box-shadow: 0 8px 20px rgba(255, 140, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 25px rgba(255, 140, 0, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--sun-primary);
    border: 2px solid var(--sun-primary);
}

.btn-secondary:hover {
    background: var(--sun-primary);
    color: var(--text-light);
    transform: translateY(-3px);
}

.btn-nav {
    padding: 8px 20px;
    font-size: 0.9rem;
    background: var(--sun-primary);
    color: #fff;
}

.btn-nav:hover {
    background: var(--sun-accent);
    color: #fff;
}

.pulse-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50px;
    background: inherit;
    z-index: -1;
    animation: pulseGlow 2s infinite cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes pulseGlow {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.15);
        opacity: 0;
    }
}

/* ---------- 导航栏 ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    height: 70px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: none;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--sun-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:not(.btn):hover {
    color: var(--sun-primary);
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--sun-primary);
    transition: width 0.3s ease;
}

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* ---------- 英雄首屏 ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    /* Offset for nav */
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 24px;
    font-weight: 900;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 90%;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 140, 0, 0.1);
    color: var(--sun-primary);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 140, 0, 0.2);
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.hero-actions span {
    font-size: 0.8rem;
    opacity: 0.8;
}

.hero-stats {
    display: flex;
    gap: 32px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 24px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-main);
}

.stat i {
    color: var(--sun-primary);
    font-size: 1.2rem;
}

/* 手机模型动画 */
.phone-mockup {
    width: 320px;
    height: 650px;
    background: #fff;
    border-radius: 40px;
    box-shadow: 0 25px 50px -12px rgba(255, 140, 0, 0.25);
    border: 8px solid #f1f5f9;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.phone-mockup:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.floating {
    animation: floatingObj 6s ease-in-out infinite;
    will-change: transform;
}

@keyframes floatingObj {
    0% {
        transform: translate3d(0, 0px, 0) perspective(1000px) rotateY(-15deg);
    }

    50% {
        transform: translate3d(0, -20px, 0) perspective(1000px) rotateY(-10deg);
    }

    100% {
        transform: translate3d(0, 0px, 0) perspective(1000px) rotateY(-15deg);
    }
}

.phone-screen {
    background: #FAFAFA;
    height: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mockup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    font-weight: bold;
    color: #333;
}

.mockup-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    height: 150px;
}

.mockup-line {
    height: 12px;
    background: #E2E8F0;
    border-radius: 6px;
    margin-bottom: 12px;
}

.w-long {
    width: 100%;
}

.w-short {
    width: 60%;
}

.mockup-btn {
    background: #EF4444;
    color: white;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.mockup-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    bottom: -50%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
    animation: sweep 3s infinite linear;
}

@keyframes sweep {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

.mockup-log {
    background: #1F2937;
    border-radius: 12px;
    padding: 15px;
    color: #A7F3D0;
    font-family: monospace;
    font-size: 0.8rem;
    flex-grow: 1;
}

/* ---------- 功能区 ---------- */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

/* ---------- 弹窗样式 ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.show {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 420px;
    padding: 30px;
    border-radius: 20px;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2);
}

.modal-overlay.show .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
}

.modal-close:hover {
    color: var(--sun-accent);
    transform: rotate(90deg);
}

.modal-input,
.modal-textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border 0.3s, background 0.3s, box-shadow 0.3s;
    background: #FAFAFA;
}

.modal-input:focus,
.modal-textarea:focus {
    border-color: var(--sun-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.1);
}

.form-group {
    margin-bottom: 16px;
}

.alert-status {
    margin-top: 15px;
    font-size: 0.95rem;
    display: none;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
}

.alert-success-text {
    color: #059669;
    background: #D1FAE5;
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.alert-error-text {
    color: #DC2626;
    background: #FEE2E2;
    animation: shakeX 0.5s ease-in-out forwards;
}

/* 下载 Android 专属款式 */
.btn-android {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: white !important;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
    border: none;
    font-weight: bold;
    font-size: 1.2rem;
    padding: 18px 40px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-android:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shakeX {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-5px);
    }

    40%,
    80% {
        transform: translateX(5px);
    }
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.95);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
    margin-bottom: 16px;
    font-size: 1.3rem;
    color: var(--text-main);
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ---------- 使用指引 ---------- */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.step-line {
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--sun-primary), transparent);
    z-index: 0;
}

.step-item {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background: white;
    border: 3px solid var(--sun-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--sun-primary);
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.2);
}

.step-content {
    background: white;
    padding: 24px 30px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    flex-grow: 1;
}

.step-content h3 {
    margin-bottom: 8px;
    color: var(--sun-primary);
}

.step-content p {
    color: var(--text-muted);
}

/* ---------- 下载区 ---------- */
.download-card {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 245, 230, 0.9));
}

.download-content h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.btn-huge {
    font-size: 1.2rem;
    padding: 18px 40px;
}

.text-sm {
    font-size: 0.8rem;
}

.text-opacity {
    opacity: 0.6;
}

/* ---------- 底部 ---------- */
footer {
    background: white;
    padding: 40px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ---------- 响应式调整 ---------- */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }

    .hero-text p {
        margin: 0 auto 32px auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .phone-mockup {
        animation: none;
        transform: rotateY(0) rotateX(0);
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* 移动端可后续补充汉堡菜单展开逻辑 */
    }

    .mobile-menu-btn {
        display: block;
    }

    /* 移动端菜单展开样式 */
    .nav-links.mobile-active {
        display: flex !important;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 24px 0;
        gap: 8px;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        animation: slideDown 0.35s cubic-bezier(0.25, 1, 0.5, 1);
        z-index: 999;
    }

    .nav-links.mobile-active li {
        text-align: center;
    }

    .nav-links.mobile-active a {
        display: block;
        padding: 12px 0;
        font-size: 1.1rem;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-15px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .hero {
        align-items: flex-start;
        padding-top: 130px;
        /* Extra space to clear the navbar completely */
        min-height: auto;
    }

    .hero-text {
        padding-top: 30px;
        /* Force badge to slide down further */
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 15px;
        margin-bottom: 30px;
    }

    .hero-actions .btn {
        width: 100%;
        padding: 16px 20px;
        /* Thicker touch targets on mobile */
        font-size: 1.1rem;
    }

    .hero-actions .btn-secondary {
        border-width: 1px;
        /* Make secondary button lighter on mobile */
    }

    .hero-stats {
        flex-wrap: wrap;
        /* Let stats wrap if screen is very narrow */
        gap: 15px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .step-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .step-line {
        display: none;
    }

    .step-number {
        margin: 0 auto;
    }
}

/* ---------- 滚动入场动画 (交由JS触发) ---------- */
.fade-in-up {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: opacity, transform;
}

.fade-in-right {
    opacity: 0;
    transform: translate3d(50px, 0, 0);
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

.reveal {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: opacity, transform;
}

/* 延迟类 */
.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

.stagger-1 {
    transition-delay: 0.1s;
}

.stagger-2 {
    transition-delay: 0.2s;
}

.stagger-3 {
    transition-delay: 0.3s;
}

.stagger-4 {
    transition-delay: 0.4s;
}

/* 激活状态 */
.active {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}