/**
 * 移动端响应式样式
 * 财经快讯 - Mobile First Design
 */

/* ========================================
   全局防溢出样式
======================================== */

/* 防止横向溢出 */
html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
}

body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    min-width: 0;
}

/* 全局强制换行 */
* {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

/* 图片防溢出 */
img {
    max-width: 100%;
    height: auto;
}

/* 表格防溢出 */
table {
    max-width: 100%;
}

/* iframe防溢出 */
iframe, video, embed, object {
    max-width: 100%;
}

/* ========================================
   移动端基础样式 (max-width: 768px)
======================================== */

@media (max-width: 768px) {
    
    /* 强制所有元素不超出屏幕 */
    * {
        max-width: 100% !important;
    }
    
    /* 排除特定元素 */
    .carousel-btn,
    .indicator,
    .icon,
    svg {
        max-width: none !important;
    }
    
    /* 容器 */
    .container {
        padding: 0 12px;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* ========== 头部导航 ========== */
    .header {
        position: sticky;
        top: 0;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .header-inner {
        height: 56px;
        padding: 0 12px;
        justify-content: flex-start !important;
        position: relative !important;
    }
    
    .logo {
        gap: 6px;
        margin: 0 !important;
        margin-left: 36px !important;
        position: static !important;
    }
    
    .header-actions {
        display: none !important;
    }
    
    .mobile-custom-icon,
    .mobile-icon-1,
    .mobile-icon-2,
    .mobile-icon-3 {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        max-width: 28px !important;
        max-height: 28px !important;
        border-radius: 50% !important;
        overflow: hidden !important;
        text-decoration: none !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        background: transparent !important;
    }
    
    .mobile-custom-icon img,
    .mobile-icon-1 img,
    .mobile-icon-2 img,
    .mobile-icon-3 img {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        max-width: 28px !important;
        max-height: 28px !important;
        object-fit: cover !important;
        border-radius: 50% !important;
        display: block !important;
        background: transparent !important;
    }
    
    /* 从右到左：搜索 → 用户 → 图标3 → 图标2 → 图标1 */
    .mobile-icon-1 { right: 120px !important; }
    .mobile-icon-2 { right: 92px !important; }
    .mobile-icon-3 { right: 64px !important; }
    
    .mobile-user-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: absolute !important;
        right: 36px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 24px;
        height: 24px;
        background: #e5e7eb;
        border-radius: 50%;
        border: 1px solid #d1d5db;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        text-decoration: none;
    }
    
    .mobile-user-btn svg {
        width: 14px;
        height: 14px;
        color: #6b7280;
    }
    
    .mobile-search-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: absolute !important;
        right: 10px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 24px;
        height: 24px;
        background: transparent;
        border-radius: 50%;
        border: none;
        text-decoration: none;
    }
    
    .mobile-search-btn svg {
        width: 16px;
        height: 16px;
        color: #6b7280;
    }
    
    .logo-icon, .logo-img {
        width: 40px !important;
        height: 40px !important;
        font-size: 32px;
    }
    
    .logo-text {
        font-size: 22px;
    }
    
    .main-nav {
        display: none;
    }
    
    /* 移动端菜单按钮 */
    .mobile-menu-btn {
        display: flex !important;
        position: absolute !important;
        left: 12px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 32px;
        height: 32px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 4px;
    }
    
    .mobile-menu-btn span {
        display: block;
        width: 100%;
        height: 2px;
        background: #374151;
        border-radius: 2px;
        transition: all 0.3s;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    /* ========== 移动端侧边菜单 ========== */
    .mobile-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 300px;
        bottom: 0;
        background: #fff;
        z-index: 1001;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        padding: 0;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
        border-radius: 16px 0 0 16px;
    }
    
    .mobile-nav.active {
        transform: translateX(0);
    }
    
    /* 侧边菜单头部 */
    .mobile-nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px;
        background: #fff;
    }
    
    .mobile-nav-logo {
        display: flex;
        align-items: center;
        gap: 12px;
        text-decoration: none;
        color: inherit;
    }
    
    .mobile-nav-logo-img {
        width: 40px;
        height: 40px;
        object-fit: contain;
        border-radius: 10px;
    }
    
    .mobile-nav-logo-icon {
        font-size: 32px;
        line-height: 1;
    }
    
    .mobile-nav-logo-info {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    
    .mobile-nav-logo-text {
        font-size: 18px;
        font-weight: 700;
        color: #1f2937;
        line-height: 1.2;
    }
    
    .mobile-nav-logo-slogan {
        font-size: 11px;
        color: #9ca3af;
        letter-spacing: 0.5px;
    }
    
    .mobile-nav-close {
        width: 32px;
        height: 32px;
        border: 1px solid #e5e7eb;
        background: #fff;
        border-radius: 50%;
        font-size: 20px;
        line-height: 1;
        color: #6b7280;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }
    
    .mobile-nav-close:hover,
    .mobile-nav-close:active {
        background: #f3f4f6;
        color: #1f2937;
    }
    
    /* 登入按钮区域 */
    .mobile-nav-auth {
        display: flex;
        gap: 12px;
        padding: 0 20px 20px;
    }
    
    .mobile-nav-auth-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex: 1;
        padding: 14px 20px;
        background: #3b82f6;
        color: #fff;
        text-decoration: none;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 600;
        transition: all 0.2s;
    }
    
    .mobile-nav-auth-btn.mobile-nav-auth-single {
        flex: none;
        width: 100%;
    }
    
    .mobile-nav-auth-btn.mobile-nav-auth-login {
        background: #3b82f6;
    }
    
    .mobile-nav-auth-btn.mobile-nav-auth-register {
        background: linear-gradient(135deg, #8b5cf6, #a855f7);
    }
    
    .mobile-nav-auth-btn:hover,
    .mobile-nav-auth-btn:active {
        opacity: 0.9;
        transform: translateY(-1px);
    }
    
    .mobile-nav-auth-btn .auth-icon {
        font-size: 16px;
    }
    
    /* 菜单列表 */
    .mobile-nav-menu {
        flex: 1;
        padding: 0;
    }
    
    .mobile-nav-item {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 16px 24px;
        color: #374151;
        text-decoration: none;
        font-size: 15px;
        font-weight: 500;
        transition: all 0.2s;
        border-left: 3px solid transparent;
    }
    
    .mobile-nav-item:hover,
    .mobile-nav-item:active {
        background: #f0f9ff;
        color: #3b82f6;
    }
    
    .mobile-nav-item.active {
        background: #eff6ff;
        color: #3b82f6;
        border-left-color: #3b82f6;
    }
    
    .mobile-nav-item .icon {
        font-size: 20px;
        width: 24px;
        text-align: center;
    }
    
    .mobile-nav-item .nav-icon {
        width: 22px;
        height: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .mobile-nav-item .nav-icon svg {
        width: 20px;
        height: 20px;
        color: #6b7280;
        transition: color 0.2s;
    }
    
    .mobile-nav-item:hover .nav-icon svg,
    .mobile-nav-item.active .nav-icon svg {
        color: #3b82f6;
    }
    
    .mobile-nav-divider {
        height: 1px;
        background: #f3f4f6;
        margin: 8px 20px;
    }
    
    /* 底部区域 */
    .mobile-nav-footer {
        padding: 20px;
        border-top: 1px solid #f3f4f6;
        text-align: center;
    }
    
    .mobile-nav-social {
        display: flex;
        justify-content: center;
        gap: 16px;
        margin-bottom: 16px;
    }
    
    .mobile-nav-social .social-link {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f3f4f6;
        border-radius: 50%;
        color: #6b7280;
        transition: all 0.2s;
    }
    
    .mobile-nav-social .social-link:hover {
        background: #3b82f6;
        color: #fff;
    }
    
    .mobile-nav-copyright {
        font-size: 12px;
        color: #9ca3af;
    }
    
    /* 移动端菜单遮罩 */
    .mobile-nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .mobile-nav-overlay.active {
        display: block;
        opacity: 1;
    }
    
    /* ========== 市场行情条 ========== */
    .market-bar {
        padding: 8px 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    .market-bar .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .market-ticker {
        flex-wrap: nowrap;
        gap: 16px;
        padding: 0 12px;
        width: max-content;
        min-width: 100%;
    }
    
    .ticker-item {
        flex-shrink: 0;
        font-size: 12px;
        padding: 6px 10px;
    }
    
    /* ========== 广告位 ========== */
    .ad-top, .ad-bottom {
        padding: 8px 0;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        display: block !important;
    }
    
    .ad-slot {
        border-radius: 12px;
        margin: 0 12px 16px;
        width: calc(100% - 24px) !important;
        max-width: calc(100% - 24px) !important;
        overflow: hidden !important;
        background: #fff;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }
    
    .ad-slot.ad-top {
        width: 100% !important;
        max-width: 430px !important;
        height: 142px !important;
        margin: 8px auto !important;
        padding: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        overflow: hidden !important;
        display: flex !important;
        justify-content: center !important;
        position: relative !important;
        z-index: auto !important;
        pointer-events: auto !important;
    }
    
    .ad-slot.ad-top * {
        pointer-events: auto !important;
    }
    
    .ad-slot.ad-top .ad-container {
        width: 100% !important;
        display: block !important;
    }
    
    .ad-slot.ad-top .ad-placeholder {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* 隐藏空的ad-image-wrapper */
    .ad-slot.ad-top .ad-image-wrapper:empty {
        display: none !important;
    }
    
    .ad-slot.ad-top .ad-image-wrapper,
    .ad-slot.ad-top .ad-carousel {
        width: 100% !important;
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .ad-slot.ad-top .ad-image-wrapper img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .ad-slot.ad-top .ad-image-wrapper a {
        display: block !important;
        line-height: 0 !important;
    }
    
    /* 移动端轮播广告 - 固定430x142 */
    .ad-slot.ad-top .ad-container,
    .ad-slot.ad-top .ad-carousel {
        width: 430px !important;
        max-width: 100% !important;
        height: 142px !important;
        margin: 0 auto !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    
    .ad-slot.ad-top .ad-carousel-wrapper {
        width: 430px !important;
        max-width: 100% !important;
        height: 142px !important;
        position: relative !important;
        overflow: hidden !important;
    }
    
    .ad-slot.ad-top .ad-carousel-slides {
        width: 430px !important;
        height: 142px !important;
        position: relative !important;
    }
    
    .ad-slot.ad-top .ad-carousel-slide {
        width: 430px !important;
        max-width: 100% !important;
        height: 142px !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }
    
    .ad-slot.ad-top .ad-carousel-slide:not(.active) {
        display: none !important;
    }
    
    .ad-slot.ad-top .ad-carousel-slide.active {
        display: block !important;
    }
    
    .ad-slot.ad-top .ad-carousel-slide img,
    .ad-slot.ad-top .ad-image-wrapper img {
        width: 430px !important;
        max-width: 100% !important;
        height: 142px !important;
        display: block !important;
        object-fit: fill !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .ad-slot.ad-top .ad-carousel-dots {
        position: absolute;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 5;
    }
    
    /* 确保页面内容可点击 */
    .main-content,
    .container,
    .page-section,
    .block-news,
    .headline-center,
    .news-tabs,
    .news-tab {
        position: relative !important;
        z-index: 1 !important;
        pointer-events: auto !important;
    }
    
    .news-tab {
        cursor: pointer !important;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1) !important;
    }
    
    .ad-slot.ad-top .ad-container,
    .ad-slot.ad-top .ad-code-wrapper,
    .ad-slot.ad-top .ad-image-wrapper,
    .ad-slot .ad-container,
    .ad-slot .ad-code-wrapper,
    .ad-slot .ad-image-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }
    
    .ad-slot.ad-top iframe,
    .ad-slot.ad-top ins,
    .ad-slot.ad-top img,
    .ad-slot iframe,
    .ad-slot ins,
    .ad-slot img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        border-radius: 0;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .ad-placeholder {
        height: 100px !important;
        font-size: 12px;
        border-radius: 12px;
    }
    
    /* ========== 主内容区 ========== */
    .main-content {
        padding: 12px 0;
    }
    
    .grid-layout {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    .sidebar {
        display: none;
    }
    
    /* ========== 新闻卡片 ========== */
    .news-card {
        border-radius: 12px;
        margin-bottom: 12px;
    }
    
    .news-card-image {
        height: 180px;
    }
    
    .news-card-content {
        padding: 14px;
    }
    
    .news-card-title {
        font-size: 16px;
        line-height: 1.4;
        -webkit-line-clamp: 2;
    }
    
    .news-card-summary {
        display: none;
    }
    
    .news-card-meta {
        font-size: 12px;
    }
    
    /* 新闻列表项 */
    .news-item {
        padding: 12px;
        gap: 12px;
    }
    
    .news-item-image {
        width: 100px;
        height: 70px;
        border-radius: 8px;
    }
    
    .news-item-title {
        font-size: 15px;
        -webkit-line-clamp: 2;
    }
    
    /* ========== 头条区域 ========== */
    .headline-section,
    .headline-section-v2 {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    .headline-left,
    .headline-right {
        display: none !important;
    }
    
    .headline-left .ad-slot-small {
        display: none !important;
    }
    
    .headline-center {
        border: none !important;
        padding: 0 !important;
    }
    
    .news-tabs {
        padding: 0 12px;
        gap: 0;
    }
    
    .news-tab {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    /* ========== 双栏布局 ========== */
    .dual-columns,
    .news-dual-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .dual-column {
        padding: 16px;
    }
    
    .dual-column-title {
        font-size: 18px;
    }
    
    /* ========== Widget 组件 ========== */
    .widget {
        border-radius: 12px;
        margin-bottom: 16px;
    }
    
    .widget-header,
    .widget-header-fancy,
    .ranking-header {
        padding: 12px 16px;
    }
    
    .widget-content {
        padding: 12px;
    }
    
    /* ========== 行情页面 ========== */
    .market-layout {
        grid-template-columns: 1fr !important;
    }
    
    .market-left,
    .market-right {
        width: 100%;
    }
    
    .index-card {
        padding: 16px;
    }
    
    .chart-container {
        height: 250px;
    }
    
    /* 热门排行 */
    .hot-ranking-table th,
    .hot-ranking-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    /* ========== 新闻详情页 ========== */
    .article-header h1 {
        font-size: 22px;
        line-height: 1.4;
    }
    
    .article-meta {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 13px;
    }
    
    .article-content {
        font-size: 16px;
        line-height: 1.8;
    }
    
    /* 详情页内容区域强制不溢出 */
    .article-content,
    .news-content,
    .content-body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
    }
    
    /* 图片强制自适应 */
    .article-content img,
    .news-content img,
    .content-body img,
    .article-content img[style],
    .news-content img[style],
    .content-body img[style] {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 16px 0;
        border-radius: 6px;
        display: block !important;
    }
    
    .article-content figure,
    .news-content figure {
        margin: 16px 0;
        width: 100% !important;
    }
    
    .article-cover img {
        width: 100%;
        height: auto;
        border-radius: 0;
    }
    
    /* 段落文字 */
    .article-content p,
    .news-content p,
    .content-body p {
        word-wrap: break-word !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        line-height: 1.8;
    }
    
    /* 表格滚动处理 */
    .article-content table,
    .news-content table,
    .content-body table {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    /* iframe视频自适应 */
    .article-content iframe,
    .news-content iframe,
    .content-body iframe {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 200px;
    }
    
    /* 视频自适应 */
    .article-content video,
    .news-content video,
    .content-body video {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* 代码块换行 */
    .article-content pre,
    .article-content code,
    .news-content pre,
    .news-content code {
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
        max-width: 100% !important;
        overflow-x: auto !important;
    }
    
    /* ========== 专家观点 ========== */
    .expert-grid {
        grid-template-columns: 1fr !important;
    }
    
    .expert-card {
        padding: 16px;
    }
    
    /* ========== 产业版块表格 ========== */
    .industry-section {
        overflow: hidden;
    }
    
    .industry-tabs {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .industry-tabs .tab-group {
        flex-wrap: nowrap;
    }
    
    .industry-tabs .update-time {
        font-size: 11px;
        width: 100%;
        text-align: right;
        margin-top: 4px;
    }
    
    .industry-table {
        font-size: 11px !important;
        table-layout: fixed;
        width: 100%;
    }
    
    .industry-table th {
        padding: 6px 4px !important;
        font-size: 10px !important;
        white-space: nowrap;
    }
    
    .industry-table td {
        padding: 8px 4px !important;
        vertical-align: middle;
    }
    
    /* 隐藏部分列 */
    .industry-table th:nth-child(4),
    .industry-table td:nth-child(4),
    .industry-table th:nth-child(5),
    .industry-table td:nth-child(5) {
        display: none; /* 隐藏成交额和大盘占比 */
    }
    
    .industry-table .ind-name {
        font-size: 12px;
        max-width: 50px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .industry-table .ind-name a {
        font-size: 12px;
    }
    
    .industry-table .ind-change {
        font-size: 11px;
        white-space: nowrap;
    }
    
    .ind-bar-cell {
        width: 80px !important;
        min-width: 80px !important;
        max-width: 80px !important;
    }
    
    .ind-bar {
        height: 16px !important;
        font-size: 9px !important;
    }
    
    .ind-bar span {
        padding: 0 2px !important;
        font-size: 9px !important;
        line-height: 16px !important;
    }
    
    .ind-leader {
        font-size: 10px !important;
        max-width: 40px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .ind-leader a {
        font-size: 10px !important;
    }
    
    .ind-leader-change {
        font-size: 10px !important;
        white-space: nowrap;
    }
    
    /* ========== 股票排行 ========== */
    .ranking-table {
        font-size: 13px;
    }
    
    .ranking-table th,
    .ranking-table td {
        padding: 10px 8px;
    }
    
    /* ========== 登录/注册页 ========== */
    .auth-container {
        padding: 20px 16px;
    }
    
    .auth-card {
        padding: 24px 20px;
        border-radius: 16px;
    }
    
    .auth-title {
        font-size: 24px;
    }
    
    .form-input {
        padding: 14px 16px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .auth-btn {
        padding: 14px;
        font-size: 16px;
    }
    
    /* ========== 页脚 ========== */
    .footer-anue {
        padding: 16px 0;
    }
    
    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }
    
    .footer-nav a {
        font-size: 11px;
    }
    
    .footer-copyright {
        font-size: 11px;
    }
    
    .footer-social {
        justify-content: center;
        gap: 12px;
    }
    
    .social-item {
        flex-direction: column;
    }
    
    .social-label {
        font-size: 9px;
    }
    
    .social-icon,
    .social-qr,
    .social-custom-icon {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
    }
    
    .social-icon.yt {
        font-size: 18px !important;
        padding-left: 3px !important;
    }
    
    .social-custom-icon.social-yt {
        padding: 2px !important;
        padding-left: 3px !important;
    }
    
    /* ========== 隐私弹窗 ========== */
    .privacy-consent {
        padding: 12px 16px;
    }
    
    .privacy-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .privacy-text {
        flex-direction: column;
    }
    
    .privacy-actions {
        width: 100%;
        justify-content: center;
    }
    
    /* ========== 触摸优化 ========== */
    a, button, .clickable {
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
    
    /* 按钮触摸反馈 */
    .btn:active,
    .auth-btn:active,
    .nav-link:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    /* 禁用长按菜单 */
    img {
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }
    
    /* 滚动条美化 */
    ::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }
    
    ::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    ::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 4px;
    }
}

/* ========================================
   超小屏幕 (max-width: 480px)
======================================== */

@media (max-width: 480px) {
    
    .container {
        padding: 0 10px;
    }
    
    .news-card-image {
        height: 150px;
    }
    
    .news-item-image {
        width: 80px;
        height: 56px;
    }
    
    .article-header h1 {
        font-size: 20px;
    }
    
    .footer-nav a {
        font-size: 10px;
    }
    
    .footer-nav span {
        display: none;
    }
    
    .footer-nav {
        gap: 4px;
    }
    
    .footer-nav a::after {
        content: '|';
        margin-left: 4px;
        color: #555;
    }
    
    .footer-nav a:last-child::after {
        display: none;
    }
}

/* ========================================
   横屏模式
======================================== */

@media (max-width: 768px) and (orientation: landscape) {
    .header-inner {
        height: 48px;
    }
    
    .chart-container {
        height: 200px;
    }
    
    .news-card-image {
        height: 120px;
    }
}

/* ========================================
   安全区域 (iPhone X 等刘海屏)
======================================== */

@supports (padding-top: env(safe-area-inset-top)) {
    .header {
        padding-top: env(safe-area-inset-top);
    }
    
    .footer-anue {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
    
    .mobile-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .privacy-consent {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

/* ========================================
   移动端间距优化
======================================== */
@media (max-width: 768px) {
    .page-section {
        padding: 0 !important;
    }
    
    .two-blocks-container {
        gap: 0 !important;
    }
    
    .block-news,
    .block-market {
        margin-bottom: 0 !important;
        padding: 0 !important;
    }
    
    .grid-layout {
        gap: 0 !important;
        margin-top: 0 !important;
    }
    
    .headline-section-v2 {
        gap: 0 !important;
    }
    
    .headline-ad-bar {
        margin: 2px 0 !important;
    }
    
    .news-timeline {
        padding: 0 !important;
    }
    
    .timeline-item {
        padding: 3px 0 !important;
    }
    
    .main-content {
        padding: 0 !important;
    }
    
    .container {
        padding: 0 8px !important;
    }
}

