/**
 * 幸运抽奖 / 签到 / 累计&日消费奖励 / 周卡月卡
 */

.welfare-page .acct-section {
    padding-bottom: 8px;
}

/* ========== 抽奖 ========== */
.lottery-cost-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}

.lottery-cost-chip {
    flex: 1 1 30%;
    min-width: 100px;
    padding: 10px 8px;
    text-align: center;
    border-radius: 12px;
    background: rgba(126, 231, 135, 0.12);
    border: 1px solid rgba(126, 231, 135, 0.3);
    font-size: 12px;
    color: var(--act-muted);
}

.lottery-cost-chip strong {
    display: block;
    margin-top: 4px;
    font-size: 15px;
    color: #7ee787;
}

.lottery-machine {
    position: relative;
    width: min(300px, 88vw);
    height: min(300px, 88vw);
    margin: 8px auto 20px;
    background: linear-gradient(145deg, #1a2332 0%, #0f1419 100%);
    border-radius: 50%;
    border: 2px solid rgba(126, 231, 135, 0.35);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), inset 0 0 30px rgba(126, 231, 135, 0.08);
    overflow: hidden;
}

.lottery-machine .prize-list {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0s;
}

.lottery-machine .prize-item {
    position: absolute;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    padding: 4px;
}

.lottery-machine .prize-item img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.lottery-machine .pointer {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 26px solid #ff6b6b;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.lottery-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 16px;
}

.btn-lottery {
    flex: 1 1 28%;
    min-width: 90px;
    min-height: 44px;
    padding: 12px 10px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    color: #0f1419;
}

.btn-lottery:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-lottery.btn-one {
    background: linear-gradient(135deg, #7ee787, #2ecc71);
}

.btn-lottery.btn-ten {
    background: linear-gradient(135deg, #00d9ff, #4facfe);
    color: #0f1419;
}

.btn-lottery.btn-hundred {
    background: linear-gradient(135deg, #ffd700, #ffab40);
}

.lottery-info-tabs {
    display: flex;
    border-bottom: 1px solid var(--act-border);
    background: rgba(0, 0, 0, 0.25);
}

.lottery-info-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--act-muted);
    border: none;
    background: transparent;
}

.lottery-info-tab.active {
    color: #7ee787;
    box-shadow: inset 0 -2px 0 #7ee787;
}

.lottery-info-body {
    padding: 12px 14px 16px;
    max-height: 280px;
    overflow-y: auto;
}

.lottery-info-panel {
    display: none;
}

.lottery-info-panel.active {
    display: block;
}

.lottery-pool-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.lottery-pool-table th {
    padding: 8px 10px;
    text-align: left;
    color: var(--act-muted);
    border-bottom: 1px solid var(--act-border);
}

.lottery-pool-table td {
    padding: 10px;
    border-bottom: 1px solid var(--act-border);
    color: var(--act-text);
}

.lottery-pool-table .prob {
    color: #7ee787;
    font-weight: 700;
}

.lottery-rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lottery-rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--act-border);
}

