* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', 'Microsoft YaHei', sans-serif; }
body { 
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c); 
    min-height: 100vh; 
    padding: 20px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    color: #fff;
}
.game-container {
    max-width: 1200px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateZ(0); /* 硬件加速 */
    will-change: transform, opacity; /* 提前通知浏览器可能的变化 */
}
/* 未登录遮罩 */
.login-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.login-mask.hidden {
    opacity: 0;
    visibility: hidden;
}
.login-panel {
    background: linear-gradient(135deg, #2d3748, #1a202c);
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid #ffd700;
}
.login-panel h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    background: linear-gradient(90deg, #ffd700, #ff9500);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.form-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.form-tab {
    padding: 10px 20px;
    cursor: pointer;
    color: #ccc;
    font-weight: bold;
    border-bottom: 3px solid transparent;
}
.form-tab.active {
    color: #ffd700;
    border-bottom-color: #ffd700;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #e0e0e0;
}
.form-control {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1rem;
}
.form-control:focus {
    outline: none;
    border-color: #ffd700;
}
.submit-btn {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(90deg, #ffd700, #ff9500);
    color: #1a202c;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-top: 10px;
}
.submit-btn:hover {
    transform: translateY(-2px);
}
.form-alert {
    text-align: center;
    margin-top: 15px;
    color: #ff6b6b;
    font-size: 0.9rem;
}
/* 头部区域 */
.header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}
.user-info {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}
.username {
    color: #ffd700;
    font-weight: bold;
    font-size: 1.1rem;
}
.logout-btn {
    padding: 6px 15px;
    border-radius: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}
.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}
.sync-status {
    position: absolute;
    top: 0;
    left: 0;
    color: #4caf50;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}
.header h1 {
    font-size: 2.5rem;
    background: linear-gradient(90deg, #ffd700, #ff9500, #ffd700);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    margin-bottom: 15px;
}
.vip-status {
    background: rgba(255, 215, 0, 0.15);
    padding: 8px 20px;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 215, 0, 0.4);
}
.vip-status span {
    color: #ffd700;
    font-weight: bold;
}
.coin-balance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 215, 0, 0.1);
    padding: 12px 24px;
    border-radius: 50px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    inline-size: fit-content;
    margin: 0 auto 20px;
}
.coin-icon {
    font-size: 1.5rem;
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}
.coin-count {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
}
/* 游戏模式切换 */
.mode-switch {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.mode-btn {
    padding: 8px 20px;
    border-radius: 50px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}
.mode-btn.active {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}
.mode-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.15);
}
.bet-info {
    text-align: center;
    margin-bottom: 15px;
    color: #ffd700;
    font-size: 1.2rem;
    font-weight: bold;
}
/* 转盘区域 */
.wheel-container {
    position: relative;
    width: 100%;
    max-width: 550px;
    margin: 0 auto 40px;
}
.wheel {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 50%;
    background: conic-gradient(
        #4ecdc4 0% 14.28%, /* 5币 */
        #45b7d1 14.28% 28.56%, /* 10币 */
        #9c27b0 28.56% 42.84%, /* 20币 */
        #ff9500 42.84% 57.12%, /* 30币 */
        #ff6b6b 57.12% 71.4%, /* 50币 */
        #ffd700 71.4% 85.68%, /* 倍数 */
        #e53e3e 85.68% 100% /* JP大奖 */
    );
    position: relative;
    transition: transform 6s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2), inset 0 0 20px rgba(0, 0, 0, 0.3);
    border: 8px solid rgba(255, 255, 255, 0.1);
    transform: translateZ(0); /* 硬件加速 */
    will-change: transform; /* 提前通知浏览器可能的变化 */
    backface-visibility: hidden; /* 优化背面渲染 */
}
.wheel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18%;
    height: 18%;
    background: linear-gradient(135deg, #fff, #eee);
    border-radius: 50%;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1;
}
.wheel::after {
    content: '🎮';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.2rem;
    z-index: 2;
}
/* 扇区文字 */
.wheel-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    top: 0;
    left: 50%;
    transform-origin: bottom left;
}
.wheel-segment span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(calc(var(--rotate) + 45deg));
    color: #fff;
    font-weight: bold;
    font-size: 1.3rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    width: 70%;
    text-align: center;
    display: inline-block;
    white-space: nowrap;
}
.pointer {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 45px solid #ffd700;
    z-index: 10;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3));
}
.pointer::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -18px;
    width: 36px;
    height: 12px;
    background: #ff9500;
    border-radius: 3px;
}
/* 操作按钮 */
.controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
}
.btn {
    padding: 15px 35px;
    border-radius: 50px;
    border: none;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.start-btn {
    background: linear-gradient(90deg, #4caf50, #81c784);
    color: #fff;
}
.start-btn:disabled {
    background: linear-gradient(90deg, #9e9e9e, #bdbdbd);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.start-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}
.stop-btn {
    background: linear-gradient(90deg, #e53e3e, #ef5350);
    color: #fff;
}
.stop-btn:disabled {
    background: linear-gradient(90deg, #9e9e9e, #bdbdbd);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.stop-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.4);
}
/* 奖项说明 */
.prize-list {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 40px;
}
.prize-list h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #ffd700;
    text-align: center;
}
.prize-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}
.prize-item {
    background: rgba(255, 255, 255, 0.08);
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.prize-item span {
    font-weight: bold;
    font-size: 1.1rem;
}
.prize-5 { background: linear-gradient(135deg, rgba(78, 205, 196, 0.2), transparent); border-color: #4ecdc4; }
.prize-10 { background: linear-gradient(135deg, rgba(69, 183, 209, 0.2), transparent); border-color: #45b7d1; }
.prize-20 { background: linear-gradient(135deg, rgba(156, 39, 176, 0.2), transparent); border-color: #9c27b0; }
.prize-30 { background: linear-gradient(135deg, rgba(255, 149, 0, 0.2), transparent); border-color: #ff9500; }
.prize-50 { background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), transparent); border-color: #ff6b6b; }
.prize-multi { background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), transparent); border-color: #ffd700; }
.prize-jp { background: linear-gradient(135deg, rgba(229, 62, 62, 0.2), transparent); border-color: #e53e3e; }
/* VIP区域 */
.vip-section {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(50, 50, 150, 0.3));
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    margin-bottom: 40px;
}
.vip-section h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(90deg, #ffd700, #ff6b00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.vip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}
.vip-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.vip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}
.vip-card.active {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}
.vip-1 { border-color: #9e9e9e; }
.vip-1::before { background: #9e9e9e; }
.vip-1:hover { border-color: #bdbdbd; }
.vip-2 { border-color: #4caf50; }
.vip-2::before { background: #4caf50; }
.vip-2:hover { border-color: #81c784; }
.vip-3 { border-color: #2196f3; }
.vip-3::before { background: #2196f3; }
.vip-3:hover { border-color: #64b5f6; }
.vip-4 { border-color: #9c27b0; }
.vip-4::before { background: #9c27b0; }
.vip-4:hover { border-color: #ba68c8; }
.vip-5 { border-color: #ffd700; animation: vipGlow 2s infinite alternate; }
.vip-5::before { background: #ffd700; }
.vip-card h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.vip-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 8px;
}
.vip-desc {
    font-size: 0.95rem;
    color: #e0e0e0;
    margin-bottom: 12px;
}
.buy-vip-btn {
    padding: 8px 18px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(90deg, #ffd700, #ff9500);
    color: #1a202c;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.buy-vip-btn:hover {
    transform: translateY(-2px);
}
.buy-vip-btn.disabled {
    background: linear-gradient(90deg, #9e9e9e, #bdbdbd);
    cursor: not-allowed;
}
/* 排行榜区域 */
.ranking-section {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(50, 50, 150, 0.3));
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}
.ranking-section h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(90deg, #ffd700, #ff6b00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ranking-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.ranking-rank {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
}
.ranking-rank.top1 { background: #ffd700; color: #1a202c; }
.ranking-rank.top2 { background: #e0e0e0; color: #1a202c; }
.ranking-rank.top3 { background: #cd7f32; color: #fff; }
.ranking-username {
    flex: 1;
    font-weight: bold;
}
.ranking-score {
    color: #ffd700;
    font-weight: bold;
    font-size: 1.1rem;
}
.ranking-empty {
    text-align: center;
    padding: 30px;
    color: #ccc;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: linear-gradient(135deg, #2d3748, #1a202c);
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid #ffd700;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}
.modal.active .modal-content {
    transform: scale(1);
}
.modal-title {
    font-size: 2rem;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #ffd700, #ff9500);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.modal-desc {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #e2e8f0;
}
.modal-btn {
    background: linear-gradient(90deg, #ffd700, #ff9500);
    color: #1a202c;
    padding: 12px 30px;
    border-radius: 50px;
    border: none;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}
.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}
.jp-animation {
    animation: jpFlash 0.5s infinite alternate;
}
@keyframes jpFlash {
    from { box-shadow: 0 0 20px #e53e3e, 0 0 40px #e53e3e; }
    to { box-shadow: 0 0 30px #ff3d00, 0 0 60px #ff3d00, 0 0 80px #ff3d00; }
}
@keyframes vipGlow {
    from { box-shadow: 0 0 10px #ffd700; }
    to { box-shadow: 0 0 20px #ffd700, 0 0 30px rgba(255, 215, 0, 0.5); }
}
/* 响应式适配 */
@media (max-width: 768px) {
    .game-container {
        padding: 20px;
    }
    .header h1 {
        font-size: 2rem;
    }
    .user-info {
        position: static;
        margin-bottom: 15px;
        justify-content: center;
    }
    .sync-status {
        position: static;
        margin-bottom: 10px;
    }
    .coin-count {
        font-size: 1.5rem;
    }
    .controls {
        flex-direction: column;
        gap: 15px;
        padding: 0 20px;
    }
    .btn {
        padding: 12px 25px;
        font-size: 1.1rem;
    }
    .prize-grid, .vip-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .vip-card {
        padding: 15px;
    }
    .mode-btn {
        padding: 6px 15px;
        font-size: 0.9rem;
    }
    .ranking-item {
        gap: 10px;
        padding: 10px 15px;
    }
    .ranking-rank {
        width: 25px;
        height: 25px;
        font-size: 0.9rem;
    }
}