/* styles.css */
:root {
    --bg-color: #f0f4f8;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --card-bg: rgba(255, 255, 255, 0.65);
    --header-bg: rgba(255, 255, 255, 0.7);
    --border-color: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 10px 40px -10px rgba(31, 38, 135, 0.1);
    
    --grad-1: hsla(210,100%,85%,0.5);
    --grad-2: hsla(250,100%,85%,0.5);
    --grad-3: hsla(280,100%,85%,0.5);
    --grad-4: hsla(190,100%,85%,0.5);

    --mouse-x: 0.5;
    --mouse-y: 0.5;
    
    /* Smooth Apple-like Animation Curve */
    --smooth-curve: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
    --bg-color: #070a14;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary-color: #38bdf8; 
    --primary-hover: #818cf8;
    
    --card-bg: rgba(16, 23, 42, 0.35);
    --header-bg: rgba(7, 10, 20, 0.55);
    --border-color: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 15px 45px -10px rgba(0, 0, 0, 0.6);

    --grad-1: rgba(56, 189, 248, 0.25); 
    --grad-2: rgba(79, 70, 229, 0.25);  
    --grad-3: rgba(139, 92, 246, 0.25); 
    --grad-4: rgba(14, 165, 233, 0.2); 
}

/* Reset & Basics */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.7;
    transition: background-color 0.5s var(--smooth-curve), color 0.5s var(--smooth-curve);
    overflow-x: hidden;
}
a { text-decoration: none; color: var(--primary-color); transition: color 0.3s var(--smooth-curve); }
a:hover { color: var(--primary-hover); }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }

/* Interactive Mesh Background */
.mesh-bg {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1;
    background-image: 
        radial-gradient(circle at calc(20% + (var(--mouse-x) * 15%)) calc(20% + (var(--mouse-y) * 15%)), var(--grad-1) 0px, transparent 65%),
        radial-gradient(circle at calc(80% - (var(--mouse-x) * 10%)) calc(10% + (var(--mouse-y) * 10%)), var(--grad-2) 0px, transparent 65%),
        radial-gradient(circle at calc(10% + (var(--mouse-x) * 10%)) calc(80% - (var(--mouse-y) * 10%)), var(--grad-3) 0px, transparent 65%),
        radial-gradient(circle at calc(90% - (var(--mouse-x) * 15%)) calc(90% - (var(--mouse-y) * 15%)), var(--grad-4) 0px, transparent 65%);
    background-size: 130% 130%;
    animation: meshWave 20s ease-in-out infinite alternate;
    /* Transition is kept for smooth theme switching gradient changes */
    transition: background-image 0.8s var(--smooth-curve);
}
@keyframes meshWave {
    0% { background-position: 0% 0%; }
    100% { background-position: 10% 10%; }
}

/* Glassmorphism */
.glassmorphic {
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
    transition: all 0.5s var(--smooth-curve);
}

/* Navbar */
.navbar {
    position: fixed; top: 0; width: 100%;
    background: var(--header-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.5s var(--smooth-curve);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--primary-color); letter-spacing: 0.5px;}
.nav-links { display: flex; gap: 35px; }
.nav-links a { color: var(--text-main); font-weight: 500; position: relative; }
.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: -4px; left: 0; background-color: var(--primary-color);
    transition: width 0.4s var(--smooth-curve);
}
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--primary-color); }
.nav-actions { display: flex; align-items: center; gap: 15px; }

/* Theme Toggle */
.theme-switch {
    position: relative; width: 40px; height: 40px; border-radius: 50%;
    background: transparent; border: 1px solid var(--border-color);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--text-main); 
    transition: all 0.4s var(--smooth-curve); overflow: hidden;
}
.theme-switch:hover { transform: scale(1.05); border-color: var(--primary-color); background: var(--card-bg);}
.theme-switch svg { position: absolute; width: 18px; height: 18px; transition: all 0.5s var(--smooth-curve); }
.sun-icon { transform: translateY(0) rotate(0); opacity: 1; }
.moon-icon { transform: translateY(-30px) rotate(-90deg); opacity: 0; }
[data-theme="dark"] .sun-icon { transform: translateY(30px) rotate(90deg); opacity: 0; }
[data-theme="dark"] .moon-icon { transform: translateY(0) rotate(0); opacity: 1; }

