/**
 * Moko.family 官方网站样式
 * 设计风格: iOS 26 玻璃态效果 (Glassmorphism)
 * 主题: 温馨睡前故事
 * 配色: 橙色渐变 (#FF8C00 → #FF6B6B) + 柔和蓝紫色
 */

/* ========================================
   CSS Variables (Design Tokens)
   ======================================== */

:root {
    /* 颜色系统 */
    --color-primary: #FF8C00;
    --color-primary-light: #FFA500;
    --color-secondary: #FF6B6B;
    --color-accent-blue: #5B9BD5;
    --color-accent-purple: #9B59B6;

    /* 中性色 */
    --color-white: #FFFFFF;
    --color-black: #000000;
    --color-gray-50: #F9FAFB;
    --color-gray-100: #F3F4F6;
    --color-gray-200: #E5E7EB;
    --color-gray-300: #D1D5DB;
    --color-gray-400: #9CA3AF;
    --color-gray-500: #6B7280;
    --color-gray-600: #4B5563;
    --color-gray-700: #374151;
    --color-gray-800: #1F2937;
    --color-gray-900: #111827;

    /* 渐变背景 */
    --gradient-primary: linear-gradient(135deg, #FF8C00 0%, #FF6B6B 100%);
    --gradient-blue: linear-gradient(135deg, #5B9BD5 0%, #4A86E8 100%);
    --gradient-purple: linear-gradient(135deg, #9B59B6 0%, #8E44AD 100%);
    --gradient-background: linear-gradient(180deg, #FFF5E6 0%, #FFE6F0 50%, #E6F2FF 100%);

    /* 玻璃态效果 (iOS 26 风格) */
    --glass-bg: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --glass-blur: blur(20px);
    --glass-saturate: saturate(180%);

    /* 间距系统 */
    --spacing-xs: 4px;
    --spacing-s: 8px;
    --spacing-m: 16px;
    --spacing-l: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    --spacing-4xl: 96px;

    /* 字体系统 */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 12px;
    --font-size-s: 14px;
    --font-size-m: 16px;
    --font-size-l: 18px;
    --font-size-xl: 24px;
    --font-size-2xl: 32px;
    --font-size-3xl: 48px;
    --font-size-4xl: 64px;

    /* 圆角 */
    --radius-s: 8px;
    --radius-m: 12px;
    --radius-l: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* 动画 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* 容器宽度 */
    --container-max-width: 1200px;
}

/* ========================================
   Reset & Base Styles
   ======================================== */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-m);
    line-height: 1.6;
    color: var(--color-gray-800);
    overflow-x: hidden;
    max-width: 100vw;
    background: var(--gradient-background);
    background-attachment: fixed;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-normal);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ========================================
   Background Effects
   ======================================== */

.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-background);
    z-index: -2;
}

.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--color-accent-blue) 0%, transparent 70%);
    top: 20%;
    right: -150px;
    animation-delay: 5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--color-accent-purple) 0%, transparent 70%);
    bottom: 10%;
    left: 10%;
    animation-delay: 10s;
}

.shape-4 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--color-secondary) 0%, transparent 70%);
    bottom: -100px;
    right: 20%;
    animation-delay: 15s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(20px, 30px) scale(1.05);
    }
}

/* ========================================
   Glass Effect
   ======================================== */

.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur) var(--glass-saturate);
    -webkit-backdrop-filter: var(--glass-blur) var(--glass-saturate);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow),
                0 1px 0 0 rgba(255, 255, 255, 0.3) inset;
}

/* ========================================
   Container
   ======================================== */

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-l);
}

