/* ===================================
   响应式设计 - 移动端适配
   =================================== */

/* 大屏到平板的渐进收缩 (< 1200px) */
@media (max-width: 1200px) {
    .container {
        padding: 0 20px;
    }

    .hero {
        padding: 140px 0 90px;
        min-height: 560px;
    }

    .feature-block {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 32px;
        padding: 32px;
    }

    .games-grid,
    .tools-grid {
        gap: 24px;
    }
}

/* 平板和小屏幕笔记本 (< 992px) */
@media (max-width: 992px) {
    body {
        background-attachment: scroll;
    }

    .navbar .container {
        flex-wrap: wrap;
        gap: 12px;
    }

    .nav-brand {
        flex: 1;
    }

    .download-btn {
        order: 3;
        margin: 0;
    }

    .hero {
        padding: 120px 0 80px;
        min-height: auto;
    }

    .hero-content {
        text-align: center;
        align-items: center;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .hero-features {
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
    }

    .hero-animation,
    .feature-floating {
        display: none;
    }

    .feature-block {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .feature-block.reverse {
        direction: ltr;
    }

    .feature-visual {
        width: 100%;
        justify-content: center;
        max-width: 420px;
        margin: 0 auto 16px;
    }

    .feature-visual img {
        width: min(280px, 100%);
        margin: 0 auto;
    }

    .feature-visual img[data-feature-image] {
        width: 100% !important;
        max-width: 100%;
    }

    .feature-info {
        padding: 0;
    }

    .learning-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .learning-points li {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-card {
        padding: 28px;
    }

    .faq-section .section-header {
        text-align: center;
    }

    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        text-align: left;
        gap: 24px;
    }

    .featured-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }

    .featured-main {
        grid-column: span 2;
    }

    .featured-image {
        height: 260px;
    }
}

/* 平板 (< 768px) */
@media (max-width: 768px) {
    /* 导航栏 */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(5, 7, 15, 0.96);
        flex-direction: column;
        padding: 40px 30px;
        transition: left 0.3s ease;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
        z-index: 999;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: left;
        padding: 18px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        color: var(--text-light);
        font-size: 1.1rem;
    }

    /* 语言切换器移动端样式 */
    .language-switcher {
        position: fixed;
        top: 15px;
        right: 80px;
        margin-left: 0;
        z-index: 1001;
    }

    .lang-btn {
        padding: 4px 8px;
        font-size: 0.8rem;
    }

    .lang-text {
        display: none; /* 移动端隐藏文字，只显示图标 */
    }

    .lang-icon {
        font-size: 1.2rem;
    }

    /* 下载按钮 */
    .download-btn {
        width: 42px;
        height: auto;
    }

    /* Hero区域 */
    .hero {
        padding-top: 110px;
    }

    .hero-features {
        gap: 8px;
    }

    .feature-tag {
        font-size: 0.9rem;
        padding: 8px 16px;
    }

    .hero-cta {
        flex-direction: column;
        gap: 10px;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        text-align: center;
    }

    /* 游戏卡片 */
    .games-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* 工具卡片 */
    .tools-grid {
        grid-template-columns: 1fr;
    }

    /* 热门话题文章列表 */
    .articles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .article-card {
        padding-bottom: 10px;
    }

    .article-card-image {
        height: 160px;
    }

    .article-card-content {
        padding: 20px;
    }

    .featured-grid {
        gap: 16px;
    }

    .featured-image {
        height: 220px;
    }

    .featured-content,
    .featured-content-small {
        padding: 18px;
    }

    .featured-image-small {
        height: 140px;
    }

    /* 学习区域 */
    .learning-text,
    .learning-visual {
        width: 100%;
    }

    /* FAQ */
    .faq-question {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section {
        align-items: center;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}

/* 中等手机 (< 600px) */
@media (max-width: 600px) {
    .hero-title {
        font-size: 1.9rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .feature-block {
        padding: 24px 20px;
    }

    .learning-text h2 {
        font-size: 2.1rem;
    }

    .learning-points li {
        gap: 12px;
    }

    .stats-card {
        padding: 24px;
    }

    .faq-question {
        padding: 20px;
    }
}

/* 手机 (< 480px) */
@media (max-width: 480px) {
    .hero {
        padding-top: 100px;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .feature-tag {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .language-switcher {
        right: 70px;
        gap: 2px;
    }

    .lang-btn {
        padding: 3px 6px;
    }

    .lang-icon {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .game-card h3 {
        font-size: 1.3rem;
    }

    .stats-card {
        text-align: center;
    }
}

/* 导航栏切换按钮显示控制 */
@media (min-width: 769px) {
    .nav-toggle {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 1001;
    }
    
    .nav-toggle span {
        width: 25px;
        height: 3px;
        background: var(--text-light);
        transition: var(--transition);
        border-radius: 2px;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

