/* ============================================================
   桐果云 - 公共样式表 (common.css)
   主题色: 主色 #1677FF / 辅色 #FF7D00
   设计规范: 四级动效体系 + 统一截图规范 + B端专业调性
   ============================================================ */

/* ========== CSS 变量 ========== */
:root {
    --primary: #1677FF;
    --primary-dark: #0958d9;
    --primary-light: #4096FF;
    --accent: #FF7D00;
    --accent-light: #FF9A2E;
    --text-heading: #0f172a;
    --text-body: #475569;
    --text-muted: #94a3b8;
    --bg-page: #ffffff;
    --bg-soft: #f8fafc;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
}

/* ============================================================
   一级动效：全局基础动效
   ============================================================ */

/* 滚动入场 */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 错峰子元素入场 */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}
.stagger-children.active > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(6) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }

/* 导航毛玻璃 */
.glass-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(229, 234, 240, 0.6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* ============================================================
   二级动效：板块专属动效
   ============================================================ */

/* 流程图流动光效 */
@keyframes flow {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.animate-flow {
    animation: flow 2.5s infinite linear;
}

/* 流动箭头脉冲 */
@keyframes flowPulse {
    0%, 100% { opacity: 0.4; transform: translateX(0); }
    50%      { opacity: 1;   transform: translateX(4px); }
}
.flow-arrow {
    animation: flowPulse 2s ease-in-out infinite;
}

/* 架构图层级点亮 */
.layer-node {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.layer-node.active {
    opacity: 1;
    transform: scale(1);
}

/* 呼吸微光 */
@keyframes breathe {
    0%, 100% { opacity: 1;    filter: drop-shadow(0 0 2px rgba(22, 119, 255, 0.4)); }
    50%      { opacity: 0.7;  filter: drop-shadow(0 0 12px rgba(22, 119, 255, 0.7)); }
}
.animate-breathe {
    animation: breathe 3s infinite ease-in-out;
}

/* 微光扫入 */
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.shimmer-once {
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.2s ease-in-out forwards;
    pointer-events: none;
}

/* 数字增长动效 - JS控制 */

/* ============================================================
   三级动效：交互反馈动效
   ============================================================ */

/* 卡片悬停上浮 */
.float-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.float-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(22, 119, 255, 0.08);
}

/* 能力卡片 */
.capability-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.capability-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(22, 119, 255, 0.1);
}

/* 主按钮 */
.btn-primary {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(22, 119, 255, 0.35);
}
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.25);
}