.lottery-rank-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.lottery-rank-num.top1 { background: linear-gradient(135deg, #ffd700, #ff8c00); color: #0f1419; }
.lottery-rank-num.top2 { background: linear-gradient(135deg, #c0c0c0, #808080); color: #fff; }
.lottery-rank-num.top3 { background: linear-gradient(135deg, #cd7f32, #8b4513); color: #fff; }
.lottery-rank-num.normal { background: rgba(255, 255, 255, 0.1); color: var(--act-muted); }

.lottery-rank-name { flex: 1; font-size: 14px; }
.lottery-rank-times { color: #7ee787; font-weight: 600; font-size: 13px; }
.lottery-rank-reward {
    font-size: 10px;
    color: #ffab40;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255, 171, 64, 0.15);
}

.lottery-result-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 8px;
    max-height: 50vh;
    overflow-y: auto;
}

.lottery-result-item {
    padding: 10px 6px;
    background: rgba(126, 231, 135, 0.12);
    border: 1px solid rgba(126, 231, 135, 0.35);
    border-radius: 10px;
    font-size: 11px;
    text-align: center;
    color: var(--act-text);
    animation: wfPop 0.4s ease;
}

@keyframes wfPop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ========== 签到 ========== */
.wf-sign-hero {
    text-align: center;
    padding: 24px 16px;
    margin-bottom: 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(126, 231, 135, 0.18), rgba(0, 217, 255, 0.12));
    border: 1px solid rgba(126, 231, 135, 0.3);
}

.wf-sign-emoji {
    font-size: 48px;
    margin-bottom: 8px;
}

.wf-sign-vip {
    font-size: 22px;
    font-weight: 700;
    color: var(--act-text);
    margin-bottom: 6px;
}

.wf-sign-reward-line {
    font-size: 14px;
    color: var(--act-muted);
}

.wf-sign-reward-line strong {
    color: #ffd700;
    font-size: 18px;
}

.wf-sign-btn {
    width: 100%;
    min-height: 48px;
    margin-bottom: 12px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(90deg, #2ecc71, #7ee787);
    color: #0f1419;
    box-shadow: 0 4px 16px rgba(126, 231, 135, 0.35);
}

.wf-sign-btn:disabled {
    background: rgba(255, 255, 255, 0.12);
    color: var(--act-muted);
    box-shadow: none;
    cursor: not-allowed;
}

.wf-reward-rows .acct-bag-item {
    border-color: rgba(126, 231, 135, 0.15);
}

.wf-reward-rows .reward-level {
    color: #7ee787;
    font-weight: 700;
    min-width: 72px;
}

/* ========== 累计 / 日消费 统计 ========== */
.wf-stat-card {
    text-align: center;
    padding: 20px 16px;
    margin-bottom: 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(126, 231, 135, 0.15), rgba(0, 217, 255, 0.1));
    border: 1px solid rgba(126, 231, 135, 0.28);
}

.wf-stat-label {
    font-size: 13px;
    color: var(--act-muted);
    margin-bottom: 8px;
}

.wf-stat-label .wf-reset-hint {
    display: block;
    font-size: 11px;
    margin-top: 4px;
    opacity: 0.85;
}

.wf-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #7ee787;
}

.wf-stat-rows {
    margin-bottom: 12px;
    border-radius: 14px;
    background: rgba(12, 18, 32, 0.82);
    border: 1px solid var(--act-border);
    overflow: hidden;
}

.wf-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--act-border);
    font-size: 14px;
}

.wf-stat-row:last-child {
    border-bottom: none;
}

.wf-stat-row .label {
    color: var(--act-muted);
}

.wf-stat-row .value {
    font-weight: 700;
    color: var(--act-text);
}

.wf-stat-row.highlight {
    background: rgba(126, 231, 135, 0.08);
}

.wf-stat-row.highlight .value {
    color: #7ee787;
    font-size: 17px;
}

/* 累计奖励卡片 */
.wf-reward-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wf-reward-card {
    padding: 14px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.9));
    border: 1px solid var(--act-border);
}

.wf-reward-card.available {
    border-color: rgba(126, 231, 135, 0.45);
    box-shadow: 0 0 0 1px rgba(126, 231, 135, 0.15);
}

.wf-reward-card.received,
.wf-reward-card.locked {
    opacity: 0.65;
}

.wf-reward-threshold {
    font-size: 14px;
    font-weight: 700;
    color: #7ee787;
    margin-bottom: 8px;
}

.wf-reward-items {
    font-size: 13px;
    color: var(--act-muted);
    margin-bottom: 12px;
    line-height: 1.5;
}

.wf-btn-reward {
    width: 100%;
    min-height: 40px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(90deg, #2ecc71, #7ee787);
    color: #0f1419;
}

.wf-btn-reward:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--act-muted);
    cursor: not-allowed;
}

/* 日消费物品网格 */
.wf-item-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.wf-item-card {
    padding: 12px 8px;
    text-align: center;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.9));
    border: 1px solid rgba(126, 231, 135, 0.2);
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
}

