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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo h1 {
    color: #667eea;
    font-size: 1.8rem;
    font-weight: bold;
}

.test-badge {
    background: #ff6b6b;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.balance {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

/* 按钮样式 */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

/* 音效开关按钮 */
#sound-toggle {
    font-size: 16px;
    padding: 8px 12px;
    min-width: 40px;
    border: 2px solid #667eea;
    background: transparent;
    color: #667eea;
    border-radius: 20px;
}

#sound-toggle.sound-on {
    background: #667eea;
    color: white;
}

#sound-toggle.sound-off {
    opacity: 0.5;
    background: #666;
    border-color: #666;
    color: white;
}

#sound-toggle:hover {
    transform: scale(1.05);
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.collection-content {
    max-width: 800px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover {
    color: #000;
}

/* 认证表单样式 */
.auth-tabs {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #667eea;
    border-bottom: 2px solid #667eea;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h3 {
    margin-bottom: 1rem;
    color: #333;
}

.register-gift {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    padding: 0.5rem;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: bold;
}

.auth-form input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: #667eea;
}

/* 测试账号样式 */
.test-accounts {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}

.test-accounts h4 {
    margin: 0 0 0.8rem 0;
    color: #667eea;
    font-size: 0.9rem;
}

.test-account-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.test-account {
    background: white;
    padding: 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
    font-size: 0.85rem;
}

.test-account:hover {
    background: #667eea;
    color: white;
    transform: translateX(5px);
}

.test-account strong {
    color: #667eea;
}

.test-account:hover strong {
    color: white;
}

.account-desc {
    color: #6c757d;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.test-account:hover .account-desc {
    color: rgba(255, 255, 255, 0.8);
}

/* 充值选项样式 */
.test-notice {
    background: #fff3cd;
    color: #856404;
    padding: 0.8rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    text-align: center;
    border: 1px solid #ffeaa7;
}

.recharge-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.recharge-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
}