/* ========================================
   Navbar
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--spacing-m) 0;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.4) inset,
                0 8px 32px 0 rgba(31, 38, 135, 0.08);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-m);
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-gray-900);
}

.logo-img {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: transform var(--transition-fast);
}

.logo:hover .logo-img {
    transform: scale(1.05);
}

.logo-text {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    font-size: var(--font-size-m);
    font-weight: 500;
    color: var(--color-gray-700);
    transition: color var(--transition-fast);
}

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

.lang-selector {
    position: relative;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: var(--spacing-s);
    padding: var(--spacing-s) var(--spacing-m);
    border-radius: var(--radius-full);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    font-size: var(--font-size-s);
    font-weight: 500;
    color: var(--color-gray-700);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.lang-toggle svg {
    transition: transform var(--transition-fast);
}

.lang-toggle:hover svg {
    transform: translateY(2px);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-m);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.2);
    padding: var(--spacing-s);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    z-index: 1001;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: var(--spacing-m);
    padding: var(--spacing-m);
    border-radius: var(--radius-s);
    font-size: var(--font-size-s);
    color: var(--color-gray-700);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--color-gray-900);
}

.lang-code {
    font-family: 'Courier New', monospace;
    font-size: var(--font-size-xs);
    color: var(--color-gray-500);
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 60px;
    text-align: center;
}

.lang-name {
    flex: 1;
    font-weight: 500;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    padding-top: calc(80px + var(--spacing-4xl));
    padding-bottom: var(--spacing-4xl);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-s);
    padding: var(--spacing-s) var(--spacing-l);
    border-radius: var(--radius-full);
    font-size: var(--font-size-s);
    font-weight: 500;
    color: var(--color-gray-700);
    margin-bottom: var(--spacing-xl);
}

.badge-icon {
    font-size: var(--font-size-l);
}

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

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--color-gray-600);
    margin-bottom: var(--spacing-2xl);
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-m);
    margin-bottom: var(--spacing-3xl);
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-s);
    padding: var(--spacing-m) var(--spacing-xl);
    border-radius: var(--radius-m);
    font-size: var(--font-size-m);
    font-weight: 600;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(255, 140, 0, 0.4);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--color-gray-700);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* ========================================
   Hero Stats
   ======================================== */

.hero-stats {
    display: flex;
    gap: var(--spacing-l);
}

.stat-item {
    padding: var(--spacing-l);
    border-radius: var(--radius-m);
    text-align: center;
}

.stat-number {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-s);
}

.stat-label {
    font-size: var(--font-size-s);
    color: var(--color-gray-600);
}

/* ========================================
   Hero Image (Moko Mascot)
   ======================================== */

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateX(60px);
    max-width: 100%;
    overflow: visible;
}

/* Moko Mascot Container - 可爱的火焰形象 */
.moko-mascot-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 400px;
    height: 400px;
    max-width: 100%;
    animation: mascotFloat 6s ease-in-out infinite;
    overflow: visible;
}

/* Mascot Floating Animation */
@keyframes mascotFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

/* Moko Mascot Image */
.moko-mascot-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 60px rgba(255, 140, 0, 0.3));
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: mascotGlow 3s ease-in-out infinite;
}

/* Glow Effect Animation */
@keyframes mascotGlow {
    0%, 100% {
        filter: drop-shadow(0 20px 60px rgba(255, 140, 0, 0.3));
    }
    50% {
        filter: drop-shadow(0 25px 70px rgba(255, 140, 0, 0.5));
    }
}

/* Hover Effect */
.moko-mascot-container:hover .moko-mascot-img {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 30px 80px rgba(255, 140, 0, 0.6));
}

/* Background Glow Circle */
.moko-mascot-container::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    max-width: 150vw;
    background: radial-gradient(
        circle,
        rgba(255, 140, 0, 0.2) 0%,
        rgba(255, 140, 0, 0.12) 25%,
        rgba(255, 107, 107, 0.08) 50%,
        transparent 75%
    );
    border-radius: 50%;
    z-index: -1;
    animation: glowPulse 4s ease-in-out infinite;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Glow Pulse Animation */
@keyframes glowPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}

