/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
    overflow: hidden;
    color: #333;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ========== 顶部导航栏 ========== */
.top-bar {
    background: #ffffff;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-back {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
}

.top-bar-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.btn-active-code {
    background: none;
    border: none;
    color: #FF6B35;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    transition: all 0.3s;
}

.btn-active-code:active {
    transform: scale(0.98);
}

/* ========== 主内容滚动区域 ========== */
.scroll-view {
    flex: 1;
    overflow-y: auto;
    background: #f0f0f0;
    -webkit-overflow-scrolling: touch;
}

.scroll-content {
    padding: 16px 0 120px 0;
}

/* ========== 精选套餐区域 ========== */
.featured-section {
    background: #ffffff;
    padding: 20px 16px;
    margin: 0 16px 16px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.featured-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 10px;
}

.featured-subtitle {
    font-size: 13px;
    color: #999;
    text-align: left;
    margin-bottom: 16px;
}

/* 套餐类型标签 */
.package-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.package-tab {
    flex: 1;
    height: 36px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.package-tab.active {
    background: linear-gradient(135deg, #FFE5D9 0%, #FFD4C4 100%);
    color: #ff6b35;
    font-weight: 600;
}

.package-tab:active {
    transform: scale(0.98);
}

.featured-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 8px;
}

.featured-subtitle {
    font-size: 13px;
    color: #999;
    text-align: left;
    margin-bottom: 16px;
}

/* 套餐横向滚动 */
.packages-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 0 16px 0;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.packages-scroll::-webkit-scrollbar {
    display: none;
}

/* 套餐卡片 */
.package-card {
    flex: 0 0 auto;
    width: 180px;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 14px;
    padding: 14px 12px;
    position: relative;
    scroll-snap-align: start;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.package-card.selected {
    border-color: #ff6b35;
    box-shadow: 0 4px 18px rgba(255, 107, 53, 0.25);
    transform: translateY(-2px);
}

.package-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #FF5A5F 0%, #FF7B7F 100%);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(255, 90, 95, 0.3);
}

.package-name {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin: 32px 0 8px 0;
    font-weight: 400;
    line-height: 1.3;
}

.package-duration {
    font-size: 13px;
    color: #333;
    text-align: center;
    margin-bottom: 12px;
    font-weight: 500;
}

.package-daily {
    font-size: 28px;
    color: #ff0000;
    text-align: center;
    line-height: 1.2;
    margin: 12px 0;
    font-weight: 500;
}

.package-daily {
    font-size: 28px;
    color: #ff0000;
    text-align: center;
    font-weight: bold;
    margin: 12px 0 16px 0;
    line-height: 1.2;
}

.package-price-section {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFF5F0 0%, #FFE8E0 100%);
    padding: 8px 12px;
    border-radius: 8px;
    margin: 0 -4px;
}

.package-price-label {
    font-size: 12px;
    color: #666;
    margin-right: 4px;
    font-weight: 400;
}

.package-price {
    font-size: 15px;
    font-weight: 700;
    color: #ff0000;
    line-height: 1;
}

.package-price-symbol {
    font-size: 11px;
    font-weight: 500;
    color: #ff0000;
    margin-right: 1px;
}

.package-price-original {
    font-size: 12px;
    color: #bbb;
    text-decoration: line-through;
    margin-left: 5px;
    font-weight: normal;
}

/* 提示信息 */
.upload-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 16px;
}

.tip-icon {
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.6;
}

.tip-text {
    font-size: 13px;
    color: #999;
    line-height: 1.6;
}

/* 订单管理入口 */
.order-link-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    margin-top: 8px;
    padding: 8px 0;
}

.order-question {
    font-size: 12px;
    color: #999;
}

.order-link {
    font-size: 12px;
    color: #FF6B35;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.3s;
}

.order-link:hover {
    opacity: 0.8;
}

.order-link:active {
    opacity: 0.6;
}

/* ========== 通用区块样式 ========== */
.why-section,
.scenarios-section,
.ai-section {
    background: #ffffff;
    padding: 20px 16px;
    margin: 0 16px 16px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.section-title {
    font-size: 19px;
    font-weight: bold;
    color: #8b4513;
    margin-bottom: 12px;
}

.section-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 8px;
}

/* ========== 特性图片区域 ========== */
.feature-image-wrapper {
    position: relative;
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
}

.feature-image {
    width: 100%;
    display: block;
    border-radius: 12px;
}

.feature-tag {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #8b4513;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

/* ========== 场景网格 ========== */
.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.scenario-card {
    text-align: center;
}

.scenario-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
}

.scenario-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scenario-label {
    font-size: 14px;
    color: #8b4513;
    font-weight: 500;
}

/* ========== AI侦测区域 ========== */
.ai-image {
    margin-top: 16px;
    border-radius: 12px;
    overflow: hidden;
}

.ai-image img {
    width: 100%;
    display: block;
}

/* ========== 分隔线区域 ========== */
.divider-section {
    padding: 20px 16px 16px 16px;
    text-align: center;
    background: transparent;
    margin: 0;
}

