/**
 * 移动端前端样式文件
 * 程序设计：闲鱼【小奇迹程序设计】
 */

/* 移动端基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    padding-bottom: 60px; /* 为底部导航留空间 */
}

/* 顶部广告轮播 */
.top-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 5vh;
    background-color: #fffbe8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow: hidden;
    color: #ed6a0c;
}

.banner-content {
    white-space: nowrap;
    animation: scroll 20s linear infinite;
    font-size: 12px;
}

@keyframes scroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* 主内容区域 */
.main-content {
    margin-top: 5vh;
    padding: 15px;
}

/* Logo区域 */
.logo-section {
    text-align: center;
/*    margin: 20px 0;*/
}

.logo-section img {
    max-width: 80px;
    height: auto;
    border-radius: 10%;
}

/* 切换账号按钮 */
.switch-account-btn {
    display: block;
    width: 53%;
    max-width: 300px;
    margin: 10px auto;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.3);
    transition: all 0.3s ease;
}

.switch-account-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

/* 优惠券列表 */
.coupon-list {
    margin: 20px 0;
}

.coupon-item {
    background-color: #d4eddb;
    margin: 10px 0;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.coupon-item:active {
    transform: scale(0.98);
}

.coupon-name {
    font-size: 16px;
    font-weight: bold;
        color: #155724;
}

.coupon-action {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 14px;
}

/* 系统广告图片 */
.system-ads {
    margin: 20px 0;
}

.ad-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    height: 60px;
    z-index: 1000;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666;
    transition: color 0.3s ease;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.nav-text {
    font-size: 12px;
}

/* 领券小技巧页面 */
.tips-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: white;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
/*    top: 5vh;*/
    z-index: 100;
}

.back-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--primary-color);
    cursor: pointer;
    padding: 5px;
}

.tips-title {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

/* FAQ样式 */
.faq-list {
    background-color: white;
    margin: 0;
}

.faq-item {
    border-bottom: 1px solid #e0e0e0;
}

.faq-question {
    width: 100%;
    padding: 15px;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:hover {
    background-color: #f8f9fa;
}

.faq-arrow {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 15px;
}

.faq-answer img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 2000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 300px;
    text-align: center;
}

.modal-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.modal-text {
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    gap: 10px;
}

.modal-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.modal-btn-cancel {
    background-color: #f8f9fa;
    color: #666;
}

.modal-btn-confirm {
    background-color: var(--primary-color);
    color: white;
}

/* 响应式调整 */
@media (max-width: 320px) {
    .main-content {
        padding: 10px;
    }
    
    .coupon-item {
        padding: 12px;
    }
    
    .coupon-name {
        font-size: 14px;
    }
    
    .switch-account-btn {
        font-size: 14px;
        padding: 10px;
    }
}

