/**
 * 返水页面样式
 * 兼容低版本浏览器和iOS设备
 * 支持三种主题：dark（默认）、light、blue
 */

/* =========================
   基础样式（兼容低版本）
========================= */
.rebate-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 50px;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    background-color: #1a1a1a;
    border-bottom: 1px solid #404040;
    -webkit-box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.rebate-header-content {
    width: 100%;
    max-width: 100%;
    padding: 0 15px;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: justify;
    -moz-box-pack: justify;
    -ms-flex-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
}

.rebate-back-btn {
    width: 40px;
    height: 40px;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    color: #e0e0e0;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.rebate-title {
    -webkit-box-flex: 1;
    -moz-box-flex: 1;
    -ms-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
    padding: 0 10px;
}

.rebate-header-placeholder {
    width: 40px;
    height: 40px;
}

.rebate-page {
    margin-top: 50px;
    padding: 15px;
    padding-bottom: 30px;
    min-height: calc(100vh - 50px);
    background-color: #1a1a1a;
}

/* VIP信息卡片 */
.rebate-vip-card {
    background-color: #2d2d2d;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: justify;
    -moz-box-pack: justify;
    -ms-flex-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.rebate-vip-item {
    -webkit-box-flex: 1;
    -moz-box-flex: 1;
    -ms-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    text-align: center;
}

.rebate-vip-label {
    display: block;
    font-size: 14px;
    color: #999999;
    margin-bottom: 8px;
}

.rebate-vip-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #FFD700;
}

/* 可领取返水卡片 */
.rebate-claimable-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    -webkit-box-shadow: 0 8px 24px rgba(245, 87, 108, 0.3);
    box-shadow: 0 8px 24px rgba(245, 87, 108, 0.3);
    color: #ffffff;
}

.rebate-claimable-header {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: justify;
    -moz-box-pack: justify;
    -ms-flex-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-box-align: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    margin-bottom: 15px;
}

.rebate-claimable-title {
    font-size: 20px;
    margin: 0;
    color: #ffffff;
}

