/* ============================================================
   全局基础样式
   ============================================================ */
* { -webkit-tap-highlight-color: transparent; }
i[class*="fa-"] { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    margin: 0; padding: 0; background: #f8fafc; color: #1e293b;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 手机端菜单（纯 CSS 开关） */
#mobileMenuToggle:checked ~ #mobileMenu { display: block !important; }
#mobileMenuToggle:checked ~ #navbar .menu-icon-open { display: none !important; }
#mobileMenuToggle:checked ~ #navbar .menu-icon-close { display: inline-block !important; }
@media (min-width: 1024px) {
    .desktop-nav { display: flex !important; }
    .desktop-btn { display: inline-flex !important; }
    .mobile-label { display: none !important; }
    #mobileMenu { display: none !important; }
}
@media (max-width: 1023px) {
    .desktop-nav { display: none !important; }
    .desktop-btn { display: none !important; }
}

/* 背景网格与光晕 */
.grid-bg { background-image: linear-gradient(rgba(22, 93, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(22, 93, 255, 0.06) 1px, transparent 1px); background-size: 48px 48px; }
.grid-bg-dark { background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px); background-size: 48px 48px; }
.glow { position: absolute; border-radius: 9999px; filter: blur(100px); opacity: 0.5; pointer-events: none; z-index: 0; }
.glass { background: rgba(255, 255, 255, 0.72); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.9); }
.glass-dark { background: rgba(255, 255, 255, 0.06); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.12); }
.text-gradient { background: linear-gradient(135deg, #165DFF 0%, #36CFC9 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 按钮样式 */
.btn-primary { position: relative; background: linear-gradient(135deg, #165DFF 0%, #36CFC9 100%); overflow: hidden; transition: all 0.3s ease; }
.btn-primary::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, #36CFC9 0%, #165DFF 100%); opacity: 0; transition: opacity 0.3s ease; }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: scale(0.97); }
.btn-primary > * { position: relative; z-index: 1; }

.btn-outline { background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1.5px solid #e2e8f0; transition: all 0.3s ease; }
.btn-outline:hover { border-color: #165DFF; color: #165DFF; }
.btn-outline:active { transform: scale(0.97); }

/* 滚动显现动画 */
.stat-num { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.reveal.in { opacity: 1; transform: translateY(0); }

@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-anim { animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

.input-field { transition: all 0.2s ease; }
.input-field:focus { border-color: #165DFF; box-shadow: 0 0 0 4px rgba(22, 93, 255, 0.1); outline: none; }

/* 意向产品卡片单选 */
.product-pick { position: relative; display: block; cursor: pointer; transition: all 0.25s ease; }
.product-pick input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.product-pick .pick-box { border: 2px solid #e2e8f0; border-radius: 12px; padding: 12px 14px; background: #fff; transition: all 0.25s ease; display: flex; align-items: center; gap: 10px; position: relative; }
.product-pick .pick-icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; flex-shrink: 0; }
.product-pick .pick-title { font-size: 13.5px; font-weight: 600; color: #1e293b; line-height: 1.3; }
.product-pick .pick-sub { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.product-pick input[type="radio"]:checked + .pick-box { border-color: #165DFF; background: linear-gradient(135deg, rgba(22, 93, 255, 0.05), rgba(54, 207, 201, 0.05)); box-shadow: 0 4px 14px -6px rgba(22, 93, 255, 0.4); }
.product-pick input[type="radio"]:checked + .pick-box::after { content: '\f00c'; font-family: FontAwesome; position: absolute; top: 8px; right: 10px; font-size: 12px; color: #165DFF; }

/* 演示选择卡片 */
.demo-choice { border: 2px solid #e2e8f0; border-radius: 16px; padding: 18px 16px; background: #fff; cursor: pointer; transition: all 0.25s ease; text-align: center; position: relative; }
.demo-choice:hover { border-color: #165DFF; background: linear-gradient(135deg, rgba(22, 93, 255, 0.05), rgba(54, 207, 201, 0.05)); transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(22, 93, 255, 0.3); }
.demo-choice .demo-icon { width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; margin: 0 auto 12px; box-shadow: 0 8px 20px -8px currentColor; }
.demo-choice .demo-name { font-size: 14px; font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.demo-choice .demo-desc { font-size: 11px; color: #94a3b8; }

/* 插件卡片 */
.plugin-card { position: relative; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; }
.plugin-card:active { transform: scale(0.97); }
@media (hover: hover) { .plugin-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -12px rgba(22, 93, 255, 0.18); } }
.plugin-icon { position: relative; box-shadow: 0 6px 20px -6px currentColor; }
.plugin-more-card { position: relative; overflow: hidden; border: 2px dashed rgba(22, 93, 255, 0.3); background: linear-gradient(135deg, rgba(22, 93, 255, 0.04) 0%, rgba(54, 207, 201, 0.04) 100%); }

@keyframes breathing { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: 0.85; } }
.breathing { animation: breathing 2.5s ease-in-out infinite; }

/* 云印/聚合核心能力卡片 */
.yy-feature { 
    position: relative; 
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); 
    overflow: hidden; 
    box-shadow: 0 4px 20px -8px rgba(0, 0, 0, 0.05); 
}
.yy-feature::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 3px; 
    height: 100%; 
    background: linear-gradient(180deg, #36CFC9, #165DFF); 
    opacity: 0.6; 
    transition: all 0.35s ease; 
}
html.dark .yy-feature { 
    box-shadow: 0 4px 20px -8px rgba(0, 0, 0, 0.5); 
    border-color: rgba(255, 255, 255, 0.08) !important;
}
@media (hover: hover) {
    .yy-feature:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 40px -12px rgba(22, 93, 255, 0.18);
        border-color: rgba(22, 93, 255, 0.4) !important;
    }
    html.dark .yy-feature:hover {
        box-shadow: 0 20px 40px -12px rgba(96, 165, 250, 0.3);
        border-color: rgba(96, 165, 250, 0.4) !important;
    }
    .yy-feature:hover::before {
        opacity: 1;
        width: 4px;
    }
}
.yy-feature:active { 
    transform: scale(0.98); 
    box-shadow: 0 10px 20px -6px rgba(22, 93, 255, 0.15) !important;
    border-color: rgba(22, 93, 255, 0.4) !important;
}
html.dark .yy-feature:active {
    box-shadow: 0 10px 20px -6px rgba(96, 165, 250, 0.15) !important;
    border-color: rgba(96, 165, 250, 0.4) !important;
}

/* 加载动画 */
@keyframes spin { to { transform: rotate(360deg); } }
.loading-spinner { animation: spin 1s linear infinite; }
@keyframes loadingBar { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.loading-bar { position: relative; overflow: hidden; background: rgba(22, 93, 255, 0.1); border-radius: 999px; height: 4px; }
.loading-bar::after { content: ''; position: absolute; top: 0; left: 0; height: 100%; width: 40%; background: linear-gradient(90deg, #165DFF, #36CFC9); border-radius: 999px; animation: loadingBar 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* 合作模式卡片 */
.coop-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 28px 24px 24px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 20px -8px rgba(0, 0, 0, 0.05);
}
.coop-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #165DFF, #36CFC9);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.coop-card:hover {
    transform: translateY(-6px);
    border-color: #cbd5e1;
    box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.1);
}
.coop-card:hover::before { opacity: 1; }

.coop-badge { display: inline-block; align-self: flex-start; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 16px; }
.coop-badge i { margin-right: 4px; }
.coop-icon { width: 60px; height: 60px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #fff !important; font-size: 24px; margin-bottom: 18px; box-shadow: 0 10px 24px -8px rgba(0,0,0,0.2); }
.coop-title { font-size: 18px; font-weight: 800; color: #1e293b; margin: 0 0 10px; letter-spacing: -0.01em; }
.coop-desc { font-size: 13px; color: #475569; line-height: 1.75; margin: 0 0 18px; }
.coop-features { list-style: none; padding: 0; margin: 0; border-top: 1px dashed #cbd5e1; padding-top: 16px; flex: 1; }
.coop-features li { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: #334155; line-height: 1.6; margin-bottom: 9px; }
.coop-features li:last-child { margin-bottom: 0; }
.coop-features li i { color: #165DFF; font-size: 12px; margin-top: 3px; flex-shrink: 0; }
.coop-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.coop-foot-label { font-size: 11px; color: #64748b; font-weight: 600; letter-spacing: 0.05em; }
.coop-foot-value { font-size: 12px; color: #334155; font-weight: 600; }

/* ============================================================
   响应式适配
   ============================================================ */
@media (max-width: 640px) {
    .hero-title { font-size: clamp(1.75rem, 9vw, 2.25rem); line-height: 1.1; letter-spacing: -0.02em; }
    .hero-subtitle { font-size: 13px; line-height: 1.6; }
    .hero-desc { font-size: 12px; line-height: 1.6; }
    .stat-num-mobile { font-size: 24px !important; }
    .plugin-card { padding: 12px !important; border-radius: 16px !important; }
    .plugin-icon-mobile { width: 38px !important; height: 38px !important; font-size: 16px !important; border-radius: 11px !important; }
    .plugin-title-mobile { font-size: 13px !important; line-height: 1.2 !important; margin-top: 10px !important; }
    .plugin-desc-mobile { font-size: 11px !important; line-height: 1.35 !important; margin-top: 4px !important; overflow: hidden; }
    .coop-card { padding: 22px 18px 18px !important; border-radius: 20px !important; }
    .coop-title { font-size: 16px !important; }
    .coop-desc { font-size: 12px !important; }
    .coop-features li { font-size: 12px !important; }
}

/* ============================================================
   深夜模式（Dark Mode）
   ============================================================ */
html.dark { color-scheme: dark; }
html.dark body { background: #0b1220; color: #e2e8f0; }

/* 导航栏深色模式 */
html.dark #navbar { background: #111827 !important; border-bottom-color: #1f2937 !important; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4) !important; }
html.dark #navbar a[href="/"] > span { color: #e2e8f0 !important; }
html.dark .desktop-nav a { color: #cbd5e1 !important; }
html.dark .desktop-nav a:hover { color: #60a5fa !important; background: rgba(96, 165, 250, 0.08); }
html.dark label[for="mobileMenuToggle"] { background: #1f2937 !important; color: #cbd5e1 !important; }
html.dark #guestNav a { color: #cbd5e1 !important; }
html.dark #guestNav a:last-child { background: #334155 !important; color: #e2e8f0 !important; }
html.dark #userName { color: #e2e8f0 !important; }
html.dark #userNav a[href="logout.php"] { color: #64748b !important; }

/* 主题切换按钮 */
#themeToggle { width: 36px; height: 36px; border-radius: 10px; background: #f1f5f9; color: #475569; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 15px; transition: all 0.25s ease; flex-shrink: 0; }
#themeToggle:hover { background: #e2e8f0; }
#themeToggle:active { transform: scale(0.94); }
html.dark #themeToggle { background: #1f2937; color: #fbbf24; }
html.dark #themeToggle:hover { background: #334155; }

/* 移动端下拉菜单深色模式 */
html.dark #mobileMenu { background: #111827 !important; border-bottom-color: #1f2937 !important; }
html.dark .mobile-link { color: #e2e8f0 !important; border-bottom-color: #1f2937 !important; }
html.dark .mobile-link:hover { background: rgba(96, 165, 250, 0.08); }

/* Hero 区深色模式 */
html.dark .hero-section { background: linear-gradient(to bottom, #0b1220, #13203a, #0b1220) !important; }
html.dark .hero-section .grid-bg { background-image: linear-gradient(rgba(96, 165, 250, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(96, 165, 250, 0.07) 1px, transparent 1px); }
html.dark .hero-title { color: #f1f5f9 !important; }
html.dark .hero-subtitle { color: #cbd5e1 !important; }
html.dark .hero-desc { color: #94a3b8 !important; }
html.dark .hero-section .stat-num { color: #f1f5f9 !important; }
html.dark .hero-section .stat-num + div { color: #94a3b8 !important; }
html.dark .hero-badge { background: rgba(30, 41, 59, 0.85) !important; border-color: rgba(96, 165, 250, 0.35) !important; }
html.dark .hero-badge span:last-child { color: #cbd5e1 !important; }
html.dark .btn-outline { background: rgba(30, 41, 59, 0.8) !important; border-color: #334155 !important; color: #e2e8f0 !important; }
html.dark .btn-outline:hover { border-color: #60a5fa !important; color: #60a5fa !important; }

/* 功能插件区深色模式 */
html.dark #feature { background: #0b1220; }
html.dark #feature h2 { color: #f1f5f9 !important; }
html.dark #feature .text-slate-500 { color: #94a3b8 !important; }
html.dark #feature .bg-primary\/10 { background: rgba(96, 165, 250, 0.12) !important; }
html.dark .glass { background: rgba(30, 41, 59, 0.65) !important; border-color: rgba(51, 65, 85, 0.7) !important; }
html.dark .plugin-card h3 { color: #e2e8f0 !important; }
html.dark .plugin-card p { color: #94a3b8 !important; }
html.dark .plugin-card:hover { box-shadow: 0 20px 40px -12px rgba(96, 165, 250, 0.2) !important; }
html.dark .plugin-more-card { border-color: rgba(96, 165, 250, 0.4) !important; background: linear-gradient(135deg, rgba(96, 165, 250, 0.08) 0%, rgba(54, 207, 201, 0.08) 100%) !important; }
html.dark .plugin-more-card h3 { color: #e2e8f0 !important; }
html.dark #feature .glass.rounded-3xl h3 { color: #f1f5f9 !important; }
html.dark #feature .glass.rounded-3xl h4 { color: #e2e8f0 !important; }
html.dark #feature .glass.rounded-3xl p { color: #94a3b8 !important; }

/* 云印超市深色模式 */
html.dark #yunyin { background: #0a0f1a !important; }
html.dark #yunyin h2 { color: #f8fafc !important; }
html.dark #yunyin h3 { color: #f8fafc !important; }
html.dark #yunyin h4 { color: #e2e8f0 !important; }
html.dark #yunyin p { color: #94a3b8 !important; }
html.dark #yunyin .text-slate-900 { color: #f1f5f9 !important; }
html.dark #yunyin .text-slate-700 { color: #cbd5e1 !important; }
html.dark #yunyin .text-slate-600 { color: #94a3b8 !important; }
html.dark #yunyin .text-slate-500 { color: #64748b !important; }
html.dark #yunyin .bg-white\/80 { background: rgba(255, 255, 255, 0.05) !important; }
html.dark #yunyin .border-slate-200 { border-color: rgba(255, 255, 255, 0.1) !important; }
html.dark #yunyin .bg-slate-200 { background: rgba(255, 255, 255, 0.1) !important; }
html.dark #yunyin .border-slate-300 { border-color: rgba(255, 255, 255, 0.2) !important; }
html.dark #yunyin .bg-amber-100 { background: rgba(245, 158, 11, 0.1) !important; }
html.dark #yunyin .border-amber-300 { border-color: rgba(245, 158, 11, 0.3) !important; }
html.dark #yunyin .text-amber-700 { color: #fbbf24 !important; }

/* 合作模式深色模式 */
html.dark #cooperate .absolute.inset-0 { background: linear-gradient(to bottom right, #0a0f1a, #111827, #0a0f1a) !important; }
html.dark .coop-card { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.12); box-shadow: none; }
html.dark .coop-card:hover { border-color: rgba(96, 165, 250, 0.4); box-shadow: 0 24px 48px -16px rgba(22, 93, 255, 0.35); background: rgba(255, 255, 255, 0.07); }
html.dark .coop-title { color: #ffffff; }
html.dark .coop-desc { color: #94a3b8; }
html.dark .coop-features { border-top-color: rgba(148, 163, 184, 0.25); }
html.dark .coop-features li { color: #cbd5e1; }
html.dark .coop-features li i { color: #36CFC9; }
html.dark .coop-foot { border-top-color: rgba(148, 163, 184, 0.15); }
html.dark .coop-foot-label { color: #64748b; }
html.dark .coop-foot-value { color: #cbd5e1; }

/* 页脚深色模式 */
html.dark footer { background: #0a0f1a !important; border-top-color: #1f2937 !important; }

/* 弹窗深色模式 */
html.dark #demoModal .bg-white, html.dark #messageModal .bg-white, html.dark #cooperateModal .bg-white { background: #1e293b !important; }
html.dark #demoModal h3, html.dark #messageModal h3, html.dark #cooperateModal h3 { color: #f1f5f9 !important; }
html.dark #demoModal p, html.dark #messageModal p, html.dark #cooperateModal p { color: #94a3b8 !important; }
html.dark #demoModal .bg-slate-50, html.dark #messageModal .bg-slate-50 { background: #0f172a !important; }
html.dark #demoModal .bg-slate-100, html.dark #messageModal .bg-slate-100 { background: #334155 !important; color: #cbd5e1 !important; }
html.dark #demoModal .text-slate-900, html.dark #messageModal .text-slate-900 { color: #f1f5f9 !important; }
html.dark #demoModal .text-slate-800, html.dark #messageModal .text-slate-800 { color: #e2e8f0 !important; }
html.dark #demoModal .text-slate-500, html.dark #messageModal .text-slate-500 { color: #94a3b8 !important; }
html.dark .input-field { background: #0f172a !important; border-color: #334155 !important; color: #e2e8f0 !important; }
html.dark .input-field::placeholder { color: #64748b; }
html.dark .input-field:focus { border-color: #60a5fa !important; box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15) !important; }
html.dark .product-pick .pick-box { background: #0f172a !important; border-color: #334155 !important; }
html.dark .product-pick .pick-title { color: #e2e8f0 !important; }
html.dark .product-pick .pick-sub { color: #64748b !important; }
html.dark .demo-choice { background: #0f172a !important; border-color: #334155 !important; }
html.dark .demo-choice .demo-name { color: #e2e8f0 !important; }
html.dark .demo-choice .demo-desc { color: #64748b !important; }
html.dark .demo-choice:hover { background: linear-gradient(135deg, rgba(96, 165, 250, 0.08), rgba(54, 207, 201, 0.08)) !important; }
html.dark #cooperateModal h3 { color: #f1f5f9 !important; }

/* ============================================================
   ★ 首页轮播图（Carousel）特殊样式
   ============================================================ */
.carousel-track { will-change: transform; }
html.dark #heroCarousel .bg-gradient-to-b { opacity: 0.95; }
#carouselDots div { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
html.dark #carouselPrev, html.dark #carouselNext { background: rgba(0, 0, 0, 0.5); color: rgba(255, 255, 255, 0.8); }
html.dark #carouselPrev:hover, html.dark #carouselNext:hover { background: rgba(0, 0, 0, 0.8); color: #fff; }