/* Buttons */
.btn {
    display: inline-block; padding: 12px 24px; border-radius: 10px;
    font-weight: 600; text-align: center; cursor: pointer;
    transition: all 0.4s var(--smooth-curve); border: 2px solid transparent;
}
.btn-primary { background-color: var(--primary-color); color: white !important; box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2); }
[data-theme="dark"] .btn-primary { box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3); }
.btn-primary:hover { transform: translateY(-3px); filter: brightness(1.1); box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4); }
[data-theme="dark"] .btn-primary:hover { box-shadow: 0 10px 25px rgba(56, 189, 248, 0.5); }
.btn-outline { background-color: transparent; border-color: var(--primary-color); color: var(--primary-color); }
.btn-outline:hover { background-color: var(--primary-color); color: white !important; transform: translateY(-2px);}
.btn-sm { padding: 8px 18px; font-size: 0.95rem; }
.btn-lg { padding: 16px 45px; font-size: 1.1rem; }
.btn-block { display: block; width: 100%; }
.glass-btn { background: rgba(255,255,255,0.1); border: 1px solid var(--border-color); backdrop-filter: blur(10px); color: var(--text-main) !important;}
[data-theme="dark"] .glass-btn { color: white !important; background: rgba(56, 189, 248, 0.2); border-color: var(--primary-color); }
[data-theme="dark"] .glass-btn:hover { background: var(--primary-color); }

/* Layout Grid */
.section { padding: 100px 0; }
.section-title { text-align: center; font-size: 2.2rem; margin-bottom: 60px; color: var(--text-main); font-weight: 800; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }

/* Reveal Animations (Scroll) */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s var(--smooth-curve); }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Hero */
.hero { padding: 180px 0 100px; text-align: center; }
.headline { font-size: 3.8rem; font-weight: 800; margin-bottom: 25px; line-height: 1.15; letter-spacing: -0.5px; }
.sub-headline { font-size: 1.25rem; color: var(--text-muted); max-width: 700px; margin: 0 auto 40px; line-height: 1.8;}
.floating { animation: levitate 6s ease-in-out infinite; }
@keyframes levitate { 0% { transform: translateY(0); } 50% { transform: translateY(-15px); } 100% { transform: translateY(0); } }

/* SVG Icons - Replacing Emojis */
.feature-svg {
    width: 48px; height: 48px; color: var(--primary-color);
    margin-bottom: 25px; transition: transform 0.6s var(--smooth-curve);
    filter: drop-shadow(0 4px 6px rgba(37, 99, 235, 0.15));
}
.card:hover .feature-svg { transform: translateY(-6px) scale(1.1); }
[data-theme="dark"] .feature-svg { filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.4)); }

/* Widget */
.hero-widget {
    margin: 60px auto 0; padding: 25px 30px; width: 100%; max-width: 420px; text-align: left;
    border-radius: 20px;
}
.widget-header { font-weight: 600; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; color: var(--text-muted); }
.pulse-dot { width: 10px; height: 10px; background-color: #22c55e; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); } 70% { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.node-item { display: flex; justify-content: space-between; margin-bottom: 18px; font-family: monospace; font-size: 1.15rem; }
.node-item:last-child { margin-bottom: 0; }
.ms-green { color: #22c55e; font-weight: 600;}
.ms-yellow { color: #eab308; font-weight: 600;}

/* Scenario Tabs */
.tab-switcher {
    display: flex; position: relative; padding: 6px; border-radius: 40px;
    margin: 0 auto 40px; max-width: 750px; overflow: hidden;
}
.tab {
    flex: 1; text-align: center; padding: 14px 0; cursor: pointer; z-index: 2;
    font-weight: 600; color: var(--text-muted); transition: color 0.4s var(--smooth-curve);
}
.tab.active { color: var(--text-main); }
.pill-indicator {
    position: absolute; top: 6px; bottom: 6px; left: 6px;
    background-color: var(--primary-color); border-radius: 30px; z-index: 1;
    transition: all 0.5s var(--smooth-curve); opacity: 0.12;
}
[data-theme="dark"] .pill-indicator { opacity: 0.25; }
.tab-content-wrapper { text-align: center; min-height: 80px; max-width: 650px; margin: 0 auto; }
.tab-content { display: none; color: var(--text-muted); font-size: 1.1rem; line-height: 1.8;}
.tab-content.active { display: block; animation: slideUpFade 0.6s var(--smooth-curve); }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* Cards */
.card { padding: 40px 30px; border-radius: 20px; transition: all 0.5s var(--smooth-curve); }
.hover-stagger:hover { transform: translateY(-12px) scale(1.02); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.12); }
[data-theme="dark"] .hover-stagger:hover { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.7); border-color: rgba(255,255,255,0.15);}
.card h3 { font-size: 1.45rem; margin-bottom: 15px; font-weight: 700;}
.card p { color: var(--text-muted); font-size: 1.05rem;}
.feature-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 50px 40px; }

