/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif; 
    background-color: #f4f6f9; 
    color: #333; 
    line-height: 1.6; 
    min-height: 100vh; 
    overflow-x: hidden; 
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Film Overlay Variables */
:root {
    --film-cyan: rgba(0, 255, 255, 0.4);
    --film-magenta: rgba(255, 0, 255, 0.4);
    --film-yellow: rgba(255, 255, 0, 0.4);
    --film-dark: rgba(30, 30, 30, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --primary-blue: #0088cc;
}

/* Navigation */
.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 5%; 
    background: var(--glass-bg); 
    border-bottom: 1px solid var(--glass-border); 
    position: sticky; 
    top: 0; 
    z-index: 100; 
    backdrop-filter: blur(2px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}
.nav-logo { 
    font-size: 26px; 
    font-weight: 900; 
    color: var(--text-main); 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    position: relative;
}
/* Logo Film Effect */
.nav-logo::before {
    content: '电报';
    position: absolute;
    left: 2px;
    top: 2px;
    color: rgba(0, 255, 255, 0.6);
    z-index: -1;
    mix-blend-mode: multiply;
}
.nav-logo::after {
    content: '电报';
    position: absolute;
    left: -2px;
    top: -2px;
    color: rgba(255, 0, 255, 0.6);
    z-index: -1;
    mix-blend-mode: multiply;
}

.nav-links { display: flex; gap: 30px; align-items: center; font-weight: bold; }
.nav-links a { 
    font-size: 16px; 
    color: var(--text-main); 
    transition: all 0.3s; 
    position: relative;
}
.nav-links a:hover { color: var(--primary-blue); }
.btn-download-nav { 
    padding: 8px 24px; 
    background: var(--primary-blue);
    color: white !important; 
    border-radius: 4px;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}
.btn-download-nav:hover { 
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

/* Hero Section */
.hero { 
    position: relative; 
    padding: 100px 5% 80px; 
    text-align: center; 
    min-height: 90vh; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    overflow: hidden;
    background: #f4f6f9;
}

/* Transparent Film Overlay Animation */
.film-container {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: multiply;
}
.film-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    border-radius: 20px;
    transform-origin: center;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: filmFloat 10s infinite alternate ease-in-out;
}
.film-layer svg {
    width: 150px;
    height: 150px;
}
.film-cyan {
    background: var(--film-cyan);
    transform: translate(-60%, -60%) rotate(-15deg);
    animation-delay: 0s;
}
.film-magenta {
    background: var(--film-magenta);
    transform: translate(-40%, -40%) rotate(10deg);
    animation-delay: -3s;
}
.film-yellow {
    background: var(--film-yellow);
    transform: translate(-50%, -30%) rotate(-5deg);
    animation-delay: -6s;
}

@keyframes filmFloat {
    0% { margin-top: 0; margin-left: 0; }
    50% { margin-top: 20px; margin-left: -20px; }
    100% { margin-top: -20px; margin-left: 20px; }
}

.hero-content { 
    z-index: 3; 
    max-width: 800px; 
    margin: 0 auto; 
    position: relative; 
    background: var(--glass-bg); 
    padding: 50px; 
    border-radius: 20px; 
    border: 1px solid var(--glass-border); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    backdrop-filter: blur(2px);
}
.hero h1 { 
    font-size: 52px; 
    margin-bottom: 20px; 
    color: var(--text-main); 
    line-height: 1.2; 
    letter-spacing: 1px;
}
.hero p { 
    font-size: 18px; 
    margin-bottom: 40px; 
    color: var(--text-muted); 
}

.hero-buttons { display: flex; gap: 20px; justify-content: center; margin-bottom: 30px; flex-wrap: wrap; }
.btn-film { 
    padding: 15px 35px; 
    font-size: 16px; 
    font-weight: bold; 
    background: white; 
    color: var(--text-main); 
    border: 2px solid var(--text-main);
    border-radius: 4px; 
    box-shadow: 6px 6px 0 rgba(0,0,0,0.1); 
    cursor: pointer; 
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.btn-film:hover { 
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 rgba(0,0,0,0.1); 
}
.btn-pc { 
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    box-shadow: 6px 6px 0 rgba(0, 136, 204, 0.3);
}
.btn-pc:hover { 
    box-shadow: 4px 4px 0 rgba(0, 136, 204, 0.3);
}

.hero-images { 
    display: flex; 
    justify-content: center; 
    gap: 20px; 
    z-index: 3; 
    align-items: flex-end; 
    position: relative;
    margin-top: 40px;
}
.hero-images img { 
    max-width: 28%; 
    border-radius: 12px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.1); 
    transition: transform 0.4s; 
    background: white;
    padding: 5px;
}
.hero-images img:hover { 
    transform: translateY(-10px) scale(1.02); 
}

/* Features Section */
.features { padding: 100px 5%; background: white; position: relative; z-index: 10;}
.section-title { 
    text-align: center; 
    font-size: 36px; 
    margin-bottom: 60px; 
    color: var(--text-main); 
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: var(--film-yellow);
    z-index: -1;
}
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1200px; margin: 0 auto; }
.feature-card { 
    background: #fdfdfd; 
    padding: 40px 30px; 
    border-radius: 12px; 
    border: 1px solid #eee;
    box-shadow: 0 10px 20px rgba(0,0,0,0.03); 
    text-align: center; 
    transition: all 0.3s;
    position: relative;
}
.feature-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.08); 
}
.feature-card h3 { 
    font-size: 22px; 
    margin-bottom: 15px; 
    color: var(--primary-blue); 
}
.feature-card p { color: var(--text-muted); font-size: 15px; }

