/* ========== CSS Variables ========== */
:root {
    --primary: #e8453c;
    --primary-dark: #c0392b;
    --primary-light: #ffeeed;
    --accent: #ff6b35;
    --bg: #ffffff;
    --bg-alt: #f8f9fb;
    --bg-dark: #1a1a2e;
    --bg-darker: #16213e;
    --text: #1e1e2e;
    --text-light: #6b7280;
    --text-white: #ffffff;
    --border: #e5e7eb;
    --border-light: #f0f0f5;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 4px 24px rgba(0,0,0,.08);
    --shadow-lg: 0 12px 48px rgba(0,0,0,.12);
    --shadow-xl: 0 24px 64px rgba(0,0,0,.16);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: .3s cubic-bezier(.4,0,.2,1);
    --max-width: 1200px;
    --nav-height: 72px;
}

/* ========== Reset ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ========== Container ========== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== Navbar ========== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}
.navbar.scrolled {
    box-shadow: var(--shadow);
}
.nav-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}
.logo-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -1px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-links a {
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    transition: var(--transition);
    position: relative;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: var(--primary-light);
}
.nav-menu-btn {
    display: none;
    background: none; border: none;
    cursor: pointer; padding: 8px;
    color: var(--text);
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: 0 4px 20px rgba(232,69,60,.35);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(232,69,60,.45);
}
.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 2px solid var(--border);
}
.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}
.btn-white {
    background: #fff;
    color: var(--primary);
}
.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.btn-lg {
    padding: 18px 40px;
    font-size: 18px;
}
.btn-block {
    width: 100%;
    justify-content: center;
}

/* ========== Hero ========== */
.hero {
    padding: calc(var(--nav-height) + 60px) 24px 80px;
    background: linear-gradient(180deg, #fef7f6 0%, #fff 100%);
    position: relative;
    overflow: hidden;
}
.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.hero-text { position: relative; z-index: 2; }
.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}
.hero h1 {
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -.02em;
}
.hero h1 span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 18px;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 440px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.hero-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 32px 24px 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    text-align: center;
    transition: var(--transition);
}
.hero-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}
.hero-card:nth-child(1) { border-top: 3px solid #3b82f6; }
.hero-card:nth-child(2) { border-top: 3px solid #22c55e; margin-top: 20px; }
.hero-card:nth-child(3) { border-top: 3px solid var(--accent); margin-top: -20px; }
.hero-card:nth-child(4) { border-top: 3px solid #a855f7; }
.hero-card-icon { font-size: 40px; margin-bottom: 12px; }
.hero-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.hero-card p { font-size: 13px; color: var(--text-light); }

/* ========== Section ========== */
.section {
    padding: 100px 24px;
}
.section-alt {
    background: var(--bg-alt);
}
.section-dark {
    background: var(--bg-dark);
    color: var(--text-white);
}
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}
.section-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--primary);
    margin-bottom: 12px;
}
.section-dark .section-label { color: var(--accent); }
.section-header h2 {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -.02em;
}
.section-header p {
    font-size: 17px;
    color: var(--text-light);
    line-height: 1.7;
}
.section-dark .section-header p {
    color: rgba(255,255,255,.65);
}

