/* ============================================
   积分中心 - 现代精致设计
   设计理念: 渐变质感 + 金色奖励感 + 玻璃态卡片
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

/* CSS 变量定义 */
:root {
    --modal-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --modal-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --modal-gold: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    --modal-text-dark: #1a1a2e;
    --modal-text-light: #6b7280;
    --modal-bg: #ffffff;
    --modal-border: rgba(0, 0, 0, 0.08);
    --modal-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --modal-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --modal-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
    --modal-shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.16);
}

/* 模态框容器 - 深色遮罩 + 动画 */
#points-modal.modal {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#points-modal.modal.is-open {
    display: flex;
}

/* 模态框内容 - 玻璃态卡片 */
#points-modal .modal-content.points-modal-redesign {
    position: relative;
    max-width: 760px;
    max-height: 92vh;
    overflow-y: auto;
    background: var(--modal-bg);
    border-radius: 24px;
    box-shadow: var(--modal-shadow-xl);
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(32px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 精致滚动条 */
#points-modal .modal-content.points-modal-redesign::-webkit-scrollbar {
    width: 6px;
}

#points-modal .modal-content.points-modal-redesign::-webkit-scrollbar-track {
    background: transparent;
}

#points-modal .modal-content.points-modal-redesign::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 8px;
}

/* 关闭按钮 - 精致圆形 */
.modal-close-elegant {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--modal-text-light);
    border: 1px solid var(--modal-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: var(--modal-shadow-sm);
}

.modal-close-elegant:hover {
    background: #ffffff;
    color: var(--modal-text-dark);
    transform: rotate(90deg) scale(1.05);
    box-shadow: var(--modal-shadow-md);
}

.modal-close-elegant:active {
    transform: rotate(90deg) scale(0.95);
}

/* 头部区域 - 渐变背景 */
.points-header-elegant {
    background: var(--modal-primary);
    padding: 48px 40px 36px;
    border-radius: 24px 24px 0 0;
    position: relative;
    overflow: hidden;
}

/* 头部装饰性背景 */
.points-header-elegant::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-30px, -30px) scale(1.1);
    }
}

.points-balance-card {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}

/* 积分图标 - 渐变环形 */
.balance-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(255, 255, 255, 0);
    }
}

.balance-icon svg {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

/* 积分信息 */
.balance-info {
    flex: 1;
}

.balance-label {
    display: block;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 500;
    font-family: 'Outfit', 'Noto Sans SC', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.balance-value {
    display: block;
    color: #ffffff;
    font-size: 56px;
    font-weight: 900;
    font-family: 'Outfit', 'Noto Sans SC', sans-serif;
    line-height: 1;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    letter-spacing: -1px;
}

/* 签到按钮 - 金色渐变 */
.checkin-btn-elegant {
    background: var(--modal-gold);
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 16px 32px;
    cursor: pointer;
    font-family: 'Outfit', 'Noto Sans SC', sans-serif;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(246, 211, 101, 0.3);
    position: relative;
    overflow: hidden;
}

.checkin-btn-elegant::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.checkin-btn-elegant:hover::before {
    left: 100%;
}

.checkin-btn-elegant:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 32px rgba(246, 211, 101, 0.4);
}

.checkin-btn-elegant:active {
    transform: translateY(0) scale(0.98);
}

.checkin-btn-elegant .btn-icon {
    font-size: 20px;
}

/* 抽奖区域 */
.lottery-section-elegant {
    padding: 32px 40px;
}

.section-title-elegant {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.title-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.section-title-elegant h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--modal-text-dark);
    margin: 0;
    font-family: 'Outfit', 'Noto Sans SC', sans-serif;
    letter-spacing: -0.5px;
}

/* 消费提示横幅 - 玻璃态 */
.lottery-cost-banner {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-left: 4px solid #667eea;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Outfit', 'Noto Sans SC', sans-serif;
    backdrop-filter: blur(8px);
}

.lottery-cost-banner .cost-icon {
    flex-shrink: 0;
    color: #667eea;
}

.lottery-cost-banner span {
    color: var(--modal-text-light);
    font-size: 14px;
}

.lottery-cost-banner strong {
    color: #667eea;
    font-weight: 700;
    font-size: 15px;
}

/* 奖品网格 - 4列卡片 */
.prize-grid-elegant {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.prize-card {
    position: relative;
    background: #ffffff;
    border: 1.5px solid var(--modal-border);
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    cursor: pointer;
}

/* 奖品卡片装饰背景 */
.prize-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.prize-card:hover::before {
    opacity: 1;
}

.prize-card:hover {
    border-color: #667eea;
    transform: translateY(-8px);
    box-shadow: var(--modal-shadow-lg);
}

/* 奖品等级特殊样式 */
.prize-card[data-level="first"] {
    border-color: rgba(255, 215, 0, 0.3);
}

.prize-card[data-level="first"]:hover {
    border-color: #ffd700;
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.3);
}

.prize-card[data-level="second"] {
    border-color: rgba(192, 192, 192, 0.3);
}

.prize-card[data-level="second"]:hover {
    border-color: #c0c0c0;
    box-shadow: 0 8px 24px rgba(192, 192, 192, 0.3);
}

