/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    /* 移动端优化：禁止iOS缩放 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    /* 移动端优化：优化文字渲染 */
    text-rendering: optimizeLegibility;
    /* 安全区域支持 - iOS安全区域通过header/fab单独处理，body不加padding避免双倍偏移 */
}

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

a {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    /* 增加点击区域 */
    min-height: 44px;
    min-width: 44px;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    /* 触摸目标优化 */
    min-height: 44px;
    min-width: 44px;
}

/* Variables */
:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --dark: #1a1a2e;
    --dark-light: #2d2d44;
    --text: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg: #fff;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a2e;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.2);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 100%);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
    /* 移动端优化变量 */
    --safe-top: env(safe-area-inset-top);
    --safe-bottom: env(safe-area-inset-bottom);
    --safe-left: env(safe-area-inset-left);
    --safe-right: env(safe-area-inset-right);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header / Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
    /* 安全区域支持 */
    padding-top: var(--safe-top);
}

.header.scrolled {
    box-shadow: var(--shadow);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--dark);
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
    font-size: 0.95rem;
    /* 触摸目标优化 */
    padding: 8px 4px;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    /* 触摸目标优化 */
    min-width: 44px;
    min-height: 44px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: var(--transition);
}

.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(5px, -5px);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--gradient-dark);
    padding: 100px 0 120px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(255, 255, 255, 0.2), transparent);
    background-size: 200px 200px, 300px 300px, 150px 150px, 250px 250px, 180px 180px;
    animation: twinkle 8s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 0.9rem;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 0%, #a8b5ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease 0.1s backwards;
}

.hero-subtitle {
    display: block;
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 500;
    margin-top: 8px;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.8);
}

.hero-desc {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease 0.2s backwards;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
    animation: fadeInUp 0.6s ease 0.3s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.4s backwards;
}

.stat {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    line-height: 0;
}

.hero-wave svg {
    width: 100%;
    height: 120px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 16px;
    line-height: 1.3;
}

.section-desc {
    font-size: clamp(1rem, 3vw, 1.125rem);
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--bg-light);
}

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

.feature-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

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

.feature-card-highlight {
    background: var(--gradient-dark);
    color: #fff;
}

.feature-card-highlight .feature-title,
.feature-card-highlight .feature-desc {
    color: #fff;
}

.feature-card-highlight .feature-desc {
    opacity: 0.8;
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 16px;
}

.feature-card-highlight .feature-icon {
    background: rgba(255, 255, 255, 0.1);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.feature-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Characters Section */
.characters {
    padding: 80px 0;
    background: #fff;
}

.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.character-card {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.character-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.character-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
}

.character-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.character-tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.character-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    display: block;
    line-height: 1.5;
}

/* How to Use Section */
.how-to-use {
    padding: 80px 0;
    background: var(--bg-light);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    position: relative;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.step-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.step-content p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Testimonials Section */
.testimonials {
    padding: 80px 0;
    background: #fff;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.testimonial-stars {
    color: #fbbf24;
    font-size: 1.1rem;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.testimonial-text {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 1.1rem;
}

.testimonial-user strong {
    display: block;
    font-size: 0.95rem;
    color: var(--dark);
}

.testimonial-user span {
    font-size: 0.8rem;
    color: var(--text-lighter);
}

/* Download Section */
.download-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.download-card {
    background: var(--gradient-dark);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(2px 2px at 30% 20%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 70% 80%, rgba(255, 255, 255, 0.3), transparent);
    background-size: 150px 150px, 200px 200px;
}

.download-content {
    position: relative;
    z-index: 1;
}

.download-content .section-tag {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.download-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 12px;
}

.download-desc {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 32px;
}

.download-info {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
}

.download-tip {
    margin-top: 20px;
    font-size: 0.9rem;
    opacity: 0.7;
}

.btn-download {
    background: #fff;
    color: var(--primary);
    font-weight: 700;
}

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

/* FAQ Section */
.faq-section {
    padding: 80px 0;
    background: #fff;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--dark);
    text-align: left;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--primary);
}

.faq-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.faq-question[aria-expanded="true"] .faq-icon {
    background: var(--primary);
    color: #fff;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.active {
    max-height: 300px;
    padding-bottom: 24px;
}

.faq-answer p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: var(--gradient-dark);
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    color: #fff;
}

.cta-content h2 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 32px;
}

