@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* 强制卡片内所有元素继承pointer光标，解决文字区出现I-beam的问题 */
.card-pointer, .card-pointer * {
    cursor: pointer;
}

/* ===== 右侧悬浮侧边栏 ===== */
.side-bar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    overflow: visible;
    padding: 6px 0;
}

.side-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px;
    padding: 12px 6px 8px;
    cursor: pointer;
    transition: background 0.25s ease;
    border-bottom: 1px solid #f0f0f0;
}

.side-item:last-child {
    border-bottom: none;
}

.side-item:hover {
    background: #f0f7ff;
}

.side-item > i {
    font-size: 20px;
    color: #3b82f6;
    margin-bottom: 4px;
}

.side-item .side-label {
    font-size: 10px;
    color: #555;
    text-align: center;
    line-height: 1.3;
}

/* hover 弹出层 */
.side-popover {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    margin-right: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.side-item:hover .side-popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
    pointer-events: auto;
}

/* ===== 侧边栏动效增强 ===== */
.side-item {
    animation: side-bounce-in 0.6s cubic-bezier(0.34,1.56,0.64,1) both;
}
.side-item:nth-child(1) { animation-delay: 0.8s; }
.side-item:nth-child(2) { animation-delay: 1.0s; }
.side-item:nth-child(3) { animation-delay: 1.2s; }
@keyframes side-bounce-in {
    from { opacity:0; transform: translateX(20px) scale(0.9); }
    to   { opacity:1; transform: translateX(0) scale(1); }
}
.side-item:hover {
    background: #f0f7ff;
    transform: scale(1.06);
    box-shadow: 0 4px 16px rgba(59,130,246,0.12);
}
.side-item:hover > i {
    color: #2563eb;
    transform: scale(1.15);
    transition: all 0.3s ease;
}
/* 呼吸光晕 */
.side-item::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 36px; height: 36px;
    transform: translate(-50%, -65%);
    border-radius: 50%;
    background: rgba(59,130,246,0.15);
    opacity: 0;
    animation: side-pulse 2.5s ease-in-out infinite;
}
.side-item:nth-child(1)::after { animation-delay: 0s; }
.side-item:nth-child(2)::after { animation-delay: 0.8s; }
.side-item:nth-child(3)::after { animation-delay: 1.6s; }
@keyframes side-pulse {
    0%, 100% { opacity: 0; transform: translate(-50%, -65%) scale(0.8); }
    50% { opacity: 0.6; transform: translate(-50%, -65%) scale(1.3); }
}
.side-item:hover::after { animation: none; opacity: 0; }
/* 图标持续微晃 */
.side-item > i {
    animation: side-icon-float 3s ease-in-out infinite;
}
.side-item:nth-child(1) > i { animation-delay: 0s; }
.side-item:nth-child(2) > i { animation-delay: 1s; }
.side-item:nth-child(3) > i { animation-delay: 2s; }
@keyframes side-icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}
.side-item:hover > i { animation: none; }

