/* 瓜分点券 — 红包主题 */
.coupon-split-page {
    background: linear-gradient(180deg, #1a0a0c 0%, #2d1218 28%, #1a1a2e 55%, #0f1419 100%) !important;
    padding-bottom: 0 !important;
}

.coupon-split-page .csp-topbar {
    background: rgba(26, 10, 12, 0.92);
    border-bottom-color: rgba(255, 180, 100, 0.12);
}

.coupon-split-page .csp-topbar .back-link {
    color: #ffb74d;
}

.csp-page {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 14px calc(20px + env(safe-area-inset-bottom, 0px));
}

.csp-page-intro {
    text-align: center;
    padding: 4px 0 16px;
}

.csp-page-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff5e6;
    letter-spacing: 0.06em;
}

.csp-page-desc {
    margin: 6px 0 0;
    font-size: 13px;
    color: rgba(255, 220, 180, 0.65);
}

/* ========== 红包主卡片 ========== */
.csp-envelope {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(165deg, #e84c3d 0%, #c62828 42%, #8b1a1a 100%);
    box-shadow:
        0 12px 40px rgba(200, 40, 40, 0.45),
        0 0 0 1px rgba(255, 220, 150, 0.15) inset;
    margin-bottom: 14px;
}

.csp-envelope-glow {
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 60%;
    background: radial-gradient(ellipse, rgba(255, 220, 120, 0.35) 0%, transparent 70%);
    pointer-events: none;
}

.csp-envelope-top {
    position: relative;
    padding: 18px 20px 8px;
    text-align: center;
}

.csp-phase-tag {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.2);
    color: #ffe082;
    border: 1px solid rgba(255, 235, 180, 0.25);
}

.csp-phase-tag.is-waiting {
    color: #b3e5fc;
    border-color: rgba(179, 229, 252, 0.35);
}

.csp-phase-tag.is-done {
    color: #cfd8dc;
}

.csp-envelope-title {
    margin: 10px 0 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff8e7;
    line-height: 1.35;
}

.csp-envelope-body {
    position: relative;
    padding: 8px 20px 16px;
    text-align: center;
}

.csp-envelope-hint {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 240, 210, 0.75);
    letter-spacing: 0.2em;
}

.csp-envelope-amount {
    margin: 4px 0 16px;
    line-height: 1.1;
}

.csp-amount-num {
    font-size: 2.75rem;
    font-weight: 800;
    color: #ffe566;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    font-variant-numeric: tabular-nums;
}

.csp-amount-unit {
    font-size: 1rem;
    color: rgba(255, 248, 220, 0.9);
    margin-left: 4px;
    font-weight: 600;
}

/* 倒计时 */
.csp-countdown-block {
    background: rgba(0, 0, 0, 0.18);
    border-radius: 12px;
    padding: 10px 12px 12px;
    margin-bottom: 12px;
}

.csp-countdown-label {
    margin: 0 0 8px;
    font-size: 12px;
    color: rgba(255, 240, 210, 0.8);
}

.csp-countdown-digits {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.csp-digit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 44px;
}

.csp-digit em {
    display: block;
    font-style: normal;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 6px 10px;
    min-width: 36px;
    font-variant-numeric: tabular-nums;
}

.csp-digit i {
    font-style: normal;
    font-size: 10px;
    color: rgba(255, 240, 210, 0.65);
    margin-top: 4px;
}

.csp-digit-sep {
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255, 240, 210, 0.5);
    padding-bottom: 14px;
}

/* 报名进度 */
.csp-progress-wrap {
    text-align: left;
}

.csp-progress-head {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255, 240, 210, 0.85);
    margin-bottom: 6px;
}

.csp-progress-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 3px;
    overflow: hidden;
}

.csp-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffe082, #ffd54f);
    border-radius: 3px;
    transition: width 0.35s ease;
}

/* 抢红包按钮区 */
.csp-envelope-foot {
    position: relative;
    padding: 20px 24px 24px;
    background: linear-gradient(180deg, #b71c1c 0%, #7f0000 100%);
    border-top: 1px dashed rgba(255, 220, 150, 0.2);
}

.csp-envelope-foot::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 88%;
    height: 28px;
    background: #c62828;
    border-radius: 50%;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
}

