/**
 * 首页样式
 */

/* 顶部Header区域 */
.home-header {
    position: relative;
    width: 100%;
    height: 173px;
    overflow: hidden;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%), 
                linear-gradient(90deg, rgb(198, 31, 13) 0%, rgb(198, 31, 13) 100%);
    z-index: 0;
}

.header-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    padding: 20px;
    height: 77px;
}

.logo-wrapper {
    width: 42px;
    height: 42px;
    margin-right: 12px;
}

.app-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-title {
    font-size: 20px;
    font-weight: 500;
    color: #fff;
    margin: 0;
}

.search-banner {
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 56px;
    z-index: 1;
}

.search-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 广告Banner */
.ad-banner-section {
    padding: 15px 16px;
}

.ad-banner {
    width: 100%;
}

.ad-banner-img {
    width: 100%;
    height: auto;
}

/* 快捷入口 */
.quick-access {
    padding: 10px 35px 20px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s;
}

.quick-item:active {
    opacity: 0.7;
}

.quick-icon {
    width: 55px;
    height: 55px;
    margin-bottom: 10px;
    object-fit: contain;
}

.quick-label {
    font-size: 10px;
    font-weight: 600;
    color: #777575;
    text-align: center;
    line-height: 1.4;
}

/* 数据统计/视频 */
.data-stats {
    padding: 0 8px 20px;
}

.stats-chart {
    width: 100%;
    height: auto;
    border-radius: 8px;
    overflow: hidden;
}

.chart-img,
.promo-video {
    width: 100%;
    height: auto;
    display: block;
}

/* 新闻预览区域 */
.news-section {
    padding: 0 16px 100px;
}

.section-header {
    position: relative;
    margin-bottom: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 500;
    color: #000;
    margin: 0;
}

.title-indicator {
    position: absolute;
    left: 66px;
    top: 8px;
    width: 3px;
    height: 11px;
    background-color: #c61f0d;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
}

.news-thumb {
    width: 73px;
    height: 48px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-title {
    font-size: 12px;
    font-weight: 500;
    color: #000;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-desc {
    font-size: 9px;
    color: #8f8d8d;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 底部导航样式（在common.css中会定义基础样式） */
.page-header {
    display: none; /* 首页不显示标题栏 */
}

/* 适配底部导航 */
.page-content {
    padding-bottom: 0;
}

/* ========== 响应式设计 ========== */

/* 超小屏 (<320px) - 整体缩小 */
@media (max-width: 319px) {
    .home-header {
        height: 140px;
    }

    .header-content {
        padding: 15px;
        height: 60px;
    }

    .logo-wrapper {
        width: 34px;
        height: 34px;
        margin-right: 10px;
    }

    .app-title {
        font-size: 16px;
    }

    .search-banner {
        left: 12px;
        right: 12px;
        height: 45px;
    }

    .quick-access {
        padding: 8px 25px 15px;
    }

    .quick-grid {
        gap: 15px;
    }

    .quick-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 8px;
    }

    .quick-label {
        font-size: 9px;
    }

    .data-stats {
        padding: 0 8px 15px;
    }

    .stats-chart {
        height: auto;
    }

    .news-section {
        padding: 0 12px 80px;
    }

    .section-title {
        font-size: 14px;
    }

    .title-indicator {
        left: 58px;
        top: 7px;
        width: 2px;
        height: 10px;
    }

    .news-item {
        gap: 12px;
        padding: 10px 0;
    }

    .news-thumb {
        width: 58px;
        height: 38px;
    }

    .news-title {
        font-size: 11px;
    }

    .news-desc {
        font-size: 8px;
    }
}

/* 小屏手机 (320-374px) - 适度缩小 */
@media (min-width: 320px) and (max-width: 374px) {
    .home-header {
        height: 155px;
    }

    .header-content {
        padding: 18px;
        height: 68px;
    }

    .logo-wrapper {
        width: 38px;
        height: 38px;
        margin-right: 11px;
    }

    .app-title {
        font-size: 18px;
    }

    .search-banner {
        left: 14px;
        right: 14px;
        height: 50px;
    }

    .quick-access {
        padding: 9px 30px 18px;
    }

    .quick-grid {
        gap: 18px;
    }

    .quick-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 9px;
    }

    .quick-label {
        font-size: 9.5px;
    }

    .data-stats {
        padding: 0 8px 18px;
    }

    .stats-chart {
        height: auto;
    }

    .news-section {
        padding: 0 14px 90px;
    }

    .section-title {
        font-size: 15px;
    }

    .title-indicator {
        left: 62px;
        top: 7.5px;
        width: 2.5px;
        height: 10.5px;
    }

    .news-item {
        gap: 14px;
        padding: 11px 0;
    }

    .news-thumb {
        width: 66px;
        height: 43px;
    }

    .news-title {
        font-size: 11.5px;
    }

    .news-desc {
        font-size: 8.5px;
    }
}

/* 标准屏 (375-413px) - 保持原始设计 */
@media (min-width: 375px) and (max-width: 413px) {
    /* 保持原始样式，无需修改 */
}

