/* ===== Mini App 全局样式 ===== */

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

html, body {
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, #0f0c29, #302b63, #24243e);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    color: #fff;
}

/* ===== 页面容器 ===== */
#app {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: 64px; /* 底部导航栏高度 */
    overflow: hidden;
}

/* ===== 页面 ===== */
.page {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 16px 20px;
    -webkit-overflow-scrolling: touch;
}

.page::-webkit-scrollbar {
    width: 3px;
}

.page::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.2);
    border-radius: 3px;
}

.page::-webkit-scrollbar-track {
    background: transparent;
}

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

.page-header-icon {
    font-size: 38px;
    margin-bottom: 4px;
    display: block;
    animation: iconBounce 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.4));
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1.05); }
}

.page-header-title {
    display: block;
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffd700, #ff8c00, #ffd700);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleShine 3s ease-in-out infinite;
    letter-spacing: 2px;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.2));
}

@keyframes titleShine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.page-header-subtitle {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 3px;
    letter-spacing: 1px;
}

/* ===== 积分卡片 ===== */
.points-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 140, 0, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 14px;
    padding: 10px 16px;
    margin: 0 auto 14px;
    max-width: 280px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.05), inset 0 1px 0 rgba(255, 215, 0, 0.1);
    animation: cardIn 0.6s ease 0.2s both;
}

@keyframes cardIn {
    0% { opacity: 0; transform: translateY(-10px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.points-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 4px 8px;
}

.points-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 3px;
    white-space: nowrap;
}

.points-value {
    font-size: 20px;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    max-width: 100%;
    overflow: hidden;
}

.points-value .balance-num {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: inherit;
}

.points-unit {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 215, 0, 0.6);
    flex-shrink: 0;
    white-space: nowrap;
}


.points-divider {
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, transparent, rgba(255, 215, 0, 0.2), transparent);
}

/* ===== 奖品快速流动区域 ===== */
.flow-wrapper {
    position: relative;
    width: 260px;
    height: 180px;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.05), rgba(255, 140, 0, 0.02));
    border: 2px solid rgba(255, 215, 0, 0.15);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.08), inset 0 0 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: flowBorderGlow 4s ease infinite;
}

@keyframes flowBorderGlow {
    0% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.08), inset 0 0 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 215, 0, 0.15); }
    25% { box-shadow: 0 0 30px rgba(255, 107, 107, 0.08), inset 0 0 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 107, 107, 0.15); }
    50% { box-shadow: 0 0 30px rgba(77, 150, 255, 0.08), inset 0 0 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(77, 150, 255, 0.15); }
    75% { box-shadow: 0 0 30px rgba(107, 203, 119, 0.08), inset 0 0 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(107, 203, 119, 0.15); }
    100% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.08), inset 0 0 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 215, 0, 0.15); }
}

.flow-wrapper::before,
.flow-wrapper::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 40px;
    z-index: 5;
    pointer-events: none;
}

.flow-wrapper::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(15, 12, 41, 0.95), transparent);
}

.flow-wrapper::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(15, 12, 41, 0.95), transparent);
}

.flow-viewport {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    bottom: 40px;
    overflow: hidden;
    z-index: 2;
}

.flow-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    will-change: transform;
    padding-top: 20px;
}

.flow-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 60px;
    padding: 0 20px;
    box-sizing: border-box;
    transition: all 0.15s ease;
    position: relative;
}

.flow-name {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.flow-item.flow-active {
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.12), transparent);
}

.flow-item.flow-active .flow-name {
    color: #ffd700;
    font-size: 17px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.flow-item.flow-winner {
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    animation: winnerPulse 0.8s ease-in-out 3;
}

.flow-item.flow-winner .flow-name {
    color: #ffd700;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.3);
}

@keyframes winnerPulse {
    0%, 100% { background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent); }
    50% { background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.35), transparent); }
}

.flow-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 60px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 12px;
    z-index: 3;
    pointer-events: none;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1), inset 0 0 15px rgba(255, 215, 0, 0.05);
    animation: indicatorPulse 2s ease-in-out infinite;
}

@keyframes indicatorPulse {
    0%, 100% { border-color: rgba(255, 215, 0, 0.4); box-shadow: 0 0 15px rgba(255, 215, 0, 0.1), inset 0 0 15px rgba(255, 215, 0, 0.05); }
    50% { border-color: rgba(255, 215, 0, 0.7); box-shadow: 0 0 25px rgba(255, 215, 0, 0.2), inset 0 0 25px rgba(255, 215, 0, 0.1); }
}

