/* =========================================
   Reset & Base
   ========================================= */
:root {
    --bg-dark: #050507;      /* 深空黑 */
    --bg-card: rgba(255, 255, 255, 0.03); /* 玻璃拟态底色 */
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);
    
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --accent-primary: #8b5cf6; /* 电光紫 */
    --accent-glow: rgba(139, 92, 246, 0.5);
    --accent-secondary: #3b82f6; /* 荧光蓝 */

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* =========================================
   Light Theme Overrides (Refined)
   ========================================= */
[data-theme="light"] {
    /* 核心改变：背景不再是纯白，而是极淡的冷灰，让纯白卡片能跳出来 */
    --bg-dark: #f3f5f8;
    
    /* 卡片改为纯白，利用背景色差拉开层次 */
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff; 
    
    --border-subtle: rgba(0, 0, 0, 0.06);
    --border-highlight: rgba(124, 58, 237, 0.4); /* 高亮色加深，更醒目 */
    
    --text-primary: #111827;      
    --text-secondary: #4b5563;    
    --text-muted: #9ca3af;        

    --accent-primary: #7c3aed; 
    --accent-glow: rgba(124, 58, 237, 0.08); /* 极淡的光晕 */
}

/* 浅色模式 - 导航栏 */
[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

/* 浅色模式 - Hero 区域 */
[data-theme="light"] .hero h1 {
    color: #111827;
}
[data-theme="light"] .text-gradient-accent {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
[data-theme="light"] .glow-bg {
    background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
}

/* 浅色模式 - Mockup 核心修复 */
[data-theme="light"] .browser-mockup {
    background: #ffffff;
    /* 优化阴影：更深邃、更有层次的投影 */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0,0,0,0.06);
    border: none;
}
[data-theme="light"] .browser-header {
    background: #f1f5f9; /* 稍微深一点的灰，区分内容区 */
    border-bottom: 1px solid #e2e8f0;
}
[data-theme="light"] .url-bar {
    background: #ffffff;
    color: var(--text-secondary);
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 1px rgba(0,0,0,0.02);
}
[data-theme="light"] .mockup-screen {
    background: #f8fafc; /* 模拟真实的浅色网页背景 */
}

/* 浅色模式 - Mockup 内部 Panel */
[data-theme="light"] .mockup-extension-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: -10px 15px 40px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.02);
}

/* 浅色模式 - Bento 卡片 (重点优化) */
[data-theme="light"] .bento-card {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    /* 让卡片明显“浮”在灰色背景上 */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    border-color: var(--accent-primary); /* 悬停边框变色 */
}
[data-theme="light"] .code-editor {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #374151;
}

/* 浅色模式 - Logo Wall */
[data-theme="light"] .logo-wall {
    filter: none; 
    opacity: 0.8; /* 增加不透明度 */
}
[data-theme="light"] .logo-wall i {
    color: #4b5563; /* 使用深灰而非纯黑，更柔和 */
}

/* 浅色模式 - Footer */
[data-theme="light"] .footer {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

/* 强制覆盖 Mockup 内部元素的内联样式 */
[data-theme="light"] .mockup-extension-panel > div:first-child {
    border-bottom-color: #f3f4f6 !important;
}
[data-theme="light"] .mockup-extension-panel > div:first-child > div {
    background: #f3f4f6 !important;
}
[data-theme="light"] .mockup-extension-panel span[style*="color: #6b7280"] {
    color: #9ca3af !important;
}
[data-theme="light"] .mockup-extension-panel span[style*="background"] {
    background: #f3e8ff !important;
    color: #7c3aed !important;
}
[data-theme="light"] .mockup-extension-panel > div:last-child {
    border-top-color: #f3f4f6 !important;
}
[data-theme="light"] .mockup-extension-panel button:first-child {
    background: #111827 !important; 
    color: white !important;
}
[data-theme="light"] .mockup-extension-panel button:last-child {
    background: #f3f4f6 !important;
    color: #4b5563 !important;
    border: 1px solid #e5e7eb;
}
[data-theme="light"] .pre-footer > div:first-child {
    background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, transparent 70%) !important;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

/* =========================================
   Utilities & Layout
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #9ca3af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-accent {
    background: linear-gradient(135deg, #c4b5fd 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 99px;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.6);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-primary:hover::after {
    left: 100%;
}

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

/* =========================================
   Navbar
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 20px 0;
    transition: 0.3s;
    background: rgba(5, 5, 7, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
}

.logo img {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-link:hover {
    color: white;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    position: relative;
    padding-top: 180px;
    padding-bottom: 100px;
    overflow: hidden;
}

/* 背景光晕 */
.glow-bg {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(5, 5, 7, 0) 70%);
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.hero p.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 48px;
}

