/* 底部样式 */
.footer {
    background-color: var(--text-primary);
    color: white;
    padding: var(--spacing-xxl) 0 var(--spacing-lg);
    margin-top: auto;
}

/* 下载APP模块（集中到组件样式，保证跨页一致） */
.app-download-section { padding: var(--spacing-xxl) 0; background: linear-gradient(135deg, #f8f4ff 0%, #e8e0ff 100%); }
.app-download-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-xxl); align-items: center; }
.app-download-content { padding-right: var(--spacing-lg); }
.app-download-title { font-size: 2.5rem; font-weight: 700; color: var(--text-primary); margin-bottom: var(--spacing-lg); line-height: 1.2; }
.app-download-desc { font-size: 1.1rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: var(--spacing-xl); }
.app-download-buttons { 
    display: flex; 
    gap: var(--spacing-md); 
    margin-bottom: var(--spacing-lg); 
    align-items: center;
    flex-wrap: wrap; /* 避免窄屏时一行放不下导致水平滚动 */
}
.app-download-btn { 
    display: inline-block; 
    transition: transform 0.3s ease; 
}
.app-download-btn:hover { transform: translateY(-2px); }
.app-download-btn img { 
    display: block; 
    height: 60px !important; 
    width: auto !important; 
    max-width: 260px; 
}
.app-download-pro-link { font-size: 0.95rem; color: var(--text-secondary); }
.app-download-pro-link a { color: var(--primary-color); text-decoration: none; font-weight: 500; }
.app-download-pro-link a:hover { text-decoration: underline; }
.app-download-phone { display: flex; justify-content: center; align-items: center; }
.app-download-hero { width: 100%; max-width: 260px; height: auto; display: block; border-radius: 24px; box-shadow: 0 20px 40px rgba(0,0,0,0.15); }
@media (max-width: 768px){
    .app-download-grid { grid-template-columns: 1fr; gap: var(--spacing-xl); }
    .app-download-content { padding-right: 0; text-align: center; }
    .app-download-title { font-size: 2rem; }
    .app-download-buttons { 
        justify-content: center; 
        align-items: center;
        flex-wrap: wrap;        /* 优先尝试一行两个，并且允许自动换行 */
        gap: 12px;
    }
    .app-download-btn { 
        flex: 0 1 48%;          /* 有空间时可以一行两个 */
        max-width: 260px;
        text-align: center;
    }
    .app-download-btn img { 
        height: 50px !important; 
        max-width: 100%;
    }
}
@media (max-width: 360px){
    .app-download-title { font-size: 1.8rem; }
    .app-download-desc { font-size: 1rem; }
    /* 极窄屏统一改成纵向排列，两按钮上下居中 */
    .app-download-buttons{
        flex-direction: column;
        align-items: center;
    }
    .app-download-btn{
        flex: 0 0 auto;
        width: 100%;
        max-width: 260px;
    }
    .app-download-btn img { 
        height: 48px; 
        max-width: 100%;
    }
}

.footer-container {
    max-width: min(1200px, 96vw);
    margin: 0 auto;
    padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right));
}

/* 响应式宽度设置 */
@media (min-width: 1280px) { 
    .footer-container { max-width: 1280px; } 
}
@media (min-width: 1440px) { 
    .footer-container { max-width: 1400px; } 
}
@media (min-width: 1600px) { 
    .footer-container { max-width: 1500px; } 
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h3 {
    font-size: var(--font-size-lg);
    font-weight: bold;
    margin-bottom: var(--spacing-lg);
    color: white;
}

.footer-section ul {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
    font-size: var(--font-size-sm);
}

.footer-section ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-round);
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.social-links img { width: 18px; height: 18px; display: block; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-lg);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--font-size-sm);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .footer-container {
        padding: 0 var(--spacing-md);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .footer-section h3 {
        font-size: 16px;
        margin-bottom: var(--spacing-md);
    }
    
    .footer-section ul {
        gap: var(--spacing-xs);
    }
    
    .footer-section ul li a {
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .footer-container {
        padding: 0 var(--spacing-sm);
    }
    
    .footer {
        padding: var(--spacing-lg) 0 var(--spacing-md);
    }
    
    /* 上面一排：商家服务 + 服务支持；下面一排：关于我们居中 */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
        text-align: center;
        margin-bottom: var(--spacing-md);
    }
    
    .footer-section {
        padding: 0;
    }
    
    .footer-section h3 {
        font-size: 14px;
        margin-bottom: var(--spacing-xs);
    }
    
    .footer-section ul {
        gap: 6px;
    }
    
    .footer-section ul li a {
        font-size: 12px;
        display: block;
    }
    
    /* 第三个 section 独占一行并居中（关于我们 + 社交图标） */
    .footer-section:nth-child(3) {
        grid-column: 1 / -1;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
        gap: var(--spacing-xs);
    }
    
    .social-links a {
        width: 32px;
        height: 32px;
    }
    
    .social-links img {
        width: 14px;
        height: 14px;
    }
    
    .footer-bottom {
        padding-top: var(--spacing-md);
    }
    
    .footer-bottom p {
        font-size: 12px;
    }
}

/* 返回顶部按钮样式 */
.scroll-to-top {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: none;
    outline: none;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.scroll-to-top svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 80px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
    
    .scroll-to-top svg {
        width: 18px;
        height: 18px;
    }
}
