/* 移动端优化 */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 10px;
    }

    header {
        padding: 0;
        margin-bottom: 0;
    }
    
    header h1 {
        font-size: 20px;
        margin: 0;
    }
    
    .header-container {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 15px;
        min-height: auto;
    }
    
    .header-container h1 {
        margin-bottom: 10px;
        text-align: center;
        padding: 0;
    }
    
    /* 移动端：独立的导航条容器 - 灰色半透明 */
    .header-overlay {
        position: relative !important;
        width: 100%;
        background: rgba(128, 128, 128, 0.6) !important;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: none !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        transition: position 0.3s ease, background 0.3s ease;
        transform: none;
        opacity: 1;
    }
    
    .header-overlay.header-fixed {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1002 !important;
        background: rgba(128, 128, 128, 0.7) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
        border: none !important;
    }
    
    .header-overlay.header-fixed .header-container {
        background: transparent !important;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    
    .header-overlay .header-container {
        width: 100%;
        margin: 0;
        padding: 15px 12px;
        background: transparent !important;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-radius: 0;
    }
    
    /* BANNER容器移动端样式 */
    .banner-wrapper {
        width: 100vw;
        margin-left: 50%;
        transform: translateX(-50%);
        margin-bottom: 10px;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        border: none;
    }
    
    .banner-wrapper .banner-container {
        margin: 0 !important;
        border-radius: 0 !important;
        width: 100%;
        max-width: 100% !important;
        box-shadow: none !important;
        border: none;
    }
    
    /* BANNER放在导航栏下方 */
    .banner-wrapper .banner-container {
        order: 2;
    }
    
    .header-overlay h1 {
        color: #FFFFFF !important;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .header-overlay nav a {
        color: #FFFFFF !important;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
        background: transparent !important;
        border: none !important;
    }
    
    .header-overlay nav a:hover {
        background: rgba(255, 255, 255, 0.2);
        border: none !important;
        color: #FFFFFF !important;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    }

    nav {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    nav a {
        padding: 14px 6px;
        text-align: center;
        font-size: 17px;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border-radius: 8px;
        line-height: 1.4;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* 防止iOS自动缩放 */
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .design-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .home-stats .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-features-new {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .pagination {
        justify-content: center;
    }

    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 12px;
    }

    /* 提交需求按钮移动端优化 */
    .btn-submit-requirement {
        width: 100%;
        max-width: 100%;
        padding: 20px 25px;
        font-size: 17px;
        border-radius: 50px;
        -webkit-tap-highlight-color: rgba(255, 107, 53, 0.3);
        touch-action: manipulation;
    }

    .btn-submit-requirement .btn-content {
        gap: 8px;
    }

    .btn-submit-requirement .btn-icon {
        font-size: 20px;
    }

    .btn-submit-requirement .btn-arrow {
        width: 20px;
        height: 20px;
    }

    .btn-submit-requirement:active {
        transform: translateY(-1px) scale(1.01);
        animation: none;
    }
    
    /* 如何下单部分 - 移动端隐藏第二行文字 */
    .how-it-works .step-card p {
        display: none;
    }
    
    .how-it-works .step-card {
        padding: 30px 20px;
    }
    
    .how-it-works .step-card h3 {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 10px 12px;
    }
    
    nav {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
    }
    
    nav a {
        padding: 12px 5px;
        font-size: 16px;
        min-height: 48px;
    }
    
    /* 小屏幕：独立的导航条容器 - 灰色半透明 */
    .header-overlay {
        position: relative !important;
        width: 100%;
        background: rgba(128, 128, 128, 0.6) !important;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: none !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .header-overlay.header-fixed {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1002 !important;
        background: rgba(128, 128, 128, 0.7) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    }
    
    .header-overlay .header-container {
        width: 100%;
        margin: 0;
        padding: 12px 10px;
        background: transparent !important;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    
    .header-overlay h1 {
        font-size: 18px;
        margin-bottom: 8px;
        color: #FFFFFF !important;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    }
    
    .header-overlay nav a {
        font-size: 14px;
        padding: 10px 4px;
        background: transparent !important;
        border: none !important;
        color: #FFFFFF !important;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    }
    
    .header-overlay nav a:hover {
        background: rgba(255, 255, 255, 0.2);
        color: #FFFFFF !important;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .home-stats .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-features-new {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .filter-bar {
        flex-direction: column;
    }

    .filter-bar a {
        width: 100%;
        text-align: center;
    }
    
    /* 如何下单部分 - 移动端隐藏第二行文字 */
    .how-it-works .step-card p {
        display: none;
    }
    
    .how-it-works .step-card {
        padding: 30px 20px;
    }
    
    .how-it-works .step-card h3 {
        margin-bottom: 0;
    }
}