.cta-content .btn-primary {
    background: #fff;
    color: var(--primary);
}

.cta-content .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Footer */
.footer {
    background: var(--dark);
    color: #fff;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    color: #fff;
    margin-bottom: 16px;
}

.brand-desc {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.brand-url {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.footer-group h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: #fff;
}

.footer-group a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    transition: var(--transition);
    font-size: 0.95rem;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Floating Download Button */
.fab-download {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--gradient);
    color: #fff;
    padding: 14px 24px;
    border-radius: 50px;
    font-weight: 600;
    display: none;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    z-index: 999;
    transition: var(--transition);
    animation: slideUp 0.3s ease;
}

.fab-download.visible {
    display: flex;
}

.fab-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

.fab-icon {
    font-size: 1.1rem;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Touch Feedback */
.btn:active {
    transform: scale(0.96);
    transition: transform 0.1s ease;
}

.btn-primary:active {
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

/* Card Touch Feedback */
.feature-card:active,
.character-card:active,
.testimonial-card:active {
    transform: scale(0.98);
}

/* FAQ Touch Feedback */
.faq-question:active {
    color: var(--primary);
}

/* Navigation Touch Feedback */
.nav-link:active {
    color: var(--primary);
}

/* ============================================
   Mobile Bottom Navigation Bar
   ============================================ */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.08);
    z-index: 998;
    padding: 8px 0;
    padding-bottom: calc(8px + var(--safe-bottom));
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 6px 4px;
    color: var(--text-lighter);
    transition: color 0.2s ease;
    min-height: 44px;
    text-decoration: none;
}

.mobile-nav-item:active {
    color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-icon {
    font-size: 1.3rem;
    margin-bottom: 2px;
    line-height: 1;
}

.mobile-nav-label {
    font-size: 0.7rem;
    font-weight: 500;
}

.mobile-nav-download {
    position: relative;
}

.mobile-nav-download::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.mobile-nav-download .mobile-nav-icon {
    position: relative;
    z-index: 1;
}

.mobile-nav-download {
    color: var(--primary);
}

.mobile-nav-download:active {
    color: var(--primary-dark);
}

/* Desktop Hide Mobile Nav */
@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
}

/* Dark Mode Bottom Nav */
@media (prefers-color-scheme: dark) {
    .mobile-nav {
        background: var(--dark);
        box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
    }
    
    .mobile-nav-item {
        color: #666;
    }
    
    .mobile-nav-item:active,
    .mobile-nav-item.active {
        color: var(--primary);
    }
}

/* ============================================
   Responsive Design - Mobile First Approach
   ============================================ */

