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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    padding: 0;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

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

/* 背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
    pointer-events: none;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.container {
    max-width: 750px;
    margin: 0 auto;
    padding-bottom: 5px;
    position: relative;
    z-index: 1;
}

/* 头部 */
.header {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 50%, #FE6B8B 100%);
    padding: 15px 12px;
    color: white;
    text-align: center;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
    position: relative;
    overflow: visible;
}

.back-btn {
    position: absolute;
    top: 15px;
    left: 12px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    z-index: 10;
}

.back-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateX(-3px);
}

.back-btn:active {
    transform: translateX(-1px);
}

.header::before {
    content: '💰';
    position: absolute;
    font-size: 60px;
    opacity: 0.15;
    top: -10px;
    left: 10px;
    animation: float 3s ease-in-out infinite;
}

.header::after {
    content: '🎁';
    position: absolute;
    font-size: 50px;
    opacity: 0.15;
    bottom: -10px;
    right: 10px;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.header h1 {
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.balance-info {
    background: rgba(255,255,255,0.25);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    padding: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.balance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.balance .label {
    font-size: 13px;
    opacity: 0.95;
    font-weight: 500;
}

.balance .amount {
    font-size: 28px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    letter-spacing: 1px;
}

.balance .unit {
    font-size: 14px;
    opacity: 0.95;
    font-weight: 500;
}

/* 红包区域 */
.redpack-section {
    margin: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: 2px solid rgba(255, 107, 107, 0.2);
    position: relative;
}

.redpack-section::before {
    content: '🧧';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 40px;
    opacity: 0.1;
}

.redpack-times {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.time-item {
    flex: 1;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #ffe8e8 100%);
    padding: 10px;
    border-radius: 12px;
    border: 2px solid #ffe0e0;
    position: relative;
    overflow: hidden;
}

/* 红包图标容器 */
.redpack-icon-wrapper {
    position: relative;
    margin-bottom: 8px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 大红包图标 */
.redpack-icon-large {
    font-size: 50px;
    animation: swingRedpack 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(255, 107, 107, 0.4));
    position: relative;
    z-index: 2;
}

@keyframes swingRedpack {
    0%, 100% {
        transform: rotate(-8deg) scale(1);
    }
    25% {
        transform: rotate(8deg) scale(1.05);
    }
    50% {
        transform: rotate(-8deg) scale(1);
    }
    75% {
        transform: rotate(8deg) scale(1.05);
    }
}

/* 金币掉落动画 */
.coins-animation {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.coin {
    position: absolute;
    font-size: 18px;
    opacity: 0;
    animation: coinFall 3s ease-in infinite;
}

.coin:nth-child(1) {
    left: 30%;
    animation-delay: 0s;
}

.coin:nth-child(2) {
    left: 50%;
    animation-delay: 1s;
}

.coin:nth-child(3) {
    left: 70%;
    animation-delay: 2s;
}

@keyframes coinFall {
    0% {
        top: -10px;
        opacity: 0;
        transform: translateY(0) rotate(0deg);
    }
    10% {
        opacity: 1;
    }
    50% {
        opacity: 1;
        transform: translateY(30px) rotate(180deg);
    }
    100% {
        top: 60px;
        opacity: 0;
        transform: translateY(60px) rotate(360deg);
    }
}

/* 激活状态时加速动画 */
.time-item.active .redpack-icon-large {
    animation: swingRedpackFast 0.8s ease-in-out infinite, glowPulse 1.5s ease-in-out infinite;
}

@keyframes swingRedpackFast {
    0%, 100% {
        transform: rotate(-15deg) scale(1.1);
    }
    50% {
        transform: rotate(15deg) scale(1.2);
    }
}

@keyframes glowPulse {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(255, 107, 107, 0.8)) drop-shadow(0 0 20px rgba(255, 107, 107, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(255, 107, 107, 1)) drop-shadow(0 0 30px rgba(255, 107, 107, 0.8));
    }
}

/* 激活状态时金币掉落更快 */
.time-item.active .coin {
    animation: coinFallFast 1.5s ease-in infinite;
}

@keyframes coinFallFast {
    0% {
        top: -10px;
        opacity: 0;
        transform: translateY(0) rotate(0deg) scale(1);
    }
    10% {
        opacity: 1;
    }
    50% {
        opacity: 1;
        transform: translateY(30px) rotate(180deg) scale(1.2);
    }
    100% {
        top: 60px;
        opacity: 0;
        transform: translateY(60px) rotate(360deg) scale(0.8);
    }
}

.time-item .time {
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(135deg, #FF6B6B, #FE6B8B);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.time-item .label {
    font-size: 11px;
    color: #888;
    margin-bottom: 8px;
    font-weight: 500;
}

.grab-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.grab-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.grab-btn:active::before {
    width: 300px;
    height: 300px;
}

.grab-btn:disabled {
    background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
}

.grab-btn.active {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 50%, #FE6B8B 100%);
    animation: pulse 1.5s infinite, glow 2s infinite;
}

.grab-btn.grabbed {
    background: linear-gradient(135deg, #52c41a 0%, #95de64 100%);
    box-shadow: 0 4px 15px rgba(82, 196, 26, 0.4);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.8), 0 0 30px rgba(255, 107, 107, 0.6);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 107, 107, 1), 0 0 40px rgba(255, 107, 107, 0.8);
    }
}

.countdown {
    text-align: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, #fff9e6 0%, #ffedd5 100%);
    border-radius: 8px;
    font-size: 12px;
    color: #d48806;
    margin-bottom: 12px;
    font-weight: 500;
    border: 1px solid #ffe7ba;
}

/* 红包播报 */
.redpack-broadcast {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #fff5e6 0%, #ffe7d9 100%);
    border: 2px solid #ffd591;
    border-radius: 10px;
    padding: 10px 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(255, 192, 105, 0.3);
}

.broadcast-icon {
    font-size: 20px;
    flex-shrink: 0;
    animation: shake 2s infinite;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(-10deg); }
    20%, 40%, 60%, 80% { transform: rotate(10deg); }
}

.broadcast-content {
    flex: 1;
    overflow: hidden;
    height: 22px;
    position: relative;
}

.broadcast-item {
    font-size: 13px;
    color: #d46b08;
    white-space: nowrap;
    position: absolute;
    width: 100%;
    animation: slideIn 0.5s ease-out;
    font-weight: 500;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.broadcast-item.highlight {
    color: #ff4d4f;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(255, 77, 79, 0.2);
}

/* 提现区域 */
.withdraw-section {
    margin: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: 2px solid rgba(35, 166, 213, 0.2);
}

.withdraw-section h2 {
    font-size: 16px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #23a6d5, #23d5ab);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

.bind-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bind-form input {
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    background: white;
}

.bind-form input:focus {
    border-color: #23a6d5;
    box-shadow: 0 0 0 3px rgba(35, 166, 213, 0.1);
}

.bind-btn, .unbind-btn {
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.bind-btn {
    background: linear-gradient(135deg, #23a6d5 0%, #23d5ab 100%);
    color: white;
}

.bind-btn:active {
    transform: scale(0.97);
}

.unbind-btn {
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
    color: white;
    margin-top: 8px;
}

.alipay-info {
    padding: 12px 14px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e6f7ff 100%);
    border-radius: 10px;
    margin-bottom: 12px;
    border: 2px solid #bae7ff;
}

.info-row {
    padding: 4px 0;
    font-size: 13px;
}

.info-row .label {
    color: #666;
    font-weight: 500;
}

.withdraw-amounts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.amount-btn {
    padding: 14px;
    border: 3px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #FFD700, #FFA500) border-box;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    color: #FF8C00;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.amount-btn::before {
    content: '💰';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    opacity: 0.3;
}

.amount-btn:active {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(255, 140, 0, 0.4);
}

/* 记录区域 */
.records-section {
    margin: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: 2px solid rgba(0, 0, 0, 0.05);
}

.records-section h2 {
    font-size: 16px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #8e44ad, #3498db);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

.my-records, .other-records {
    max-height: 180px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
    padding-right: 5px;
}

/* 滚动提示 */
.other-records::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to top, rgba(255,255,255,0.95), transparent);
    pointer-events: none;
}

.record-item {
    padding: 10px 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.record-item:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.record-item:last-child {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.record-info {
    flex: 1;
}

.record-account {
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
    font-weight: 500;
}

.record-time {
    font-size: 11px;
    color: #999;
}

.record-amount {
    font-size: 16px;
    font-weight: bold;
    background: linear-gradient(135deg, #FF6B6B, #FE6B8B);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.record-status {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 8px;
    font-weight: 500;
}

.record-status.success {
    background: linear-gradient(135deg, #52c41a 0%, #95de64 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(82, 196, 26, 0.3);
}

.record-status.pending {
    background: linear-gradient(135deg, #faad14 0%, #ffd666 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(250, 173, 20, 0.3);
}

.empty-tip {
    text-align: center;
    padding: 20px;
    color: #bbb;
    font-size: 13px;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
    border-radius: 20px;
    padding: 25px;
    margin: 12px;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    animation: slideUp 0.4s ease-out;
    border: 3px solid rgba(255, 107, 107, 0.3);
}

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

.redpack-modal {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.redpack-modal::before {
    content: '✨';
    position: absolute;
    font-size: 30px;
    top: 10px;
    left: 20px;
    animation: sparkle 2s infinite;
}

.redpack-modal::after {
    content: '✨';
    position: absolute;
    font-size: 30px;
    top: 10px;
    right: 20px;
    animation: sparkle 2s infinite 0.5s;
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1); }
}

.redpack-animation {
    margin: 15px 0;
    position: relative;
    z-index: 1;
}

.redpack-icon {
    font-size: 80px;
    animation: bounce 1s infinite, rotate 3s infinite;
    filter: drop-shadow(0 5px 15px rgba(255, 107, 107, 0.4));
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

@keyframes rotate {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.redpack-amount {
    font-size: 32px;
    font-weight: bold;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 50%, #FE6B8B 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 15px 0;
    text-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
    position: relative;
    z-index: 1;
}

.close-modal-btn, .confirm-btn, .cancel-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 20px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.close-modal-btn, .confirm-btn {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 50%, #FE6B8B 100%);
    color: white;
    width: 100%;
}

.close-modal-btn:active, .confirm-btn:active {
    transform: scale(0.95);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.cancel-btn {
    flex: 1;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    color: #666;
}

.confirm-btn {
    flex: 1;
}

.modal h3 {
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
    background: linear-gradient(135deg, #8e44ad, #3498db);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

.modal-info {
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin-bottom: 15px;
    border: 2px solid #dee2e6;
}

.modal-info p {
    padding: 5px 0;
    font-size: 14px;
    color: #666;
}

.modal-info strong {
    color: #333;
    font-size: 15px;
    font-weight: 600;
}

/* 提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(0,0,0,0.9), rgba(50,50,50,0.9));
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 2000;
    display: none;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.1);
    font-weight: 500;
}

.toast.show {
    display: block;
    animation: fadeInOut 2s;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    10%, 90% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FF6B6B 0%, #FE6B8B 100%);
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #FF8E53 0%, #FF6B6B 100%);
}

/* 日历提醒弹窗 */
.calendar-modal {
    text-align: center;
}

.calendar-tip {
    color: #666;
    font-size: 14px;
    margin: 15px 0;
    line-height: 1.6;
}

.calendar-times {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.calendar-time-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px;
    background: linear-gradient(135deg, #fff9e6 0%, #ffedd5 100%);
    border-radius: 12px;
    border: 2px solid #ffe7ba;
}

.time-icon {
    font-size: 24px;
    animation: bounce 2s infinite;
}

.time-text {
    font-size: 16px;
    font-weight: bold;
    color: #d48806;
}

