/* 移动端响应式设计优化 */
/* Mobile Responsive Design Optimization */

/* CSS变量定义 */
:root {
    --mobile-header-height: 70px;
    --tablet-header-height: 80px;
    --desktop-header-height: 100px;
    --touch-target-size: 44px;
    --mobile-font-scale: 0.9;
    --tablet-font-scale: 0.95;
}

/* 基础响应式重置 */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* 视口高度变量 */
html {
    --vh: 1vh;
}

/* 设备特定样式 */
.device-small-mobile {
    --header-height: var(--mobile-header-height);
    font-size: calc(16px * var(--mobile-font-scale));
}

.device-mobile {
    --header-height: var(--mobile-header-height);
    font-size: calc(16px * var(--mobile-font-scale));
}

.device-tablet {
    --header-height: var(--tablet-header-height);
    font-size: calc(16px * var(--tablet-font-scale));
}

.device-desktop-small,
.device-desktop-large {
    --header-height: var(--desktop-header-height);
}

/* 触摸设备优化 */
.touch-supported {
    /* 增加触摸目标大小 */
}

.touch-supported a,
.touch-supported button,
.touch-supported .clickable {
    min-height: var(--touch-target-size);
    min-width: var(--touch-target-size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
}

.touch-supported .main-nav a {
    padding: 12px 16px;
}

/* 超小屏幕设备优化 (≤360px) */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }
    
    .site-title h1 {
        font-size: 16px;
        line-height: 1.2;
    }
    
    .site-title h2 {
        font-size: 11px;
    }
    
    .hero-slider {
        height: 200px;
    }
    
    .slide-content h2 {
        font-size: 1.2rem;
    }
    
    .slide-content p {
        font-size: 0.8rem;
    }
    
    .data-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .quick-access-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .mobile-nav {
        width: 100%;
        right: -100%;
    }
    
    .mobile-nav.active {
        right: 0;
    }
}