/* iPhone Frame - 温暖橙金配色 */
.phone-frame {
    width: 340px;
    height: 680px;
    margin: 0 auto;
    border-radius: 48px;
    padding: 16px;
    background: linear-gradient(145deg,
        rgba(251, 146, 60, 0.5) 0%,
        rgba(234, 88, 12, 0.45) 100%
    );
    border: 1px solid rgba(253, 200, 140, 0.95);
    box-shadow: 0 24px 64px rgba(234, 88, 12, 0.2),
                0 8px 24px rgba(251, 146, 60, 0.15),
                inset 0 3px 8px rgba(255, 255, 255, 0.9),
                inset 0 1px 2px rgba(255, 255, 255, 1);
    position: relative;
    animation: phoneFloat 8s infinite ease-in-out;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.phone-frame:hover {
    transform: translateY(-12px) scale(1.05) rotateX(0deg) rotateY(0deg);
    animation-play-state: paused;
    box-shadow:
        0 32px 80px rgba(234, 88, 12, 0.35),
        0 12px 32px rgba(251, 146, 60, 0.3),
        inset 0 3px 10px rgba(255, 255, 255, 0.95),
        inset 0 1px 3px rgba(255, 255, 255, 1);
}

/* iPhone Notch - 温暖橙金主题 */
.phone-notch {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 28px;
    background: #1A1D2E;
    border-radius: 0 0 20px 20px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3),
                0 0 12px rgba(251, 146, 60, 0.1);
}

.phone-notch::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #4A5568;
    border-radius: 50%;
}

.phone-notch::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 24px;
    width: 12px;
    height: 12px;
    background: rgba(74, 85, 104, 0.6);
    border-radius: 50%;
}

/* Screen Wrapper with UX Effects */
.phone-screen-wrapper {
    width: 100%;
    height: 100%;
    background: #F3F2F9;
    border-radius: 36px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Screen Glow Effect (屏幕光晕) */
.phone-screen-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 36px;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 60%
    );
    pointer-events: none;
    z-index: 1;
}

/* Screen Reflection Effect (屏幕反射光效) */
.phone-screen-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 36px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.3) 0%,
        transparent 40%,
        transparent 60%,
        rgba(255, 255, 255, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

.phone-frame:hover .phone-screen-wrapper::after {
    opacity: 1;
}

.app-preview-img {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    object-fit: cover;
    object-position: center center;
    border-radius: 36px;
    transition: opacity 0.3s ease;
}

/* Light mode: show light image, hide dark image */
.app-preview-light {
    opacity: 1;
}

.app-preview-dark {
    opacity: 0;
}

/* iPhone Home Indicator - 温暖橙金光晕 */
.phone-home-indicator {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    z-index: 2;
    box-shadow: 0 0 8px rgba(251, 146, 60, 0.2);
}

/* Click Ripple Effect (点击涟漪) */
.screen-ripple {
    position: absolute;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.4);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
    z-index: 10;
}

@keyframes ripple {
    to {
        transform: scale(10);
        opacity: 0;
    }
}

@keyframes phoneFloat {
    0% {
        transform: translateY(0) rotateX(2deg) rotateY(-2deg);
    }
    25% {
        transform: translateY(-15px) rotateX(-1deg) rotateY(1deg);
    }
    50% {
        transform: translateY(-20px) rotateX(1deg) rotateY(2deg);
    }
    75% {
        transform: translateY(-15px) rotateX(-2deg) rotateY(-1deg);
    }
    100% {
        transform: translateY(0) rotateX(2deg) rotateY(-2deg);
    }
}

.phone-mockup {
    width: 320px;
    height: 650px;
    border-radius: 40px;
    padding: 12px;
    position: relative;
    animation: phoneFloat 6s infinite ease-in-out;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1F2937 0%, #374151 100%);
    border-radius: 32px;
    overflow: hidden;
    position: relative;
}

.app-preview {
    padding: var(--spacing-l);
}

.story-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-m);
    padding: var(--spacing-m);
    display: flex;
    gap: var(--spacing-m);
}

.card-cover {
    width: 80px;
    height: 120px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-radius: var(--radius-s);
}

.card-content {
    flex: 1;
}

.card-title {
    font-size: var(--font-size-m);
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: var(--spacing-s);
}

.card-subtitle {
    font-size: var(--font-size-s);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--spacing-m);
    line-height: 1.4;
}

