* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}

:root {
    --primary: #007AFF;
    --primary-happy: #FFB347;
    --primary-neutral: #5AC8FA;
    --primary-sad: #8E8E93;
    --primary-angry: #FF3B30;
    --primary-content: #34C759;
    --primary-devastated: #5856D6;
    --bg-color: #F2F2F7;
}

body {
    background-color: var(--bg-color);
    overflow-x: hidden;
}

/* 渐变背景球 */
.gradient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: 0;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* 玻璃拟态卡片 */
.glass-card {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04), 
                0 2px 8px rgba(0, 0, 0, 0.02),
                inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.glass-nav {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

/* 极简 App Logo - 此刻 */
.app-logo {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.app-logo::before {
    content: '';
    width: 55%;
    height: 55%;
    border: 2.4px solid #1a1a1a;
    border-radius: 50%;
    background: transparent;
}

.app-logo::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 23%;
    height: 23%;
    background: #FF8A3D;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 14px rgba(255, 138, 61, 0.5);
    animation: breathe 4s ease-in-out infinite;
}

/* 呼吸光感动画 · L6 静态商标（黑环=时间，橙点=此刻） */
@keyframes breathe {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(0.85); 
        opacity: 0.85;
        box-shadow: 0 0 8px rgba(255, 138, 61, 0.3);
    }
    50% { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 1;
        box-shadow: 0 0 18px rgba(255, 138, 61, 0.55);
    }
}

/* 手机 Mockup */
.phone-mockup {
    background: #000;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15),
                0 10px 30px rgba(0, 0, 0, 0.1),
                inset 0 2px 4px rgba(255, 255, 255, 0.1);
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.phone-screen {
    background: var(--bg-color);
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 9/19;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 28px;
    background: #000;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 10;
}

/* Mockup 内部交互元素 */
.mock-mood-btn {
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 20;
    padding: 4px;
    line-height: 1;
    font-size: 1.25rem;
    width: 32px;
    height: 32px;
}

.mock-mood-btn:hover {
    transform: scale(1.1);
}

.mock-mood-btn.active {
    transform: scale(1.25);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    opacity: 1 !important;
}

.mock-tab-btn {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 20;
    user-select: none;
}

.mock-category-btn {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 20;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mock-category-btn:hover {
    transform: translateY(-1px);
}

.mock-category-btn.active {
    background: white;
    border: 1px solid #3B82F6;
    color: #3B82F6;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 功能图标动画 */
.feature-icon {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

/* 情绪色块 */
.mood-pill {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    white-space: nowrap;
}

.mood-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 滚动显示动画 */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 按钮光泽效果 */
.shiny-btn {
    position: relative;
    overflow: hidden;
}

.shiny-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.3) 50%,
        rgba(255,255,255,0) 100%
    );
    transform: rotate(30deg) translateY(-100%);
    transition: transform 0.6s;
}

.shiny-btn:hover::before {
    transform: rotate(30deg) translateY(100%);
}

/* 截图展示轨道 - 手动滑动 */
.screenshot-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 20px;
}

.screenshot-container::-webkit-scrollbar {
    display: none;
}

.screenshot-track {
    display: flex;
    gap: 24px;
    padding: 0 24px 20px 24px;
    width: max-content;
}

/* AI 特色光效 */
.ai-glow {
    position: relative;
    overflow: hidden;
}

.ai-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(139, 92, 246, 0.3) 60deg,
        rgba(59, 130, 246, 0.3) 120deg,
        transparent 180deg
    );
    animation: rotate 4s linear infinite;
    z-index: 0;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

.ai-glow-content {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.9);
    border-radius: inherit;
    height: 100%;
    width: 100%;
}

/* 平台标签 */
.platform-badge {
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.platform-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.2);
}

/* 无限循环滚动 */
.infinite-marquee-section {
    padding: 40px 0;
    overflow: hidden;
    position: relative;
}

.infinite-marquee-container {
    overflow: hidden;
    width: 100%;
    padding: 20px 0;
}

