/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Microsoft YaHei', 'Heiti SC', sans-serif; 
    background-color: #0a0a0a; 
    color: #e0e0e0; 
    line-height: 1.6; 
    min-height: 100vh; 
    overflow-x: hidden; 
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Theme Variables - Torn Paper & Neon */
:root {
    --bg-dark: #111111;
    --bg-darker: #050505;
    --neon-blue: #00f3ff;
    --neon-blue-dim: #0055ff;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
}

/* Navigation */
.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 20px 5%; 
    background: rgba(17, 17, 17, 0.9); 
    backdrop-filter: blur(2px);
    position: sticky; 
    top: 0; 
    z-index: 100; 
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
}
.nav-logo { 
    font-size: 24px; 
    font-weight: 900; 
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}
.nav-logo svg {
    width: 32px;
    height: 32px;
    fill: var(--neon-blue);
    filter: drop-shadow(0 0 5px var(--neon-blue));
}
.nav-links { display: flex; gap: 30px; align-items: center; font-weight: bold; }
.nav-links a { 
    color: var(--text-muted); 
    transition: all 0.3s; 
    font-size: 16px; 
}
.nav-links a:hover { 
    color: var(--neon-blue); 
    text-shadow: 0 0 8px var(--neon-blue);
}
.btn-download-nav { 
    padding: 8px 24px; 
    background: transparent;
    color: var(--neon-blue) !important; 
    border: 2px solid var(--neon-blue);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2), inset 0 0 10px rgba(0, 243, 255, 0.2);
    transition: all 0.3s; 
}
.btn-download-nav:hover { 
    background: var(--neon-blue);
    color: #000 !important;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.6);
}

/* Hero Section - Torn Paper Effect */
.hero-wrapper {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 5% 120px;
    overflow: hidden;
    background: var(--bg-darker);
}

/* The dark poster layers with SVG noise texture */
.tear-layer-top {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 48%;
    background: #1a1a1a url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
    clip-path: polygon(0 0, 100% 0, 100% 100%, 97% 90%, 94% 98%, 91% 85%, 88% 95%, 85% 80%, 82% 99%, 79% 88%, 76% 95%, 73% 82%, 70% 100%, 67% 85%, 64% 96%, 61% 80%, 58% 92%, 55% 85%, 52% 98%, 49% 82%, 46% 95%, 43% 88%, 40% 100%, 37% 85%, 34% 96%, 31% 80%, 28% 92%, 25% 85%, 22% 98%, 19% 82%, 16% 95%, 13% 88%, 10% 100%, 7% 85%, 4% 96%, 1% 80%, 0 100%);
    z-index: 2;
    filter: drop-shadow(0 15px 15px rgba(0,0,0,0.9));
}

.tear-layer-bottom {
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 48%;
    background: #1a1a1a url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
    clip-path: polygon(0 100%, 100% 100%, 100% 0, 97% 10%, 94% 2%, 91% 15%, 88% 5%, 85% 20%, 82% 1%, 79% 12%, 76% 5%, 73% 18%, 70% 0%, 67% 15%, 64% 4%, 61% 20%, 58% 8%, 55% 15%, 52% 2%, 49% 18%, 46% 5%, 43% 12%, 40% 0%, 37% 15%, 34% 4%, 31% 20%, 28% 8%, 25% 15%, 22% 2%, 19% 18%, 16% 5%, 13% 12%, 10% 0%, 7% 15%, 4% 4%, 1% 20%, 0 0);
    z-index: 2;
    filter: drop-shadow(0 -15px 15px rgba(0,0,0,0.9));
}