.divider-dots {
    font-size: 11px;
    color: #ddd;
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.divider-text-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.divider-arrow {
    font-size: 20px;
    color: #bbb;
    font-weight: normal;
}

.divider-title {
    font-size: 23px;
    font-weight: bold;
    color: #6B5D3F;
}

/* ========== 权益卡片 ========== */
.benefit-card {
    background: #ffffff;
    padding: 28px 20px;
    margin: 0 16px 16px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.benefit-title {
    font-size: 21px;
    font-weight: bold;
    color: #6B5D3F;
    margin-bottom: 14px;
}

.benefit-desc {
    font-size: 14px;
    color: #999;
    line-height: 1.7;
    margin-bottom: 24px;
}

/* 权益图片容器 */
.benefit-images-wrapper {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    position: relative;
    align-items: flex-end;
}

.benefit-image-left {
    flex: 0 0 58%;
    max-width: 58%;
    z-index: 1;
}

.benefit-image-right {
    flex: 0 0 42%;
    max-width: 42%;
    margin-left: -30px;
    margin-bottom: 20px;
    z-index: 2;
}

.benefit-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.benefit-image-single {
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 16px;
    /*box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);*/
}

.benefit-image-single .benefit-img {
    width: 100%;
    height: auto;
    display: block;
}

/* 权益底部说明 */
.benefit-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    padding: 0 4px;
}

.benefit-point {
    flex: 1;
}

.benefit-point-left {
    text-align: left;
}

.benefit-point-right {
    text-align: right;
}

.point-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.4;
}

.point-title-warning {
    color: #B8956A;
}

.point-subtitle {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.point-subtitle-warning {
    color: #B8956A;
}

/* ========== 底部固定支付栏 ========== */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 16px 16px 8px 16px;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.bottom-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.price-section {
    flex: 1;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.price-symbol {
    font-size: 20px;
    font-weight: bold;
    color: #ff0000;
    margin-right: 2px;
}

.price-value {
    font-size: 32px;
    font-weight: bold;
    color: #ff0000;
    line-height: 1;
    margin-right: 8px;
}

.price-original {
    font-size: 13px;
    color: #999;
    align-self: center;
}

.btn-pay {
    flex-shrink: 0;
    height: 50px;
    padding: 0 40px;
    background: linear-gradient(135deg, #FFB366 0%, #FF9944 100%);
    color: #8B4513;
    border: none;
    border-radius: 25px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 153, 68, 0.4);
    transition: all 0.3s;
}

.btn-pay:active {
    transform: scale(0.98);
}

.btn-pay:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
    color: #999;
}

.agreement-section {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.agreement-icon {
    flex-shrink: 0;
    cursor: pointer;
}

.agreement-text {
    cursor: pointer;
    user-select: none;
}

.bottom-indicator {
    width: 134px;
    height: 5px;
    background: #333;
    border-radius: 3px;
    margin: 0 auto;
    opacity: 0.3;
}

/* ========== Loading ========== */
.loading {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.loading.show {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== Toast ========== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 2000;
    display: none;
    max-width: 80%;
    text-align: center;
}

.toast.show {
    display: block;
    animation: fadeInOut 2s;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0;
    }
    10%, 90% {
        opacity: 1;
    }
}

/* ========== 兑换码弹窗 ========== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    animation: slideUp 0.3s;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:active {
    transform: scale(0.95);
}

.modal-body {
    padding: 24px 20px;
}

.modal-input {
    width: 100%;
    height: 48px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 15px;
    color: #333;
    outline: none;
    transition: border-color 0.3s;
}

.modal-input:focus {
    border-color: #ff6b35;
}

.modal-input::placeholder {
    color: #bbb;
}

.modal-hint {
    font-size: 13px;
    color: #999;
    margin-top: 12px;
    line-height: 1.5;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px 20px 20px;
}

.modal-btn {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.modal-btn-cancel:active {
    background: #e0e0e0;
}

.modal-btn-confirm {
    background: linear-gradient(135deg, #FFB366 0%, #FF9944 100%);
    color: #8B4513;
    box-shadow: 0 2px 8px rgba(255, 153, 68, 0.3);
}

.modal-btn-confirm:active {
    transform: scale(0.98);
}

.modal-btn-confirm:disabled {
    background: #ccc;
    color: #999;
    box-shadow: none;
    cursor: not-allowed;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .package-card {
        width: 160px;
        padding: 10px 8px;
        border-radius: 12px;
    }
    
    .package-badge {
        top: 8px;
        left: 8px;
        font-size: 9px;
        padding: 2px 6px;
    }
    
    .package-name {
        font-size: 13px;
        margin: 26px 0 6px 0;
    }
    
    .package-duration {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .package-daily {
        font-size: 24px;
        margin: 10px 0 12px 0;
    }
    
    .package-price-section {
        padding: 6px 8px;
        border-radius: 6px;
    }
    
    .package-price-label {
        font-size: 11px;
    }
    
    .package-price {
        font-size: 14px;
    }
    
    .package-price-symbol {
        font-size: 10px;
    }
    
    .scenarios-grid {
        gap: 12px;
    }
}


/* ========== 升级相关样式 ========== */
.package-card.upgradeable {
    border: 2px solid #FF6B35;
    background: linear-gradient(135deg, #fff5f2 0%, #ffffff 100%);
}

.package-card.upgradeable.selected {
    border-color: #FF6B35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.upgrade-badge {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C5A 100%);
    color: white;
    font-weight: 600;
}

.upgrade-label {
    font-size: 12px;
    color: #FF6B35;
    margin-right: 4px;
    font-weight: 500;
}

.package-card.upgradeable .package-price {
    color: #FF6B35;
}

.package-card.upgradeable .package-price-symbol {
    color: #FF6B35;
}

/* 升级提示 */
.upgrade-tip {
    background: #fff5f2;
    border-left: 3px solid #FF6B35;
    padding: 12px 16px;
    margin: 16px;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upgrade-tip-icon {
    color: #FF6B35;
    font-size: 18px;
    flex-shrink: 0;
}

/* 升级按钮样式 */
.btn-pay.upgrade-mode {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C5A 100%);
}

.btn-pay.upgrade-mode:active {
    background: linear-gradient(135deg, #E55A2B 0%, #E57A48 100%);
}