.card-meta {
    display: flex;
    gap: var(--spacing-m);
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   Features Section
   ======================================== */

.features {
    padding: var(--spacing-4xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

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

.section-subtitle {
    font-size: var(--font-size-xl);
    color: var(--color-gray-600);
}

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

.feature-card {
    padding: var(--spacing-xl);
    border-radius: var(--radius-l);
    transition: all var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px 0 rgba(31, 38, 135, 0.2);
}

.feature-icon {
    margin-bottom: var(--spacing-l);
}

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

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

/* ========================================
   Story Showcase Section
   ======================================== */

.story-showcase {
    padding: var(--spacing-4xl) 0;
    background: linear-gradient(180deg,
        rgba(255, 245, 230, 0.3) 0%,
        rgba(255, 235, 205, 0.2) 100%);
}

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

.story-book {
    padding: var(--spacing-l);
    border-radius: var(--radius-l);
    transition: all var(--transition-normal);
    cursor: pointer;
    overflow: hidden;
}

.story-book:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px 0 rgba(31, 38, 135, 0.2);
}

.book-cover {
    width: 100%;
    border-radius: var(--radius-s);
    overflow: hidden;
    margin-bottom: var(--spacing-m);
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-s);
    transition: transform var(--transition-normal);
}

.story-book:hover .book-cover img {
    transform: scale(1.05);
}

.book-info {
    text-align: center;
}

.book-title {
    font-size: var(--font-size-l);
    font-weight: 600;
    color: var(--color-gray-900);
    margin-bottom: var(--spacing-s);
}

.book-desc {
    font-size: var(--font-size-s);
    color: var(--color-gray-600);
    line-height: 1.5;
}

/* ========================================
   Download Section
   ======================================== */

.download {
    padding: var(--spacing-4xl) 0;
}

.download-card {
    padding: var(--spacing-3xl);
    border-radius: var(--radius-xl);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
}

.download-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-s);
    padding: var(--spacing-s) var(--spacing-l);
    background: var(--gradient-primary);
    color: var(--color-white);
    border-radius: var(--radius-full);
    font-size: var(--font-size-s);
    font-weight: 500;
    margin-bottom: var(--spacing-l);
}

.download-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: var(--spacing-l);
    line-height: 1.2;
}

.download-subtitle {
    font-size: var(--font-size-l);
    color: var(--color-gray-600);
    margin-bottom: var(--spacing-2xl);
}

.download-buttons {
    display: flex;
    gap: var(--spacing-l);
    align-items: center;
}

.download-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-s);
    padding: var(--spacing-l);
    border-radius: var(--radius-m);
    color: var(--color-gray-900);
    transition: all var(--transition-normal);
    width: 168px;
    height: 168px;
    text-align: center;
}

.download-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.2);
}

.download-btn .apple-icon {
    filter: brightness(0);
}

.download-text {
    text-align: left;
}

.download-label {
    font-size: var(--font-size-xs);
    color: var(--color-gray-600);
}

.download-name {
    font-size: var(--font-size-l);
    font-weight: 600;
    color: var(--color-gray-900);
}

.qr-code {
    padding: var(--spacing-l);
    border-radius: var(--radius-m);
    text-align: center;
    width: 168px;
    height: 168px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-placeholder {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--spacing-m);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray-400);
}

.qr-label {
    font-size: var(--font-size-s);
    color: var(--color-gray-600);
}

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

.live-illustration {
    width: 100%;
    max-width: 300px;
    height: auto;
    animation: floatGentle 4s ease-in-out infinite;
    filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.15));
    position: relative;
}

/* 火堆温馨光晕背景 */
.live-illustration::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 140%;
    background: radial-gradient(
        ellipse at center,
        rgba(251, 146, 60, 0.25) 0%,
        rgba(249, 115, 22, 0.15) 30%,
        rgba(234, 88, 12, 0.08) 50%,
        transparent 70%
    );
    border-radius: 50%;
    filter: blur(40px);
    animation: campfireGlow 3s ease-in-out infinite alternate;
    z-index: -1;
    pointer-events: none;
}

@keyframes campfireGlow {
    0% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

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

/* ========================================
   Brand Story Section
   ======================================== */

.brand-story {
    padding: var(--spacing-4xl) 0;
    background: linear-gradient(180deg,
        rgba(255, 250, 240, 0.5) 0%,
        rgba(255, 245, 235, 0.8) 50%,
        rgba(255, 250, 240, 0.5) 100%);
    position: relative;
    overflow: hidden;
}

.story-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-4xl);
    align-items: center;
}