/* The glowing gap inside the tear */
.tear-gap {
    position: absolute;
    top: 35%; left: 0; width: 100%; height: 30%;
    background: var(--bg-darker);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.glow-light {
    position: absolute;
    width: 120%;
    height: 10px;
    background: #fff;
    box-shadow: 0 0 18px 6px var(--neon-blue), 0 0 100px 50px var(--neon-blue-dim);
    opacity: 0.9;
    transform: rotate(-2deg);
}

/* Flying Plane inside the gap */
.flying-plane {
    position: absolute;
    width: 180px;
    height: 180px;
    z-index: 3;
    animation: flyThrough 4s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
    filter: drop-shadow(0 0 25px var(--neon-blue));
}

@keyframes flyThrough {
    0% { transform: translateX(-60vw) translateY(80px) rotate(25deg) scale(0.5); opacity: 0; }
    20% { opacity: 1; }
    50% { transform: translateX(0) translateY(0) rotate(5deg) scale(1.2); }
    80% { opacity: 1; }
    100% { transform: translateX(60vw) translateY(-80px) rotate(-15deg) scale(0.8); opacity: 0; }
}

.hero-content { 
    z-index: 10; 
    max-width: 1000px; 
    text-align: center;
    position: relative;
    pointer-events: none; /* Let clicks pass through to buttons */
}
.hero-content * { pointer-events: auto; }

.hero-title {
    font-size: 42px; /* Adjusted for longer title */
    font-weight: 900;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 0 20px rgba(0,0,0,0.8), 0 0 10px var(--neon-blue);
    letter-spacing: 2px;
}

.hero p { 
    font-size: 20px; 
    margin-bottom: 40px; 
    color: #ddd;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: bold;
}

.hero-buttons { display: flex; gap: 20px; justify-content: center; margin-bottom: 50px; flex-wrap: wrap; }

.btn-neon { 
    padding: 15px 35px; 
    font-size: 18px; 
    font-weight: bold; 
    color: #000; 
    background: var(--neon-blue);
    border: none;
    border-radius: 4px;
    box-shadow: 0 0 15px var(--neon-blue), 0 0 30px var(--neon-blue-dim);
    transition: all 0.3s;
}
.btn-neon:hover { 
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--neon-blue), 0 0 50px var(--neon-blue-dim);
    background: #fff;
}

.btn-neon-outline { 
    padding: 15px 35px; 
    font-size: 18px; 
    font-weight: bold; 
    color: var(--neon-blue); 
    background: rgba(0,0,0,0.5);
    border: 2px solid var(--neon-blue);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3), inset 0 0 10px rgba(0, 243, 255, 0.3);
    transition: all 0.3s;
    backdrop-filter: blur(2px);
}
.btn-neon-outline:hover { 
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.6), inset 0 0 20px rgba(0, 243, 255, 0.6);
}

.hero-images { 
    display: flex; 
    justify-content: center; 
    gap: 25px; 
    align-items: flex-end; 
}
.hero-images img { 
    max-width: 28%; 
    border-radius: 12px;
    border: 1px solid rgba(0, 243, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0,0,0,0.8), 0 0 20px rgba(0, 243, 255, 0.2);
    transition: all 0.3s; 
}
.hero-images img:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.9), 0 0 30px rgba(0, 243, 255, 0.5);
    border-color: var(--neon-blue);
}

/* Features Section */
.features { padding: 100px 5%; background: var(--bg-dark); position: relative; z-index: 10;}
.section-title { 
    text-align: center; 
    font-size: 36px; 
    margin-bottom: 60px; 
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1200px; margin: 0 auto; }

