/* ============================================================
   手机端专项修复 (针对截图中的问题)
   ============================================================ */

/* 1. 导航栏文字溢出处理 */
.brand {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 2. URL地址显示优化 */
.url-bar {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* 3. 导航按钮间距调整 */
.nav-toggle {
    display: flex;
    gap: 20px;
    padding: 0 16px;
}
.nav-toggle .close-btn, 
.nav-toggle .menu-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* 4. 量化号文字处理 */
.quant-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-left: 8px;
    border-left: 2px solid var(--accent-blue);
}

/* 5. 图标与文字对齐修复 */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 20px 0;
}
.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}
.icon-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.icon-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

/* 6. 横向关键词组修复 */
.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
    justify-content: center;
}
.keyword-tag {
    background: rgba(41,121,255,0.1);
    border: 1px solid rgba(41,121,255,0.2);
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* 7. 英文副标题优化 */
.subtitle-en {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin: 12px 0;
    letter-spacing: 0.05em;
}

/* 8. 主标题排版修复 */
.hero-text h1 {
    line-height: 1.2;
    margin-bottom: 16px;
}
.hero-line1, .hero-line2 {
    display: block;
}
.hero-line2 {
    margin-top: 4px;
}

/* 9. 正文文字截断处理 */
.hero-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 24px;
    word-wrap: break-word;
    hyphens: auto;
}
.hero-desc::after {
    content: '...';
    color: var(--text-muted);
}

/* 10. 浮动客服按钮调整 */
.chat-button {
    position: fixed;
    bottom: 80px !important; /* 提高位置避免遮挡 */
    right: 20px;
    width: 48px;
    height: 48px;
    z-index: 1000;
    background: linear-gradient(135deg, #7B1FA2, #9C27B0);
    border: none;
    box-shadow: 0 4px 20px rgba(123,31,162,0.3);
}
.chat-button::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: rgba(123,31,162,0.1);
    border-radius: 50%;
    z-index: -1;
}

/* 11. 安全区域适配 */
@supports (padding: max(0px)) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
        padding-bottom: env(safe-area-inset-bottom);
    }
    #navbar {
        padding-top: calc(16px + env(safe-area-inset-top));
    }
}

/* 12. 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    .btn-primary, .btn-ghost, .video-tab, .nav-links a {
        min-height: 44px; /* Apple 推荐的最小触摸目标 */
        min-width: 44px;
    }
    .nav-links a {
        padding: 12px 16px;
    }
}

/* 13. 文字大小调整 */
@media (max-width: 375px) {
    .hero-text h1 {
        font-size: 1.5rem;
    }
    .hero-desc {
        font-size: 0.85rem;
    }
    .section-header h2 {
        font-size: 1.8rem;
    }
}

/* 14. 策略演示视频区手机适配 */
@media (max-width: 768px) {
    .video-row {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .video-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }
    .video-tab {
        flex: 1 1 calc(50% - 12px);
        min-width: 140px;
    }
    .video-tab p {
        font-size: 0.8rem;
    }
    .video-player {
        aspect-ratio: 16/9;
        width: 100%;
    }
}

/* 15. 加载更多提示 */
.content-truncated {
    position: relative;
    max-height: 120px;
    overflow: hidden;
}
.content-truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--bg-deep));
}
.read-more {
    display: inline-block;
    margin-top: 8px;
    color: var(--accent-blue);
    font-size: 0.85rem;
    text-decoration: none;
    border-bottom: 1px dashed var(--accent-blue);
}