.story-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2xl);
}

.story-header {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-m);
}

.story-label {
    display: inline-block;
    padding: var(--spacing-s) var(--spacing-l);
    background: var(--gradient-primary);
    color: var(--color-white);
    font-size: var(--font-size-s);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: var(--radius-full);
    width: fit-content;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.story-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--color-gray-900);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.story-body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.story-paragraph {
    animation: fadeInUp 0.8s ease-out backwards;
}

.story-paragraph:nth-child(1) {
    animation-delay: 0.2s;
}

.story-paragraph:nth-child(2) {
    animation-delay: 0.4s;
}

.story-paragraph:nth-child(3) {
    animation-delay: 0.6s;
}

.story-paragraph p {
    font-size: var(--font-size-l);
    color: var(--color-gray-700);
    line-height: 1.8;
    text-align: justify;
}

.story-footer {
    margin-top: var(--spacing-xl);
}

.story-quote {
    padding: var(--spacing-xl);
    background: linear-gradient(135deg,
        rgba(255, 140, 0, 0.1) 0%,
        rgba(255, 107, 107, 0.1) 100%);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-m);
    margin: 0;
}

.story-quote p {
    font-size: var(--font-size-l);
    color: var(--color-gray-800);
    line-height: 1.8;
    font-style: italic;
    margin-bottom: var(--spacing-m);
}

.story-quote cite {
    display: block;
    font-size: var(--font-size-m);
    color: var(--color-gray-600);
    font-style: normal;
    font-weight: 600;
}

.story-illustration {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.illustration-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-story-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(255, 255, 255, 0.5);
    animation: floatGentle 6s ease-in-out infinite;
    transition: transform var(--transition-normal);
}

.brand-story-image:hover {
    transform: scale(1.05);
}