/* 次按钮 */
.btn-secondary {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-secondary:hover {
    background-color: #1677FF;
    color: white;
    border-color: #1677FF;
}

/* 导航链接下划线滑入 */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #1677FF;
    border-radius: 1px;
    transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ============================================================
   四级动效：科技氛围点缀
   ============================================================ */

/* 背景点阵 */
.bg-dots {
    background-image: radial-gradient(rgba(22, 119, 255, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* 科技渐变背景 */
.tech-gradient {
    background: radial-gradient(circle at 50% 50%, rgba(22, 119, 255, 0.08) 0%, transparent 70%);
}
.tech-gradient-warm {
    background: radial-gradient(circle at 70% 30%, rgba(22, 119, 255, 0.1) 0%, rgba(255, 125, 0, 0.04) 50%, transparent 80%);
}

/* 浮动光斑 */
.hero-bubble {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* ============================================================
   截图统一规范 (16:9 容器 + 浏览器外框)
   ============================================================ */

.screenshot-wrapper {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    background: #f7fafc;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.screenshot-wrapper:hover {
    box-shadow: 0 12px 40px rgba(22, 119, 255, 0.12);
    border-color: rgba(22, 119, 255, 0.3);
}
.screenshot-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.6s ease;
}
.screenshot-wrapper:hover img {
    transform: scale(1.02);
}

/* 浏览器顶栏 */
.screenshot-bar {
    padding: 8px 16px;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.screenshot-bar .dots {
    display: flex;
    gap: 6px;
}
.screenshot-bar .dots span {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.screenshot-bar .dots span:nth-child(1) { background: #ef4444; }
.screenshot-bar .dots span:nth-child(2) { background: #f59e0b; }
.screenshot-bar .dots span:nth-child(3) { background: #10b981; }
.screenshot-bar .title {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
    margin-left: 8px;
    letter-spacing: 0.3px;
}

/* 深色截图变体（产品页Hero用） */
.screenshot-wrapper.dark {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}
.screenshot-wrapper.dark .screenshot-bar {
    background: rgba(15, 23, 42, 0.5);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}
.screenshot-wrapper.dark .screenshot-bar .title {
    color: rgba(255, 255, 255, 0.5);
}
.screenshot-wrapper.dark:hover {
    border-color: rgba(22, 119, 255, 0.4);
    box-shadow: 0 12px 50px rgba(22, 119, 255, 0.15);
}

/* 脱敏标注 */
.screenshot-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.screenshot-wrapper:not(.dark) .screenshot-badge {
    background: rgba(0, 0, 0, 0.45);
}

/* ============================================================
   客户Logo墙
   ============================================================ */

.logo-wall-item {
    filter: grayscale(100%) opacity(0.5);
    transition: filter 0.3s ease, transform 0.3s ease;
    cursor: default;
}
.logo-wall-item:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.08);
}

/* Logo墙滚动容器 */
.logo-scroll-container {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.logo-scroll-row {
    display: flex;
    width: max-content;
    animation: scroll-left 35s linear infinite;
}
.logo-scroll-row:hover {
    animation-play-state: paused;
}
@keyframes scroll-left {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================================
   标签系统
   ============================================================ */

.tag-core {
    background: linear-gradient(135deg, #1677FF 0%, #4096FF 100%);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    display: inline-block;
}
.tag-new {
    background: linear-gradient(135deg, #FF7D00 0%, #FF9A2E 100%);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    display: inline-block;
}

/* ============================================================
   Tabs 组件
   ============================================================ */

.tab-trigger {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    user-select: none;
}
.tab-trigger::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #1677FF, #4096FF);
    border-radius: 2px;
    transition: width 0.3s ease;
}
.tab-trigger.active::after {
    width: 60%;
}
.tab-trigger:hover::after {
    width: 40%;
}
.tab-trigger.active:hover::after {
    width: 60%;
}

.tab-panel {
    display: none;
    animation: tabFadeIn 0.4s ease-out;
}
.tab-panel.active {
    display: block;
}
@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   特色功能点列表
   ============================================================ */

.feature-point {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}
.feature-point:last-child {
    border-bottom: none;
}
.feature-point .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1677FF;
    margin-top: 8px;
    flex-shrink: 0;
}

/* ============================================================
   流程连接线
   ============================================================ */

.step-connector {
    position: relative;
}
.step-connector::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -20px;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #1677FF, #e2e8f0);
    transform: translateY(-50%);
}
.step-connector:last-child::after {
    display: none;
}

@media (max-width: 1024px) {
    .step-connector::after {
        display: none;
    }
}

/* ============================================================
   渐变文字
   ============================================================ */

.gradient-text {
    background: linear-gradient(135deg, #1677FF 0%, #FF7D00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gradient-text-blue {
    background: linear-gradient(135deg, #1677FF 0%, #4096FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   导航组件
   ============================================================ */

#global-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: all 0.3s ease;
}

/* ============================================================
   页脚组件
   ============================================================ */

#global-footer {
    /* 由JS渲染，此处预留 */
}

/* ============================================================
   Hero 区动画元素
   ============================================================ */

/* 浮动粒子（产品页Hero） */
@keyframes float-particle {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    25%      { transform: translate(30px, -20px) scale(1.2); opacity: 0.7; }
    50%      { transform: translate(-10px, -40px) scale(0.9); opacity: 0.5; }
    75%      { transform: translate(20px, -10px) scale(1.1); opacity: 0.8; }
}
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: float-particle 8s ease-in-out infinite;
}

/* 流动光线（产品页Hero） */
@keyframes flow-line {
    0%  { transform: translateX(-100%) scaleX(0.5); opacity: 0; }
    20% { opacity: 0.6; }
    80% { opacity: 0.6; }
    100%{ transform: translateX(100vw) scaleX(0.5); opacity: 0; }
}
.flow-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(22,119,255,0.4), rgba(99,102,241,0.2), transparent);
    width: 40%;
    pointer-events: none;
    animation: flow-line 6s ease-in-out infinite;
}

/* 光晕脉冲（产品页Hero） */
@keyframes pulse-bg {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 0.8; }
}
.pulse-glow {
    animation: pulse-bg 4s ease-in-out infinite;
}

/* 首页Hero浮动动画 */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50%      { transform: translateY(-20px) rotate(5deg); }
}
.animate-float {
    animation: float 6s ease-in-out infinite;
}
.animate-float-delay-1 { animation-delay: 1s; }
.animate-float-delay-2 { animation-delay: 2s; }
.animate-float-delay-3 { animation-delay: 3s; }

/* AI发光效果 */
.ai-glow {
    box-shadow: 0 0 60px rgba(22, 119, 255, 0.15), 0 0 120px rgba(22, 119, 255, 0.08);
}

/* ============================================================
   AI 对话气泡
   ============================================================ */

.chat-bubble {
    animation: slideIn 0.5s ease-out forwards;
    opacity: 0;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.typing-dot {
    animation: typingBounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40%           { transform: scale(1); }
}

/* ============================================================
   案例卡片
   ============================================================ */

.case-image-overlay {
    background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.8) 100%);
}

/* ============================================================
   点击波纹
   ============================================================ */

@keyframes pulse-glow-btn {
    0%, 100% { box-shadow: 0 0 0 0 rgba(22, 119, 255, 0.4); }
    50%      { box-shadow: 0 0 20px 5px rgba(22, 119, 255, 0.2); }
}
.animate-pulse-glow {
    animation: pulse-glow-btn 2s ease-in-out infinite;
}

/* ============================================================
   Demo截图（首页特色功能区 - 16:10创意视觉）
   ============================================================ */

.demo-screenshot {
    background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.3s;
}
.demo-screenshot:hover {
    box-shadow: 0 12px 40px rgba(22, 119, 255, 0.12);
}
.demo-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.demo-screenshot .play-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.06);
    pointer-events: none;
}
.demo-screenshot .play-badge .circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(22, 119, 255, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(22, 119, 255, 0.35);
}

/* ============================================================
   3D透视
   ============================================================ */

.perspective-lg {
    perspective: 1000px;
}

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 768px) {
    .tab-trigger {
        font-size: 0.85rem;
        padding: 6px 14px;
    }
    .tab-trigger::after {
        bottom: 0;
    }
    .screenshot-bar .title {
        font-size: 9px;
    }
    .layer-node {
        transform: none;
    }
    .particle,
    .flow-line {
        display: none;
    }
    /* 移动端关闭视差、微光重型动效 */
    .shimmer-once {
        animation: none;
        background: none;
    }
}

/* 打印样式 - 去除所有动效 */
@media print {
    .reveal,
    .stagger-children > *,
    .layer-node {
        opacity: 1 !important;
        transform: none !important;
    }
}
