/* 算法奖励规则弹窗 */
.reward-rules-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #fcd34d;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #b45309;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.reward-rules-btn:active {
    transform: scale(0.97);
}

.reward-rules-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.algo-reward-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.my-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 16px 12px 8px;
}

.my-section-head .my-section-title {
    margin: 0;
}

.hall-btn-reward {
    border: 1px solid #fcd34d;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #b45309;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

/* 结构与公告弹窗一致，避免遮罩盖住内容 */
.reward-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10100;
    background: rgba(15, 23, 42, 0.62);
}

.reward-modal.show {
    display: block;
}

.reward-modal-cell {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100%;
    padding: 0;
    box-sizing: border-box;
}

.reward-modal-box {
    position: relative;
    z-index: 2;
    width: min(520px, 100%);
    max-height: min(92vh, 720px);
    background: #fff;
    color: #1e293b;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.reward-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 12px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
    background: #fff;
}

.reward-modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.reward-modal-close {
    border: none;
    background: #f1f5f9;
    color: #64748b;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.reward-modal-body {
    padding: 0 18px 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(88vh - 160px);
    background: #fff;
}

.reward-intro {
    font-size: 13px;
    line-height: 1.65;
    color: #475569;
    margin: 12px 0 16px;
}

.reward-section {
    margin-bottom: 16px;
}

.reward-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.reward-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.reward-dot.blue { background: #3b82f6; }
.reward-dot.green { background: #10b981; }
.reward-dot.red { background: #ef4444; }
.reward-dot.orange { background: #f59e0b; }

.reward-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.reward-section-sub {
    font-size: 12px;
    color: #94a3b8;
    margin-left: 16px;
    margin-bottom: 8px;
}

.reward-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #f8fafc;
    border-radius: 10px;
    overflow: hidden;
}

.reward-table th,
.reward-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.reward-table th {
    background: #f1f5f9;
    color: #64748b;
    font-weight: 600;
    font-size: 12px;
}

.reward-table tr:last-child td {
    border-bottom: none;
}

.reward-days {
    color: #ea580c;
    font-weight: 700;
}

.reward-highlight-box {
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.65;
    color: #475569;
}

.reward-highlight-box.record {
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.reward-highlight-box.limit {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.reward-highlight-box strong {
    color: #ea580c;
}

.reward-notes {
    margin: 12px 0 0;
    padding-left: 18px;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.6;
}

.reward-notes li {
    margin-bottom: 4px;
}

.reward-modal-footer {
    padding: 12px 18px 16px;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
    flex-shrink: 0;
}

.reward-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reward-quick-links button {
    flex: 1 1 calc(50% - 4px);
    min-width: 120px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
}

.reward-quick-links button:active {
    background: #f1f5f9;
}

@media (max-width: 480px) {
    .reward-modal-cell {
        align-items: flex-start;
        padding: 0;
        padding-top: env(safe-area-inset-top, 0px);
    }

    .reward-modal-box {
        width: 100%;
        max-height: calc(92vh - env(safe-area-inset-top, 0px));
        border-radius: 0 0 16px 16px;
    }

    .reward-modal-body {
        max-height: calc(92vh - env(safe-area-inset-top, 0px) - 150px);
    }
}