.flow-indicator::before,
.flow-indicator::after {
    content: '▶';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: rgba(255, 215, 0, 0.5);
    animation: arrowPulse 1.5s ease-in-out infinite;
}

.flow-indicator::before {
    left: -18px;
    content: '◀';
}

.flow-indicator::after {
    right: -18px;
}

@keyframes arrowPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ===== 抽奖按钮 ===== */
.lottery-action {
    text-align: center;
    margin: 14px 0;
}

.lottery-btn {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #1a1a2e;
    border: none;
    padding: 14px 48px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 25px rgba(255, 215, 0, 0.4), 0 0 40px rgba(255, 215, 0, 0.1);
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.lottery-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.lottery-btn:hover::before {
    left: 100%;
}

.lottery-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.lottery-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== 抽奖结果 ===== */
.lottery-result {
    text-align: center;
    padding: 16px;
    margin: 10px 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 140, 0, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.2);
    animation: resultIn 0.6s ease;
    backdrop-filter: blur(4px);
}

@keyframes resultIn {
    0% { opacity: 0; transform: scale(0.3) rotate(-10deg); }
    50% { transform: scale(1.1) rotate(3deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.result-icon {
    font-size: 52px;
    margin-bottom: 8px;
    display: block;
    animation: resultIcon 0.8s ease;
}

@keyframes resultIcon {
    0% { transform: rotate(-30deg) scale(0) translateY(20px); opacity: 0; }
    50% { transform: rotate(10deg) scale(1.3); opacity: 1; }
    100% { transform: rotate(0deg) scale(1); opacity: 1; }
}

.result-text {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

/* ===== 轮播屏（参照 suoyinbot1.0/zhuli 纯CSS animation 实现） ===== */
.marquee-section {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.marquee-title {
    font-size: 13px;
    color: rgba(255, 215, 0, 0.6);
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: 1px;
    font-weight: 600;
}

.marquee-list {
    position: relative;
    height: 200px;
    overflow: hidden;
    min-height: 40px;
    border-radius: 10px;
}

/* 顶部和底部的渐变遮罩，营造淡入淡出效果 */
.marquee-list::before,
.marquee-list::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 30px;
    z-index: 2;
    pointer-events: none;
}

.marquee-list::before {
    top: 0;
    background: linear-gradient(to bottom, #0f0c29, transparent);
}

.marquee-list::after {
    bottom: 0;
    background: linear-gradient(to top, #0f0c29, transparent);
}

/* 轮播容器 - 使用纯CSS animation 实现无缝向上滚动 */
.marquee-carousel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: marqueeScrollUp 20s linear infinite;
    padding: 4px 0;
}

.marquee-carousel:hover {
    animation-play-state: paused;
}

@keyframes marqueeScrollUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

.marquee-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.06), rgba(255, 140, 0, 0.03));
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.05);
    flex-shrink: 0;
    height: 40px;
    box-sizing: border-box;
}






.no-records {
    text-align: center;
    color: rgba(255, 255, 255, 0.25);
    font-size: 12px;
    padding: 20px 8px;
}


/* ===== 积分选择UI（档位选择） ===== */
.select-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.select-panel {
    width: 88%;
    max-width: 320px;
    background: linear-gradient(160deg, #1a1a3e, #2a2a5e);
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.05);
    padding: 20px 16px 16px;
    animation: panelIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    max-height: 80%;
    overflow-y: auto;
}

@keyframes panelIn {
    0% { opacity: 0; transform: scale(0.8) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.select-header {
    text-align: center;
    margin-bottom: 14px;
}

.select-title {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    margin-bottom: 4px;
}

.select-hint {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

.tier-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.tier-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.tier-card:hover {
    border-color: rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.06), rgba(255, 140, 0, 0.03));
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.08);
}

.tier-card:active { transform: scale(0.98); }

.tier-card.selected {
    border-color: #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 140, 0, 0.06));
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.15), inset 0 0 20px rgba(255, 215, 0, 0.03);
}

.tier-card.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 16px;
    color: #ffd700;
    font-weight: 700;
}

.tier-card.insufficient {
    opacity: 0.5;
    cursor: not-allowed;
}

.tier-card.insufficient:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.tier-card.insufficient .tier-cost { color: #ff6b6b; }

.tier-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.tier-cost {
    font-size: 16px;
    font-weight: 700;
    color: #ffd700;
}

.tier-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
}

.tier-status.insufficient-text {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}

.tier-prizes {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 215, 0, 0.1);
}

.tier-prize-item {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 6px;
    border-radius: 6px;
    white-space: nowrap;
}

.select-actions {
    display: flex;
    gap: 10px;
}

