/**
 * 文章抢抢红包插件前端样式
 * 仅保留前台展示样式，后台沿用 WordPress 原生样式
 */

.qqhb-box-wrap {
    margin: 24px 0;
}

.qqhb-box {
    position: relative;
    border: 1px solid #ffe0e6;
    border-radius: 16px;
    padding: 20px 24px;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 76, 118, 0.18), transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(255, 200, 80, 0.18), transparent 50%),
        linear-gradient(135deg, #fff7f8 0%, #fffbf2 100%);
    box-shadow: 0 6px 24px rgba(255, 76, 118, 0.12);
    overflow: hidden;
}

.qqhb-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(45deg, rgba(255, 76, 118, 0.03) 0 12px, transparent 12px 24px);
    pointer-events: none;
}

.qqhb-box-head {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
}

.qqhb-box-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff7a8a 0%, #ff4c76 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(255, 76, 118, 0.4);
    flex-shrink: 0;
}

.qqhb-box-icon svg {
    width: 32px;
    height: 32px;
}

.qqhb-box-title h3 {
    margin: 0;
    font-size: 18px;
    color: #2c1a1f;
    font-weight: 700;
}

.qqhb-box-title p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #9c6b76;
}

.qqhb-summary {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    position: relative;
}

.qqhb-summary li {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #ffd6df;
    border-radius: 10px;
    padding: 10px 6px;
    text-align: center;
}

.qqhb-summary li span {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #e23b5a;
    line-height: 1.2;
}

.qqhb-summary li em {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-style: normal;
    color: #9c6b76;
}

.qqhb-status {
    margin-top: 12px;
    font-size: 13px;
    color: #9c6b76;
    min-height: 18px;
}

.qqhb-status:empty {
    display: none;
}

.qqhb-claimed-tip {
    margin-top: 10px;
    font-size: 13px;
    color: #2c8a4a;
}

.qqhb-claimed-tip b {
    color: #1f6d39;
}

.qqhb-claim-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.qqhb-password-input {
    flex: 1;
    min-width: 160px;
    padding: 8px 12px;
    border: 1px solid #ffd6df;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
}

.qqhb-password-input:focus {
    border-color: #ff4c76;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 76, 118, 0.15);
}

