/* 响应式设计 - 移动优先 */

/* ===== 手机端样式（默认）< 768px ===== */

/* 头部导航 - 手机端 */
@media (max-width: 767px) {
    .header {
        padding: 10px 0;
    }
    
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .nav-link {
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }
    
    .header-buttons {
        width: 100%;
        justify-content: center;
        gap: 10px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* 英雄区域 - 手机端 */
@media (max-width: 767px) {
    .hero {
        padding: 20px 0;
    }
    
    .pos-card {
        flex-direction: column;
        gap: 15px;
        padding: 0 20px;
    }
    
    .carditem {
        width: 100%;
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .carditem.selected {
        background: linear-gradient(135deg, #007bff, #0056b3);
        box-shadow: 0 2px 10px rgba(0, 123, 255, 0.3);
        transform: translateY(-2px);
    }
    
    .carditem:hover {
        transform: translateY(-1px);
    }
}

/* 项目卡片 - 手机端 */
@media (max-width: 767px) {
    .project-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 20px;
    }
    
    .project-card {
        padding: 20px;
    }
    
    .project-tabs {
        flex-direction: column;
        gap: 10px;
    }
    
    .tab-bg {
        flex-direction: column;
        padding: 10px;
    }
    
    .tab-btn {
        width: 100%;
        padding: 12px;
    }
}

/* 平台介绍 - 手机端 */
@media (max-width: 767px) {
    .app-screenshots-container {
        margin: 0 20px 60px 20px;
        max-width: calc(100vw - 40px); /* 移动端全宽减去左右边距 */
    }
    
    .app-screenshots {
        gap: 20px;
    }
    
    .screenshot-item {
        width: 100%;
        max-width: 300px;
    }
    
    .screenshot-item img {
        width: 100%;
        max-width: 300px;
        height: auto;
    }
    
    .screenshot-nav {
        display: none; /* 移动端隐藏导航按钮 */
    }
    
    .platform-info {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .left-pl {
        flex-direction: column;
        align-items: center;
    }
    
    .platform-text {
        margin-left: 0 !important;
        margin-top: 20px;
    }
    
    .category-buttons {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .category-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .btn-orange {
        width: 100%;
        max-width: 300px;
        animation: breathe-orange 2s ease-in-out infinite;
    }
}

/* 手机端 图片查看器样式优化 */
@media (max-width: 767px) {
    .image-viewer-content {
        width: 95%;
        max-width: none;
        border-radius: 12px;
    }
    .viewer-image {
        max-height: 60vh;
    }
}

/* 贴牌服务 - 手机端 */
@media (max-width: 767px) {
    .franchise-tabs > div {
        flex-direction: column;
        padding: 10px;
    }
    
    .tab-div {
        width: 100%;
        padding: 12px;
    }
    
    .franchise-content {
        padding: 0 20px;
    }
    
    .franchise-content img {
        width: 100%;
        height: auto;
    }
}

/* 申请表单 - 手机端 */
@media (max-width: 767px) {
    .application-form {
        margin: 20px;
        padding: 20px;
    }
    
    .form-group input,
    .form-group2 textarea {
        padding: 12px;
        font-size: 14px;
    }
}

/* APP下载页面 - 手机端 */
@media (max-width: 767px) {
    .app-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .ap-left h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .ap-left h5 {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .ap-left img {
        width: 120px;
        height: 120px;
    }
    
    .ap-right img {
        width: 100%;
        max-width: 300px;
        height: auto;
    }
    
    /* 其他下载方式 - 手机端垂直布局 */
    .other-ap > div {
        flex-direction: column !important;
        gap: 30px;
    }
    
   /* .download-options {
        order: 2;
    } */
    
    .dashboard-preview {
        order: 1;
        margin-top: 0;
    }
    
    .download-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .download-card {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .apple-card {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .dashboard-preview img {
        max-width: 100%;
        height: auto;
    }
}

/* 弹窗 - 手机端 */
@media (max-width: 767px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 10px;
    }
    
    .modal-body {
        padding: 20px 15px;
        margin-top: -80px;
    }
    
    .modal-body h3 {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .register-form .input-field input {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .verification-field {
        flex-direction: column;
        gap: 10px;
    }
    
    .linebtn {
        justify-content: center;
    }
    
    .btn-verification {
        width: 100%;
        padding: 12px;
    }
}

/* 底部 - 手机端 */
@media (max-width: 767px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-section {
        padding: 0 20px;
    }
    
    .wechat-qr img {
        width: 80px;
        height: 80px;
    }
}

/* 固定底部推广栏 - 手机端 */
@media (max-width: 767px) {
    .sticky-promotion {
        left: 10px;
        right: 10px;
        height: 150px;
        padding: 0 20px;
        flex-direction: column;
        justify-content: center;
        gap: 10px;
    }
    
    .sticky-promotion .s-text {
        text-align: center;
        flex: none;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .sticky-promotion > div:last-child {
        text-align: center;
    }
    
    .btn-register2 {
        width: 150px;
        font-size: 12px;
        padding: 6px 16px;
    }
}

/* ===== 平板端样式 768px - 1024px ===== */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .app-screenshots-container {
        margin: 0 40px 60px 40px;
        max-width: 720px; /* 4张图片的宽度：(150px + 20px) * 4 - 20px = 720px */
    }
    
    .app-screenshots {
        gap: 20px;
    }
    
    .screenshot-item {
        width: 150px;
    }
    
    .screenshot-item img {
        width: 150px;
        height: 240px;
    }
    
    .screenshot-prev,
    .screenshot-next {
        width: 40px;
        height: 40px;
    }
    
    .screenshot-prev {
        left: -20px;
    }
    
    .screenshot-next {
        right: -20px;
    }
    
    .download-row {
        justify-content: center;
    }
}

/* ===== PC端样式 > 1024px ===== */
@media (min-width: 1025px) {
    /* 保持现有的PC端样式 */
    .header .container {
        flex-direction: row;
    }
    
    .nav-list {
        flex-direction: row;
    }
    
    .project-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .app-screenshots {
        display: flex;
        flex-direction: row;
    }
    
    .platform-info {
        flex-direction: row;
    }
    
    .left-pl {
        flex-direction: row;
    }
    
    .franchise-tabs > div {
        flex-direction: row;
    }
    
    .other-ap > div {
        flex-direction: row !important;
    }
    
    /* .download-options {
        flex-direction: row;
    } */
    
    .download-row {
        flex-direction: row;
    }
    
    .footer-content {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ===== 通用响应式优化 ===== */

/* 图片响应式 */
img {
    max-width: 100%;
    height: auto;
}

/* 文字响应式 */
@media (max-width: 767px) {
    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }
    h4 { font-size: 16px; }
    p { font-size: 14px; }
}

/* 按钮响应式 */
@media (max-width: 767px) {
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .btn-large {
        padding: 12px 24px;
        font-size: 16px;
    }
}

/* 间距响应式 */
@media (max-width: 767px) {
    .section-title {
        margin-bottom: 30px;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* 隐藏/显示元素 */
@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav {
        display: none;
    }
    
    .nav.mobile-active {
        display: block;
    }
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
    
    .nav {
        display: block;
    }
} 