/* 小屏幕移动设备优化 (≤480px) */
@media (max-width: 480px) {
    /* 头部优化 */
    .header {
        height: var(--mobile-header-height);
        padding: 0 10px;
    }
    
    .header-container {
        height: var(--mobile-header-height);
        padding: 0 10px;
    }
    
    .site-title h1 {
        font-size: 18px;
        line-height: 1.2;
    }
    
    .site-title h2 {
        font-size: 12px;
        margin-top: 2px;
    }
    
    /* 移动端导航触发按钮优化 */
    .mobile-nav-trigger {
        width: 45px;
        height: 45px;
        top: 12px;
        right: 15px;
        font-size: 16px;
    }
    
    /* 轮播图优化 */
    .hero-slider {
        height: 250px;
        margin-top: var(--mobile-header-height);
    }
    
    .slide-content {
        width: 90%;
        padding: 0 15px;
    }
    
    .slide-content h2 {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    .slide-content p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
        line-height: 1.4;
    }
    
    /* 轮播图控制按钮 */
    .prev-btn,
    .next-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .slider-controls {
        padding: 0 10px;
    }
    
    /* 指示器优化 */
    .indicator {
        width: 10px;
        height: 10px;
    }
    
    .slider-indicators {
        gap: 8px;
        bottom: 15px;
    }
    
    /* 数据展示模块 */
    .data-showcase {
        padding: 30px 0;
    }
    
    .data-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 15px;
    }
    
    .data-item {
        padding: 15px 10px;
        text-align: center;
    }
    
    .data-number {
        font-size: 1.8rem;
        margin-bottom: 5px;
    }
    
    .data-label {
        font-size: 12px;
        line-height: 1.3;
    }
    
    /* 新闻区域 */
    .news-section {
        padding: 30px 0;
    }
    
    .section-header {
        margin-bottom: 20px;
        padding: 0 15px;
    }
    
    .section-header h2 {
        font-size: 20px;
        margin-bottom: 5px;
    }
    
    .en-title {
        font-size: 12px;
    }
    
    /* 公告栏优化 */
    .announcement-wrapper {
        margin: 0 15px;
        padding: 12px 15px;
        height: auto;
        flex-direction: column;
        gap: 10px;
    }
    
    .announcement-icon {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-right: 0;
        padding-bottom: 10px;
        width: 100%;
        justify-content: center;
    }
    
    .announcement-content {
        margin: 0;
        height: auto;
    }
    
    .announcement-item {
        position: static;
        height: auto;
        padding: 8px 0;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .announcement-date {
        width: 100%;
        text-align: right;
        font-size: 11px;
    }
    
    .announcement-more {
        width: 100%;
        justify-content: center;
        padding-top: 10px;
        border-top: 1px solid var(--border-color);
        font-size: 13px;
    }
    
    /* 新闻容器 */
    .news-container {
        flex-direction: column;
        gap: 20px;
        padding: 0 15px;
    }
    
    .news-carousel {
        width: 100%;
    }
    
    .news-list {
        width: 100%;
    }
    
    .news-item {
        padding: 12px 0;
        gap: 12px;
    }
    
    .news-number {
        font-size: 14px;
        padding: 4px 8px;
        min-width: 24px;
        height: 24px;
        line-height: 16px;
    }
    
    .news-title {
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 4px;
    }
    
    .news-date {
        font-size: 11px;
    }
    
    /* 快速入口 */
    .quick-access {
        padding: 30px 0;
    }
    
    .quick-access-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 15px;
    }
    
    .quick-access-item {
        padding: 15px 12px;
        border-radius: 6px;
    }
    
    .quick-access-item i {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .quick-access-item h3 {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .quick-access-item p {
        font-size: 11px;
        line-height: 1.3;
    }
    
    /* 活动资讯 */
    .activity-section {
        padding: 30px 0;
    }
    
    .activity-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 15px;
    }
    
    .activity-card {
        border-radius: 6px;
    }
    
    .activity-image {
        height: 160px;
    }
    
    .activity-content {
        padding: 12px;
    }
    
    .activity-content h3 {
        font-size: 15px;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .activity-info p {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    /* 行业动态 */
    .industry-trends {
        padding: 30px 0;
    }
    
    .trends-list {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 15px;
    }
    
    .trend-item {
        height: auto;
        flex-direction: column;
    }
    
    .trend-image {
        height: 150px;
        width: 100%;
    }
    
    .trend-content {
        padding: 12px;
    }
    
    .trend-meta {
        gap: 8px;
        margin-bottom: 8px;
        flex-wrap: wrap;
    }
    
    .trend-category {
        font-size: 11px;
        padding: 2px 8px;
    }
    
    .trend-date {
        font-size: 11px;
    }
    
    .trend-content h3 {
        font-size: 14px;
        margin-bottom: 6px;
        line-height: 1.3;
    }
    
    .trend-content p {
        font-size: 12px;
        margin-bottom: 8px;
        line-height: 1.4;
    }
    
    .read-more {
        font-size: 12px;
    }
    
    /* 合作单位 */
    .partners {
        padding: 30px 0;
    }
    
    .partners-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 15px;
    }
    
    .partner-item {
        padding: 12px;
        gap: 12px;
    }
    
    .partner-icon {
        width: 45px;
        height: 45px;
    }
    
    .partner-icon img {
        max-width: 30px;
        max-height: 30px;
    }
    
    .partner-info h3 {
        font-size: 14px;
        margin-bottom: 3px;
    }
    
    .partner-info p {
        font-size: 11px;
    }
    
    /* 页脚 */
    .footer {
        padding: 30px 0 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px;
        padding: 0 15px;
    }
    
    .footer-section h4 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .footer-section ul li {
        margin-bottom: 6px;
    }
    
    .footer-section a {
        font-size: 14px;
    }
    
    .footer-bottom {
        padding: 15px;
        font-size: 12px;
    }
}

/* 中等移动设备优化 (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .header {
        height: var(--mobile-header-height);
    }
    
    .header-container {
        height: var(--mobile-header-height);
    }
    
    .hero-slider {
        height: 300px;
        margin-top: var(--mobile-header-height);
    }
    
    .slide-content h2 {
        font-size: 1.6rem;
    }
    
    .slide-content p {
        font-size: 0.95rem;
    }
    
    .data-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .quick-access-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .news-container {
        flex-direction: column;
        gap: 25px;
    }
    
    .trends-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* 平板设备优化 (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .header {
        height: var(--tablet-header-height);
    }
    
    .header-container {
        height: var(--tablet-header-height);
    }
    
    .hero-slider {
        height: 400px;
        margin-top: var(--tablet-header-height);
    }
    
    .data-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }
    
    .quick-access-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trends-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* 小桌面设备优化 (1025px - 1200px) */
@media (min-width: 1025px) and (max-width: 1200px) {
    .container {
        max-width: 1000px;
    }
    
    .quick-access-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .trends-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .partners-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 大桌面设备优化 (≥1201px) */
@media (min-width: 1201px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-slider {
        height: 500px;
    }
    
    .slide-content h2 {
        font-size: 2.5rem;
    }
    
    .slide-content p {
        font-size: 1.2rem;
    }
    
    .data-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 30px;
    }
    
    .quick-access-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
    
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .trends-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .partners-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 0fr,0fr);
        gap: 40px;
    }
}