.prize-card[data-level="third"] {
    border-color: rgba(205, 127, 50, 0.3);
}

.prize-card[data-level="third"]:hover {
    border-color: #cd7f32;
    box-shadow: 0 8px 24px rgba(205, 127, 50, 0.3);
}

/* 奖品图标 */
.prize-badge {
    font-size: 40px;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.prize-card:hover .prize-badge {
    animation: spin 0.6s ease-in-out;
}

@keyframes spin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.2);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

.prize-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.prize-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--modal-text-dark);
    font-family: 'Outfit', 'Noto Sans SC', sans-serif;
}

.prize-desc {
    font-size: 12px;
    color: var(--modal-text-light);
    line-height: 1.4;
}

/* 奖品数量徽章 */
.prize-count-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--modal-primary);
    color: #fff;
    min-width: 28px;
    height: 28px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    padding: 0 8px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    animation: pop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes pop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* 按钮组 */
.lottery-actions-elegant {
    display: flex;
    gap: 12px;
}

/* 次要按钮 - 灰白玻璃态 */
.btn-secondary-elegant {
    flex: 1;
    background: rgba(0, 0, 0, 0.03);
    color: var(--modal-text-light);
    border: 1.5px solid var(--modal-border);
    border-radius: 14px;
    padding: 16px 20px;
    cursor: pointer;
    font-family: 'Outfit', 'Noto Sans SC', sans-serif;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary-elegant svg {
    width: 18px;
    height: 18px;
}

.btn-secondary-elegant:hover {
    background: rgba(102, 126, 234, 0.06);
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: var(--modal-shadow-sm);
}

.btn-secondary-elegant:active {
    transform: translateY(0);
}

/* 主要按钮 - 渐变光泽 */
.btn-primary-elegant {
    flex: 2;
    background: var(--modal-primary);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 16px 28px;
    cursor: pointer;
    font-family: 'Outfit', 'Noto Sans SC', sans-serif;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

/* 按钮光泽动画 */
.btn-primary-elegant::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.btn-primary-elegant:hover::before {
    left: 100%;
}

.btn-primary-elegant:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.btn-primary-elegant:active {
    transform: translateY(-1px) scale(0.98);
}

/* 历史记录区域 */
.history-section-elegant {
    padding: 32px 40px;
    border-top: 1px solid var(--modal-border);
    background: linear-gradient(180deg, transparent 0%, rgba(102, 126, 234, 0.02) 100%);
}

/* 历史标签页 */
.history-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--modal-border);
}

.history-tab {
    padding: 14px 24px;
    background: none;
    border: none;
    color: var(--modal-text-light);
    cursor: pointer;
    font-family: 'Outfit', 'Noto Sans SC', sans-serif;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px 8px 0 0;
}

.history-tab svg {
    width: 16px;
    height: 16px;
}

.history-tab:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.history-tab.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.history-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--modal-primary);
    border-radius: 3px 3px 0 0;
}

/* 历史记录列表 */
.history-display-elegant {
    min-height: 120px;
}

.history-display-elegant ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-display-elegant li {
    padding: 16px 20px;
    margin-bottom: 10px;
    background: #ffffff;
    border: 1px solid var(--modal-border);
    border-radius: 12px;
    border-left: 4px solid #667eea;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 14px;
    color: var(--modal-text-dark);
    transition: all 0.2s;
    box-shadow: var(--modal-shadow-sm);
}

.history-display-elegant li:hover {
    transform: translateX(4px);
    box-shadow: var(--modal-shadow-md);
}

.history-display-elegant .points-positive {
    color: #10b981;
    font-weight: 700;
}

.history-display-elegant .points-negative {
    color: #ef4444;
    font-weight: 700;
}

/* 空状态 */
.history-display-elegant:empty::before {
    content: '暂无记录';
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    color: var(--modal-text-light);
    font-size: 14px;
    font-family: 'Noto Sans SC', sans-serif;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #points-modal .modal-content.points-modal-redesign {
        max-width: 95vw;
        border-radius: 20px;
    }

    .points-header-elegant {
        padding: 36px 24px 28px;
    }

    .lottery-section-elegant,
    .history-section-elegant {
        padding: 24px;
    }

    .balance-value {
        font-size: 48px;
    }

    .balance-icon {
        width: 64px;
        height: 64px;
    }

    .balance-icon svg {
        width: 36px;
        height: 36px;
    }

    .prize-grid-elegant {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .lottery-actions-elegant {
        flex-direction: column;
    }

    .btn-secondary-elegant,
    .btn-primary-elegant {
        width: 100%;
    }

    .section-title-elegant h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .points-header-elegant {
        padding: 28px 20px 24px;
    }

    .lottery-section-elegant,
    .history-section-elegant {
        padding: 20px;
    }

    .balance-value {
        font-size: 40px;
    }

    .checkin-btn-elegant {
        padding: 12px 24px;
        font-size: 14px;
    }

    .prize-badge {
        font-size: 32px;
    }

    .prize-title {
        font-size: 13px;
    }

    .history-tabs {
        gap: 4px;
    }

    .history-tab {
        padding: 12px 16px;
        font-size: 13px;
    }
}
