/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; 
    background: #e8e0ce; /* Paper background */
    color: #333; 
    line-height: 1.6; 
    min-height: 100vh; 
    overflow-x: hidden; 
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Theme Variables */
:root {
    --paper-bg: #e8e0ce;
    --paper-text: #3e382c;
    --burn-dark: #2a0800;
    --burn-glow: #ff5500;
    --sci-fi-bg: #050510;
    --sci-fi-accent: #00f3ff;
    --sci-fi-text: #e0f7fa;
}

/* Navigation (Paper Style) */
.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 5%; 
    background: var(--paper-bg); 
    border-bottom: 2px dashed #c4bca8; 
    position: sticky; 
    top: 0; 
    z-index: 100; 
}
.nav-logo { 
    font-size: 24px; 
    font-weight: 900; 
    color: var(--paper-text);
    letter-spacing: 1px;
}
.nav-links { display: flex; gap: 30px; align-items: center; font-weight: bold; }
.nav-links a { color: var(--paper-text); transition: color 0.3s; }
.nav-links a:hover { color: #000; }
.btn-download-nav { 
    padding: 8px 24px; 
    background: #d64000; 
    color: #fff !important; 
    border-radius: 4px; 
    box-shadow: 2px 2px 0 #000;
    transition: all 0.1s; 
}
.btn-download-nav:hover { transform: translate(2px, 2px); box-shadow: 0 0 0 #000; }

/* Hero Section - Burning Paper Edge */
.hero-wrapper {
    background: var(--paper-bg);
    padding: 40px 20px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
}

.burned-hole {
    position: relative;
    width: 95%;
    max-width: 1400px;
    min-height: 80vh;
    background: var(--sci-fi-bg);
    /* Irregular shape simulating a burned hole */
    border-radius: 45% 55% 40% 60% / 55% 45% 60% 40%;
    box-shadow: 
        inset 0 0 18px 6px #000,
        inset 0 0 18px 6px var(--burn-dark),
        0 0 20px 5px var(--burn-glow),
        0 0 18px 6px rgba(255, 60, 0, 0.5);
    animation: burnShift 6s infinite alternate ease-in-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--sci-fi-text);
}

/* Sci-Fi Grid inside the hole */
.burned-hole::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; right: -50%; bottom: -50%;
    background: 
        linear-gradient(rgba(0, 243, 255, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.15) 1px, transparent 1px);
    background-size: 40px 40px;
    transform: perspective(500px) rotateX(60deg);
    animation: gridMove 10s infinite linear;
    z-index: 0;
    pointer-events: none;
}

@keyframes burnShift {
    0% { 
        border-radius: 45% 55% 40% 60% / 55% 45% 60% 40%; 
        box-shadow: inset 0 0 18px 6px #000, inset 0 0 18px 6px var(--burn-dark), 0 0 20px 5px var(--burn-glow), 0 0 18px 6px rgba(255, 60, 0, 0.5); 
    }
    100% { 
        border-radius: 55% 45% 60% 40% / 45% 55% 40% 60%; 
        box-shadow: inset 0 0 18px 6px #000, inset 0 0 80px 40px var(--burn-dark), 0 0 18px 6px var(--burn-glow), 0 0 18px 6px rgba(255, 80, 0, 0.7); 
    }
}
@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(40px); }
}

/* Embers */
.ember {
    position: absolute;
    width: 4px; height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px 3px #ff5500, 0 0 20px 5px #ff0000;
    animation: floatEmber 4s infinite ease-in;
    z-index: 1;
    opacity: 0;
}
@keyframes floatEmber {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-100px) scale(0); opacity: 0; }
}

.hero-content { 
    z-index: 3; 
    max-width: 900px; 
    text-align: center;
    background: rgba(5, 5, 16, 0.6);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(0, 243, 255, 0.3);
    backdrop-filter: blur(2px);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
}
.hero h1 { 
    font-size: 44px; 
    margin-bottom: 20px; 
    line-height: 1.3; 
    color: #fff;
    text-shadow: 0 0 10px var(--sci-fi-accent), 0 0 20px var(--sci-fi-accent);
}
.hero p { 
    font-size: 18px; 
    margin-bottom: 40px; 
    color: #b0e0e6;
}