/* Pricing */
.pricing-grid { align-items: center; }
.pricing-card { position: relative; text-align: center; }
.pricing-card.popular { transform: scale(1.05); border-color: var(--primary-color); z-index: 2;}
.pricing-card.popular:hover { transform: scale(1.05) translateY(-8px); }
.badge {
    position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
    background-color: var(--primary-color); color: white; padding: 6px 18px;
    border-radius: 20px; font-size: 0.85rem; font-weight: 700; box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}
.price { font-size: 3rem; font-weight: 800; margin: 25px 0; color: var(--text-main); }
.price span { font-size: 1.1rem; font-weight: normal; color: var(--text-muted); }
.feature-list { list-style: none; margin-bottom: 35px; text-align: left; }
.feature-list li { margin-bottom: 16px; padding-left: 30px; position: relative; color: var(--text-muted); font-size: 1.05rem;}
.feature-list li::before { 
    content: ""; position: absolute; left: 0; top: 5px;
    width: 18px; height: 18px; 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: cover;
}

/* FAQ & Reviews */
.faq-item { margin-bottom: 20px; border-radius: 16px; transition: all 0.4s var(--smooth-curve);}
.faq-item:hover { background: rgba(255,255,255,0.8); }
[data-theme="dark"] .faq-item:hover { background: rgba(16, 23, 42, 0.6); }
details { padding: 25px; }
summary { font-weight: 600; font-size: 1.15rem; cursor: pointer; list-style: none; position: relative; padding-right: 20px; transition: color 0.3s;}
summary:hover { color: var(--primary-color); }
summary::-webkit-details-marker { display: none; }
summary::after { 
    content: ""; position: absolute; right: 0; top: 50%; transform: translateY(-50%); 
    width: 20px; height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'%3E%3C/line%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
    transition: transform 0.4s var(--smooth-curve);
}
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { margin-top: 20px; color: var(--text-muted); padding-top: 20px; border-top: 1px solid var(--border-color); font-size: 1.05rem; line-height: 1.8;}
.review-card .stars { color: #fbbf24; font-size: 1.4rem; margin-bottom: 20px; letter-spacing: 2px;}
.review-card p { font-style: italic; margin-bottom: 20px; font-size: 1.05rem; line-height: 1.8;}
.review-card .author { font-weight: bold; color: var(--text-main); }
.mb-4 { margin-bottom: 35px; }

/* Footer */
.footer { border-top: 1px solid var(--border-color); padding: 70px 0 40px; text-align: center; margin-top: 60px;}
.footer-links { margin-bottom: 35px; display: flex; justify-content: center; gap: 35px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); font-weight: 500;}
.footer-links a:hover { color: var(--primary-color); }
.copyright { color: var(--text-muted); font-size: 0.95rem; }

/* Subpages */
.page-header { padding: 160px 0 70px; text-align: center; }
.page-header h1 { font-size: 2.8rem; margin-bottom: 20px; font-weight: 800;}
.page-content { max-width: 850px; margin: 0 auto; padding: 50px 40px; border-radius: 20px; margin-bottom: 80px;}
.page-content h2 { margin: 40px 0 20px; color: var(--text-main); font-weight: 700;}
.page-content p { margin-bottom: 20px; color: var(--text-muted); font-size: 1.1rem; line-height: 1.8;}
.page-content ul { margin-bottom: 25px; padding-left: 20px; color: var(--text-muted); font-size: 1.1rem; line-height: 1.8;}
.page-content li { margin-bottom: 12px; }

/* Article Card for insights */
.article-card { display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; color: inherit; height: 100%; padding: 35px;}
.article-card:hover h3 { color: var(--primary-color); }
.article-meta { margin-top: 20px; font-size: 0.95em; color: var(--text-muted); border-top: 1px solid var(--border-color); padding-top: 15px; }

/* Responsive */
@media (max-width: 992px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .pricing-card.popular { transform: none; }
    .pricing-card.popular:hover { transform: translateY(-5px); }
    .nav-links { display: none; }
}
@media (max-width: 768px) {
    .headline { font-size: 2.6rem; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .btn { padding: 15px 24px; font-size: 1.1rem; }
    .section { padding: 70px 0; }
    .hero-widget { padding: 20px; }
    .tab-switcher { flex-wrap: wrap; border-radius: 15px; }
    .tab { flex: 1 1 50%; }
    .page-content { padding: 30px 20px; }
}