.qqhb-claim-btn {
    padding: 10px 28px !important;
    font-size: 15px !important;
    border-radius: 30px !important;
    color: #fff !important;
    background: linear-gradient(135deg, #ff7a8a 0%, #ff4c76 100%) !important;
    border: none !important;
    box-shadow: 0 6px 18px rgba(255, 76, 118, 0.4);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.qqhb-claim-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(255, 76, 118, 0.5);
}

.qqhb-actions.is-disabled .but {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========= 列表徽章 ========= */
.qqhb-list-marker {
    display: none !important;
}

.qqhb-list-badge-tag.but.c-red {
    color: #fff !important;
    background: linear-gradient(135deg, #ff7a8a 0%, #ff4c76 100%);
    border: none;
    padding: 2px 10px;
    font-size: 12px;
    border-radius: 50px;
    box-shadow: 0 3px 8px rgba(255, 76, 118, 0.35);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.qqhb-list-badge-tag::before {
    content: '\f06b';
    font-family: FontAwesome;
    margin-right: 4px;
}

/* ========= 模态弹窗（领取成功结果） ========= */
.qqhb-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qqhb-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
}

.qqhb-modal-box {
    position: relative;
    width: 92%;
    max-width: 380px;
    background: linear-gradient(180deg, #ff4c76 0%, #e23b5a 100%);
    border-radius: 18px;
    padding: 0;
    color: #fff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: qqhb-pop 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes qqhb-pop {
    0%   { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}

.qqhb-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 8px;
}

.qqhb-modal-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

.qqhb-modal-close {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background 0.2s;
}

.qqhb-modal-close:hover {
    background: rgba(255, 255, 255, 0.4);
}

.qqhb-modal-body {
    padding: 16px 20px 8px;
    text-align: center;
}

.qqhb-amount-num {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.qqhb-amount-tip {
    margin-top: 6px;
    font-size: 14px;
    opacity: 0.9;
}

.qqhb-modal .qqhb-summary {
    margin: 16px 0 0;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.qqhb-modal .qqhb-summary li {
    background: rgba(255, 255, 255, 0.18);
    border: none;
    padding: 8px 6px;
}

.qqhb-modal .qqhb-summary li span {
    color: #fff;
    font-size: 16px;
}

.qqhb-modal .qqhb-summary li em {
    color: rgba(255, 255, 255, 0.85);
}

.qqhb-balance {
    margin-top: 12px;
    font-size: 13px;
    opacity: 0.9;
}

.qqhb-balance b {
    font-size: 15px;
}

.qqhb-modal-foot {
    padding: 12px 20px 20px;
    text-align: center;
}

.qqhb-modal-foot .but {
    width: 100%;
    padding: 10px 0 !important;
    border-radius: 30px !important;
    background: #fff !important;
    color: #e23b5a !important;
    border: none !important;
    font-size: 15px !important;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.qqhb-modal-foot .but:hover {
    transform: translateY(-1px);
}

/* ========= 用户中心：领取/发出记录 ========= */
.qqhb-uc {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.qqhb-uc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.qqhb-uc-head h3 {
    margin: 0;
    font-size: 16px;
    color: #2c1a1f;
}

.qqhb-uc-count {
    font-size: 12px;
    color: #9c6b76;
}

.qqhb-empty {
    padding: 40px 0;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.qqhb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.qqhb-table th,
.qqhb-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid #f2f2f2;
}

.qqhb-table th {
    color: #666;
    font-weight: 600;
    background: #fafafa;
}

.qqhb-table td a {
    color: #ff4c76;
    text-decoration: none;
}

.qqhb-table td a:hover {
    text-decoration: underline;
}

.qqhb-amount-cell {
    color: #e23b5a;
    font-weight: 700;
}

.qqhb-status-ok {
    color: #2c8a4a;
    font-size: 12px;
}

.qqhb-status-end {
    color: #999;
    font-size: 12px;
}

.qqhb-pagination {
    margin-top: 16px;
    text-align: center;
}

.qqhb-pagination .page-numbers {
    display: inline-block;
    padding: 4px 10px;
    margin: 0 2px;
    border: 1px solid #eee;
    border-radius: 4px;
    color: #555;
    text-decoration: none;
    font-size: 13px;
}

.qqhb-pagination .page-numbers.current {
    background: #ff4c76;
    color: #fff;
    border-color: #ff4c76;
}

.qqhb-pagination .page-numbers:hover:not(.current) {
    border-color: #ff4c76;
    color: #ff4c76;
}

/* ========= 文章红包卡片内嵌领取记录列表 ========= */
.qqhb-card-claims {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #ffe0e6;
}
.qqhb-card-claims-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.qqhb-card-claims-title {
    font-size: 14px;
    font-weight: 700;
    color: #2c1a1f;
}
.qqhb-card-claims-summary {
    font-size: 12px;
    color: #9c6b76;
}
.qqhb-card-claims-list {
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
}
.qqhb-card-claims-list::-webkit-scrollbar { width: 5px; }
.qqhb-card-claims-list::-webkit-scrollbar-track { background: #fff5f7; border-radius: 3px; }
.qqhb-card-claims-list::-webkit-scrollbar-thumb { background: #ffc2d1; border-radius: 3px; }

.qqhb-card-claim-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: linear-gradient(135deg, #fff7f8 0%, #fffbf2 100%);
    border: 1px solid #ffe0e6;
    border-radius: 10px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.qqhb-card-claim-item:hover {
    transform: translateX(2px);
    box-shadow: 0 3px 10px rgba(255, 76, 118, 0.08);
}
.qqhb-card-claim-item.is-lucky {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.07), rgba(255, 251, 235, 0.5));
    border-color: #fde68a;
}

.qqhb-card-claim-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #ff4c76, #ffa64d);
    display: flex;
    align-items: center;
    justify-content: center;
}
.qqhb-card-claim-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.qqhb-card-claim-avatar-fallback {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.qqhb-card-claim-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.qqhb-card-claim-name {
    font-size: 13px;
    font-weight: 600;
    color: #2c1a1f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.qqhb-card-claim-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.qqhb-card-claim-uid {
    font-size: 10px;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 3px;
    font-family: monospace;
}
.qqhb-card-claim-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 3px;
    background: #dbeafe;
    color: #1e40af;
}
.qqhb-card-claim-tag.lucky {
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    color: #7c2d12;
}

.qqhb-card-claim-amount {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 800;
    color: #16a34a;
}

.qqhb-card-claims-more {
    text-align: center;
    padding: 8px 0 2px;
    color: #9ca3af;
    font-size: 11px;
}

@media (max-width: 640px) {
    .qqhb-card-claims-list { max-height: 280px; }
    .qqhb-card-claim-item { padding: 6px 8px; gap: 8px; }
    .qqhb-card-claim-avatar { width: 28px; height: 28px; }
    .qqhb-card-claim-name { font-size: 12px; }
    .qqhb-card-claim-amount { font-size: 13px; }
}

/* ========= 查看领取记录按钮 ========= */
.qqhb-view-claims-wrap {
    margin-top: 12px;
    text-align: center;
}

.qqhb-view-claims-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 76, 118, 0.08);
    color: #ff4c76;
    border: 1px solid rgba(255, 76, 118, 0.2);
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.qqhb-view-claims-btn:hover {
    background: rgba(255, 76, 118, 0.14);
    border-color: rgba(255, 76, 118, 0.4);
}

.qqhb-view-claims-btn svg {
    flex-shrink: 0;
}

.qqhb-claims-badge {
    display: inline-block;
    min-width: 18px;
    padding: 0 6px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    background: #ff4c76;
    color: #fff;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 2px;
}

/* ========= 领取记录弹窗 ========= */
.qqhb-claims-modal .qqhb-modal-box {
    max-width: 460px;
    width: calc(100% - 32px);
}

.qqhb-modal-body--scroll {
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.qqhb-claims-list-wrap {
    padding: 4px 0;
}

.qqhb-claims-head {
    padding: 0 4px 8px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.qqhb-claims-head h4 {
    margin: 0;
    font-size: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qqhb-claims-summary {
    font-size: 13px;
    color: #6b7280;
}
.qqhb-claims-summary b {
    color: #e23b5a;
    font-size: 15px;
}

.qqhb-claims-count {
    font-size: 12px;
    font-weight: normal;
    color: #888;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 10px;
}

.qqhb-claims-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.qqhb-claim-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 4px;
    border-bottom: 1px solid #f7f7f7;
}

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

.qqhb-claim-item.is-me {
    background: rgba(255, 76, 118, 0.04);
    border-radius: 8px;
    padding-left: 8px;
    padding-right: 8px;
}

.qqhb-claim-item.is-lucky {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.06), transparent);
    border-radius: 8px;
    padding-left: 8px;
    padding-right: 8px;
}

.qqhb-claim-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #ff4c76, #ffa64d);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qqhb-claim-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qqhb-avatar-text {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.qqhb-claim-main {
    flex: 1;
    min-width: 0;
}

.qqhb-claim-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.qqhb-claim-uid {
    font-size: 11px;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 500;
    font-family: monospace;
}

.qqhb-claim-time {
    font-size: 12px;
    color: #999;
}

.qqhb-claim-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.4;
}

.qqhb-badge-author {
    background: #dbeafe;
    color: #1e40af;
}

.qqhb-badge-me {
    background: #fee2e2;
    color: #b91c1c;
}

.qqhb-claim-amount {
    flex-shrink: 0;
    text-align: right;
}

.qqhb-amount-mask {
    font-size: 12px;
    color: #999;
}

.qqhb-claims-more {
    text-align: center;
    padding: 12px 0 4px;
    color: #999;
    font-size: 12px;
}

.qqhb-claim-name .qqhb-lucky-badge {
    font-size: 10px;
    padding: 1px 6px;
    animation: none;
}

/* ========= 余额记录页 ========= */
.qqhb-balance-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0;
}

.qqhb-balance-card {
    background: linear-gradient(135deg, #fff7f8 0%, #fffbf2 100%);
    border: 1px solid #ffe0e6;
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(255, 76, 118, 0.06);
}

.qqhb-balance-card.qqhb-income {
    background: linear-gradient(135deg, #f0fff4 0%, #ecfdf5 100%);
    border-color: #c6f6d5;
}

.qqhb-balance-card.qqhb-expense {
    background: linear-gradient(135deg, #fff5f5 0%, #fef2f2 100%);
    border-color: #fed7d7;
}

/* ========================================================================
   【红包中心 UI 大升级】 2026-08-06 新增：
   渐变统计卡片 + 卡片列表（原表格淘汰）+ 进度条 + 手气最佳金徽 + 筛选器 + 移动端响应式
   ======================================================================== */

/* -------- 1. 顶部渐变统计卡（3 列 / 4 列） -------- */
.qqhb-stats-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}
.qqhb-stats-3 { grid-template-columns: repeat(3, 1fr); }
.qqhb-stats-4 { grid-template-columns: repeat(4, 1fr); }

.qqhb-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff7f8 0%, #fffbf2 100%);
    border: 1px solid #ffe0e6;
    box-shadow: 0 3px 12px rgba(255, 76, 118, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}
.qqhb-stat-card::after {
    content: '';
    position: absolute;
    right: -20px; bottom: -20px;
    width: 80px; height: 80px;
    background: radial-gradient(circle, rgba(255,76,118,.08), transparent 70%);
    pointer-events: none;
}
.qqhb-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(255, 76, 118, 0.14);
}
.qqhb-stat-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    background: linear-gradient(135deg, #ffe0e6 0%, #fff3cd 100%);
    flex-shrink: 0;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,.04);
}
.qqhb-stat-body { display: flex; flex-direction: row; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.qqhb-stat-label {
    font-size: 12px;
    color: #9c6b76;
    font-weight: 500;
}
.qqhb-stat-value {
    font-size: 18px;
    font-weight: 800;
    color: #e23b5a;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.qqhb-stat-sub {
    font-size: 11px;
    font-weight: 500;
    opacity: .75;
    margin-left: 3px;
}

/* 不同统计卡的主题渐变 */
.qqhb-stat--balance { background: linear-gradient(135deg, #fff5f7 0%, #ffeff4 100%); border-color: #ffd0dd; }
.qqhb-stat--count   { background: linear-gradient(135deg, #f0f9ff 0%, #eff6ff 100%); border-color: #bfdbfe; }
.qqhb-stat--count   .qqhb-stat-value { color: #1d4ed8; }
.qqhb-stat--count   .qqhb-stat-icon  { background: linear-gradient(135deg,#dbeafe,#bfdbfe); }
.qqhb-stat--lucky   { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); border-color: #fcd34d; }
.qqhb-stat--lucky   .qqhb-stat-value { color: #b45309; }
.qqhb-stat--lucky   .qqhb-stat-icon  { background: linear-gradient(135deg,#fde68a,#fbbf24); }
.qqhb-stat--max     { background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); border-color: #86efac; }
.qqhb-stat--max     .qqhb-stat-value { color: #166534; }
.qqhb-stat--max     .qqhb-stat-icon  { background: linear-gradient(135deg,#bbf7d0,#86efac); }

.qqhb-stat--packet-total  { background: linear-gradient(135deg,#fff1f2 0%,#ffe4e6 100%); border-color: #fecdd3; }
.qqhb-stat--packet-count  { background: linear-gradient(135deg,#f5f3ff 0%,#ede9fe 100%); border-color: #ddd6fe; }
.qqhb-stat--packet-count  .qqhb-stat-value { color: #5b21b6; }
.qqhb-stat--packet-count  .qqhb-stat-icon  { background: linear-gradient(135deg,#ddd6fe,#c4b5fd); }
.qqhb-stat--packet-claimed{ background: linear-gradient(135deg,#ecfdf5 0%,#d1fae5 100%); border-color: #6ee7b7; }
.qqhb-stat--packet-claimed .qqhb-stat-value { color: #047857; }
.qqhb-stat--packet-claimed .qqhb-stat-icon  { background: linear-gradient(135deg,#a7f3d0,#6ee7b7); }
.qqhb-stat--packet-remain { background: linear-gradient(135deg,#fffbeb 0%,#fef3c7 100%); border-color: #fcd34d; }
.qqhb-stat--packet-remain .qqhb-stat-value { color: #92400e; }
.qqhb-stat--packet-remain .qqhb-stat-icon  { background: linear-gradient(135deg,#fde68a,#fbbf24); }

.qqhb-stat--cur { background: linear-gradient(135deg, #fff5f7 0%, #ffe8ef 100%); border-color: #ffc2d1; }
.qqhb-stat--cur .qqhb-stat-value { font-size: 22px; }
.qqhb-stat--in { background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); border-color: #86efac; }
.qqhb-stat--in .qqhb-stat-value { color: #166534; }
.qqhb-stat--in .qqhb-stat-icon { background: linear-gradient(135deg,#bbf7d0,#86efac); }
.qqhb-stat--out { background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%); border-color: #fca5a5; }
.qqhb-stat--out .qqhb-stat-value { color: #b91c1c; }
.qqhb-stat--out .qqhb-stat-icon { background: linear-gradient(135deg,#fecaca,#fca5a5); }

/* -------- 2. 卡片列表容器（原表格淘汰，移动端友好） -------- */
.qqhb-card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* -------- 3. 通用列表卡片（领取/流水通用） -------- */
.qqhb-list-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #f3e8eb;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    text-decoration: none !important;
    color: inherit;
    position: relative;
}
.qqhb-list-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 76, 118, 0.1);
    border-color: #ffc2d1;
    z-index: 1;
}
a.qqhb-list-card:hover { color: inherit; text-decoration: none; }

/* 缩略图（左侧 56×56 圆角） */
.qqhb-card-thumb {
    width: 56px; height: 56px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #fff7f8 0%, #fffbf2 100%);
    display: flex; align-items: center; justify-content: center;
    border: 1px solid #ffe0e6;
}
.qqhb-card-thumb img,
.qqhb-thumb-img {
    width: 100% !important; height: 100% !important;
    object-fit: cover;
    display: block;
    border-radius: 0 !important;
    max-width: none !important;
}
.qqhb-thumb-fallback {
    font-size: 22px;
    opacity: .6;
}

/* 中部：标题 + 元数据 */
.qqhb-card-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.qqhb-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c1a1f;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.qqhb-card-title a:hover { text-decoration: underline; }
.qqhb-card-meta {
    font-size: 12px;
    color: #8b6a73;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.qqhb-log-balance-row b {
    color: #c71f48;
    font-weight: 700;
}
.qqhb-log-time-row {
    color: #9ca3af;
    font-size: 11px;
    font-family: monospace;
}

/* 右侧：金额列 */
.qqhb-card-amount {
    flex-shrink: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.qqhb-amount-in {
    color: #16a34a;
    font-weight: 800;
    font-size: 16px;
    line-height: 1.2;
}
.qqhb-amount-out {
    color: #dc2626;
    font-weight: 800;
    font-size: 16px;
    line-height: 1.2;
}

/* 👑 手气最佳徽章（金色渐变 + 动画） */
.qqhb-lucky-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    background: linear-gradient(135deg, #fde68a 0%, #f59e0b 100%);
    color: #7c2d12;
    border-radius: 999px;
    border: 1px solid #f59e0b;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
    line-height: 1.4;
    animation: ms-hb-lucky-pulse 2.5s ease-in-out infinite;
}
.qqhb-claim-card.is-lucky {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.12), 0 6px 18px rgba(245, 158, 11, 0.15) !important;
    background: linear-gradient(135deg, #fffbeb 0%, #fff 40%, #fef3c7 100%);
}
@keyframes ms-hb-lucky-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35); }
    50%      { transform: scale(1.06); box-shadow: 0 4px 14px rgba(245, 158, 11, 0.55); }
}

/* -------- 4. 我发出的红包卡（带进度条 + 操作按钮） -------- */
.qqhb-packet-card {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
}
.qqhb-packet-card .qqhb-packet-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px dashed #f3e0e5;
}
.qqhb-packet-card .qqhb-packet-head:hover { background: linear-gradient(90deg, rgba(255,76,118,.04), transparent); }

.qqhb-packet-status {
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    line-height: 1.5;
}
.qqhb-packet-status--active { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.qqhb-packet-status--end    { background: #f3f4f6; color: #4b5563; border: 1px solid #d1d5db; }

.qqhb-packet-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.qqhb-packet-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.qqhb-packet-am {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    background: linear-gradient(135deg, #fff7f8 0%, #fffbf2 100%);
    border: 1px solid #ffe0e6;
    border-radius: 10px;
}
.qqhb-packet-am .am-label { font-size: 11px; color: #9c6b76; }
.qqhb-packet-am .am-val {
    font-size: 15px;
    font-weight: 800;
    color: #e23b5a;
}
.qqhb-packet-am .am-val.in  { color: #16a34a; }
.qqhb-packet-am .am-val.out { color: #b45309; }

/* 进度条（渐变） */
.qqhb-progress {
    position: relative;
    background: #fff1f5;
    border: 1px solid #ffd6df;
    border-radius: 999px;
    height: 28px;
    overflow: hidden;
}
.qqhb-progress-bar {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    background: linear-gradient(90deg, #ff7a8a 0%, #ff4c76 50%, #ffb347 100%);
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(.4, 0, .2, 1);
    box-shadow: inset 0 -2px 4px rgba(0,0,0,.08);
}
.qqhb-progress-txt {
    position: relative;
    z-index: 1;
    height: 100%;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: #7a2436;
    text-shadow: 0 1px 0 rgba(255,255,255,.55);
}

/* 操作按钮 */
.qqhb-packet-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.qqhb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none !important;
    line-height: 1.4;
}
.qqhb-btn--primary {
    background: linear-gradient(135deg, #ff7a8a 0%, #ff4c76 100%);
    color: #fff !important;
    border: 1px solid #ff4c76;
    box-shadow: 0 3px 8px rgba(255,76,118,.3);
}
.qqhb-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255,76,118,.45);
    color: #fff !important;
}
.qqhb-btn--ghost {
    background: rgba(255,76,118,.08);
    color: #e23b5a !important;
    border: 1px solid rgba(255,76,118,.25);
}
.qqhb-btn--ghost:hover {
    background: rgba(255,76,118,.14);
    transform: translateY(-1px);
    color: #e23b5a !important;
}
.qqhb-btn--disabled {
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    border: 1px solid #e5e7eb !important;
    cursor: not-allowed;
    pointer-events: none;
}

/* -------- 5. 余额流水卡（带图标 + 类型徽章） -------- */
.qqhb-log-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.qqhb-log-icon--claim   { background: linear-gradient(135deg,#fecaca,#f87171); }
.qqhb-log-icon--publish { background: linear-gradient(135deg,#fed7aa,#fb923c); }
.qqhb-log-icon--refund  { background: linear-gradient(135deg,#c7d2fe,#818cf8); }
.qqhb-log-icon--modify  { background: linear-gradient(135deg,#ddd6fe,#a78bfa); }

.qqhb-log-type-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    margin-right: 4px;
}
.qqhb-log-type--claim   { background: #fee2e2; color: #991b1b; border:1px solid #fecaca; }
.qqhb-log-type--publish { background: #ffedd5; color: #9a3412; border:1px solid #fed7aa; }
.qqhb-log-type--refund  { background: #e0e7ff; color: #3730a3; border:1px solid #c7d2fe; }
.qqhb-log-type--modify  { background: #ede9fe; color: #5b21b6; border:1px solid #ddd6fe; }
.qqhb-log-note { color: #444; font-weight: 500; }
.qqhb-log-post-link {
    color: #e23b5a !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.qqhb-log-post-link:hover { opacity: .8; }

/* -------- 6. 类型筛选器（pills 胶囊） -------- */
.qqhb-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0 6px;
    flex-wrap: wrap;
}
.qqhb-filter-pill {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 999px;
    background: #fff;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    text-decoration: none !important;
    transition: all 0.2s;
    line-height: 1.4;
}
.qqhb-filter-pill:hover {
    border-color: #ffc2d1;
    color: #e23b5a;
    background: #fff5f7;
}
.qqhb-filter-pill.is-active {
    background: linear-gradient(135deg, #ff7a8a 0%, #ff4c76 100%);
    color: #fff !important;
    border-color: #ff4c76;
    box-shadow: 0 3px 10px rgba(255,76,118,.3);
}

/* -------- 7. 空状态（升级成带 emoji 图标） -------- */
.qqhb-empty {
    padding: 50px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    line-height: 1.8;
}
.qqhb-empty-icon {
    font-size: 52px;
    margin-bottom: 10px;
    opacity: .55;
}

/* -------- 8. 移动端响应式（≤640px） -------- */
@media (max-width: 640px) {
    .qqhb-stats-3 { grid-template-columns: repeat(1, 1fr); }
    .qqhb-stats-4 { grid-template-columns: repeat(2, 1fr); }

    .qqhb-stat-card { padding: 12px; gap: 10px; }
    .qqhb-stat-icon { width: 38px; height: 38px; font-size: 18px; border-radius: 10px; }
    .qqhb-stat-label { font-size: 11px; }
    .qqhb-stat-value { font-size: 16px; }
    .qqhb-stat--cur .qqhb-stat-value { font-size: 18px; }

    .qqhb-card-thumb { width: 48px; height: 48px; border-radius: 8px; }
    .qqhb-card-title  { font-size: 13px; }
    .qqhb-card-meta   { font-size: 11px; }
    .qqhb-amount-in,
    .qqhb-amount-out  { font-size: 14px; }
    .qqhb-log-icon { width: 38px; height: 38px; font-size: 18px; border-radius: 10px; }

    .qqhb-packet-amounts { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .qqhb-packet-am { padding: 6px 2px; border-radius: 8px; }
    .qqhb-packet-am .am-val { font-size: 13px; }

    .qqhb-packet-actions { flex-direction: column; align-items: stretch; }
    .qqhb-btn { width: 100%; }

    .qqhb-filter-pill { padding: 5px 12px; font-size: 12px; }
}
@media (max-width: 380px) {
    .qqhb-stats-4 { grid-template-columns: repeat(1, 1fr); }
}

.qqhb-balance-label {
    font-size: 12px;
    color: #888;
}

.qqhb-balance-value {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
}

.qqhb-income .qqhb-balance-value {
    color: #16a34a;
}

.qqhb-expense .qqhb-balance-value {
    color: #dc2626;
}

.qqhb-logs-table .qqhb-log-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: #f3f4f6;
    color: #4b5563;
    white-space: nowrap;
}

.qqhb-type-claim {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

.qqhb-type-publish {
    background: #dbeafe !important;
    color: #1e40af !important;
}

.qqhb-type-refund {
    background: #dcfce7 !important;
    color: #166534 !important;
}

.qqhb-type-modify {
    background: #fef3c7 !important;
    color: #92400e !important;
}

.qqhb-log-note {
    max-width: 280px;
    word-break: break-all;
}

.qqhb-log-post {
    color: #ff4c76;
    text-decoration: none;
    margin-left: 4px;
}

.qqhb-log-post:hover {
    text-decoration: underline;
}

.qqhb-amount-in {
    color: #16a34a;
    font-weight: 600;
}

.qqhb-amount-out {
    color: #dc2626;
    font-weight: 600;
}

.qqhb-balance-cell {
    color: #6b7280;
}

/* ========= 响应式 ========= */
@media (max-width: 600px) {
    .qqhb-box {
        padding: 16px;
    }
    .qqhb-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    .qqhb-table {
        font-size: 12px;
    }
    .qqhb-table th,
    .qqhb-table td {
        padding: 8px 4px;
    }
    .qqhb-balance-summary {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .qqhb-log-note {
        max-width: 160px;
    }
}

/* ========= 前端投稿页面的红包设置面板 ========= */
.qqhb-front-panel {
    margin: 14px 0;
    padding: 16px 18px;
    background: linear-gradient(135deg, #fff5f7 0%, #fff9ed 100%);
    border: 1px solid #ffccd5;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(255, 76, 118, 0.06);
}
.qqhb-front-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px dashed #ffccd5;
    flex-wrap: wrap;
    gap: 8px;
}
.qqhb-front-panel-title {
    font-size: 16px;
    font-weight: 700;
    color: #c71f48;
}
.qqhb-front-panel-balance {
    font-size: 13px;
    color: #6b4551;
}
.qqhb-front-panel-balance strong {
    color: #c71f48;
    font-size: 14px;
    margin: 0 2px;
}
.qqhb-front-panel-balance a {
    color: #d63638;
    text-decoration: underline;
    font-weight: 600;
}
.qqhb-front-panel-tip {
    font-size: 12px;
    color: #c71f48;
    background: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    border-left: 3px solid #ff4c76;
}

.qqhb-front-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 12px;
    flex-wrap: wrap;
}
.qqhb-front-label {
    flex-shrink: 0;
    min-width: 100px;
    width: 110px;
    font-size: 13px;
    font-weight: 600;
    color: #2c1a1f;
    padding-top: 6px;
    line-height: 1.4;
}
.qqhb-front-control {
    flex: 1;
    min-width: 180px;
}
.qqhb-front-control input[type="text"],
.qqhb-front-control input[type="number"] {
    width: 100%;
    padding: 7px 10px;
    font-size: 13px;
    border: 1px solid #e5b8c2;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}
.qqhb-front-control input:focus {
    outline: none;
    border-color: #ff4c76;
    box-shadow: 0 0 0 2px rgba(255, 76, 118, 0.15);
}
.qqhb-front-mode {
    display: flex;
    gap: 16px;
    padding-top: 6px;
    flex-wrap: wrap;
}
.qqhb-front-mode label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #2c1a1f;
    cursor: pointer;
    font-weight: 500;
}
.qqhb-front-mode input[type="radio"] {
    accent-color: #ff4c76;
}

/* 提示区 */
.qqhb-front-tip {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 10px;
    line-height: 1.5;
}
.qqhb-front-tip.wait {
    background: #fff8e5;
    color: #996800;
    border: 1px solid #f5d77e;
}
.qqhb-front-tip.success {
    background: #e6f7e6;
    color: #1a7a1a;
    border: 1px solid #8fd68f;
}
.qqhb-front-tip.error {
    background: #ffeaea;
    color: #a00;
    border: 1px solid #ffb3b3;
}
.qqhb-front-btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    margin-top: 6px;
    transition: all 0.15s;
}
.qqhb-front-btn-primary {
    background: linear-gradient(135deg, #ff4c76, #ff9966);
    color: #fff;
    border: 0;
    box-shadow: 0 2px 6px rgba(255, 76, 118, 0.25);
}
.qqhb-front-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 76, 118, 0.35);
    color: #fff;
}

@media (max-width: 640px) {
    .qqhb-front-panel { padding: 12px 14px; margin: 10px 0; border-radius: 12px; }
    .qqhb-front-panel-title { font-size: 15px; }
    .qqhb-front-row { flex-direction: column; gap: 6px; }
    .qqhb-front-label { min-width: auto; width: 100%; padding-top: 0; }
    .qqhb-front-control { width: 100%; min-width: 0; }
    .qqhb-front-mode { padding-top: 0; gap: 12px; }
}