/* 大屏手机 (414px-767px) - 居中显示，适度放大 */
@media (min-width: 414px) and (max-width: 767px) {
    .home-header {
        height: 190px;
    }

    .header-content {
        padding: 22px;
        height: 85px;
    }

    .logo-wrapper {
        width: 46px;
        height: 46px;
        margin-right: 13px;
    }

    .app-title {
        font-size: 22px;
    }

    .search-banner {
        left: 50%;
        transform: translateX(-50%);
        width: 343px;
        height: 62px;
    }

    .quick-access {
        padding: 11px 40px 22px;
    }

    .quick-grid {
        gap: 22px;
    }

    .quick-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 11px;
    }

    .quick-label {
        font-size: 10.5px;
    }

    .data-stats {
        padding: 0 8px 22px;
    }

    .stats-chart {
        height: auto;
    }

    .news-section {
        padding: 0 18px 110px;
    }

    .section-title {
        font-size: 17px;
    }

    .title-indicator {
        left: 70px;
        top: 8.5px;
        width: 3.5px;
        height: 12px;
    }

    .news-item {
        gap: 18px;
        padding: 13px 0;
    }

    .news-thumb {
        width: 80px;
        height: 53px;
    }

    .news-title {
        font-size: 12.5px;
    }

    .news-desc {
        font-size: 9.5px;
    }
}

/* 平板 (768px-1023px) - 居中显示，增加阴影效果 */
@media (min-width: 768px) and (max-width: 1023px) {
    .page-content {
        max-width: 450px;
        margin: 0 auto;
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
        border-radius: 8px;
        overflow: hidden;
    }

    .home-header {
        height: 210px;
    }

    .header-content {
        padding: 25px;
        height: 94px;
    }

    .logo-wrapper {
        width: 50px;
        height: 50px;
        margin-right: 14px;
    }

    .app-title {
        font-size: 24px;
    }

    .search-banner {
        left: 50%;
        transform: translateX(-50%);
        width: 400px;
        height: 68px;
    }

    .ad-banner-section {
        padding: 17px 20px;
    }

    .quick-access {
        padding: 12px 45px 25px;
    }

    .quick-grid {
        gap: 25px;
    }

    .quick-icon {
        width: 65px;
        height: 65px;
        margin-bottom: 12px;
    }

    .quick-label {
        font-size: 11px;
    }

    .data-stats {
        padding: 0 8px 25px;
    }

    .stats-chart {
        height: auto;
    }

    .news-section {
        padding: 0 20px 120px;
    }

    .section-title {
        font-size: 18px;
    }

    .title-indicator {
        left: 74px;
        top: 9px;
        width: 4px;
        height: 13px;
    }

    .news-item {
        gap: 20px;
        padding: 14px 0;
    }

    .news-thumb {
        width: 87px;
        height: 58px;
    }

    .news-title {
        font-size: 13px;
    }

    .news-desc {
        font-size: 10px;
    }
}

/* 桌面端 (1024px+) - 固定宽度，居中显示 */
@media (min-width: 1024px) {
    .page-content {
        max-width: 375px;
        margin: 0 auto;
        box-shadow: 0 0 30px rgba(0,0,0,0.15);
        border-radius: 12px;
        overflow: hidden;
    }

    /* 保持原始375px设计尺寸 */
    .home-header {
        height: 173px;
    }

    .header-content {
        padding: 20px;
        height: 77px;
    }

    .logo-wrapper {
        width: 42px;
        height: 42px;
        margin-right: 12px;
    }

    .app-title {
        font-size: 20px;
    }

    .search-banner {
        left: 16px;
        right: 16px;
        height: 56px;
    }

    .ad-banner-section {
        padding: 15px 16px;
    }

    .quick-access {
        padding: 10px 35px 20px;
    }

    .quick-grid {
        gap: 20px;
    }

    .quick-icon {
        width: 55px;
        height: 55px;
        margin-bottom: 10px;
    }

    .quick-label {
        font-size: 10px;
    }

    .data-stats {
        padding: 0 8px 20px;
    }

    .stats-chart {
        height: auto;
    }

    .news-section {
        padding: 0 16px 100px;
    }

    .section-title {
        font-size: 16px;
    }

    .title-indicator {
        left: 66px;
        top: 8px;
        width: 3px;
        height: 11px;
    }

    .news-item {
        gap: 16px;
        padding: 12px 0;
    }

    .news-thumb {
        width: 73px;
        height: 48px;
    }

    .news-title {
        font-size: 12px;
    }

    .news-desc {
        font-size: 9px;
    }
}

/* 横屏模式优化 */
@media (orientation: landscape) and (max-height: 500px) {
    .home-header {
        height: 120px;
    }

    .header-content {
        height: 50px;
    }

    .logo-wrapper {
        width: 30px;
        height: 30px;
    }

    .app-title {
        font-size: 16px;
    }

    .search-banner {
        height: 35px;
    }

    .quick-access {
        padding: 5px 25px 10px;
    }

    .quick-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 5px;
    }

    .quick-label {
        font-size: 8px;
    }

    .data-stats {
        padding: 0 8px 10px;
    }

    .stats-chart {
        height: auto;
    }

    .news-section {
        padding: 0 16px 60px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .quick-item {
        transition: opacity 0.2s;
    }

    .quick-item:active {
        opacity: 0.6;
        transform: scale(0.95);
    }

    .news-item {
        transition: background-color 0.2s;
    }

    .news-item:active {
        background-color: rgba(198, 31, 13, 0.05);
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .app-logo,
    .search-banner-img,
    .ad-banner-img,
    .chart-img,
    .news-thumb,
    .quick-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    .quick-item,
    .news-item {
        transition: none;
    }
}

