@import url('fonts_local.css');

:root {
    --primary: #FF6B8B;
    --primary-dark: #E05271;
    --site-header-h: 64px;
    --bg-main: #FFFFFF;
    --bg-sub: #F8FAFC;
    --text-main: #1A1C1E;
    --text-sub: #44474A;
    --border: rgba(0, 0, 0, 0.04);
    --border-light: rgba(0, 0, 0, 0.02);
}

@media (min-width: 768px) {
    :root { --site-header-h: 80px; }
}

/* 极致全局排版与渲染优化 */
html {
    overflow-y: scroll;
    scroll-behavior: smooth;
    scroll-padding-top: var(--site-header-h);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.8; /* 黄金行高提升阅读舒适度 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.015em;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* 标题系统：高级感的核心在于字重与间距的平衡 */
h1, h2, h3, h4 {
    letter-spacing: -0.04em;
    line-height: 1.15;
    font-weight: 900;
}

/* 标准容器：锁定呼吸感留白 */
.content-container {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .content-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .content-container {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

/* 统一头部与页面左右边距标准 */
.site-shell {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.page-gutter {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .site-shell,
    .page-gutter {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* 兼容现有页面：将历史 px-6 的外层布局统一到同一标准 */
header > .max-w-7xl.mx-auto,
footer > .max-w-7xl.mx-auto,
section.px-6,
main.px-6 {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    header > .max-w-7xl.mx-auto,
    footer > .max-w-7xl.mx-auto,
    section.px-6,
    main.px-6 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* 高级感组件：微阴影与润感 */
.shadow-premium {
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.04), 0 0 1px rgba(0, 0, 0, 0.03);
}

.shadow-pink-glow {
    box-shadow: 0 25px 60px -15px rgba(255, 107, 139, 0.15);
}

.card-simple {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 40px;
    padding: 3rem;
    transition: all 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.card-simple:hover {
    transform: translateY(-12px);
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.06);
    border-color: var(--primary);
}

/* 按钮细节：物理缓动感 */
.btn-simple {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

/* 主按钮悬停光效 */
.btn-simple.bg-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}
.btn-simple.bg-primary:hover::before {
    left: 100%;
}

/* 次级按钮悬停效果 */
.btn-simple:not(.bg-primary):not(.bg-slate-900):hover {
    border-color: var(--primary);
    color: var(--primary);
}

a, button {
    -webkit-tap-highlight-color: transparent;
}

.btn-simple:focus-visible,
.nav-link:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 14px;
}

.btn-simple:active {
    transform: scale(0.98);
}

/* 主CTA按钮脉冲动画 */
@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.15); opacity: 0; }
}
.btn-pulse {
    position: relative;
}
.btn-pulse::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--primary);
    animation: pulse-ring 2s ease-out infinite;
    pointer-events: none;
    z-index: -1;
}

.nav-link {
    color: var(--text-sub);
    transition: all 0.4s ease;
    position: relative;
    opacity: 0.6;
}

.nav-link:hover {
    opacity: 1;
    color: var(--text-main);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* 响应式间距优化 */
@media (max-width: 768px) {
    body { font-size: 15px; }
    h1 { font-size: 2.5rem !important; }
    .btn-simple { white-space: normal; }
    header .flex.items-center.space-x-4 {
        min-width: 0;
        gap: 0.5rem;
    }
    header .flex.items-center.space-x-4 .btn-simple {
        font-size: 13px;
        line-height: 1.2;
        text-align: center;
    }
}

/* 弹窗移动端安全区：限制高度并启用内部滚动，避免长内容顶出屏幕 */
.modal-safe-viewport {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100%;
    padding: 1.5rem;
}

.modal-safe-panel {
    width: 100%;
    max-height: min(calc(var(--modal-safe-vh, 100dvh) - 3rem), 48rem);
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.modal-safe-header,
.modal-safe-footer {
    flex: none;
    background: #fff;
}

.modal-safe-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scroll-padding-top: 1rem;
    scroll-padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

@media (max-width: 640px) {
    .modal-safe-viewport {
        align-items: flex-start;
        padding-top: max(0.75rem, env(safe-area-inset-top));
        padding-right: 0.75rem;
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
        padding-left: 0.75rem;
    }

    .modal-safe-panel {
        max-height: calc(var(--modal-safe-vh, 100dvh) - max(1.5rem, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
        border-radius: 1.5rem !important;
    }
}

/* ===== 新增UI优化 ===== */

/* 信任徽章样式 */
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #fef3f5 0%, #fff 100%);
    border: 1px solid rgba(255, 107, 139, 0.15);
    border-radius: 100px;
    font-size: 0.875rem;
    color: var(--text-main);
    transition: all 0.3s ease;
}
.trust-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -8px rgba(255, 107, 139, 0.2);
}
.trust-badge strong {
    color: var(--primary);
    font-weight: 800;
}

/* 数字高亮计数 */
.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary) 0%, #FF8FA3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 表单输入体验 */
input:focus, select:focus, textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(255, 107, 139, 0.1) !important;
}
input::placeholder {
    color: #94a3b8;
}

/* 滚动出现动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.animate-on-scroll {
    opacity: 0;
}
.animate-on-scroll.is-visible {
    animation: fadeInUp 0.6s ease forwards;
}

/* 功能卡片悬停增强 */
.feature-card {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
}
.feature-card:hover .feature-icon {
    transform: scale(1.1);
    background: var(--primary);
}
.feature-card:hover .feature-icon svg {
    color: white !important;
}
.feature-icon {
    transition: all 0.35s ease;
}

/* 版本卡片推荐标识动画 */
@keyframes badge-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 139, 0.4); }
    50% { box-shadow: 0 0 20px 5px rgba(255, 107, 139, 0.2); }
}
.tier-recommended {
    animation: badge-glow 2s ease-in-out infinite;
}

/* 移动端汉堡菜单 */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}
.mobile-menu-btn:hover {
    background: #f1f5f9;
}
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
}

/* 浮动联系按钮 */
.floating-contact {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}
.floating-btn:hover {
    transform: scale(1.1);
}
.floating-btn.primary {
    background: var(--primary);
    color: white;
}
.floating-btn.wechat {
    background: #07c160;
    color: white;
}

/* 进度指示器 */
.progress-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e2e8f0;
    transition: all 0.3s ease;
}
.progress-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--primary);
}

/* 标签云样式 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-item {
    padding: 6px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 100px;
    font-size: 0.8125rem;
    color: #64748b;
    transition: all 0.2s ease;
}
.tag-item:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