.hero-buttons { display: flex; gap: 20px; justify-content: center; margin-bottom: 40px; flex-wrap: wrap; }
.btn-sci-fi { 
    padding: 15px 35px; 
    font-size: 16px; 
    font-weight: bold; 
    background: transparent; 
    color: var(--sci-fi-accent); 
    border: 2px solid var(--sci-fi-accent);
    border-radius: 4px;
    text-transform: uppercase;
    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;
    position: relative;
    overflow: hidden;
}
.btn-sci-fi::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.4), transparent);
    transition: all 0.5s;
}
.btn-sci-fi:hover::before { left: 100%; }
.btn-sci-fi: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); }

.btn-sci-fi-solid { 
    padding: 15px 35px; 
    font-size: 16px; 
    font-weight: bold; 
    background: var(--sci-fi-accent); 
    color: #000; 
    border: 2px solid var(--sci-fi-accent);
    border-radius: 4px;
    box-shadow: 0 0 15px var(--sci-fi-accent);
    transition: all 0.3s;
}
.btn-sci-fi-solid:hover { background: #fff; border-color: #fff; box-shadow: 0 0 25px #fff; }

.hero-images { 
    display: flex; 
    justify-content: center; 
    gap: 20px; 
    z-index: 3; 
    align-items: flex-end; 
    margin-top: 20px;
}
.hero-images img { 
    max-width: 28%; 
    border-radius: 8px;
    border: 2px solid rgba(0, 243, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
    transition: transform 0.3s; 
}
.hero-images img:hover { transform: translateY(-10px); box-shadow: 0 0 30px rgba(0, 243, 255, 0.5); }

/* Features Section (Back on Paper) */
.features { padding: 100px 5%; background: var(--paper-bg); }
.section-title { text-align: center; font-size: 36px; margin-bottom: 60px; color: var(--paper-text); }
.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: #fdfbf7;
    border: 1px solid #d4cbb8;
    box-shadow: 4px 4px 0 #c4bca8;
    transition: all 0.2s; 
}
.feature-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #c4bca8; }
.feature-card h3 { color: #8a3a00; font-size: 22px; margin-bottom: 15px; }
.feature-card p { color: #555; }

/* Blog Section */
.blog { padding: 100px 5%; background: #fdfbf7; border-top: 1px dashed #c4bca8; }
.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: #fff;
    border: 1px solid #d4cbb8;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.05);
}
.blog-card img { width: 100%; height: 260px; object-fit: cover; border-bottom: 1px solid #d4cbb8; }
.blog-content { padding: 30px; }
.blog-date { display: inline-block; margin-bottom: 15px; font-size: 14px; color: #8a3a00; font-weight: bold; border-bottom: 2px solid #8a3a00; }
.blog-content h3 { font-size: 22px; margin-bottom: 15px; color: var(--paper-text); }
.blog-content p { color: #666; margin-bottom: 0; }
.btn-more { 
    display: block; 
    width: 220px; 
    margin: 60px auto 0; 
    text-align: center; 
    padding: 15px; 
    background: #3e382c;
    color: #fff; 
    font-weight: bold; 
    border-radius: 4px;
    transition: all 0.3s; 
}
.btn-more:hover { background: #000; }

/* FAQ Section */
.faq { padding: 100px 5%; max-width: 900px; margin: 0 auto; background: var(--paper-bg); margin-bottom: 80px; }
.faq-item { 
    background: #fdfbf7; 
    margin-bottom: 20px; 
    padding: 25px 30px; 
    border-left: 4px solid #8a3a00;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.03);
}
.faq-question { font-size: 18px; font-weight: bold; color: var(--paper-text); margin-bottom: 12px; }
.faq-question::before { content: 'Q: '; color: #8a3a00; }
.faq-answer { color: #555; font-size: 15px; }

/* Footer */
.footer { background: #2a261f; padding: 80px 5% 30px; color: #e8e0ce; border-top: 4px solid #8a3a00; }
.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: bold; }
.footer-col ul li { margin-bottom: 15px; }
.footer-col ul li a { color: #bcaea0; transition: color 0.3s; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid #3e382c; color: #888; 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: #fdfbf7; border: 1px solid #d4cbb8; box-shadow: 4px 4px 0 #c4bca8; }
.download-card h3 { font-size: 22px; margin-bottom: 15px; color: #8a3a00;}
.download-card p { color: #555; margin-bottom: 30px; font-size: 15px; }
.btn-dl-card { display: inline-block; padding: 12px 30px; background: #3e382c; color: #fff; border-radius: 4px; font-weight: bold; transition: background 0.3s; }
.btn-dl-card:hover { background: #000; }

/* === 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;
    }
}