.infinite-marquee-track {
    display: flex;
    width: fit-content;
    animation: marquee-scroll 30s linear infinite;
    will-change: transform;
}

.infinite-marquee-section.offscreen .infinite-marquee-track {
    animation-play-state: paused;
}

.infinite-marquee-track:hover {
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* YuSaeLife 悬停效果 */
.yusaelife-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.yusaelife-tooltip:hover {
    color: #FF8A3D;
}

.yusaelife-tooltip .tooltip-text {
    visibility: hidden;
    opacity: 0;
    font-size: 0.75rem;
    color: #6B7280;
    font-weight: 400;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-left: 4px;
}

.yusaelife-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* 微信弹窗样式 */
.wechat-content {
    -webkit-user-select: text;
    user-select: text;
}

/* ============================================
   Download Page Specific Styles
   ============================================ */

/* 下载卡片动效 */
.download-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

/* 平台图标 - 修复emoji展示问题 */
.platform-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
    margin-bottom: 16px;
    flex-shrink: 0;
    overflow: visible;
    position: relative;
}

/* 确保emoji完全显示 */
.platform-icon {
    text-align: center;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
}

.android-icon { 
    background: linear-gradient(135deg, #34C759, #30D158); 
    color: white;
}
.web-icon { 
    background: linear-gradient(135deg, #007AFF, #5AC8FA); 
    color: white;
}
.ios-icon { 
    background: linear-gradient(135deg, #1C1C1E, #48484A); 
    color: white;
}
.win-icon {
    background: linear-gradient(135deg, #0A84FF, #5AC8FA);
    color: white;
}

/* 二维码容器 */
.qr-code {
    background: white;
    padding: 12px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* 步骤编号 */
.step-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    line-height: 1;
}

/* 版本标签 */
.version-tag {
    background: rgba(0, 122, 255, 0.1);
    color: #007AFF;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
    white-space: nowrap;
}

/* 下载按钮光泽效果 */
.download-btn {
    background: linear-gradient(135deg, #007AFF, #5856D6);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.download-btn:hover::before {
    left: 100%;
}

/* 文件信息项 */
.file-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6B7280;
    font-size: 13px;
    line-height: 1.4;
}

.file-info-item svg {
    flex-shrink: 0;
}

/* 更新日志项 */
.changelog-item {
    position: relative;
    padding-left: 24px;
    padding-bottom: 16px;
    border-left: 2px solid #E5E7EB;
}

.changelog-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 6px;
    width: 8px;
    height: 8px;
    background: #007AFF;
    border-radius: 50%;
    flex-shrink: 0;
}

.changelog-item:last-child {
    border-left: 2px solid transparent;
    padding-bottom: 0;
}

/* 脉冲动画 */
.pulse-ring {
    position: absolute;
    border-radius: 50%;
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.33); opacity: 1; }
    80%, 100% { transform: scale(1.8); opacity: 0; }
}

/* 弹窗默认隐藏 */
#qqModal, #wechatModal, #iosModal {
    display: none;
}

#qqModal.flex, #wechatModal.flex, #iosModal.flex {
    display: flex;
}

/* 动画延迟工具类 */
.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* 选中文字样式优化 */
.allow-select, .cursor-text {
    cursor: text;
    -webkit-user-select: text;
    user-select: text;
}

/* 防止按钮文字被选中 */
button, .mock-tab-btn, .mock-category-btn, .mock-mood-btn {
    -webkit-user-select: none;
    user-select: none;
}