/* Blog Section */
.blog { padding: 100px 5%; background: #f4f6f9; }
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; max-width: 1100px; margin: 0 auto; }
.blog-card { 
    background: white; 
    border-radius: 12px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    transition: all 0.3s;
}
.blog-card:hover { 
    transform: translateY(-5px); 
}
.blog-card img { width: 100%; height: 260px; object-fit: cover; mix-blend-mode: multiply; opacity: 0.9;}
.blog-content { padding: 30px; }
.blog-date { display: inline-block; background: var(--film-cyan); color: #000; padding: 4px 12px; border-radius: 4px; font-size: 13px; font-weight: bold; margin-bottom: 15px; }
.blog-content h3 { font-size: 22px; margin-bottom: 15px; color: var(--text-main); }
.blog-content p { color: var(--text-muted); margin-bottom: 0; }
.btn-more { 
    display: block; 
    width: 220px; 
    margin: 60px auto 0; 
    text-align: center; 
    padding: 15px; 
    background: transparent; 
    color: var(--primary-blue); 
    border: 2px solid var(--primary-blue); 
    border-radius: 4px; 
    font-weight: bold; 
    font-size: 16px;
    transition: all 0.3s; 
}
.btn-more:hover { 
    background: var(--primary-blue);
    color: white;
}

/* FAQ Section */
.faq { padding: 100px 5%; max-width: 900px; margin: 0 auto; background: white; border-radius: 20px; margin-bottom: 80px; box-shadow: 0 20px 40px rgba(0,0,0,0.05);}
.faq-item { 
    background: #fdfdfd; 
    margin-bottom: 20px; 
    border-radius: 8px; 
    padding: 25px 30px; 
    border: 1px solid #eee;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.faq-item::before {
    content: '';
    position: absolute;
    left: 0; top: 0; width: 4px; height: 100%;
    background: var(--film-magenta);
}
.faq-item:hover { 
    transform: translateX(5px); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.faq-question { font-size: 18px; font-weight: bold; color: var(--text-main); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.faq-question::before { content: 'Q:'; color: var(--primary-blue); font-size: 22px; }
.faq-answer { color: var(--text-muted); font-size: 15px; padding-left: 32px; }

/* Footer */
.footer { background: #1a1a1a; padding: 80px 5% 30px; color: #fff; position: relative; overflow: hidden;}
.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 5px;
    background: linear-gradient(90deg, cyan, magenta, yellow);
}
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; max-width: 1200px; margin: 0 auto 50px; position: relative; z-index: 2;}
.footer-col h4 { font-size: 18px; color: white; margin-bottom: 25px; font-weight: bold; }
.footer-col ul li { margin-bottom: 15px; }
.footer-col ul li a { color: #aaa; transition: color 0.3s; }
.footer-col ul li a:hover { color: white; }
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid #333; color: #777; font-size: 14px; position: relative; z-index: 2;}

/* Page specific headers */
.page-header { 
    padding: 120px 5% 80px; 
    text-align: center; 
    background: #f4f6f9;
    position: relative;
    overflow: hidden;
}
.page-header h1 { 
    font-size: 42px; 
    color: var(--text-main); 
    margin-bottom: 20px; 
    position: relative;
    z-index: 2;
}
.page-header p { color: var(--text-muted); font-size: 18px; position: relative; z-index: 2;}

/* 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 { 
    background: white; 
    border-radius: 12px; 
    padding: 40px 30px; 
    text-align: center; 
    border: 1px solid #eee;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
    transition: all 0.3s;
}
.download-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 15px 40px rgba(0,0,0,0.1); 
}
.download-card h3 { color: var(--text-main); font-size: 24px; margin-bottom: 15px; }
.download-card p { color: var(--text-muted); margin-bottom: 30px; font-size: 15px; }

/* === 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;
    }
}