.recharge-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.recharge-item.popular {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.recharge-item.vip {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.popular-tag, .vip-tag {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff6b6b;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

.vip-tag {
    background: #ffd700;
    color: #333;
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

.draws {
    color: #666;
    font-size: 0.9rem;
}

/* 主要内容样式 */
.main-content {
    flex: 1;
    padding: 2rem;
}

.gacha-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.gacha-banner {
    text-align: center;
    margin-bottom: 2rem;
}

.gacha-banner h2 {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.gacha-banner p {
    color: #666;
    font-size: 1.1rem;
}

.gacha-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.gacha-option {
    flex: 1;
    max-width: 300px;
}

.gacha-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.gacha-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.gacha-btn.ten {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 10px 30px rgba(240, 147, 251, 0.3);
}

.gacha-btn.ten:hover {
    box-shadow: 0 15px 40px rgba(240, 147, 251, 0.4);
}

.gacha-icon {
    font-size: 3rem;
}

.gacha-text {
    text-align: left;
}

.gacha-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.gacha-price {
    font-size: 1rem;
    opacity: 0.9;
}

.discount {
    background: #ffd700;
    color: #333;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

/* 结果展示样式 */
.result-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.result-section.hidden {
    display: none;
}

.result-section h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.result-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.card-item {
    background: white;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-item.rare {
    border-color: #007aff;
    background: linear-gradient(135deg, #e6f3ff, #cce7ff);
}

.card-item.epic {
    border-color: #af52de;
    background: linear-gradient(135deg, #f5e6ff, #e6ccff);
}

.card-item.legendary {
    border-color: #ff9500;
    background: linear-gradient(135deg, #fff4e6, #ffe6cc);
}

.card-item.hidden {
    border-color: #1c1c1e;
    background: linear-gradient(135deg, #2c2c2e, #1c1c1e);
    color: #ff453a;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 20px rgba(255, 69, 58, 0.5);
    }
    to {
        box-shadow: 0 0 30px rgba(255, 69, 58, 0.8);
    }
}

.card-emoji {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.card-name {
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.card-rarity {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* 收藏展示样式 */
.collection-stats {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #667eea;
    font-weight: bold;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

/* 卡池详情模态框 */
.pool-details-content {
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.pool-summary {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.summary-item {
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 14px;
    color: #ccc;
    margin-bottom: 5px;
}

.summary-value {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
}

.rarity-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rarity-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
}

.rarity-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    padding: 8px;
    border-radius: 8px;
}

.common-title {
    background: linear-gradient(45deg, #8e8e93, #636366);
    color: white;
}

.rare-title {
    background: linear-gradient(45deg, #007aff, #5ac8fa);
    color: white;
}

.epic-title {
    background: linear-gradient(45deg, #af52de, #bf5af2);
    color: white;
}

.legendary-title {
    background: linear-gradient(45deg, #ff9500, #ffcc02);
    color: white;
}

.hidden-title {
    background: linear-gradient(45deg, #1c1c1e, #48484a);
    color: #ff453a;
    border: 2px solid #ff453a;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.pool-card-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    transition: transform 0.2s;
}

.pool-card-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

.pool-card-name {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 5px;
}

.pool-card-emoji {
    font-size: 24px;
    display: block;
    margin-bottom: 5px;
}

.collection-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    border: 2px solid #eee;
    transition: all 0.3s ease;
}

.collection-item.collected {
    background: white;
    border-color: #667eea;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

.collection-item.collected:hover {
    transform: scale(1.05);
}

.collection-emoji {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    filter: grayscale(100%);
}

.collection-item.collected .collection-emoji {
    filter: none;
}

.collection-name {
    font-size: 0.8rem;
    font-weight: bold;
    color: #666;
}

.collection-item.collected .collection-name {
    color: #333;
}

/* 抽卡动画样式 */
.gacha-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    /* 默认主题色 */
    --accent: #ffd700;
    --accent2: #ff7e5f;
    animation: screenShake 0.6s ease-in-out, backgroundPulse 2.4s ease-in-out infinite;
}

/* 屏幕震动效果 */
@keyframes screenShake {
    0%, 100% { transform: translate(0, 0) scale(1); }
    10% { transform: translate(-2px, -1px) scale(1.002); }
    20% { transform: translate(2px, 1px) scale(0.998); }
    30% { transform: translate(-1px, 2px) scale(1.001); }
    40% { transform: translate(1px, -2px) scale(0.999); }
    50% { transform: translate(-2px, 1px) scale(1.003); }
    60% { transform: translate(2px, -1px) scale(0.997); }
    70% { transform: translate(-1px, -2px) scale(1.001); }
    80% { transform: translate(1px, 2px) scale(0.999); }
    90% { transform: translate(-1px, 1px) scale(1.001); }
}

/* 背景脉冲效果 */
@keyframes backgroundPulse {
    0%, 100% { background: rgba(0, 0, 0, 0.8); }
    25% { background: rgba(0, 0, 0, 0.85); }
    50% { background: rgba(0, 0, 0, 0.9); }
    75% { background: rgba(0, 0, 0, 0.85); }
}

.gacha-animation.hidden {
    display: none;
}

.animation-content {
    text-align: center;
    color: white;
}

/* 能量阶段 */
.energy-stage {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 0 auto 1.5rem;
}

.energy-core {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, var(--accent) 30%, var(--accent2) 60%, transparent 70%);
    box-shadow: 0 0 20px var(--accent), 0 0 40px var(--accent2);
    animation: corePulse 1.6s ease-in-out infinite;
}

@keyframes corePulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.8; }
}

.energy-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

.energy-ring.ring1 {
    width: 220px;
    height: 220px;
    animation: ringWave 2.2s linear infinite;
}

.energy-ring.ring2 {
    width: 180px;
    height: 180px;
    animation: ringWave 2.2s linear infinite 0.6s;
}

@keyframes ringWave {
    0% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.7; }
    50% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.7; }
}

.beams {
    position: absolute;
    inset: 0;
}

.beam {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 100px;
    background: linear-gradient(to bottom, var(--accent), rgba(255,255,255,0));
    transform-origin: top center;
    filter: drop-shadow(0 0 6px #fff);
    animation: beamGlow 1.2s ease-in-out infinite;
}

.b1 { transform: translate(-50%, -50%) rotate(0deg); }
.b2 { transform: translate(-50%, -50%) rotate(60deg); }
.b3 { transform: translate(-50%, -50%) rotate(120deg); }
.b4 { transform: translate(-50%, -50%) rotate(180deg); }
.b5 { transform: translate(-50%, -50%) rotate(240deg); }
.b6 { transform: translate(-50%, -50%) rotate(300deg); }

@keyframes beamGlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.particles .p {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent);
    animation: particleFly 2s ease-out infinite;
    --angle: calc(var(--i, 0) * 18deg);
    --distance: calc(80px + var(--i, 0) * 10px);
    --delay: calc(var(--i, 0) * 0.1s);
    animation-delay: var(--delay);
}

/* 爆炸粒子特效 */
.particles .p.burst {
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, var(--accent) 0%, var(--accent2) 50%, transparent 70%);
    animation: burstFly 1.5s ease-out infinite;
    --distance: calc(120px + var(--i, 0) * 15px);
}

/* 轨迹粒子特效 */
.particles .p.trail {
    width: 2px;
    height: 8px;
    border-radius: 1px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: trailFly 2.5s ease-out infinite;
    --distance: calc(100px + var(--i, 0) * 12px);
}

/* 星光粒子特效 */
.particles .p.star {
    width: auto;
    height: auto;
    background: none;
    box-shadow: none;
    font-size: 12px;
    animation: starFly 3s ease-out infinite;
    --distance: calc(150px + var(--i, 0) * 20px);
}

.particles .p:nth-child(1) { --i: 1; }
.particles .p:nth-child(2) { --i: 2; }
.particles .p:nth-child(3) { --i: 3; }
.particles .p:nth-child(4) { --i: 4; }
.particles .p:nth-child(5) { --i: 5; }
.particles .p:nth-child(6) { --i: 6; }
.particles .p:nth-child(7) { --i: 7; }
.particles .p:nth-child(8) { --i: 8; }
.particles .p:nth-child(9) { --i: 9; }
.particles .p:nth-child(10) { --i: 10; }
.particles .p:nth-child(11) { --i: 11; }
.particles .p:nth-child(12) { --i: 12; }
.particles .p:nth-child(13) { --i: 13; }
.particles .p:nth-child(14) { --i: 14; }
.particles .p:nth-child(15) { --i: 15; }
.particles .p:nth-child(16) { --i: 16; }
.particles .p:nth-child(17) { --i: 17; }
.particles .p:nth-child(18) { --i: 18; }
.particles .p:nth-child(19) { --i: 19; }
.particles .p:nth-child(20) { --i: 20; }
.particles .p:nth-child(21) { --i: 21; }
.particles .p:nth-child(22) { --i: 22; }
.particles .p:nth-child(23) { --i: 23; }
.particles .p:nth-child(24) { --i: 24; }
.particles .p:nth-child(25) { --i: 25; }
.particles .p:nth-child(26) { --i: 26; }
.particles .p:nth-child(27) { --i: 27; }
.particles .p:nth-child(28) { --i: 28; }
.particles .p:nth-child(29) { --i: 29; }
.particles .p:nth-child(30) { --i: 30; }
.particles .p:nth-child(31) { --i: 31; }
.particles .p:nth-child(32) { --i: 32; }
.particles .p:nth-child(33) { --i: 33; }
.particles .p:nth-child(34) { --i: 34; }
.particles .p:nth-child(35) { --i: 35; }
.particles .p:nth-child(36) { --i: 36; }

@keyframes particleFly {
    0% {
        transform: translate(0, 0) scale(0);
        opacity: 0;
    }
    20% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(
            calc(cos(var(--angle)) * var(--distance)),
            calc(sin(var(--angle)) * var(--distance))
        ) scale(0);
        opacity: 0;
    }
}

@keyframes burstFly {
    0% {
        transform: translate(0, 0) scale(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        transform: translate(0, 0) scale(1.5) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: translate(
            calc(cos(var(--angle)) * var(--distance)),
            calc(sin(var(--angle)) * var(--distance))
        ) scale(0) rotate(360deg);
        opacity: 0;
    }
}

@keyframes trailFly {
    0% {
        transform: translate(0, 0) scale(0) rotate(var(--angle));
        opacity: 0;
    }
    15% {
        transform: translate(0, 0) scale(1) rotate(var(--angle));
        opacity: 1;
    }
    100% {
        transform: translate(
            calc(cos(var(--angle)) * var(--distance)),
            calc(sin(var(--angle)) * var(--distance))
        ) scale(0.3) rotate(calc(var(--angle) + 180deg));
        opacity: 0;
    }
}

@keyframes starFly {
    0% {
        transform: translate(0, 0) scale(0) rotate(0deg);
        opacity: 0;
        filter: brightness(1);
    }
    25% {
        transform: translate(0, 0) scale(1.2) rotate(90deg);
        opacity: 1;
        filter: brightness(1.5);
    }
    100% {
        transform: translate(
            calc(cos(var(--angle)) * var(--distance)),
            calc(sin(var(--angle)) * var(--distance))
        ) scale(0.5) rotate(720deg);
        opacity: 0;
        filter: brightness(0.5);
    }
}

.card-flip {
    width: 200px;
    height: 280px;
    margin: 0 auto 2rem;
    perspective: 1000px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

.card-back, .card-front {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255,255,255,0.3);
}

.card-back {
    background: linear-gradient(135deg, 
        var(--accent) 0%, 
        var(--accent2) 50%, 
        rgba(255,255,255,0.1) 100%);
    color: white;
    animation: flip3D 2s ease-in-out infinite, cardGlow 1.6s ease-in-out infinite, cardFloat 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.card-back::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255,255,255,0.3) 50%, 
        transparent 70%);
    animation: shimmer 2s ease-in-out infinite;
    transform: rotate(45deg);
}

.card-front {
    background: linear-gradient(135deg, 
        var(--accent2) 0%, 
        var(--accent) 50%, 
        rgba(255,255,255,0.2) 100%);
    transform: rotateY(180deg);
    color: white;
}

@keyframes flip3D {
    0%, 100% { 
        transform: rotateY(0deg) rotateX(0deg) rotateZ(0deg) scale(1); 
    }
    25% { 
        transform: rotateY(90deg) rotateX(15deg) rotateZ(5deg) scale(1.05); 
    }
    50% { 
        transform: rotateY(180deg) rotateX(0deg) rotateZ(0deg) scale(1.1); 
    }
    75% { 
        transform: rotateY(270deg) rotateX(-15deg) rotateZ(-5deg) scale(1.05); 
    }
}

@keyframes cardGlow {
    0%, 100% { 
        box-shadow: 
            0 0 20px var(--accent),
            0 0 40px rgba(255,255,255,0.2),
            inset 0 0 20px rgba(255,255,255,0.1);
    }
    50% { 
        box-shadow: 
            0 0 40px var(--accent2),
            0 0 80px rgba(255,255,255,0.4),
            inset 0 0 30px rgba(255,255,255,0.2);
    }
}

@keyframes cardFloat {
    0%, 100% { 
        transform: translateY(0px) scale(1); 
    }
    33% { 
        transform: translateY(-10px) scale(1.02); 
    }
    66% { 
        transform: translateY(5px) scale(0.98); 
    }
}

@keyframes shimmer {
    0% { 
        transform: translateX(-100%) translateY(-100%) rotate(45deg); 
        opacity: 0;
    }
    50% { 
        opacity: 1;
    }
    100% { 
        transform: translateX(100%) translateY(100%) rotate(45deg); 
        opacity: 0;
    }
}

/* 稀有度主题：调整能量色与动画速度 */
.gacha-animation.theme-common { --accent: #8e8e93; --accent2: #636366; }
.gacha-animation.theme-rare { --accent: #007aff; --accent2: #5ac8fa; }
.gacha-animation.theme-epic { --accent: #af52de; --accent2: #bf5af2; }
.gacha-animation.theme-legendary { --accent: #ff9500; --accent2: #ffcc02; }
.gacha-animation.theme-hidden { --accent: #ff453a; --accent2: #ff2d55; }

.gacha-animation.theme-legendary .card-back { animation-duration: 1.6s, 1.2s, 3s; }
.gacha-animation.theme-hidden .card-back { animation-duration: 1.4s, 1s, 3s; }

.gacha-animation.theme-legendary .energy-ring { animation-duration: 1.8s; }
.gacha-animation.theme-hidden .energy-ring { animation-duration: 1.6s; }

/* 传说级特殊效果 */
.gacha-animation.theme-legendary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, 
        rgba(255, 149, 0, 0.1) 0%, 
        rgba(255, 204, 2, 0.05) 50%, 
        transparent 70%);
    animation: legendaryPulse 2s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

.gacha-animation.theme-legendary .energy-core {
    animation: corePulse 1.6s ease-in-out infinite, legendaryCore 2s ease-in-out infinite;
}

/* 隐藏级特殊效果 */
.gacha-animation.theme-hidden::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 69, 58, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255, 45, 85, 0.15) 0%, transparent 50%),
        linear-gradient(45deg, transparent 40%, rgba(255, 69, 58, 0.1) 50%, transparent 60%);
    animation: hiddenMystery 3s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

.gacha-animation.theme-hidden .energy-core {
    animation: corePulse 1.6s ease-in-out infinite, hiddenCore 2.5s ease-in-out infinite;
}

/* 传说级雷电效果 */
.gacha-animation.theme-legendary .animation-content::after {
    content: '⚡⚡⚡';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: #ffcc02;
    animation: lightning 1.5s ease-in-out infinite;
    text-shadow: 0 0 10px #ff9500, 0 0 20px #ffcc02;
}

/* 隐藏级神秘符文效果 */
.gacha-animation.theme-hidden .animation-content::after {
    content: '🔮✨🌟';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.8rem;
    animation: mysticalRunes 2s ease-in-out infinite;
    text-shadow: 0 0 15px #ff453a, 0 0 30px #ff2d55;
}

@keyframes legendaryPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

@keyframes legendaryCore {
    0%, 100% { 
        filter: brightness(1) hue-rotate(0deg);
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        filter: brightness(1.5) hue-rotate(30deg);
        transform: translate(-50%, -50%) scale(1.2);
    }
}

@keyframes hiddenMystery {
    0%, 100% { 
        opacity: 0.2; 
        transform: rotate(0deg) scale(1);
    }
    33% { 
        opacity: 0.5; 
        transform: rotate(120deg) scale(1.02);
    }
    66% { 
        opacity: 0.3; 
        transform: rotate(240deg) scale(0.98);
    }
}

@keyframes hiddenCore {
    0%, 100% { 
        filter: brightness(1) hue-rotate(0deg) saturate(1);
        transform: translate(-50%, -50%) scale(1);
    }
    25% { 
        filter: brightness(1.3) hue-rotate(90deg) saturate(1.5);
        transform: translate(-50%, -50%) scale(1.1);
    }
    50% { 
        filter: brightness(1.6) hue-rotate(180deg) saturate(2);
        transform: translate(-50%, -50%) scale(1.3);
    }
    75% { 
        filter: brightness(1.3) hue-rotate(270deg) saturate(1.5);
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes lightning {
    0%, 90%, 100% { 
        opacity: 0; 
        transform: translateX(-50%) translateY(0px) scale(1);
    }
    5%, 85% { 
        opacity: 1; 
        transform: translateX(-50%) translateY(-5px) scale(1.1);
    }
    10%, 80% { 
        opacity: 0.7; 
        transform: translateX(-50%) translateY(5px) scale(0.9);
    }
}

@keyframes mysticalRunes {
    0%, 100% { 
        opacity: 0.6; 
        transform: translateX(-50%) rotate(0deg) scale(1);
        filter: hue-rotate(0deg);
    }
    33% { 
        opacity: 1; 
        transform: translateX(-50%) rotate(120deg) scale(1.1);
        filter: hue-rotate(120deg);
    }
    66% { 
        opacity: 0.8; 
        transform: translateX(-50%) rotate(240deg) scale(0.9);
        filter: hue-rotate(240deg);
    }
}

.loading-text {
    font-size: 1.5rem;
    font-weight: bold;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* 底部样式 */
.footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 1rem;
    color: white;
    margin-top: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .user-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .gacha-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .gacha-option {
        width: 100%;
        max-width: 400px;
    }
    
    .recharge-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}