/* 禁用状态按钮 */
button:disabled, .download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* 移动端性能：停 blob 动画、降毛玻璃开销 */
@media (max-width: 767px) {
  .gradient-blob { animation: none; filter: blur(60px); }
  .glass-card, .glass-nav { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
}

/* 样张同款深色机壳 */
.shot-phone{
    background: #0B0D12;
    border-radius: 44px;
    padding: 9px;
    box-shadow: 0 30px 60px rgba(20,26,46,.28), inset 0 2px 3px rgba(255,255,255,.06);
    transition: transform .3s ease, box-shadow .3s ease;
}
.shot-phone .screen{
    background: #F2F2F7;
    border-radius: 36px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 9/19;
}
.shot-phone .sbar{
    position: absolute; top: 0; left: 0; right: 0;
    display: flex; justify-content: space-between;
    padding: 16px 20px 0;
    font-size: 11px; font-weight: 600; color: #9AA3B5;
    z-index: 2; pointer-events: none;
}

/* ============================================================
   明暗跟随（落地页 + 下载页）—— 用 html[data-theme="dark"] 覆盖层，
   不重建 Tailwind。QR 码保持白底（扫码需要），故不覆盖 .qr-code。
   ============================================================ */
html[data-theme="dark"]{ --bg-color:#0E1015; color-scheme:dark; }
html[data-theme="dark"] body{ background-color:#0E1015; color:#F2F4FA; }
/* 文字 */
html[data-theme="dark"] .text-gray-900{ color:#F2F4FA; }
html[data-theme="dark"] .text-gray-800{ color:#E5E9F2; }
html[data-theme="dark"] .text-gray-700{ color:#D3D9E6; }
html[data-theme="dark"] .text-gray-600{ color:#AEB6C8; }
html[data-theme="dark"] .text-gray-500{ color:#9AA3B5; }
html[data-theme="dark"] .text-gray-400{ color:#6B7488; }
html[data-theme="dark"] .text-blue-700{ color:#7FB2FF; }
html[data-theme="dark"] .text-blue-600{ color:#8FBBFF; }
html[data-theme="dark"] .text-green-600{ color:#5FD98A; }
/* 玻璃卡片 / 导航 */
html[data-theme="dark"] .glass-card{ background:rgba(30,33,44,.72); border:1px solid rgba(255,255,255,.08); box-shadow:0 8px 32px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.05); }
html[data-theme="dark"] .glass-nav{ background:rgba(18,20,28,.72); border-bottom:1px solid rgba(255,255,255,.08); }
html[data-theme="dark"] .download-card:hover{ box-shadow:0 20px 40px rgba(0,0,0,.5); }
/* 通用浅底 */
html[data-theme="dark"] .bg-white{ background-color:#1B1E28; }
html[data-theme="dark"] .bg-white\/30{ background-color:rgba(30,33,44,.5); }
html[data-theme="dark"] .bg-white\/50{ background-color:rgba(30,33,44,.55); }
html[data-theme="dark"] .hover\:bg-white\/50:hover{ background-color:rgba(255,255,255,.06); }
html[data-theme="dark"] .bg-gray-50{ background-color:#181B24; }
html[data-theme="dark"] .bg-gray-100{ background-color:#1E222C; }
html[data-theme="dark"] .bg-gray-200{ background-color:#262B37; }
html[data-theme="dark"] .hover\:bg-gray-200:hover{ background-color:#2C323F; }
html[data-theme="dark"] .hover\:bg-gray-300:hover{ background-color:#333A48; }
html[data-theme="dark"] .text-gray-700.bg-gray-200, html[data-theme="dark"] button.bg-gray-200{ color:#D3D9E6; }
/* 彩色浅底徽章/图标块 */
html[data-theme="dark"] .bg-blue-100\/50{ background-color:rgba(80,120,220,.18); }
html[data-theme="dark"] .bg-blue-100{ background-color:rgba(80,120,220,.22); }
html[data-theme="dark"] .bg-green-100{ background-color:rgba(52,199,89,.18); }
html[data-theme="dark"] .bg-yellow-50{ background-color:rgba(230,180,60,.12); }
html[data-theme="dark"] .border-yellow-200{ border-color:rgba(230,180,60,.3); }
/* 边框 */
html[data-theme="dark"] .border-gray-200{ border-color:rgba(255,255,255,.1); }
html[data-theme="dark"] .border-gray-200\/50{ border-color:rgba(255,255,255,.08); }
html[data-theme="dark"] .border-gray-300{ border-color:rgba(255,255,255,.14); }
html[data-theme="dark"] .border-blue-200\/60{ border-color:rgba(120,160,255,.25); }
html[data-theme="dark"] .border-blue-200\/50{ border-color:rgba(120,160,255,.22); }
/* Logo 白底改深（黑环变浅环） */
html[data-theme="dark"] .app-logo{ background:#1B1E28; box-shadow:0 2px 8px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.06); }
html[data-theme="dark"] .app-logo::before{ border-color:#E5E9F2; }
/* 文件信息 / 更新日志 */
html[data-theme="dark"] .file-info-item{ color:#AEB6C8; }
html[data-theme="dark"] .changelog-item{ border-left-color:rgba(255,255,255,.12); }
/* 手机壳内屏（CSS mock 兜底） */
html[data-theme="dark"] .shot-phone .screen{ background:#14161D; }
/* 滚动条 */
html[data-theme="dark"] ::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.14); }
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover{ background:rgba(255,255,255,.24); }
/* 背景球降亮 */
html[data-theme="dark"] .gradient-blob{ opacity:.22; }
/* 弹窗内容 */
html[data-theme="dark"] #qqModal .bg-white, html[data-theme="dark"] #iosModal .bg-white, html[data-theme="dark"] #wechatModal .bg-white{ background-color:#1B1E28; color:#F2F4FA; }
/* 二维码容器强制白底（扫码需要浅底，覆盖其 bg-gray-50 工具类） */
html[data-theme="dark"] .qr-code{ background:#fff; border-color:rgba(255,255,255,.14); }

/* ============================================================
   交互动效打磨（对齐统一动效语言：强 ease-out / 收紧时长 /
   只动 transform·opacity / hover 指针门控 / reduced-motion 降级）
   ============================================================ */
:root{ --ease-out:cubic-bezier(.22,1,.36,1); --ease-io:cubic-bezier(.65,0,.35,1); }

/* 滚动揭示：只动 transform/opacity，曲线换强 ease-out，时长收到 .6s */
.reveal{ transition: transform .6s var(--ease-out), opacity .6s var(--ease-out); }

/* 下载卡：只动 transform/阴影，收紧到 .3s，位移略减 */
.download-card{ transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s var(--ease-out); }
.download-card:hover{ transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,0,0,.10); }
html[data-theme="dark"] .download-card:hover{ box-shadow: 0 20px 44px rgba(0,0,0,.5); }

/* 情绪块/功能图标 hover 统一强 ease-out、时长收到 .25s */
.mood-pill{ transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out); }
.feature-icon{ transition: transform .3s var(--ease-out); }
.mock-mood-btn{ transition: transform .2s var(--ease-out); }
.mock-category-btn{ transition: transform .2s var(--ease-out); }

/* hover 效果仅给指针设备：触屏不做悬停位移，避免粘滞态 */
@media (hover:none), (pointer:coarse){
  .download-card:hover{ transform:none; }
  .feature-card:hover .feature-icon{ transform:none; }
  .mood-pill:hover{ transform:none; }
  .mock-mood-btn:hover{ transform:none; }
  .mock-category-btn:hover{ transform:none; }
  .platform-badge:hover{ transform:none; }
}

/* FAQ 展开/收起：改 max-height + 淡入过渡（配合 JS 去掉 hidden 硬切） */
.faq-answer{ overflow:hidden; max-height:0; opacity:0; transition: max-height .32s var(--ease-io), opacity .28s var(--ease-out); }
.faq-answer.open{ opacity:1; }
.faq-btn svg{ transition: transform .28s var(--ease-out); }

/* 尊重"减少动态"系统偏好 */
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1 !important; transform:none !important; transition:none !important; }
  .gradient-blob, .ai-glow::after, .app-logo::after, .infinite-marquee-track, .pulse-ring, .shiny-btn::before{ animation:none !important; }
  .download-card, .mood-pill, .feature-icon, .mock-mood-btn, .mock-category-btn, .platform-badge, .faq-answer, .faq-btn svg{ transition:none !important; }
  .download-card:hover, .feature-card:hover .feature-icon, .mood-pill:hover{ transform:none !important; }
  .reveal{ transition:none !important; }
}