.feature-card { 
    padding: 40px 30px; 
    text-align: center; 
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    transition: all 0.3s; 
}
.feature-card:hover { 
    transform: translateY(-5px); 
    background: rgba(0, 243, 255, 0.05);
    border-color: rgba(0, 243, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 15px rgba(0, 243, 255, 0.1);
}
.feature-card h3 { 
    font-size: 22px; 
    margin-bottom: 15px; 
    font-weight: 900; 
    color: var(--neon-blue);
}
.feature-card p { color: var(--text-muted); font-size: 15px;}

/* Blog Section */
.blog { padding: 100px 5%; background: var(--bg-darker); }
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; max-width: 1100px; margin: 0 auto; }
.blog-card { 
    display: flex; 
    flex-direction: column; 
    background: var(--bg-dark);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s;
}
.blog-card:hover { 
    transform: translateY(-5px); 
    border-color: rgba(0, 243, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 20px rgba(0, 243, 255, 0.15);
}
.blog-card img { width: 100%; height: 260px; object-fit: cover; opacity: 0.8; transition: opacity 0.3s;}
.blog-card:hover img { opacity: 1; }
.blog-content { padding: 30px; }
.blog-date { display: inline-block; margin-bottom: 15px; font-size: 14px; color: var(--neon-blue); font-weight: bold;}
.blog-content h3 { font-size: 22px; margin-bottom: 15px; font-weight: 900; color: #fff;}
.blog-content p { color: var(--text-muted); margin-bottom: 0; }
.btn-more { 
    display: block; 
    width: 240px; 
    margin: 60px auto 0; 
    text-align: center; 
    padding: 15px; 
    background: transparent;
    color: var(--neon-blue); 
    font-weight: bold; 
    border: 1px solid var(--neon-blue);
    border-radius: 4px;
    transition: all 0.3s; 
}
.btn-more:hover { background: rgba(0, 243, 255, 0.1); box-shadow: 0 0 15px rgba(0, 243, 255, 0.3); }

/* FAQ Section */
.faq { padding: 100px 5%; max-width: 900px; margin: 0 auto; background: var(--bg-dark); margin-top: 40px; margin-bottom: 80px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05);}
.faq-item { 
    background: rgba(255,255,255,0.02); 
    margin-bottom: 20px; 
    padding: 25px 30px; 
    border-radius: 6px;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}
.faq-item:hover { 
    background: rgba(0, 243, 255, 0.03); 
    border-left-color: var(--neon-blue);
    transform: translateX(5px);
}
.faq-question { font-size: 18px; font-weight: 900; margin-bottom: 12px; color: #fff;}
.faq-answer { color: var(--text-muted); font-size: 15px; }

/* Footer */
.footer { background: #080808; padding: 80px 5% 30px; color: #888; border-top: 1px solid rgba(255,255,255,0.05);}
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; max-width: 1200px; margin: 0 auto 50px; }
.footer-col h4 { font-size: 18px; color: #fff; margin-bottom: 25px; font-weight: 900;}
.footer-col ul li { margin-bottom: 15px; }
.footer-col ul li a { color: #888; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--neon-blue); }
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.05); font-size: 14px;}

/* Download Page Grid */
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; max-width: 1100px; margin: 60px auto; padding: 0 5%; }
.download-card { 
    padding: 40px 30px; 
    text-align: center; 
    background: rgba(255,255,255,0.03); 
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s;
}
.download-card:hover { 
    transform: translateY(-5px); 
    border-color: rgba(0, 243, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(0, 243, 255, 0.1);
}
.download-card h3 { font-size: 24px; margin-bottom: 15px; font-weight: 900; color: #fff;}
.download-card p { color: var(--text-muted); margin-bottom: 30px; font-size: 15px; }
.btn-dl-card { 
    display: inline-block; 
    padding: 12px 30px; 
    background: rgba(0, 243, 255, 0.1);
    color: var(--neon-blue); 
    font-weight: bold; 
    border: 1px solid var(--neon-blue);
    border-radius: 4px;
    transition: all 0.3s; 
}
.btn-dl-card:hover { background: var(--neon-blue); color: #000; box-shadow: 0 0 15px rgba(0, 243, 255, 0.5); }

/* Page specific headers */
.page-header { 
    padding: 100px 5% 80px; 
    text-align: center; 
    background: var(--bg-darker);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.page-header-content {
    max-width: 800px;
    margin: 0 auto;
}
.page-header h1 { 
    font-size: 42px; 
    margin-bottom: 20px; 
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}
.page-header p { font-size: 18px; color: var(--text-muted);}

/* === perf: reduce motion & lower GPU cost === */
.feature-card,
.blog-card,
.hero-content,
.glass-panel,
.pearl-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.navbar {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* perf: limit decorative infinite layers on mid/low-end devices */
@media (max-width: 768px) {
    .bubble:nth-child(n+3),
    .tiny-plane:nth-child(n+3),
    .bg-shard:nth-child(n+4),
    .orb:nth-child(n+2) {
        display: none !important;
    }
}
