/* 充值赠金活动页面样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}
 
.recharge-gift-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px; 
}

/* 页面头部 */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
} 

.page-subtitle {
    font-size: 16px;
    color: #666;
}

/* 叠加提示 */
.stack-tip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 20px;
    background: #1A56DB;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.stack-tip i {
    font-size: 18px;
}

.stack-tip strong {
    font-size: 18px;
    font-weight: 700;
    margin: 0 4px;
}

/* 加载状态 */
.loading-wrapper {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 活动列表 */
.activity-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

/* 活动卡片 */
.activity-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    border: 2px solid #e0e0e0;
    z-index: 1;
}

.activity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px 12px 0 0;
}

.activity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
    z-index: 10;
}

/* 当卡片内有tooltip悬浮时，提升卡片层级 */
.activity-card:has(.user-type-tooltip:hover) {
    z-index: 10;
}

/* 活动序号 */
.activity-number {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #ea66b9 0%, #a24b56 100%);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    z-index: 1;
}

/* 活动状态 */
.activity-status {
    margin-bottom: 16px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-ongoing {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-coming {
    background: #e3f2fd;
    color: #1565c0;
}

.status-ended {
    background: #f5f5f5;
    color: #757575;
}

/* 活动标题 */
.activity-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
    line-height: 1.4;
}

/* 活动时间 */
.activity-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.icon-time::before {
    content: '⏰';
    font-size: 16px;
}

.time-range {
    color: #333;
    font-weight: 500;
}

/* 活动内容 */
.activity-content {
    margin-bottom: 20px;
}

.content-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #e0e0e0;
}

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

.item-label {
    font-size: 14px;
    color: #666;
}

.item-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.item-value.highlight {
    color: #667eea;
    font-size: 18px;
}

.item-value.gift-value {
    color: #e74c3c;
    font-size: 18px;
}

/* 活动说明 */
.activity-description {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.description-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.description-content {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* 充值按钮 */
.activity-action {
    text-align: center;
}

.btn-recharge {
    display: inline-block;
    width: 100%;
    padding: 12px 24px;
    background: #1A56DB;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    cursor: pointer;
}

.btn-recharge:hover:not(.btn-disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-recharge:active:not(.btn-disabled) {
    transform: translateY(0);
}

/* 禁用状态按钮 */
.btn-recharge.btn-disabled {
    background: #c0c4cc;
    cursor: not-allowed;
    opacity: 0.8;
}

.btn-recharge.btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* 资格提示tooltip样式 */
.eligibility-tooltip {
    padding: 8px 4px;
    font-size: 14px;
    line-height: 1.8;
}

.eligibility-tooltip p {
    margin: 0;
    white-space: nowrap;
}

.eligibility-tooltip strong {
    color: #606266;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    margin-bottom: 24px;
}

.empty-icon svg {
    display: inline-block;
}

.empty-text {
    font-size: 16px;
    color: #999;
    margin-bottom: 24px;
}

.btn-recharge-empty {
    display: inline-block;
    padding: 12px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-recharge-empty:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-recharge-empty:active {
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .recharge-gift-page {
        padding: 20px 16px;
    }

    .page-title {
        font-size: 24px;
    }

    .page-subtitle {
        font-size: 14px;
    }

    .activity-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .activity-card {
        padding: 20px;
    }

    .activity-title {
        font-size: 18px;
    }

    .activity-time {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .content-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .item-value {
        font-size: 14px;
    }

    .item-value.highlight,
    .item-value.gift-value {
        font-size: 16px;
    }
}

/* 用户类型标签样式 */
.user-type-item {
    margin-top: 8px;
}

.user-type-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    transition: all 0.3s ease;
}

/* 文字截断样式 */
.user-type-tag.user-type-ellipsis {
    max-width: 200px;
    cursor: pointer;
    position: relative;
}

/* 悬浮效果 */
.user-type-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 自定义Tooltip容器 */
.user-type-tooltip {
    position: relative;
    display: inline-block;
}

/* Tooltip内容 */
.user-type-tooltip .tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #667eea 100%);
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 9999;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

/* Tooltip箭头 */
.user-type-tooltip .tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #764ba2 transparent transparent transparent;
}

/* 显示Tooltip */
.user-type-tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
    bottom: 135%;
}

/* Tooltip动画 */
@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.user-type-tooltip:hover .tooltip-content {
    animation: tooltipFadeIn 0.3s ease-out;
}

/* 所有用户 - 灰色 */
.user-type-tag.type-all {
    background: #f0f2f5;
    color: #666;
    border: 1px solid #d9d9d9;
}

/* 新用户专享 - 绿色 */
.user-type-tag.type-new {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #7dd3fc;
}

/* 老用户专享 - 蓝色 */
.user-type-tag.type-old {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* 等级限制 - 橙色 */
.user-type-tag.type-level {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fdba74;
}

/* 打印样式 */
@media print {
    .btn-recharge,
    .btn-recharge-empty {
        display: none;
    }

    .activity-card {
        break-inside: avoid;
    }
}