/* 超宽屏设备优化 (≥1440px) */
@media (min-width: 1440px) {
    .container {
        max-width: 1600px;
    }
    
    .hero-slider {
        height: 600px;
    }
    
    .data-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 40px;
    }
    
    .quick-access-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 40px;
    }
    
    .news-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 40px;
    }
    
    .trends-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .partners-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 30px;
    }
}

/* 4K和超高分辨率设备优化 (≥1920px) */
@media (min-width: 1920px) {
    .container {
        max-width: 1800px;
    }
    
    .hero-slider {
        height: 700px;
    }
    
    .slide-content h2 {
        font-size: 3rem;
    }
    
    .slide-content p {
        font-size: 1.4rem;
    }
    
    .section-header h2 {
        font-size: 32px;
    }
    
    .data-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 50px;
    }
    
    .quick-access-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 50px;
    }
    
    .news-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 50px;
    }
    
    .trends-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 50px;
    }
    
    .partners-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 40px;
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
        gap: 50px;
    }
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.back-to-top:active {
    transform: translateY(0);
}

/* 移动端回到顶部按钮 */
@media (max-width: 768px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
        font-size: 16px;
    }
}

/* 头部滚动效果 */
.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* 移动端导航优化 */
@media (max-width: 768px) {
    .mobile-nav {
        width: min(300px, 85vw);
    }
    
    .mobile-nav-header {
        padding: 15px;
    }
    
    .mobile-nav-header h3 {
        font-size: 14px;
    }
    
    .mobile-nav-list a {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .mobile-nav-footer {
        padding: 15px;
    }
    
    .mobile-login-btn,
    .mobile-register-btn {
        padding: 10px;
        font-size: 14px;
    }
    
    .mobile-language-switcher {
        margin-bottom: 15px;
        padding: 12px 0;
    }
    
    .mobile-language-option {
        padding: 6px 12px;
        font-size: 13px;
        border-radius: 15px;
    }
}

/* 性能优化 */
.animate__animated {
    animation-duration: 0.6s;
    animation-fill-mode: both;
}

/* 减少动画的设备 */
@media (prefers-reduced-motion: reduce) {
    .animate__animated {
        animation: none;
    }
    
    .back-to-top,
    .login-btn,
    .register-btn,
    .mobile-login-btn,
    .mobile-register-btn {
        transition: none;
    }
    
    .hero-slider .slide {
        transition: none;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .header {
        border-bottom-width: 2px;
    }
    
    .announcement-wrapper {
        border-width: 2px;
    }
    
    .back-to-top {
        border: 2px solid white;
    }
}

/* 深色模式支持 */
/* @media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e5e5e5;
        --light-gray: #2a2a2a;
        --border-color: #404040;
    }
    
    body {
        background-color: #1a1a1a;
        color: var(--text-color);
    }
    
    .header {
        background: #2a2a2a;
        border-bottom-color: var(--border-color);
    }
    
    .mobile-nav {
        background: #2a2a2a;
    }
    
    .announcement-wrapper {
        background: #2a2a2a;
        border-color: var(--border-color);
    }
} */

/* 打印样式 */
@media print {
    .header,
    .mobile-nav,
    .mobile-nav-trigger,
    .back-to-top,
    .hero-slider,
    .footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .news-item,
    .trend-item,
    .activity-card {
        break-inside: avoid;
    }
}

/* 无障碍访问优化 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 焦点可见性 */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    /* outline: 2px solid var(--primary-color); */
    outline-offset: 2px;
}

/* 跳过链接 */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}