.hero-demo-wrapper {
    margin-top: 64px;
    position: relative;
    perspective: 1000px;
}

.browser-mockup {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background: #0f0f11;
    border: 1px solid var(--border-highlight);
    border-radius: 12px;
    box-shadow: 0 0 100px rgba(0,0,0,0.5), 0 0 30px rgba(139, 92, 246, 0.1);
    overflow: hidden;
    transform: rotateX(2deg);
    transition: transform 0.5s ease;
}

.browser-mockup:hover {
    transform: rotateX(0deg) translateY(-10px);
}

.browser-header {
    height: 40px;
    background: #1a1a1e;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
    border-bottom: 1px solid var(--border-subtle);
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.url-bar {
    flex: 1;
    height: 24px;
    background: #0f0f11;
    border-radius: 4px;
    margin-left: 12px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mockup-screen {
    height: 560px;
    position: relative;
    background: #1e1e24; /* 模拟 ChatGPT 背景 */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.mockup-screen img {
    width: 100%;
    height: auto;
    opacity: 0.8;
}

/* 模拟 Extension 展开 */
.mockup-extension-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 320px;
    height: 520px;
    background: rgba(15, 15, 17, 0.95);
    border: 1px solid var(--border-highlight);
    border-radius: 16px;
    box-shadow: -20px 20px 60px rgba(0,0,0,0.5);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
}

/* =========================================
   Bento Grid / Features
   ========================================= */
.features-section {
    padding: 120px 0;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 300px);
    gap: 24px;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-highlight);
    transform: translateY(-5px);
}

.card-1 { grid-column: span 2; }
.card-2 { grid-column: span 1; }
.card-3 { grid-column: span 3; }

.bento-content h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.bento-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 90%;
}

.bento-visual {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    position: relative;
}

/* 模拟编辑器动画 */
.code-editor {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #a5b4fc;
    background: rgba(0,0,0,0.3);
    padding: 16px;
    border-radius: 8px;
    width: 100%;
    border-left: 3px solid var(--accent-primary);
}
.cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--accent-primary);
    animation: blink 1s infinite;
    vertical-align: text-bottom;
}

@keyframes blink { 50% { opacity: 0; } }

/* =========================================
   Social Proof
   ========================================= */
.social-proof {
    padding: 60px 0 120px;
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
}

.logo-wall {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
    opacity: 0.5;
    filter: grayscale(100%);
}

.logo-wall i {
    font-size: 2rem;
    color: white;
}

/* =========================================
   FAQ Section (New)
   ========================================= */
.faq-section {
    padding: 80px 0;
    border-top: 1px solid var(--border-subtle);
}

.faq-header {
    text-align: center;
    margin-bottom: 60px;
}

.faq-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.faq-question {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    transition: background 0.2s;
}

.faq-question:hover {
    background: var(--bg-card-hover);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: rgba(0,0,0,0.2); /* 深色模式下的答案背景稍深 */
}

.faq-answer p {
    padding: 0 24px 24px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    max-height: 200px; /* 足够展开内容 */
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
}

.faq-toggle {
    transition: transform 0.3s;
    color: var(--text-muted);
}

/* 浅色模式适配 - FAQ */
[data-theme="light"] .faq-section {
    border-top-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .faq-item {
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
[data-theme="light"] .faq-answer {
    background: #f9fafb;
}

/* =========================================
   Utility Classes (Replacing Inline Styles)
   ========================================= */
.text-highlight-dashed {
    color: white;
    border-bottom: 1px dashed var(--text-muted);
}
[data-theme="light"] .text-highlight-dashed {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.pill-badge {
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid transparent;
    color: var(--text-secondary);
}
.pill-badge.active {
    background: rgba(255,255,255,0.1);
    border-color: var(--accent-primary);
    color: white;
}

/* 浅色模式适配 - Pills */
[data-theme="light"] .pill-badge {
    background: #f3f4f6;
    color: var(--text-secondary);
}
[data-theme="light"] .pill-badge.active {
    background: #f3e8ff;
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* =========================================
   Pre-Footer
   ========================================= */
.pre-footer {
    padding: 160px 0;
    text-align: center;
    position: relative;
}

.pre-footer h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 48px;
}

/* =========================================
   Footer
   ========================================= */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 80px 0 40px;
    background: #020203;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 16px;
    max-width: 300px;
}

.footer-col h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 24px;
    letter-spacing: 0.05em;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }
.footer-col a:hover { color: var(--accent-primary); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 40px;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* =========================================
   Animations
   ========================================= */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .bento-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .card-1, .card-2, .card-3 { grid-column: span 1; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* Pre-launch CTA lock (Chrome Store URL pending) */
.cta-disabled {
    pointer-events: none;
    opacity: 0.65;
    cursor: not-allowed;
}