/* ===== 免费检测工具样式 ===== */
.check-tab {
    padding: 0.65rem 1.5rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
    background: #e5e7eb;
    color: #6b7280;
}
.check-tab.active { background: #2563eb; color: white; box-shadow: 0 4px 12px rgba(37,99,235,0.25); }
.check-tab:hover:not(.active) { background: #d1d5db; }
.upload-area {
    border: 2px dashed #d1d5db; border-radius: 12px; padding: 2.5rem; text-align: center;
    transition: all 0.3s ease; cursor: pointer; background: #fafbfc;
}
.upload-area:hover, .upload-area.dragover { border-color: #2563eb; background: #eff6ff; }
.result-card { background: linear-gradient(135deg,#667eea 0%,#764ba2 100%); border-radius: 1.25rem; padding: 2rem; color: white; }
.score-circle {
    width:110px; height:110px; border-radius:50%; background: rgba(255,255,255,0.2);
    display:flex; align-items:center; justify-content:center; font-size:2.2rem; font-weight:800;
}
.progress-bar { transition: width 1.4s ease-out; }

/* ===== 案例轮播 ===== */
.case-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #d1d5db; cursor: pointer;
    transition: all 0.3s ease;
}
.case-dot.active {
    background: #2563eb; width: 28px; border-radius: 4px;
}
.case-dot:hover { background: #93c5fd; }
.case-arrow:active { transform: translateY(-50%) scale(0.92); }
.case-slide { opacity: 0.4; transition: opacity 0.5s ease; }
.case-slide:first-child { opacity: 1; }
@media (max-width: 768px) {
    .case-arrow { display: none; }
}

/* 移动端隐藏侧边栏 */
@media (max-width: 768px) {
    .side-bar { display: none; }
}

.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ===== 导航栏交互增强 ===== */
.nav-link {
    position: relative;
    padding: 6px 14px;
    font-size: 15px;
    font-weight: 500;
    color: #4b5563;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}
.nav-link:hover {
    color: #2563eb;
    background: rgba(59, 130, 246, 0.06);
}
.nav-link:hover::after {
    width: 60%;
}
.nav-link.active {
    color: #2563eb;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.08);
}
.nav-link.active::after {
    width: 65%;
}
.nav-brand { transition: transform 0.3s ease; }
.nav-brand:hover { transform: scale(1.03); }

/* ===== Section 卡片激活高亮 ===== */
@keyframes card-glow-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(59,130,246,0.06); }
    50% { box-shadow: 0 8px 32px rgba(59,130,246,0.14); }
}
.section-active .card-hover {
    border-color: rgba(59,130,246,0.25);
    animation: card-glow-pulse 3s ease-in-out infinite;
}

/* ===== Hero左侧内容初始状态（GSAP动画前隐藏） ===== */
.hero-left > * {
    opacity: 0;
    transform: translateY(28px);
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.progress-bar {
    transition: width 1.5s ease-in-out;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.open {
    max-height: 500px;
}

.logo-hover {
    transition: transform 0.3s ease;
    display: inline-block;
}
.logo-hover:hover {
    transform: translateY(-3px);
}

.hero-pattern {
    background-color: #f8fafc;
    background-image:
        radial-gradient(at 40% 20%, rgba(102, 126, 234, 0.05) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(118, 75, 162, 0.05) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(102, 126, 234, 0.05) 0px, transparent 50%);
}

.hero-anim-wrap {
    width: 100%; max-width: 700px;
}
.hero-anim-wrap iframe {
    border-radius: 16px;
}
/* ===== Hero右侧动效插图样式 ===== */
.canvas-wrap {
    width: 700px; height: 420px;
    position: relative; margin: 0 auto;
}

.bubble-cloud {
    position:relative; width:100%; height:420px;
}

/* 动画前初始隐藏（防止闪烁） */
.q-bubble { opacity: 0; }
.hero-bubble { opacity: 0; transform: translate(-50%,-50%) scale(0.85); }
.hero-bg-circle { opacity: 0; }

.hero-bg-circle {
    position:absolute; left:50%; top:50%;
    transform:translate(-50%,-50%);
    width:240px; height:240px; border-radius:50%;
    background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, rgba(59,130,246,0.03) 50%, transparent 70%);
    z-index:0;
}

.q-bubble {
    position:absolute; display:flex; align-items:center; gap:11px;
    background:#ffffff;
    border:1.5px solid #e2e8f0;
    border-radius:16px;
    padding:12px 19px;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.04),
        0 4px 14px rgba(0,0,0,0.05);
    z-index:1;
    transition: box-shadow 0.25s ease;
    will-change: transform;
    transform: translateZ(0);
}
.q-bubble:hover {
    box-shadow:
        0 2px 6px rgba(59,130,246,0.08),
        0 7px 20px rgba(0,0,0,0.07);
}
.q-bubble.tag-deepseek { background:#f8faff; border-color:#c7d7ed; }
.q-bubble.tag-kimi     { background:#f5f8fc; border-color:#d0dce8; }
.q-bubble.tag-yuanbao  { background:#fafbff; border-color:#d4dde9; }
.q-bubble.tag-qwen     { background:#f7f9fd; border-color:#ccd9e6; }
.q-bubble.tag-wenxin   { background:#f9fbff; border-color:#d0dce8; }
.q-bubble.tag-doubao   { background:#f8faff; border-color:#c7d7ed; }

.q-bubble .bubble-icon {
    width:34px; height:34px; border-radius:50%;
    object-fit:cover; flex-shrink:0;
}
.q-bubble .bubble-icon.doubao {
    width:40px; height:40px;
}

.q-bubble .q-text {
    font-size:14px; color:#334155; line-height:1.45; font-weight:600;
    pointer-events:none;
    letter-spacing:0.2px;
}

/* C位 */
.hero-bubble {
    position:absolute; left:50%; top:52%;
    display:flex; align-items:center; gap:14px;
    background:#ffffff;
    border:2.5px solid #3b82f6;
    border-radius:18px;
    padding:16px 32px;
    box-shadow:
        0 0 22px rgba(59,130,246,0.15),
        0 0 58px rgba(59,130,246,0.07),
        0 7px 26px rgba(59,130,246,0.10);
    z-index:100;
}
.hero-bubble .hero-text {
    font-size:18px; font-weight:800; color:#0f172a; line-height:1.35;
    white-space:nowrap;
    letter-spacing:0.3px;
}
.hero-bubble .ai-badge {
    display:inline-flex; align-items:center; justify-content:center;
    width:40px; height:30px; border-radius:9px;
    background:linear-gradient(135deg,#3b82f6,#2563eb);
    color:#fff; font-size:14px; font-weight:800;
    letter-spacing:0.5px;
    box-shadow:0 2px 8px rgba(37,99,235,0.30);
}

@keyframes hero-pulse {
    0%, 100% {
        box-shadow: 0 0 22px rgba(59,130,246,0.15), 0 0 58px rgba(59,130,246,0.07), 0 7px 26px rgba(59,130,246,0.10);
    }
    50% {
        box-shadow: 0 0 28px rgba(59,130,246,0.20), 0 0 66px rgba(59,130,246,0.09), 0 7px 26px rgba(59,130,246,0.12);
    }
}
.hero-bubble {
    animation: hero-pulse 4s ease-in-out infinite;
}

/* 动画完成后恢复正常可见 */
.anim-ready .q-bubble,
.anim-ready .hero-bubble,
.anim-ready .hero-bg-circle {
    opacity: 1;
}

@media (max-width: 768px) {
    .hero-anim-wrap { max-width: 100%; }
    /* 气泡云是装饰性动效，画布固定 700px 会把移动端版心顶宽（实测产生 161px 横向滚动）。
       收窄到屏宽并裁掉出界气泡，中心 CTA 气泡仍可见。 */
    .canvas-wrap, .bubble-cloud { width: 100%; max-width: 100%; height: 320px; }
    .bubble-cloud { overflow: hidden; }

    /* 移动端热区：导航项与主 CTA 至少 44px 高（触摸可达性） */
    #main-nav a, #main-nav button { min-height: 44px; min-width: 44px; justify-content: center; display: inline-flex; align-items: center; }
}
