/* ==========================================================================
   全局重置与苹果级排版设定
   ========================================================================== */
body, html {
    padding: 0;
    margin: 0;
    direction: ltr;
    /* iOS 系统级字体栈 */
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    /* 极致暗黑极光渐变背景 */
    background: #000000;
    background-image: radial-gradient(circle at 50% -20%, #1c1c28 0%, #000000 70%);
    background-attachment: fixed;
    color: #f5f5f7;
    -webkit-font-smoothing: antialiased;
    max-width: 600px;
    margin: auto;
}

/* ==========================================================================
   核心视觉组件：毛玻璃 (Glassmorphism)
   ========================================================================== */
.glass-panel {
    background: rgba(30, 30, 35, 0.65);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   AI 分析控制台 (输入框 + 按钮)
   ========================================================================== */
.hero-analysis-section {
    padding: 30px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.ai-control-center {
    width: 100%;
    max-width: 400px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.apple-input {
    width: 100%;
    height: 64px; /* 高度增加了 8px，显得更宽敞大气 */
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px; /* 苹果经典的圆角矩形 */
    color: #fff;
    font-size: 18px;
    letter-spacing: 1px; /* 稍微增加字间距，输入股票代码时更清晰 */
    text-align: center;
    outline: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-sizing: border-box;
    direction: ltr;
}

.apple-input::placeholder {
    color: #6e6e73;
    letter-spacing: normal;
}

.apple-input:focus {
    border-color: #007aff;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.2);
    background: rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   全新升级版 AI 呼吸引擎按钮
   ========================================================================== */
.apple-btn {
    width: 88%; /* 宽度缩窄，两边留白，不再与输入框一样宽 */
    margin: 0 auto; /* 保证在父容器中居中 */
    height: 52px; /* 高度微微降低，拉开与输入框的体量差异 */
    border: none;
    border-radius: 30px; /* 核心改变：完全圆润的胶囊形，打破“两块砖头”的死板 */
    background: linear-gradient(135deg, #007aff, #5856d6);
    color: white;
    font-size: 16px; /* 字体随高度微微缩小，更加精致 */
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    
    /* 保持原有的 Flex 对齐与特效 */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px; 
    animation: btn-breathe 3s infinite alternate;
}

.apple-btn:active {
    transform: scale(0.96);
}

/* AI 四芒星图标动画：缓慢自转并伴随缩放 */
.ai-sparkle {
    width: 20px;
    height: 20px;
    animation: sparkle-spin 4s linear infinite;
}

/* 镜面扫光物理特效层 */
.shimmer-sweep {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    /* 创造一道半透明的白色斜光 */
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: sweep-glare 3.5s infinite;
    pointer-events: none; /* 确保它只作为视觉层，不会阻挡用户的真实点击 */
}

/* --- 核心动画关键帧 --- */

/* 1. 按钮光晕呼吸：在深蓝和亮紫之间切换阴影大小 */
@keyframes btn-breathe {
    0% { box-shadow: 0 8px 20px rgba(88, 86, 214, 0.4); }
    100% { box-shadow: 0 8px 30px rgba(88, 86, 214, 0.8), 0 0 15px rgba(0, 122, 255, 0.5); }
}

/* 2. 星星旋转：0到180度时略微放大，再转到360度恢复 */
@keyframes sparkle-spin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.15); }
    100% { transform: rotate(360deg) scale(1); }
}

/* 3. 扫光特效：快速扫过，然后长时间停留等待下一轮 */
@keyframes sweep-glare {
    0% { left: -100%; }
    20% { left: 200%; } /* 前 20% 的时间用来快速扫光 */
    100% { left: 200%; } /* 后 80% 的时间隐藏在右侧休息 */
}

.apple-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   弹窗与进度条 (Modals & Progress)
   ========================================================================== */
.win-pp-window {
    display: none;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0%);
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    max-width: 600px;
    z-index: 999;
    background: rgba(0, 0, 0, 0.6); /* 弹窗背后的全局蒙层 */
    backdrop-filter: blur(5px);
}

.win-pp-content {
    width: 85%;
    max-width: 400px;
    text-align: center;
    position: relative;
    padding: 35px 25px;
    box-sizing: border-box;
}

.progress-wrapper {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    margin-top: 10px;
    margin-bottom: 25px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.progress-indicator {
    height: 100%;
    width: 0;
    border-radius: 10px;
    background: linear-gradient(90deg, #00C6FF, #0072FF);
    box-shadow: 0 0 10px rgba(0, 114, 255, 0.6);
    text-align: right;
    padding-right: 8px;
    font-size: 10px;
    line-height: 12px;
    font-weight: bold;
    color: white;
    transition: width 0.1s linear; /* 进度条动画更加平滑 */
}

/* ==========================================================================
   原有结构与动画辅助类 (保留以兼容你的图片排版)
   ========================================================================== */
.position-relative { position: relative; }
.position-absolute { position: absolute; left: 0; top: 0; }
.full-width-img { width: 100%; display: block; }
.almost-full-width-img { width: 92%; display: block; margin: 0 auto; }

.description-text {
    width: 100%;
    color: #6e6e73;
    font-size: 14px;
    margin: 30px 0;
    text-align: center;
}

.textBlock01 {
    display: none; /* 隐藏长篇隐私协议 */
}

/* 动画定义 */
@keyframes slide-up {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.slide-up-animation {
    animation: slide-up 0.8s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

@keyframes scale-up {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.scale-up-animation {
    animation: scale-up 0.5s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}

/* ==========================================================================
   AI 动态头部区域 (Siri风格光球 + 渐变标题)
   ========================================================================== */
.ai-header {
    text-align: center;
    padding: 60px 20px 30px; /* 控制头部与顶部的间距 */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
}

/* --- 光球容器 --- */
.ai-orb-container {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
}

/* --- 核心光球 --- */
.ai-orb {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    /* 使用苹果 Siri 经典的蓝紫相间渐变 */
    background: radial-gradient(circle at 30% 30%, #5856d6, #007aff, #00C6FF);
    box-shadow: 0 0 25px rgba(0, 122, 255, 0.8), inset 0 0 15px rgba(255, 255, 255, 0.6);
    z-index: 3;
    /* 核心呼吸动画：来回放大缩小并改变光晕亮度 */
    animation: orb-breathe 2.5s ease-in-out infinite alternate;
}

/* --- 外围波纹圆环 --- */
.ai-orb-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(0, 198, 255, 0.4);
    z-index: 2;
}

.ring-1 {
    width: 80px;
    height: 80px;
    animation: ring-pulse 2.5s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.ring-2 {
    width: 100px;
    height: 100px;
    animation: ring-pulse 2.5s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
    animation-delay: 1.25s; /* 错开时间，形成向外扩散的波纹 */
}

/* --- 字体排版 --- */
.ai-title {
    font-size: 34px;
    font-weight: 800;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
    color: #fff;
}

/* 渐变流光文字特效 */
.text-gradient {
    background: linear-gradient(90deg, #00C6FF, #0072FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ai-subtitle {
    font-size: 15px;
    color: #a1a1a6; /* 苹果常用的次级灰 */
    margin: 0;
    line-height: 1.5;
    max-width: 320px;
    font-weight: 400;
}

/* --- 动画关键帧定义 --- */
@keyframes orb-breathe {
    0% { transform: scale(0.9); box-shadow: 0 0 15px rgba(0, 122, 255, 0.5); }
    100% { transform: scale(1.1); box-shadow: 0 0 40px rgba(0, 198, 255, 0.9); }
}

@keyframes ring-pulse {
    0% { transform: scale(0.7); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* ==========================================================================
   AI 合作伙伴 / 模型 Logo 无缝轮播 (Logo Ticker)
   ========================================================================== */
.ai-partners-section {
    width: 100%;
    margin: 10px 0 25px 0; /* 控制与上下元素的距离 */
    text-align: center;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

/* 提示小标题 */
.partners-title {
    font-size: 11px;
    letter-spacing: 2px;
    color: #6e6e73;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* 轮播容器：使用 mask-image 制作左右两端的渐隐模糊效果 */
.ticker-wrapper {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
}

/* 滚动轨道：包含两组相同的 Logo 列表 */
.ticker-track {
    display: inline-flex;
    gap: 40px; /* Logo 之间的间距 */
    padding-left: 40px; /* 补偿最后一项的间距 */
    align-items: center;
    white-space: nowrap;
    /* 动画：持续 15 秒，匀速，无限循环 */
    animation: ticker-scroll 15s linear infinite;
}

.partner-logo {
    height: 25px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    opacity: 0.72;
    filter: grayscale(1) brightness(1.25);
    transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease;
    cursor: default;
}

/* 悬停时点亮并微微放大 */
.partner-logo:hover {
    opacity: 1;
    filter: none;
    transform: scale(1.05);
    /* 暂停动画让用户看清楚 */
}

.partner-logo-text {
    display: inline-flex;
    align-items: center;
    height: 25px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

/* 鼠标悬停在轨道上时，整个轮播暂停 */
.ticker-wrapper:hover .ticker-track {
    animation-play-state: paused;
}

/* 无缝滚动的关键帧：向左移动 50% 的宽度 */
@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); } 
}

/* ==========================================================================
   实时股票行情反向轮播带 (Stock Ticker)
   ========================================================================== */
.stock-ticker-section {
    width: 100%;
    margin: 0 0 35px 0; /* 控制与下方输入框的距离 */
    overflow: hidden;
    position: relative;
    z-index: 10;
}

/* 复用并稍微加宽遮罩容器 */
.stock-wrapper {
    max-width: 600px;
}

/* 股票滚动轨道：反向动画 */
.stock-ticker-track {
    display: inline-flex;
    gap: 15px; /* 胶囊之间的间距 */
    padding-left: 15px;
    align-items: center;
    white-space: nowrap;
    /* 注意这里使用的是反向滚动的关键帧，持续时间稍微比Logo慢一点，增加层次感 */
    animation: ticker-scroll-reverse 20s linear infinite;
}

/* 当鼠标悬停时暂停滚动 */
.stock-ticker-section:hover .stock-ticker-track {
    animation-play-state: paused;
}

/* 苹果风半透明磨砂胶囊设计 */
.stock-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05); /* 极度微弱的白底 */
    border: 1px solid rgba(255, 255, 255, 0.1); /* 极其纤细的边框 */
    padding: 8px 16px;
    border-radius: 30px; /* 胶囊圆角 */
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: default;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* 悬停时的微交互效果 */
.stock-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* 股票名称：使用苹果高级白 */
.stock-name {
    color: #f5f5f7;
    letter-spacing: 0.5px;
}

/* 股票涨跌颜色：使用 iOS 原生的金融红绿色 */
.stock-change.up {
    color: #34c759; /* 苹果绿 (上涨) */
}

.stock-change.down {
    color: #ff3b30; /* 苹果红 (下跌) */
}

/* --- 反向无缝滚动的关键帧 --- */
/* 从 -50% (偏左) 滚动到 0 (偏右)，与上面 Logo 的向左滚动形成完美交错 */
@keyframes ticker-scroll-reverse {
    0% { transform: translateX(50%); }
    100% { transform: translateX(0); }
}

/* ==========================================================================
   信任背书模块 (Trust Badges)
   ========================================================================== */
.trust-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px; /* 控制三个标签之间的间距 */
    margin-top: 5px; /* 微微拉开与按钮的距离 */
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08); /* 顶部加上一条极其微弱的分隔线增加层次感 */
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 6px; /* 图标和文字的间距 */
    color: #a1a1a6; /* 苹果次级灰文字，不抢主按钮风头 */
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.badge-item svg {
    width: 16px;
    height: 16px;
    /* 使用 iOS 原生绿色作为图标线稿色，呼应你截图里的颜色 */
    stroke: #34c759; 
    /* 增加一层微弱的发光效果，提升 AI 科技感 */
    filter: drop-shadow(0 0 4px rgba(52, 199, 89, 0.5));
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* 增加一点简单的微交互：鼠标悬停时图标微缩放，文字变亮 */
.badge-item:hover {
    color: #f5f5f7;
}

.badge-item:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(52, 199, 89, 0.8));
}

/* 移动端屏幕适配：如果屏幕太小，缩小间距 */
@media (max-width: 480px) {
    .trust-badges {
        gap: 15px;
    }
    .badge-item {
        font-size: 12px;
    }
}