.rebate-date-badge {
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.rebate-stats {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: justify;
    -moz-box-pack: justify;
    -ms-flex-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid rgba(255,255,255,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.rebate-stat-item {
    -webkit-box-flex: 1;
    -moz-box-flex: 1;
    -ms-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    text-align: center;
}

.rebate-stat-label {
    display: block;
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.rebate-stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
}

.rebate-stat-highlight {
    font-size: 32px;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.rebate-claim-btn {
    width: 100%;
    background: #ffffff;
    color: #f5576c;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    gap: 10px;
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    -o-transition: all 0.3s;
    transition: all 0.3s;
    -webkit-box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    -webkit-tap-highlight-color: transparent;
}

.rebate-claim-btn:active {
    -webkit-transform: translateY(1px);
    -moz-transform: translateY(1px);
    -ms-transform: translateY(1px);
    -o-transform: translateY(1px);
    transform: translateY(1px);
}

.rebate-claim-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.rebate-claim-icon {
    font-size: 24px;
}

.rebate-claim-status {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    min-height: 20px;
}

.rebate-claim-status.success {
    color: #4caf50;
}

.rebate-claim-status.error {
    color: #ff5252;
}

/* 返水记录区域 */
.rebate-records-section {
    background-color: #2d2d2d;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    -webkit-box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.rebate-records-header {
    margin-bottom: 15px;
}

.rebate-records-title {
    font-size: 18px;
    margin: 0 0 15px 0;
    color: #ffffff;
}

.rebate-filter-tabs {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    gap: 10px;
}

.rebate-tab-btn {
    -webkit-box-flex: 1;
    -moz-box-flex: 1;
    -ms-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #404040;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    -o-transition: all 0.3s;
    transition: all 0.3s;
    font-size: 14px;
    color: #999999;
    -webkit-tap-highlight-color: transparent;
}

.rebate-tab-btn.active {
    background: #FFD700;
    color: #1a1a1a;
    border-color: #FFD700;
}

.rebate-records-list {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -moz-box-orient: vertical;
    -moz-box-direction: normal;
    -ms-flex-direction: column;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 12px;
}

.rebate-record-item {
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 12px;
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    -o-transition: all 0.3s;
    transition: all 0.3s;
}

.rebate-record-date {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: justify;
    -moz-box-pack: justify;
    -ms-flex-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-box-align: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #404040;
}

.rebate-record-date-text {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
}

.rebate-record-status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.rebate-record-status-badge.completed {
    background: #4caf50;
    color: #ffffff;
}

.rebate-record-status-badge.pending {
    background: #ff9800;
    color: #ffffff;
}

.rebate-record-status-badge.failed {
    background: #f44336;
    color: #ffffff;
}

.rebate-record-details {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -moz-box-orient: vertical;
    -moz-box-direction: normal;
    -ms-flex-direction: column;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 8px;
}

.rebate-record-detail-row {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: justify;
    -moz-box-pack: justify;
    -ms-flex-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    font-size: 14px;
}

.rebate-record-detail-label {
    color: #999999;
}

.rebate-record-detail-value {
    color: #ffffff;
    font-weight: 500;
}

.rebate-record-highlight {
    color: #f5576c;
    font-weight: bold;
    font-size: 16px;
}

.rebate-load-more {
    margin-top: 15px;
    text-align: center;
}

.rebate-load-more-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #404040;
    border-radius: 6px;
    color: #999999;
    font-size: 14px;
    cursor: pointer;
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    -o-transition: all 0.3s;
    transition: all 0.3s;
    -webkit-tap-highlight-color: transparent;
}

.rebate-load-more-btn:active {
    background: #404040;
}

/* 返水规则说明 */
.rebate-rules-section {
    background-color: #2d2d2d;
    border-radius: 12px;
    padding: 15px;
    -webkit-box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.rebate-rules-title {
    font-size: 18px;
    margin: 0 0 15px 0;
    color: #ffffff;
}

.rebate-rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rebate-rules-list li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    color: #999999;
    font-size: 14px;
    line-height: 1.6;
}

.rebate-rules-list li:before {
    content: "•";
    position: absolute;
    left: 10px;
    color: #FFD700;
    font-weight: bold;
    font-size: 18px;
}

.rebate-rules-list li:not(:last-child) {
    border-bottom: 1px solid #404040;
}

/* 加载和空状态 */
.rebate-loading {
    text-align: center;
    padding: 40px 20px;
    color: #999999;
}

.rebate-loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    border: 3px solid #404040;
    border-top-color: #FFD700;
    border-radius: 50%;
    -webkit-animation: rebate-spin 1s linear infinite;
    -moz-animation: rebate-spin 1s linear infinite;
    -o-animation: rebate-spin 1s linear infinite;
    animation: rebate-spin 1s linear infinite;
}

@-webkit-keyframes rebate-spin {
    to { -webkit-transform: rotate(360deg); }
}

@-moz-keyframes rebate-spin {
    to { -moz-transform: rotate(360deg); }
}

@-o-keyframes rebate-spin {
    to { -o-transform: rotate(360deg); }
}

@keyframes rebate-spin {
    to { transform: rotate(360deg); }
}

.rebate-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999999;
    font-size: 14px;
}

/* =========================
   白色主题
========================= */
#theme-light:checked ~ body .rebate-header,
body[data-theme="light"] .rebate-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e0e0e0 !important;
    -webkit-box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

#theme-light:checked ~ body .rebate-title,
body[data-theme="light"] .rebate-title {
    color: #333333 !important;
}

#theme-light:checked ~ body .rebate-back-btn,
body[data-theme="light"] .rebate-back-btn {
    color: #666666 !important;
}

#theme-light:checked ~ body .rebate-page,
body[data-theme="light"] .rebate-page {
    background-color: #f5f5f5 !important;
}

#theme-light:checked ~ body .rebate-vip-card,
body[data-theme="light"] .rebate-vip-card {
    background-color: #ffffff !important;
    -webkit-box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

#theme-light:checked ~ body .rebate-vip-label,
body[data-theme="light"] .rebate-vip-label {
    color: #666666 !important;
}

#theme-light:checked ~ body .rebate-vip-value,
body[data-theme="light"] .rebate-vip-value {
    color: #4CAF50 !important;
}

#theme-light:checked ~ body .rebate-records-section,
body[data-theme="light"] .rebate-records-section {
    background-color: #ffffff !important;
    -webkit-box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

#theme-light:checked ~ body .rebate-records-title,
body[data-theme="light"] .rebate-records-title {
    color: #333333 !important;
}

#theme-light:checked ~ body .rebate-tab-btn,
body[data-theme="light"] .rebate-tab-btn {
    border-color: #e0e0e0 !important;
    color: #666666 !important;
}

#theme-light:checked ~ body .rebate-tab-btn.active,
body[data-theme="light"] .rebate-tab-btn.active {
    background: #4CAF50 !important;
    color: #ffffff !important;
    border-color: #4CAF50 !important;
}

#theme-light:checked ~ body .rebate-record-item,
body[data-theme="light"] .rebate-record-item {
    border-color: #e0e0e0 !important;
    background-color: #fafafa !important;
}

#theme-light:checked ~ body .rebate-record-date-text,
body[data-theme="light"] .rebate-record-date-text {
    color: #333333 !important;
}

#theme-light:checked ~ body .rebate-record-detail-value,
body[data-theme="light"] .rebate-record-detail-value {
    color: #333333 !important;
}

#theme-light:checked ~ body .rebate-record-detail-label,
body[data-theme="light"] .rebate-record-detail-label {
    color: #666666 !important;
}

#theme-light:checked ~ body .rebate-record-date,
body[data-theme="light"] .rebate-record-date {
    border-bottom-color: #e0e0e0 !important;
}

#theme-light:checked ~ body .rebate-rules-section,
body[data-theme="light"] .rebate-rules-section {
    background-color: #ffffff !important;
    -webkit-box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

#theme-light:checked ~ body .rebate-rules-title,
body[data-theme="light"] .rebate-rules-title {
    color: #333333 !important;
}

#theme-light:checked ~ body .rebate-rules-list li,
body[data-theme="light"] .rebate-rules-list li {
    color: #666666 !important;
}

#theme-light:checked ~ body .rebate-rules-list li:not(:last-child),
body[data-theme="light"] .rebate-rules-list li:not(:last-child) {
    border-bottom-color: #e0e0e0 !important;
}

#theme-light:checked ~ body .rebate-rules-list li:before,
body[data-theme="light"] .rebate-rules-list li:before {
    color: #4CAF50 !important;
}

#theme-light:checked ~ body .rebate-load-more-btn,
body[data-theme="light"] .rebate-load-more-btn {
    border-color: #e0e0e0 !important;
    color: #666666 !important;
}

/* =========================
   蓝色主题
========================= */
#theme-blue:checked ~ body .rebate-header,
body[data-theme="blue"] .rebate-header {
    background-color: #bbdefb !important;
    border-bottom: 1px solid #90caf9 !important;
    -webkit-box-shadow: 0 2px 4px rgba(33,150,243,0.2) !important;
    box-shadow: 0 2px 4px rgba(33,150,243,0.2) !important;
}

#theme-blue:checked ~ body .rebate-title,
body[data-theme="blue"] .rebate-title {
    color: #0d47a1 !important;
}

#theme-blue:checked ~ body .rebate-back-btn,
body[data-theme="blue"] .rebate-back-btn {
    color: #1565c0 !important;
}

#theme-blue:checked ~ body .rebate-page,
body[data-theme="blue"] .rebate-page {
    background-color: #e3f2fd !important;
}

#theme-blue:checked ~ body .rebate-vip-card,
body[data-theme="blue"] .rebate-vip-card {
    background-color: #ffffff !important;
    -webkit-box-shadow: 0 2px 8px rgba(33,150,243,0.2) !important;
    box-shadow: 0 2px 8px rgba(33,150,243,0.2) !important;
}

#theme-blue:checked ~ body .rebate-vip-value,
body[data-theme="blue"] .rebate-vip-value {
    color: #2196F3 !important;
}

#theme-blue:checked ~ body .rebate-records-section,
body[data-theme="blue"] .rebate-records-section {
    background-color: #ffffff !important;
    -webkit-box-shadow: 0 2px 8px rgba(33,150,243,0.2) !important;
    box-shadow: 0 2px 8px rgba(33,150,243,0.2) !important;
}

#theme-blue:checked ~ body .rebate-records-title,
body[data-theme="blue"] .rebate-records-title {
    color: #1565c0 !important;
}

#theme-blue:checked ~ body .rebate-tab-btn.active,
body[data-theme="blue"] .rebate-tab-btn.active {
    background: #2196F3 !important;
    color: #ffffff !important;
    border-color: #2196F3 !important;
}

#theme-blue:checked ~ body .rebate-record-item,
body[data-theme="blue"] .rebate-record-item {
    border-color: #90caf9 !important;
    background-color: #f5f5f5 !important;
}

#theme-blue:checked ~ body .rebate-record-date-text,
body[data-theme="blue"] .rebate-record-date-text {
    color: #1565c0 !important;
}

#theme-blue:checked ~ body .rebate-record-detail-value,
body[data-theme="blue"] .rebate-record-detail-value {
    color: #1565c0 !important;
}

#theme-blue:checked ~ body .rebate-rules-section,
body[data-theme="blue"] .rebate-rules-section {
    background-color: #ffffff !important;
    -webkit-box-shadow: 0 2px 8px rgba(33,150,243,0.2) !important;
    box-shadow: 0 2px 8px rgba(33,150,243,0.2) !important;
}

#theme-blue:checked ~ body .rebate-rules-title,
body[data-theme="blue"] .rebate-rules-title {
    color: #1565c0 !important;
}

#theme-blue:checked ~ body .rebate-rules-list li:before,
body[data-theme="blue"] .rebate-rules-list li:before {
    color: #2196F3 !important;
}

#theme-blue:checked ~ body .rebate-claimable-card,
body[data-theme="blue"] .rebate-claimable-card {
    background: linear-gradient(135deg, #2196F3 0%, #1976d2 100%) !important;
    -webkit-box-shadow: 0 8px 24px rgba(33, 150, 243, 0.3) !important;
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.3) !important;
}

#theme-blue:checked ~ body .rebate-claim-btn,
body[data-theme="blue"] .rebate-claim-btn {
    background: #ffffff !important;
    color: #1976d2 !important;
}

#theme-blue:checked ~ body .rebate-claim-btn:active,
body[data-theme="blue"] .rebate-claim-btn:active {
    background: rgba(255, 255, 255, 0.9) !important;
}

#theme-blue:checked ~ body .rebate-stat-highlight,
body[data-theme="blue"] .rebate-stat-highlight {
    color: #ffffff !important;
}

#theme-blue:checked ~ body .rebate-record-highlight,
body[data-theme="blue"] .rebate-record-highlight {
    color: #2196F3 !important;
}

#theme-blue:checked ~ body .rebate-vip-label,
body[data-theme="blue"] .rebate-vip-label {
    color: rgba(13, 71, 161, 0.7) !important;
}

#theme-blue:checked ~ body .rebate-tab-btn,
body[data-theme="blue"] .rebate-tab-btn {
    border-color: #90caf9 !important;
    color: rgba(13, 71, 161, 0.7) !important;
}

#theme-blue:checked ~ body .rebate-record-detail-label,
body[data-theme="blue"] .rebate-record-detail-label {
    color: rgba(13, 71, 161, 0.7) !important;
}

#theme-blue:checked ~ body .rebate-record-date,
body[data-theme="blue"] .rebate-record-date {
    border-bottom-color: #90caf9 !important;
}

#theme-blue:checked ~ body .rebate-load-more-btn,
body[data-theme="blue"] .rebate-load-more-btn {
    border-color: #90caf9 !important;
    color: rgba(13, 71, 161, 0.7) !important;
}

#theme-blue:checked ~ body .rebate-load-more-btn:active,
body[data-theme="blue"] .rebate-load-more-btn:active {
    background: rgba(33, 150, 243, 0.1) !important;
}

#theme-blue:checked ~ body .rebate-rules-list li,
body[data-theme="blue"] .rebate-rules-list li {
    color: rgba(13, 71, 161, 0.8) !important;
}

#theme-blue:checked ~ body .rebate-rules-list li:not(:last-child),
body[data-theme="blue"] .rebate-rules-list li:not(:last-child) {
    border-bottom-color: #90caf9 !important;
}

/* =========================
   响应式设计（移动端优化）
========================= */
@media (max-width: 768px) {
    .rebate-page {
        padding: 12px;
    }
    
    .rebate-vip-card {
        padding: 15px;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -moz-box-orient: vertical;
        -moz-box-direction: normal;
        -ms-flex-direction: column;
        -webkit-flex-direction: column;
        flex-direction: column;
        gap: 15px;
    }
    
    .rebate-stats {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -moz-box-orient: vertical;
        -moz-box-direction: normal;
        -ms-flex-direction: column;
        -webkit-flex-direction: column;
        flex-direction: column;
        gap: 15px;
    }
    
    .rebate-stat-highlight {
        font-size: 28px;
    }
    
    .rebate-records-header {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -moz-box-orient: vertical;
        -moz-box-direction: normal;
        -ms-flex-direction: column;
        -webkit-flex-direction: column;
        flex-direction: column;
        gap: 15px;
    }
}

/* iOS Safari 兼容性 */
@supports (-webkit-touch-callout: none) {
    .rebate-page {
        /* iOS Safari 需要额外的 padding-bottom 来避免底部被遮挡 */
        padding-bottom: env(safe-area-inset-bottom, 30px);
    }
    
    .rebate-header {
        /* iOS Safari 状态栏高度 */
        padding-top: env(safe-area-inset-top, 0);
    }
}

/* 低版本浏览器兼容性 */
.rebate-claim-btn::-moz-focus-inner {
    border: 0;
    padding: 0;
}

.rebate-tab-btn::-moz-focus-inner {
    border: 0;
    padding: 0;
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .rebate-claim-btn {
        min-height: 48px; /* iOS 推荐的最小触摸目标 */
    }
    
    .rebate-tab-btn {
        min-height: 44px;
    }
    
    .rebate-back-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* =========================
   返水模态框样式
========================= */
.rebate-records-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    -webkit-animation: fadeIn 0.3s ease;
    animation: fadeIn 0.3s ease;
}

.rebate-records-overlay.active {
    display: block;
}

/* 弹窗主体 - 全屏模式 */
.rebate-records-modal {
    background-color: #1a1a1a;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    overflow: hidden;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-animation: slideUp 0.3s ease;
    animation: slideUp 0.3s ease;
}

/* 头部 */
.rebate-records-header {
    position: relative;
    padding: 16px 56px;
    background-color: #2d2d2d;
    border-bottom: 1px solid #404040;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.rebate-records-title {
    font-size: 18px;
    font-weight: bold;
    color: #e0e0e0;
    text-align: center;
    line-height: 1.4;
}

/* 关闭按钮 */
.rebate-records-close {
    position: absolute;
    top: 50%;
    right: 14px;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: #999;
    font-size: 30px;
    line-height: 30px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    border-radius: 50%;
    padding: 0;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.rebate-records-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.rebate-records-close:active {
    background-color: rgba(255, 255, 255, 0.15);
    -webkit-transform: translateY(-50%) scale(0.95);
    -ms-transform: translateY(-50%) scale(0.95);
    transform: translateY(-50%) scale(0.95);
}

/* 弹窗主体内容区 */
.rebate-records-body {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background-color: #1a1a1a;
    min-height: 0;
    padding: 15px;
}

/* 模态框内的VIP信息卡片 */
.rebate-records-modal .rebate-vip-card {
    margin-bottom: 15px;
}

/* 模态框内的可领取返水卡片 */
.rebate-records-modal .rebate-claimable-card {
    margin-bottom: 15px;
}

/* 模态框内的返水记录区域 */
.rebate-records-modal .rebate-records-section {
    margin-bottom: 15px;
}

.rebate-records-header-section {
    margin-bottom: 15px;
}

.rebate-records-title-section {
    font-size: 16px;
    font-weight: bold;
    color: #e0e0e0;
    margin: 0 0 10px 0;
}

/* 动画 */
@-webkit-keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@-webkit-keyframes slideUp {
    from {
        -webkit-transform: translateY(50px);
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        -webkit-transform: translateY(0);
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        -webkit-transform: translateY(50px);
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        -webkit-transform: translateY(0);
        transform: translateY(0);
        opacity: 1;
    }
}

/* =========================
   返水模态框 - 白色主题适配
========================= */
#theme-light:checked ~ * .rebate-records-modal {
    background-color: #ffffff;
}

#theme-light:checked ~ * .rebate-records-header {
    background-color: #f5f5f5;
    border-bottom-color: #e0e0e0;
}

#theme-light:checked ~ * .rebate-records-title {
    color: #333333;
}

#theme-light:checked ~ * .rebate-records-close {
    color: #666666;
}

#theme-light:checked ~ * .rebate-records-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #333333;
}

#theme-light:checked ~ * .rebate-records-body {
    background-color: #ffffff;
}

#theme-light:checked ~ * .rebate-records-title-section {
    color: #333333;
}

/* =========================
   返水模态框 - 蓝色主题适配
========================= */
#theme-blue:checked ~ * .rebate-records-modal {
    background-color: #e3f2fd;
}

#theme-blue:checked ~ * .rebate-records-header {
    background-color: #bbdefb;
    border-bottom-color: #90caf9;
}

#theme-blue:checked ~ * .rebate-records-title {
    color: #0d47a1;
}

#theme-blue:checked ~ * .rebate-records-close {
    color: #1976d2;
}

#theme-blue:checked ~ * .rebate-records-close:hover {
    background-color: rgba(25, 118, 210, 0.1);
    color: #0d47a1;
}

#theme-blue:checked ~ * .rebate-records-body {
    background-color: #e3f2fd;
}

#theme-blue:checked ~ * .rebate-records-title-section {
    color: #0d47a1;
}