.csp-grab-btn {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    padding: 0;
    border: none;
    border-radius: 50%;
    aspect-ratio: 1;
    background: linear-gradient(145deg, #ffd54f 0%, #ffb300 45%, #ff8f00 100%);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.35),
        0 0 0 4px rgba(255, 235, 180, 0.35),
        inset 0 2px 4px rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.csp-grab-btn:active:not(:disabled) {
    transform: scale(0.96);
}

.csp-grab-btn:disabled {
    background: linear-gradient(145deg, #9e9e9e, #757575);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: not-allowed;
}

.csp-grab-btn-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 1.15rem;
    font-weight: 800;
    color: #5d3200;
    letter-spacing: 0.08em;
}

.csp-grab-btn.is-joined .csp-grab-btn-inner {
    font-size: 0.95rem;
    color: #424242;
}

.csp-joined-tip {
    margin: 14px 0 0;
    text-align: center;
    font-size: 13px;
    color: #c8e6c9;
}

/* 空状态红包 */
.csp-envelope--empty {
    padding: 48px 24px;
    text-align: center;
    background: linear-gradient(165deg, #4a3035 0%, #2d1218 100%);
}

.csp-envelope-icon {
    font-size: 4rem;
    opacity: 0.5;
    margin-bottom: 12px;
}

.csp-empty-title {
    margin: 0;
    font-size: 1.05rem;
    color: #ffccbc;
}

.csp-empty-desc {
    margin: 8px 0 0;
    font-size: 13px;
    color: rgba(255, 200, 180, 0.5);
}

/* 信息条 */
.csp-info-card {
    background: rgba(26, 20, 28, 0.85);
    border: 1px solid rgba(255, 200, 120, 0.1);
    border-radius: 14px;
    padding: 4px 0;
    margin-bottom: 12px;
}

.csp-info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.csp-info-row:last-child {
    border-bottom: none;
}

.csp-info-icon {
    font-size: 1.1rem;
    line-height: 1.4;
}

.csp-info-text {
    flex: 1;
    min-width: 0;
}

.csp-info-label {
    display: block;
    font-size: 11px;
    color: #8b9cb3;
    margin-bottom: 2px;
}

.csp-info-value {
    font-size: 13px;
    color: #e8ecf2;
    line-height: 1.45;
    word-break: break-all;
}

.csp-link-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: none;
    background: transparent;
    color: #ffb74d;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
}

/* ========== 底部往期面板 ========== */
.csp-bottom-panel {
    margin: 8px -14px 0;
    padding-top: 8px;
}

.csp-bottom-panel-inner {
    background: linear-gradient(180deg, #1e2430 0%, #151a24 100%);
    border-radius: 20px 20px 0 0;
    border: 1px solid rgba(255, 200, 120, 0.12);
    border-bottom: none;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
    padding: 0 16px 16px;
    min-height: 120px;
}

.csp-bottom-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 16px 4px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 12px;
}

.csp-bottom-head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #f0f4f8;
}

.csp-bottom-sub {
    font-size: 12px;
    color: #6b7c93;
}

.csp-past-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.csp-past-list::-webkit-scrollbar {
    width: 4px;
}

.csp-past-list::-webkit-scrollbar-thumb {
    background: rgba(255, 200, 100, 0.25);
    border-radius: 2px;
}

.csp-past-loading,
.csp-past-empty {
    text-align: center;
    padding: 28px 16px;
    font-size: 13px;
    color: #6b7c93;
}

.csp-past-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.csp-past-item:active {
    background: rgba(255, 200, 100, 0.08);
    border-color: rgba(255, 200, 100, 0.2);
}

.csp-past-item-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #c62828, #8b1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.csp-past-item-body {
    flex: 1;
    min-width: 0;
}

.csp-past-item-title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: #f0f4f8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.csp-past-item-meta {
    margin: 0;
    font-size: 12px;
    color: #8b9cb3;
    line-height: 1.4;
}

.csp-past-item-amt {
    flex-shrink: 0;
    text-align: right;
}

.csp-past-item-amt strong {
    display: block;
    font-size: 15px;
    color: #ffd54f;
    font-weight: 700;
}

.csp-past-item-amt span {
    font-size: 10px;
    color: #6b7c93;
}

/* 活动说明 */
.csp-rules {
    margin: 16px 0 8px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 13px;
    color: #8b9cb3;
}

.csp-rules summary {
    cursor: pointer;
    color: #b0bec5;
    font-weight: 500;
    list-style: none;
}

.csp-rules summary::-webkit-details-marker {
    display: none;
}

.csp-rules ul {
    margin: 10px 0 0;
    padding-left: 18px;
    line-height: 1.65;
}

/* 详情弹层 */
.csp-detail-sheet .csp-detail-body {
    font-size: 14px;
    color: #c5cdd8;
}

.csp-detail-hero {
    text-align: center;
    padding: 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(200, 40, 40, 0.25), rgba(139, 26, 26, 0.15));
    border-radius: 12px;
}

.csp-detail-hero .amt {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffd54f;
}

.csp-winner-list h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #f0f4f8;
}

.csp-winner-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.csp-winner-item .amt {
    color: #ffd54f;
    font-weight: 700;
}

@media (min-width: 400px) {
    .csp-grab-btn {
        max-width: 168px;
    }
}
