/* ========================================
   响应式设计 - 移动端优先
   ======================================== */

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
    .navbar-container {
        height: 65px;
    }
    
    .navbar-search {
        max-width: 250px;
        margin: 0 15px;
    }
    
    .nav-menu {
        gap: 20px;
    }
    
    .nav-link {
        font-size: 14px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 28px;
        margin-bottom: 35px;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* 手机设备 (480px - 767px) */
@media (max-width: 767px) {
    /* 导航栏调整 */
    .navbar-container {
        height: 60px;
        padding: 0 15px;
    }
    
    .navbar-search {
        display: none;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .mobile-menu {
        top: 60px;
    }
    
    /* Hero 区域 */
    .hero {
        padding: 60px 15px;
    }
    
    .hero::before {
        width: 300px;
        height: 300px;
        right: -15%;
    }
    
    .hero::after {
        width: 250px;
        height: 250px;
        left: -10%;
    }
    
    .hero-title {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        padding: 12px 24px;
        font-size: 15px;
    }
    
    /* 内容区域 */
    .section {
        padding: 50px 15px;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* 视频网格 */
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .video-card {
        border-radius: 8px;
    }
    
    .video-info {
        padding: 10px;
    }
    
    .video-title {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .video-stats {
        font-size: 12px;
        gap: 10px;
    }
    
    /* FAQ */
    .faq-container {
        padding: 0 15px;
    }
    
    .faq-question {
        padding: 15px;
        font-size: 15px;
    }
    
    .faq-answer {
        padding: 0 15px;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 15px 15px 15px;
    }
    
    /* 评论 */
    .comments-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .comment-card {
        padding: 15px;
    }
    
    /* 底部 */
    .footer {
        padding: 40px 15px 20px;
        margin-top: 50px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-title {
        font-size: 18px;
    }
    
    .footer-subtitle {
        font-size: 15px;
    }
    
    .footer-links li {
        font-size: 13px;
    }
    
    .app-download {
        justify-content: center;
    }
    
    .qr-code img {
        width: 70px;
        height: 70px;
    }
    
    .copyright {
        font-size: 12px;
    }
    
    .footer-links-bottom {
        font-size: 12px;
    }
}

/* 小手机设备 (320px - 479px) */
@media (max-width: 479px) {
    /* 导航栏 */
    .navbar-container {
        height: 55px;
        padding: 0 12px;
    }
    
    .logo-img {
        width: 35px;
        height: 35px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .hamburger span {
        width: 22px;
        height: 2.5px;
    }
    
    /* Hero */
    .hero {
        padding: 40px 12px;
    }
    
    .hero-title {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    /* 内容 */
    .section {
        padding: 40px 12px;
    }
    
    .section-title {
        font-size: 20px;
        margin-bottom: 25px;
    }
    
    /* 视频网格 */
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .video-title {
        font-size: 13px;
    }
    
    .video-stats {
        font-size: 11px;
        gap: 8px;
    }
    
    /* 按钮 */
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* 卡片 */
    .card {
        padding: 15px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .card-desc {
        font-size: 13px;
    }
    
    /* FAQ */
    .faq-question {
        padding: 12px;
        font-size: 14px;
    }
    
    .faq-answer {
        padding: 0 12px;
        font-size: 13px;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 12px 12px 12px;
    }
    
    /* 评论 */
    .comment-card {
        padding: 12px;
    }
    
    .comment-avatar {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .comment-name {
        font-size: 14px;
    }
    
    .comment-text {
        font-size: 13px;
    }
    
    /* 底部 */
    .footer-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .footer-subtitle {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .footer-desc {
        font-size: 13px;
    }
    
    .footer-links li {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
    }
    
    .app-download {
        gap: 15px;
    }
    
    .qr-code img {
        width: 60px;
        height: 60px;
    }
    
    .qr-code p {
        font-size: 11px;
    }
}

/* 横屏模式 */
@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        padding: 30px 20px;
    }
    
    .hero-title {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .section {
        padding: 40px 20px;
    }
}

/* 高分辨率屏幕 */
@media (min-width: 1920px) {
    .container,
    .navbar-container,
    .hero-container,
    .footer-container {
        max-width: 1600px;
    }
    
    .hero-title {
        font-size: 56px;
    }
    
    .section-title {
        font-size: 42px;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    .social-link,
    .video-card,
    .card {
        padding: 12px 24px;
    }
    
    .btn:active,
    .nav-link:active,
    .social-link:active {
        opacity: 0.8;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .footer,
    .hamburger,
    .mobile-menu,
    .btn-secondary {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section {
        page-break-inside: avoid;
    }
}

/* 暗黑模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --light-bg: #1A1A2E;
        --text-dark: #F5F5F5;
        --border-color: #333;
    }
    
    body {
        background-color: var(--light-bg);
        color: var(--text-dark);
    }
    
    .navbar {
        background: linear-gradient(135deg, #1A1A2E 0%, #2A2A4E 100%);
        border-bottom-color: #333;
    }
    
    .navbar-search {
        background: #2A2A4E;
    }
    
    .navbar-search:focus-within {
        background: #333;
    }
    
    .search-input {
        color: var(--text-dark);
    }
    
    .nav-link {
        color: var(--text-dark);
    }
    
    .video-card,
    .card,
    .comment-card,
    .faq-item {
        background: #2A2A4E;
        border-color: #333;
    }
    
    .video-title,
    .card-title,
    .comment-name,
    .faq-question {
        color: var(--text-dark);
    }
    
    .video-stats,
    .comment-time,
    .card-desc,
    .comment-text,
    .faq-answer {
        color: #AAA;
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
