
                        /* ===== 基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: linear-gradient(135deg, #fff 0%, #00a1ff 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-text-size-adjust: 100%;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 20px;
}

.main {
    background: linear-gradient(180deg, transparent, #7cafee 1.5rem);
    position: relative;
    margin-top: -1rem;
    padding-top: 1rem;
}

/* ===== 用户信息 ===== */
.user-info {
    padding: 0 15px;
    margin-bottom: 15px;
}

.user-points {
    background: rgba(255,255,255,0.9);
    padding: 12px 15px;
    border-radius: 20px;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#currentPoints {
    color: #ff6b00;
    font-size: 1.2em;
}

.records-btn {
    background: transparent;
    border: none;
    color: #000000;
    font-size: 1em;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

/* ===== 横幅区域 ===== */
.banner {
    width: 100%;
    height: 0;
    padding-bottom: 40%;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.banner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* ===== 奖励兑换区域 ===== */
.reward-section {
    background-color: #fff;
    border-radius: 12px;
    padding: 15px;
    margin: 0 10px 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
    color: #333;
    position: relative;
    padding-bottom: 5px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b00, #ff9e00);
    border-radius: 3px;
}

/* 新增：奖励容器包装层 */
.rewards-wrapper {
    position: relative;
    margin: 0 -5px;
}

/* 修改：奖励容器横向滚动 */
.rewards-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 5px 5px 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.rewards-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* 修改：奖励项样式 */
.reward-item {
    flex: 0 0 auto;
    width: 120px;
    background-color: #fff;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.reward-img-container {
    aspect-ratio: 1/1;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.reward-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.reward-name {
    font-size: 12px;
    margin: 5px 0;
    font-weight: 600;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 36px;
    line-height: 1.3;
}

.reward-points {
    font-size: 14px;
    color: #ff6b00;
    margin: 5px 0;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reward-points::before {
    content: '✦';
    margin-right: 5px;
    font-size: 10px;
}

.reward-stock {
    font-size: 11px;
    color: #666;
    margin: 3px 0;
}

.exchange-btn {
    background: linear-gradient(90deg, #ff6b00, #ff9e00);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    font-weight: 500;
    margin-top: auto;
    box-shadow: 0 3px 8px rgba(255, 107, 0, 0.3);
}

.exchange-btn:hover {
    background: linear-gradient(90deg, #ff5e00, #ff8f00);
}

.exchange-btn:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

/* ===== 导航箭头 ===== */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #ff6b00;
    transition: all 0.3s;
}

.scroll-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.scroll-btn.left {
    left: -15px;
}

.scroll-btn.right {
    right: -15px;
}

.scroll-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ===== 任务列表 ===== */
.task-section {
    background-color: #fff;
    border-radius: 12px;
    padding: 15px;
    margin: 0 10px 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.task-list {
    margin-top: 10px;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.task-info {
    flex: 1;
    min-width: 0;
}

.task-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.task-desc {
    font-size: 13px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.task-reward {
    font-size: 13px;
    color: #4CAF50;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.task-reward::before {
    content: "+";
    margin-right: 2px;
}

.task-btn {
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 3px 8px rgba(76, 175, 80, 0.3);
    flex-shrink: 0;
    margin-left: 10px;
}

.task-btn:hover {
    background: linear-gradient(90deg, #43A047, #5CB85C);
}

.task-btn:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

/* ===== 活动规则 ===== */
.rules-section {
    background-color: #fff;
    border-radius: 12px;
    padding: 18px;
    margin: 0 10px 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    max-height: 250px;
    overflow-y: auto;
}

.rules-section::-webkit-scrollbar {
    width: 6px;
}

.rules-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.rules-section::-webkit-scrollbar-thumb {
    background: #ff6b00;
    border-radius: 10px;
}

.rules-content {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
}

.rules-content p {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.rules-content p::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background-color: #ff6b00;
    border-radius: 50%;
}

/* ===== 底部 ===== */
.footer {
    text-align: center;
    padding: 15px 0;
    color: #888;
    font-size: 13px;
}

/* ===== 模态框 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    width: 85%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.modal-message {
    margin-bottom: 20px;
    text-align: center;
    color: #555;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.modal-btn {
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 80px;
}

.modal-confirm {
    background: linear-gradient(90deg, #ff6b00, #ff9e00);
    color: white;
}

.modal-confirm:hover {
    background: linear-gradient(90deg, #ff5e00, #ff8f00);
}

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

.modal-cancel:hover {
    background: #e0e0e0;
}

/* ===== 记录模态框 ===== */
.records-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    position: relative;
    color: #999;
}

.tab-btn.active {
    color: #ff6b00;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ff6b00;
}

.tab-pane {
    display: none;
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
}

.tab-pane.active {
    display: block;
}

.record-item {
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.record-item:last-child {
    border-bottom: none;
}

.record-name {
    font-weight: 500;
    flex: 1;
}

.record-points {
    font-weight: bold;
    margin-left: 10px;
}

.record-points.positive {
    color: #4CAF50;
}

.record-points.negative {
    color: #f44336;
}

.record-time {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
}

/* ===== Toast提示 ===== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 20px;
    color: white;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    max-width: 80%;
    text-align: center;
}

.toast.show {
    opacity: 1;
}

.toast.success {
    background: #4CAF50;
}

.toast.error {
    background: #f44336;
}

.toast.info {
    background: #2196F3;
}

.toast.warning {
    background: #ff9800;
}

/* ===== 响应式调整 ===== */
@media (max-width: 400px) {
    .reward-item {
        width: 110px;
        padding: 8px;
    }
    
    .reward-name {
        font-size: 11px;
    }
    
    .exchange-btn {
        font-size: 12px;
        padding: 6px;
    }
    
    .scroll-btn {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }
    
    .scroll-btn.left {
        left: -10px;
    }
    
    .scroll-btn.right {
        right: -10px;
    }
    
    .task-title {
        font-size: 15px;
    }
    
    .task-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}
                    