.select-actions button {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.select-confirm {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.select-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.select-confirm:active { transform: scale(0.97); }

.select-confirm:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.select-cancel {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.select-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.select-cancel:active { transform: scale(0.97); }

/* ===== 底部导航栏 ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(180deg, rgba(15, 12, 41, 0.95), rgba(30, 25, 70, 0.98));
    border-top: 1px solid rgba(255, 215, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 9999;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    padding: 4px 0;
}

.nav-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ffd700, #ff8c00);
    border-radius: 0 0 2px 2px;
    transition: width 0.3s ease;
}

.nav-item.active::after {
    width: 40px;
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 2px;
    transition: transform 0.2s ease;
    filter: grayscale(0.6);
    opacity: 0.6;
}

.nav-item.active .nav-icon {
    transform: scale(1.1);
    filter: grayscale(0);
    opacity: 1;
}

.nav-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.nav-item.active .nav-label {
    color: #ffd700;
    font-weight: 600;
}

.nav-item:active .nav-icon {
    transform: scale(0.9);
}

/* ===== 个人中心 ===== */

/* 用户信息卡片 */
.profile-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 140, 0, 0.04));
    border: 1px solid rgba(255, 215, 0, 0.12);
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 16px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.05);
}

.profile-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 140, 0, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    border: 2px solid rgba(255, 215, 0, 0.2);
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.profile-id {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* 数据统计网格 */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.stats-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 14px 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.stats-item:hover {
    border-color: rgba(255, 215, 0, 0.15);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.04), rgba(255, 140, 0, 0.02));
}

.stats-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.stats-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 4px;
}

.stats-value {
    font-size: 20px;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

/* 个人中心中奖记录列表 */
.profile-records-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-record-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.2s ease;
}

.profile-record-item:hover {
    background: rgba(255, 215, 0, 0.04);
    border-color: rgba(255, 215, 0, 0.1);
}

.profile-record-name {
    font-size: 13px;
    color: #ffd700;
    font-weight: 600;
}

.profile-record-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.25);
    white-space: nowrap;
}

/* ===== 日志弹窗 ===== */
.log-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeIn 0.25s ease;
}

.log-panel {
    width: 92%;
    max-width: 360px;
    max-height: 80vh;
    background: linear-gradient(160deg, #1a1a3e, #2a2a5e);
    border-radius: 18px;
    border: 1px solid rgba(255, 215, 0, 0.15);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.05);
    display: flex;
    flex-direction: column;
    animation: panelIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}

.log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.log-title {
    font-size: 17px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.log-close {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.log-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.log-close:active {
    transform: scale(0.9);
}

.log-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px;
    min-height: 120px;
    -webkit-overflow-scrolling: touch;
}

.log-body::-webkit-scrollbar {
    width: 3px;
}

.log-body::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.15);
    border-radius: 3px;
}

.log-body::-webkit-scrollbar-track {
    background: transparent;
}

.log-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.log-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.log-item:hover {
    background: rgba(255, 215, 0, 0.04);
    border-color: rgba(255, 215, 0, 0.1);
}

.log-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
    width: 24px;
    text-align: center;
}

.log-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.log-type {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.log-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.log-after {
    font-size: 11px;
    color: rgba(255, 215, 0, 0.5);
}

.log-amount {
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
    font-variant-numeric: tabular-nums;
}

.log-amount.positive {
    color: #4ecdc4;
}

.log-amount.negative {
    color: #ff6b6b;
}

.log-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    margin-top: 1px;
    white-space: nowrap;
    min-width: 60px;
    text-align: right;
}

.log-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.log-loading-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(255, 215, 0, 0.15);
    border-top-color: #ffd700;
    border-radius: 50%;
    animation: logSpin 0.8s linear infinite;
}

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

.log-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    color: rgba(255, 255, 255, 0.25);
    font-size: 14px;
}

.log-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.log-btn {
    padding: 7px 18px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 20px;
    background: rgba(255, 215, 0, 0.08);
    color: #ffd700;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.log-btn:hover:not(:disabled) {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.35);
}

.log-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.log-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.log-page-info {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    min-width: 70px;
    text-align: center;
}

/* ===== 可点击的统计卡片 ===== */
.stats-item.clickable {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stats-item.clickable:active {
    transform: scale(0.95);
}

.stats-item.clickable::after {
    content: '›';
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 16px;
    color: rgba(255, 215, 0, 0.3);
    font-weight: 700;
    transition: all 0.2s ease;
}

.stats-item.clickable:hover::after {
    color: rgba(255, 215, 0, 0.6);
    right: 8px;
}

/* ===== Toast 动画 ===== */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes panelIn {
    0% { opacity: 0; transform: scale(0.8) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