/* Tablet Landscape & Small Desktop (max-width: 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 24px;
    }
    
    .hero-title {
        font-size: clamp(2rem, 6vw, 3.5rem);
    }
    
    /* Testimonials: 2 columns on tablet */
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet Portrait (max-width: 768px) */
@media (max-width: 768px) {
    /* Mobile Bottom Nav */
    .mobile-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
    
    /* Add bottom padding to body for nav */
    body {
        padding-bottom: calc(70px + var(--safe-bottom));
    }
    
    /* Update FAB to not overlap */
    .fab-download {
        display: none !important;
    }
    
    /* Container */
    .container {
        padding: 0 20px;
    }
    
    /* Navigation - Mobile Menu */
    .nav-menu {
        position: fixed;
        top: calc(60px + var(--safe-top));
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 24px 20px;
        gap: 8px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
        max-height: calc(100vh - 60px - var(--safe-top));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-link {
        display: block;
        width: 100%;
        padding: 14px 16px;
        font-size: 1.05rem;
        border-radius: 10px;
        transition: background 0.2s ease;
        min-height: 48px;
    }
    
    .nav-link:active {
        background: var(--bg-light);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    /* Hero Section */
    .hero {
        padding: 80px 0 80px;
        min-height: auto;
    }
    
    .hero-content {
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
        line-height: 1.2;
        margin-bottom: 12px;
    }
    
    .hero-subtitle {
        font-size: clamp(0.95rem, 4vw, 1.1rem);
    }
    
    .hero-desc {
        font-size: 1rem;
        margin-bottom: 32px;
        line-height: 1.7;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
        gap: 12px;
        margin-bottom: 40px;
    }
    
    .btn {
        width: 100%;
        min-height: 52px;
        font-size: 1rem;
        padding: 16px 28px;
    }
    
    .btn-large {
        padding: 18px 32px;
        font-size: 1.05rem;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .stat {
        flex: 1;
        min-width: 80px;
    }
    
    .stat-num {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* Sections */
    .features,
    .characters,
    .how-to-use,
    .testimonials,
    .download-section,
    .faq-section {
        padding: 50px 0;
    }
    
    .section-header {
        margin-bottom: 36px;
    }
    
    .section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
    
    .section-desc {
        font-size: 0.95rem;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .feature-card {
        padding: 28px 24px;
    }
    
    .feature-icon {
        width: 56px;
        height: 56px;
        font-size: 1.75rem;
        margin-bottom: 16px;
    }
    
    .feature-title {
        font-size: 1.15rem;
    }
    
    .feature-desc {
        font-size: 0.9rem;
    }
    
    /* Characters Grid */
    .characters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .character-card {
        padding: 24px 16px;
    }
    
    .character-avatar {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .character-card h3 {
        font-size: 1.05rem;
    }
    
    .character-tag {
        font-size: 0.75rem;
        padding: 3px 10px;
        margin-bottom: 8px;
    }
    
    .character-desc {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    /* Steps */
    .steps {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    
    .step-number {
        font-size: 2.5rem;
    }
    
    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .testimonial-card {
        padding: 24px;
    }
    
    .testimonial-text {
        font-size: 0.9rem;
    }
    
    /* Download Section */
    .download-card {
        padding: 36px 24px;
        border-radius: 16px;
    }
    
    .download-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
    
    .download-desc {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }
    
    .download-info {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 32px;
    }
    
    .info-item {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 0.85rem;
    }
    
    /* FAQ */
    .faq-list {
        max-width: 100%;
    }
    
    .faq-question {
        font-size: 0.95rem;
        padding: 18px 0;
        line-height: 1.5;
        min-height: 56px;
    }
    
    .faq-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        flex-shrink: 0;
    }
    
    .faq-answer.active {
        max-height: 500px;
        padding-bottom: 20px;
    }
    
    .faq-answer p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    /* CTA Section */
    .cta-section {
        padding: 50px 0;
    }
    
    .cta-content h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
    
    .cta-content p {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }
    
    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 28px;
        margin-bottom: 28px;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-group a {
        font-size: 0.9rem;
        margin-bottom: 8px;
        min-height: 36px;
    }
    
    .footer-bottom {
        padding-top: 20px;
        font-size: 0.8rem;
    }
    
    /* Floating Download Button */
    .fab-download {
        bottom: calc(16px + var(--safe-bottom));
        right: 16px;
        padding: 12px 20px;
        font-size: 0.9rem;
        gap: 6px;
        min-height: 48px;
        z-index: 999;
    }
    
    .fab-text {
        display: inline;
    }
    
    /* Keywords Section */
    .keywords-section {
        padding: 30px 0 !important;
    }
    
    .keywords-section h2 {
        font-size: 1rem !important;
        margin-bottom: 16px !important;
    }
    
    .keywords-section a {
        padding: 6px 14px !important;
        font-size: 0.8rem !important;
    }
}

/* Large Mobile (max-width: 576px) */
@media (max-width: 576px) {
    /* Container */
    .container {
        padding: 0 16px;
    }
    
    /* Hero Section */
    .hero {
        padding: 60px 0 60px;
    }
    
    .hero-badge {
        padding: 6px 16px;
        font-size: 0.8rem;
        margin-bottom: 20px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .hero-stats {
        gap: 16px;
    }
    
    .stat {
        flex: 1;
    }
    
    .stat-num {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* Sections */
    .features,
    .characters,
    .how-to-use,
    .testimonials,
    .download-section,
    .faq-section {
        padding: 40px 0;
    }
    
    .section-header {
        margin-bottom: 28px;
    }
    
    .section-tag {
        font-size: 0.75rem;
        padding: 4px 12px;
        margin-bottom: 12px;
    }
    
    .section-title {
        font-size: 1.35rem;
        margin-bottom: 12px;
    }
    
    .section-desc {
        font-size: 0.9rem;
    }
    
    /* Features */
    .feature-card {
        padding: 24px 20px;
    }
    
    /* Characters */
    .characters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .character-card {
        padding: 20px 12px;
    }
    
    .character-avatar {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }
    
    .character-card h3 {
        font-size: 1rem;
    }
    
    .character-desc {
        font-size: 0.8rem;
    }
    
    /* Download Card */
    .download-card {
        padding: 28px 20px;
    }
    
    .btn {
        min-height: 50px;
        font-size: 0.95rem;
    }
    
    /* Footer */
    .footer-links {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    
    /* Fab Button */
    .fab-download {
        bottom: calc(12px + var(--safe-bottom));
        right: 12px;
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* Small Mobile (max-width: 375px) */
@media (max-width: 375px) {
    /* Container */
    .container {
        padding: 0 12px;
    }
    
    /* Navigation */
    .nav {
        height: 56px;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .nav-menu {
        top: calc(56px + var(--safe-top));
    }
    
    /* Hero */
    .hero {
        padding: 50px 0 50px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-desc {
        font-size: 0.9rem;
        margin-bottom: 24px;
    }
    
    .hero-stats {
        flex-wrap: nowrap;
        gap: 8px;
    }
    
    .stat {
        min-width: 60px;
    }
    
    .stat-num {
        font-size: 1.1rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    /* Sections */
    .features,
    .characters,
    .how-to-use,
    .testimonials,
    .download-section,
    .faq-section {
        padding: 36px 0;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    /* Characters - single column for very small screens */
    .characters-grid {
        grid-template-columns: 1fr;
    }
    
    /* FAQ */
    .faq-question {
        font-size: 0.9rem;
    }
    
    /* Fab Button */
    .fab-download {
        bottom: calc(10px + var(--safe-bottom));
        right: 10px;
        padding: 10px;
        font-size: 0;
        min-width: 44px;
        min-height: 44px;
    }
    
    .fab-download .fab-icon {
        font-size: 1.1rem;
    }
    
    .fab-text {
        display: none;
    }
}

/* Landscape Mode Optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 60px 0 40px;
    }
    
    .hero-content {
        padding: 40px 0;
    }
    
    .hero-stats {
        margin-bottom: 0;
    }
}

/* Tablet Landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 32px;
    }
    
    .characters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .header {
        background: rgba(26, 26, 46, 0.95);
    }
    
    .nav-menu {
        background: var(--dark);
    }
    
    .nav-link {
        color: #fff;
    }
    
    body {
        background: var(--dark);
        color: #e0e0e0;
    }
    
    .features,
    .how-to-use,
    .download-section {
        background: var(--dark-light);
    }
    
    .characters,
    .testimonials,
    .faq-section {
        background: var(--dark);
    }
    
    .feature-card,
    .testimonial-card {
        background: var(--dark-light);
    }
    
    .character-card {
        background: var(--dark-light);
    }
    
    .section-title,
    .feature-title,
    .character-card h3,
    .testimonial-user strong {
        color: #fff;
    }
    
    .section-desc,
    .feature-desc,
    .character-desc,
    .testimonial-text {
        color: #a0a0a0;
    }
    
    .section-tag,
    .character-tag {
        background: rgba(102, 126, 234, 0.2);
    }
    
    .faq-item {
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .faq-question {
        color: #fff;
    }
    
    .faq-question:active {
        color: var(--primary);
    }
    
    .footer-group a {
        color: rgba(255, 255, 255, 0.6);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .feature-card,
    .character-card {
        border: 1px solid var(--border);
    }
}

/* Print styles */
@media print {
    .header,
    .fab-download,
    .nav-toggle,
    .hero-bg {
        display: none !important;
    }
    
    .hero {
        padding-top: 0;
        min-height: auto;
        background: #fff !important;
        color: #000 !important;
    }
    
    .hero-content {
        color: #000 !important;
    }
    
    .hero-title {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
    }
    
    .hero-subtitle,
    .hero-desc,
    .hero-badge {
        color: #333 !important;
        -webkit-text-fill-color: #333 !important;
    }
    
    .btn {
        display: none;
    }
    
    .features,
    .characters,
    .how-to-use,
    .testimonials,
    .download-section,
    .faq-section,
    .cta-section {
        background: #fff !important;
        color: #000 !important;
        page-break-inside: avoid;
    }
    
    .feature-card,
    .character-card,
    .testimonial-card {
        break-inside: avoid;
    }
    
    .footer {
        background: #fff !important;
        color: #000 !important;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    /* Show download URLs in print */
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}