/* Fade in up animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.phone-preview {
    width: 280px;
    height: 580px;
    border-radius: 36px;
    padding: 10px;
    margin: 0 auto;
}

.preview-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1F2937 0%, #374151 100%);
    border-radius: 28px;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    padding: var(--spacing-3xl) 0 var(--spacing-xl);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-3xl);
    margin-bottom: var(--spacing-3xl);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-m);
    margin-bottom: var(--spacing-m);
}

.footer-logo-text {
    font-family: 'Fredoka', sans-serif;
    font-size: var(--font-size-l);
    font-weight: 600;
    letter-spacing: -0.01em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-tagline {
    color: var(--color-gray-600);
    font-size: var(--font-size-s);
}

.footer-heading {
    font-size: var(--font-size-m);
    font-weight: 600;
    color: var(--color-gray-900);
    margin-bottom: var(--spacing-m);
}

.footer-list {
    list-style: none;
}

.footer-list li {
    margin-bottom: var(--spacing-s);
}

.footer-list a {
    color: var(--color-gray-600);
    font-size: var(--font-size-s);
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--glass-border);
}

.copyright {
    font-size: var(--font-size-s);
    color: var(--color-gray-600);
}

.footer-social {
    display: flex;
    gap: var(--spacing-m);
}

.social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-s);
    color: var(--color-gray-600);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
    }

    .hero-image {
        order: -1;
        margin-bottom: var(--spacing-xl);
    }

    .download-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .story-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-3xl);
    }

    .story-illustration {
        order: -1; /* Image first on mobile */
    }

    .illustration-wrapper {
        max-width: 400px;
    }

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

    /* Tablet: slightly reduce mascot transform offset */
    .hero-image {
        transform: translateX(30px);
    }

    .moko-mascot-container {
        width: 350px;
        height: 350px;
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-4xl: 40px;
        --font-size-3xl: 32px;
        --font-size-2xl: 24px;
    }

    .nav-links {
        gap: var(--spacing-m);
    }

    .nav-link {
        display: none;
    }

    .hero {
        padding-top: calc(80px + var(--spacing-2xl));
    }

    /* Mobile: reset hero-image transform and center it */
    .hero-image {
        transform: none;
        margin-left: auto;
        margin-right: auto;
        overflow: visible;
    }

    /* Mobile: adjust mascot size and ensure horizontal centering */
    .moko-mascot-container {
        width: min(300px, 80vw);
        height: min(300px, 80vw);
        margin: 0 auto;
        max-width: 100%;
    }

    .moko-mascot-container::before {
        width: min(500px, 120vw);
        height: min(500px, 120vw);
    }

    .moko-mascot-img {
        display: block;
        margin: 0 auto;
        max-width: 100%;
    }

    /* Mobile: adjust phone frame size and ensure centering (keeping for backward compatibility) */
    .phone-frame {
        width: min(280px, 85vw);
        height: 575px; /* Fallback for browsers without aspect-ratio support */
        max-width: 100%;
        padding: 16px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        /* Enhanced border with highlight effect */
        background: linear-gradient(145deg,
            rgba(251, 146, 60, 0.5) 0%,
            rgba(234, 88, 12, 0.45) 100%
        );
        border: 1px solid rgba(253, 200, 140, 0.95);
        box-shadow:
            /* Outer glow */
            0 24px 64px rgba(234, 88, 12, 0.25),
            0 8px 24px rgba(251, 146, 60, 0.2),
            /* Inner highlight (top edge) - pure white highlight */
            inset 0 3px 8px rgba(255, 255, 255, 0.9),
            inset 0 1px 2px rgba(255, 255, 255, 1),
            /* Inner glow (bottom edge) */
            inset 0 -1px 2px rgba(234, 88, 12, 0.2),
            /* Additional outer highlight */
            0 0 20px rgba(251, 146, 60, 0.25);
    }

    .phone-screen-wrapper {
        flex: 1;
        display: flex;
        align-items: stretch;
        justify-content: stretch;
        overflow: hidden;
        position: relative;
        background: #F3F2F9;
        border-radius: 36px;
        min-height: 0;
    }

    /* Mobile: ensure app preview images NEVER overflow */
    .app-preview-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
        position: absolute;
        inset: 0;
        border-radius: 36px;
        top: 15px;
    }

    /* Modern browsers: use aspect-ratio for better responsiveness */
    @supports (aspect-ratio: 1) {
        .phone-frame {
            height: auto;
            aspect-ratio: 280 / 575;
        }
    }

    /* Fallback for browsers without inset support */
    @supports not (inset: 0) {
        .app-preview-img {
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
        }
    }

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

    .hero-subtitle {
        font-size: var(--font-size-l);
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: column;
    }

    .stat-item {
        width: 100%;
    }

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

    .story-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-m);
    }

    .download-buttons {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-m);
        text-align: center;
    }
}

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

    /* Extra small screens: further reduce mascot size and ensure centering */
    .moko-mascot-container {
        width: min(250px, 75vw);
        height: min(250px, 75vw);
        margin: 0 auto;
        max-width: 100%;
    }

    .moko-mascot-container::before {
        width: min(450px, 110vw);
        height: min(450px, 110vw);
    }

    /* Keep phone frame styles for backward compatibility */
    .phone-frame {
        width: min(280px, 85vw);
        padding: 12px;
        border-radius: 40px;
    }

    .phone-notch {
        width: 100px;
        height: 20px;
        top: 12px;
    }

    .phone-screen-wrapper {
        border-radius: 30px;
    }

    .phone-screen-wrapper::before {
        border-radius: 30px;
    }

    .phone-screen-wrapper::after {
        border-radius: 30px;
    }

    /* Ensure phone mockup in download section also adapts */
    .phone-mockup {
        width: min(260px, 80vw);
        height: auto;
        aspect-ratio: 1 / 2;
    }

    .phone-preview {
        width: min(240px, 75vw);
        height: auto;
        aspect-ratio: 1 / 2;
    }

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

    .book-title {
        font-size: var(--font-size-m);
    }

    .book-desc {
        font-size: var(--font-size-xs);
    }
}

/* ========================================
   Animations & Transitions
   ======================================== */

.hero-content > * {
    animation: fadeInUp 0.8s ease-out;
}

.hero-badge {
    animation-delay: 0.1s;
}

.hero-title {
    animation-delay: 0.2s;
}

.hero-subtitle {
    animation-delay: 0.3s;
}

.hero-cta {
    animation-delay: 0.4s;
}

.hero-stats {
    animation-delay: 0.5s;
}