.wf-item-card:active:not(.disabled) {
    transform: scale(0.97);
}

.wf-item-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wf-item-card .item-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.wf-item-card .item-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--act-text);
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wf-item-card .item-num {
    font-size: 11px;
    color: var(--act-muted);
    margin-bottom: 8px;
}

.wf-item-card .item-btn {
    display: inline-block;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(126, 231, 135, 0.2);
    color: #7ee787;
    font-weight: 600;
}

.wf-notice {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 171, 64, 0.1);
    border: 1px solid rgba(255, 171, 64, 0.3);
    font-size: 12px;
    color: #ffab40;
    line-height: 1.6;
}

.wf-notice .notice-item::before {
    content: "• ";
}

.wf-history-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--act-border);
    font-size: 13px;
}

.wf-history-item:last-child {
    border-bottom: none;
}

.wf-history-items {
    color: var(--act-text);
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.wf-history-time {
    color: var(--act-muted);
    font-size: 11px;
    flex-shrink: 0;
}

/* 周卡 / 月卡 */
.wf-card-hero {
    text-align: center;
    padding: 28px 16px;
    margin-bottom: 12px;
    border-radius: 14px;
    color: #fff;
}

.wf-card-hero--week {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.5), rgba(245, 87, 108, 0.45));
    border: 1px solid rgba(245, 87, 108, 0.4);
}

.wf-card-hero--week.inactive {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.35), rgba(118, 75, 162, 0.35));
    border-color: var(--act-border);
    opacity: 0.9;
}

.wf-card-hero--month {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.5), rgba(0, 242, 254, 0.4));
    border: 1px solid rgba(0, 217, 255, 0.4);
}

.wf-card-hero--month.inactive {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.35), rgba(118, 75, 162, 0.35));
    border-color: var(--act-border);
}

.wf-card-hero .card-icon {
    font-size: 52px;
    margin-bottom: 8px;
}

.wf-card-hero .card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.wf-card-hero .card-time {
    font-size: 13px;
    opacity: 0.9;
}

.wf-card-action {
    margin: 12px 0;
}

.wf-card-action .act-btn-primary.wf-btn-buy-card {
    background: linear-gradient(90deg, #ff6b6b, #ee5a5a);
    color: #fff;
    box-shadow: 0 4px 16px rgba(238, 90, 90, 0.35);
}

.wf-card-action .act-btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* 投票候选（日消费人气票） */
.wf-vote-search {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.wf-vote-search input {
    flex: 1;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--act-border);
    background: rgba(0, 0, 0, 0.35);
    color: var(--act-text);
    font-size: 14px;
}

.wf-vote-search button {
    min-height: 44px;
    padding: 0 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.wf-vote-selected {
    display: none;
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(167, 139, 250, 0.4);
    font-size: 14px;
    font-weight: 600;
    color: #c4b5fd;
}

.wf-vote-candidate {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 10px;
    border: 1px solid var(--act-border);
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-size: 14px;
}

.wf-vote-candidate:hover:not(.disabled) {
    border-color: rgba(167, 139, 250, 0.5);
    background: rgba(124, 58, 237, 0.12);
}

.wf-vote-candidate.selected {
    border-color: #a78bfa;
    background: rgba(124, 58, 237, 0.25);
}

.wf-vote-candidate.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wf-vote-no {
    color: #a78bfa;
    font-weight: 700;
    min-width: 40px;
}

.wf-vote-name {
    flex: 1;
    color: var(--act-text);
}

.wf-vote-count {
    font-size: 12px;
    color: var(--act-muted);
}

.act-modal-foot.act-btn-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.act-modal-foot.act-btn-row .act-btn-primary {
    flex: 1;
    width: auto;
}

.wf-reward-rows .acct-bag-item .reward-level {
    flex-shrink: 0;
    min-width: 72px;
    color: #7ee787;
    font-weight: 700;
    font-size: 14px;
}

@media (max-width: 360px) {
    .wf-item-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lottery-result-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