/* ========== Stats ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}
.stat-card {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: var(--transition);
}
.stat-card:hover::before { opacity: 1; }
.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}
.stat-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}
.stat-label {
    font-size: 15px;
    color: var(--text-light);
    font-weight: 500;
}

/* ========== Products ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: var(--max-width);
    margin: 0 auto;
}
.product-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}
.product-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s ease;
}
.product-card:hover::after {
    transform: scaleX(1);
}
.product-icon-wrap {
    width: 60px; height: 60px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
}
.product-icon-wrap.blue { background: #eff6ff; color: #3b82f6; }
.product-icon-wrap.green { background: #f0fdf4; color: #22c55e; }
.product-icon-wrap.orange { background: #fff7ed; color: var(--accent); }
.product-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.product-card .product-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 20px;
}
.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.product-features li {
    padding: 5px 14px;
    background: var(--bg-alt);
    border-radius: 100px;
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
}

/* ========== Features ========== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}
.feature-card {
    display: flex;
    gap: 16px;
    padding: 28px;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
.feature-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}
.feature-icon-sq {
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    background: var(--primary-light);
}
.feature-text h4 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.feature-text p { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* ========== CTA ========== */
.cta-section {
    padding: 80px 24px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.cta-section .container { position: relative; z-index: 1; }
.cta-section h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}
.cta-section p {
    font-size: 17px;
    color: rgba(255,255,255,.85);
    margin-bottom: 36px;
    max-width: 500px;
    margin-left: auto; margin-right: auto;
}
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ========== Download Page ========== */
.download-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-height) + 40px) 24px 60px;
    background: linear-gradient(180deg, #fef7f6 0%, #fff 100%);
}
.download-wrapper {
    max-width: 480px;
    width: 100%;
}
.download-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 56px 48px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    text-align: center;
}
.dl-icon {
    width: 88px; height: 88px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 40px;
    font-weight: 800;
    box-shadow: 0 8px 30px rgba(232,69,60,.3);
}
.download-card h1 { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.download-card .dl-tagline { font-size: 15px; color: var(--text-light); margin-bottom: 32px; }
.dl-info {
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 32px;
    text-align: left;
}
.dl-info-row {
    display: flex; justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}
.dl-info-row:last-child { border: none; }
.dl-info-label { color: var(--text-light); }
.dl-info-value { font-weight: 600; }
.dl-platforms {
    display: flex; gap: 8px; justify-content: center;
    flex-wrap: wrap; margin-top: 24px;
}
.dl-platform-badge {
    padding: 6px 16px;
    background: var(--bg-alt);
    border-radius: 100px;
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
}
.dl-back {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 28px;
    font-size: 14px;
    color: var(--text-light);
    transition: var(--transition);
}
.dl-back:hover { color: var(--primary); }
.dl-back svg { width: 18px; height: 18px; }

/* ========== 404 Page ========== */
.error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--nav-height) 24px 60px;
    background: linear-gradient(180deg, #fef7f6 0%, #fff 100%);
}
.error-graphic {
    position: relative;
    margin-bottom: 40px;
}
.error-icon-big {
    font-size: 120px;
    position: relative;
    z-index: 2;
    animation: float-404 3s ease-in-out infinite;
}
@keyframes float-404 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
}
.error-ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 200px; height: 200px;
    border: 2px dashed #e5e7eb;
    border-radius: 50%;
    animation: spin-404 20s linear infinite;
}
@keyframes spin-404 {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
.error-ring:nth-child(3) {
    width: 160px; height: 160px;
    animation-direction: reverse;
    animation-duration: 14s;
    border-color: var(--primary-light);
}
.error-code-404 {
    font-size: 100px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 20px;
}
.error-page h1 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.error-page .error-desc {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 420px;
}
.error-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ========== Footer ========== */
.footer {
    background: var(--bg-darker);
    color: rgba(255,255,255,.7);
    padding: 60px 24px 32px;
}
.footer-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand .logo { color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: 14px; line-height: 1.7; max-width: 280px; }
.footer-col h5 {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}
.footer-col a {
    display: block;
    font-size: 13px;
    padding: 4px 0;
    color: rgba(255,255,255,.55);
    transition: var(--transition);
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: 24px;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,.4);
}
.footer-bottom a { color: rgba(255,255,255,.55); }
.footer-bottom a:hover { color: #fff; }

/* ========== Animations (Intersection Observer based) ========== */
.anim-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease;
}
.anim-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-subtitle { margin: 0 auto 36px; }
    .hero-cta { justify-content: center; }
    .hero-visual { max-width: 400px; margin: 0 auto; }
    .hero-cards { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0; right: 0;
        background: #fff;
        border-bottom: 1px solid var(--border);
        padding: 16px;
        gap: 4px;
        box-shadow: var(--shadow);
    }
    .nav-menu-btn { display: block; }
    .hero h1 { font-size: 36px; }
    .hero-cards { grid-template-columns: 1fr; max-width: 260px; }
    .hero-card:nth-child(1),
    .hero-card:nth-child(2),
    .hero-card:nth-child(3),
    .hero-card:nth-child(4) { margin-top: 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .products-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .section { padding: 60px 24px; }
    .download-card { padding: 40px 24px; }
    .error-code-404 { font-size: 64px; }
    .error-icon-big { font-size: 80px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 30px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-number { font-size: 34px; }
    .btn { padding: 12px 24px; font-size: 14px; }
}
