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

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0B1426 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #0B1426 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3px;
    position: relative;
    overflow-x: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

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

/* 添加宇宙星空背景效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(3px 3px at 20px 30px, #FFFFFF, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 90px 40px, #87CEEB, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(135,206,235,0.8), transparent),
        radial-gradient(2px 2px at 160px 30px, #E6E6FA, transparent),
        radial-gradient(1px 1px at 200px 60px, #B0E0E6, transparent),
        radial-gradient(2px 2px at 240px 20px, #F0F8FF, transparent),
        radial-gradient(1px 1px at 280px 90px, #FFD700, transparent),
        radial-gradient(1px 1px at 320px 50px, #FF69B4, transparent),
        radial-gradient(2px 2px at 360px 120px, #00CED1, transparent),
        radial-gradient(1px 1px at 400px 80px, #9370DB, transparent),
        radial-gradient(2px 2px at 440px 40px, #20B2AA, transparent);
    background-repeat: repeat;
    background-size: 500px 300px;
    animation: sparkle 12s linear infinite;
    z-index: -1;
}

@keyframes sparkle {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(90deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
    75% { transform: translateY(-20px) rotate(270deg); }
}

.game-container {
    background: linear-gradient(145deg, rgba(11, 20, 38, 0.9), rgba(26, 26, 46, 0.9), rgba(22, 33, 62, 0.9), rgba(15, 52, 96, 0.9), rgba(11, 20, 38, 0.9));
    background-size: 400% 400%;
    animation: containerGlow 10s ease infinite;
    border-radius: 30px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(135, 206, 235, 0.3),
        inset 0 1px 0 rgba(255, 215, 0, 0.4);
    padding: 40px;
    max-width: 800px;
    width: 100%;
    color: #FFD700;
    position: relative;
    border: 3px solid #87CEEB;
    backdrop-filter: blur(15px);
    margin: 0 auto;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 左上角特效開關按鈕 */
.effects-toggle-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, #9b59b6, #8e44ad);
    border: 2px solid #9b59b6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(155, 89, 182, 0.4),
        0 0 20px rgba(155, 89, 182, 0.3);
    z-index: 1000;
    animation: effectsToggleGlow 3s ease-in-out infinite alternate;
}

.effects-toggle-btn:hover {
    background: linear-gradient(145deg, #8e44ad, #7d3c98);
    transform: scale(1.1);
    box-shadow: 
        0 6px 20px rgba(155, 89, 182, 0.6),
        0 0 30px rgba(155, 89, 182, 0.5);
}

.effects-toggle-btn:active {
    transform: scale(0.95);
}

.effects-toggle-btn.disabled {
    background: linear-gradient(145deg, #95a5a6, #7f8c8d);
    border: 2px solid #95a5a6;
    opacity: 0.7;
    animation: none;
}

.effects-toggle-btn.disabled:hover {
    background: linear-gradient(145deg, #7f8c8d, #6c7b7d);
    transform: scale(1.05);
    box-shadow: 
        0 4px 15px rgba(149, 165, 166, 0.4),
        0 0 20px rgba(149, 165, 166, 0.3);
}

.effects-icon {
    font-size: 1.5rem;
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.effects-toggle-btn:hover .effects-icon {
    transform: scale(1.1);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.effects-toggle-btn.disabled .effects-icon {
    color: #ecf0f1;
    text-shadow: 0 0 5px rgba(236, 240, 241, 0.3);
}

@keyframes effectsToggleGlow {
    0% {
        box-shadow: 
            0 4px 15px rgba(155, 89, 182, 0.4),
            0 0 20px rgba(155, 89, 182, 0.3);
    }
    100% {
        box-shadow: 
            0 4px 15px rgba(155, 89, 182, 0.6),
            0 0 30px rgba(155, 89, 182, 0.5);
    }
}

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

.game-header {
    text-align: center;
    margin-bottom: 10px;
}

.game-header h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(135, 206, 235, 0.8),
        0 0 40px rgba(255, 215, 0, 0.6);
    background: linear-gradient(45deg, #FFD700, #87CEEB, #E6E6FA, #FFD700, #87CEEB, #FFD700);
    background-size: 300% 300%;
    animation: titleRainbow 5s ease infinite;
    -webkit-background-clip: text;
/*    -webkit-text-fill-color: transparent;*/
    background-clip: text;
    font-weight: bold;
    letter-spacing: 2px;
    color: white;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

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

.game-subtitle {
    color: #87CEEB;
    font-size: 1.3rem;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 15px rgba(135, 206, 235, 0.6);
    animation: subtitleBounce 3s ease-in-out infinite;
    background: linear-gradient(45deg, #87CEEB, #E6E6FA, #FFD700, #87CEEB);
    background-size: 300% 300%;
    animation: subtitleRainbow 4s ease infinite, subtitleBounce 3s ease-in-out infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

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

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

.score-board {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(145deg, rgba(11, 20, 38, 0.6), rgba(26, 26, 46, 0.6));
    border-radius: 25px;
    padding: 25px 30px;
    backdrop-filter: blur(15px);
    border: 2px solid #87CEEB;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(135, 206, 235, 0.4);
    animation: scoreBoardPulse 4s ease-in-out infinite;
    gap: 20px;
}

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

.score-item {
    text-align: center;
    transition: all 0.3s ease;
}

.score-item:hover {
    transform: translateY(-5px) scale(1.1);
}

.score-item .label {
    display: block;
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 8px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.score-item .value {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 215, 0, 0.8), 0 0 20px rgba(135, 206, 235, 0.6);
    animation: valueGlow 2s ease-in-out infinite alternate;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

@keyframes valueGlow {
    0% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 215, 0, 0.8), 0 0 20px rgba(135, 206, 235, 0.6); }
    100% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 215, 0, 1), 0 0 30px rgba(135, 206, 235, 1); }
}

.slot-machine {
    text-align: center;
}

.machine-frame {
    background: linear-gradient(145deg, #1a1a2e, #16213e, #0f3460, #1a1a2e);
    background-size: 200% 200%;
    animation: machineGlow 6s ease infinite;
    border-radius: 25px;
    padding: 35px 35px 35px 35px;
    padding-right: 100px;
    margin: 0 auto 35px auto;
    min-height: 300px;
    height: auto;
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 
        inset 0 15px 30px rgba(0, 0, 0, 0.7),
        0 15px 35px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(135, 206, 235, 0.4);
    position: relative;
    border: 3px solid #87CEEB;
}

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

.reels-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 35px;
/*    margin-bottom: 25px;*/
    width: 100%;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    transform: scale(1.1);
}

.reel {
    width: 180px;
    height: 180px;
    background: linear-gradient(145deg, #FFD700, #FFA500, #FFD700);
    background-size: 200% 200%;
    animation: reelGlow 4s ease infinite;
    border-radius: 25px;
    overflow: hidden;
    position: relative;
    box-shadow: 
        inset 0 10px 20px rgba(0, 0, 0, 0.4),
        0 10px 25px rgba(0, 0, 0, 0.3),
        0 0 25px rgba(255, 215, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 4px solid #FFD700;
    transition: all 0.3s ease;
}

.reel:hover {
    transform: scale(1.05);
    box-shadow: 
        inset 0 8px 15px rgba(0, 0, 0, 0.4),
        0 12px 30px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(255, 215, 0, 0.5);
}

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

.symbol {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    user-select: none;
    font-size: 4.5rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    line-height: 1;
    position: relative;
    top: 0;
    animation: symbolFloat 3s ease-in-out infinite;
}

@keyframes symbolFloat {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-3px); }
}

/* 確保轉輪只顯示一個符號，並且對準紅線 */
.reel .symbol {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
}

.symbol.winning {
    text-shadow: 
        0 0 25px rgba(255, 215, 0, 0.9), 
        0 0 35px rgba(255, 215, 0, 0.7),
        0 0 45px rgba(255, 215, 0, 0.5);
    animation: gemGlow 1s ease-in-out infinite alternate, symbolBounce 0.5s ease-in-out infinite;
}

@keyframes gemGlow {
    0% { 
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        text-shadow: 0 0 25px rgba(255, 215, 0, 0.9);
    }
    100% { 
        transform: translate(-50%, -50%) scale(1.2) rotate(5deg);
        text-shadow: 0 0 40px rgba(255, 215, 0, 1), 
                     0 0 50px rgba(255, 215, 0, 0.8),
                     0 0 60px rgba(255, 215, 0, 0.6);
    }
}

@keyframes symbolBounce {
    0%, 100% { transform: translate(-50%, -50%) scale(1.1); }
    50% { transform: translate(-50%, -50%) scale(1.3); }
}

.reel.spinning .symbol {
    animation: spin 0.1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) translateY(0) rotate(0deg); }
    100% { transform: translate(-50%, -50%) translateY(-100%) rotate(360deg); }
}

.payline {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    height: 4px;
    background: linear-gradient(90deg, transparent, #FFD700, #FFA500, #FFD700, transparent);
    border-radius: 3px;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    animation: paylineGlow 2s ease-in-out infinite alternate;
}

@keyframes paylineGlow {
    0% { 
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
        opacity: 0.8;
    }
    100% { 
        box-shadow: 0 0 25px rgba(255, 215, 0, 1);
        opacity: 1;
    }
}

.result-display {
    margin-bottom: 35px;
}

.message {
    font-size: 1.4rem;
    font-weight: bold;
    padding: 20px;
    background: linear-gradient(145deg, rgba(139, 0, 0, 0.3), rgba(178, 34, 34, 0.3));
    border-radius: 15px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid #FFD700;
    backdrop-filter: blur(10px);
    animation: messageFloat 4s ease-in-out infinite;
    color: #FFD700;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

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

.message.win {
    background: linear-gradient(45deg, #FFD700, #FFA500, #FFD700);
    background-size: 200% 200%;
    animation: winPulse 1.5s ease-in-out infinite alternate, winRainbow 3s ease infinite;
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.6);
    border: 2px solid #FFD700;
    color: #000000;
}

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

.message.lose {
    background: linear-gradient(45deg, #8B0000, #B22222, #8B0000);
    background-size: 200% 200%;
    animation: loseShake 0.5s ease-in-out;
    box-shadow: 0 10px 25px rgba(139, 0, 0, 0.5);
    border: 2px solid #FFD700;
    color: #FFD700;
}

@keyframes loseShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.controls {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.bet-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(145deg, rgba(139, 0, 0, 0.3), rgba(178, 34, 34, 0.3));
    padding: 20px 25px;
    border-radius: 35px;
    border: 2px solid #FFD700;
    backdrop-filter: blur(10px);
    animation: betControlsFloat 5s ease-in-out infinite;
}

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

.bet-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(145deg, #FFD700, #FFA500, #FFD700);
    background-size: 200% 200%;
    animation: buttonGlow 3s ease infinite;
    color: #000000;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.5);
    border: 2px solid #FFD700;
}

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

.bet-btn:hover {
    transform: scale(1.2) rotate(5deg);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.7);
    animation: buttonHover 0.5s ease-in-out;
}

@keyframes buttonHover {
    0% { transform: scale(1.2) rotate(5deg); }
    50% { transform: scale(1.3) rotate(10deg); }
    100% { transform: scale(1.2) rotate(5deg); }
}

.bet-btn:active {
    transform: scale(0.9);
}

/* 最大下注按鈕樣式 */
.max-bet-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(145deg, #FFD700, #FFA500, #FFD700);
    background-size: 200% 200%;
    animation: maxBetBtnGlow 3s ease infinite;
    color: #000000;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.5);
    border: 2px solid #FFD700;
    position: relative;
    overflow: hidden;
}

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

.max-bet-btn:hover {
    transform: scale(1.2) rotate(5deg);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.7);
    animation: maxBetBtnHover 0.5s ease-in-out;
}

@keyframes maxBetBtnHover {
    0% { transform: scale(1.2) rotate(5deg); }
    50% { transform: scale(1.3) rotate(10deg); }
    100% { transform: scale(1.2) rotate(5deg); }
}

.max-bet-btn:active {
    transform: scale(0.9);
}

.max-bet-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

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

.bet-display {
    font-size: 1.3rem;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 215, 0, 0.8);
    animation: betDisplayGlow 2s ease-in-out infinite alternate;
}

@keyframes betDisplayGlow {
    0% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 215, 0, 0.8); }
    100% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 215, 0, 1); }
}

.spin-button {
    width: 250px;
    height: 100px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(145deg, #e74c3c, #c0392b, #e74c3c);
    background-size: 200% 200%;
    animation: spinButtonGlow 4s ease infinite;
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    box-shadow: 0 15px 35px rgba(231, 76, 60, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.spin-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.spin-button:hover::before {
    left: 100%;
}

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

.spin-button:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 25px 50px rgba(231, 76, 60, 0.6);
    animation: spinButtonHover 0.5s ease-in-out;
}

@keyframes spinButtonHover {
    0% { transform: translateY(-8px) scale(1.05); }
    50% { transform: translateY(-12px) scale(1.1); }
    100% { transform: translateY(-8px) scale(1.05); }
}

.spin-button:active {
    transform: translateY(0) scale(0.95);
}

.spin-button:disabled {
    background: linear-gradient(145deg, #7f8c8d, #95a5a6, #7f8c8d);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    animation: none;
}

.max-bet-button {
    padding: 20px 35px;
    border: none;
    border-radius: 35px;
    background: linear-gradient(145deg, #FFD700, #FFA500, #FFD700);
    background-size: 200% 200%;
    animation: maxBetGlow 3s ease infinite;
    color: #000000;
    font-size: 1.4rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.5);
    border: 2px solid #FFD700;
}

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

.max-bet-button:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 30px rgba(255, 215, 0, 0.7);
    animation: maxBetHover 0.5s ease-in-out;
}

@keyframes maxBetHover {
    0% { transform: translateY(-5px) scale(1.1); }
    50% { transform: translateY(-8px) scale(1.15); }
    100% { transform: translateY(-5px) scale(1.1); }
}

.game-footer {
    margin-top: 35px;
    text-align: center;
}

.paytable {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.paytable h3 {
    margin-bottom: 15px;
    color: #f39c12;
    font-size: 1.3rem;
}

.payout-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.payout-row:hover {
    background: rgba(255, 255, 255, 0.2);
}

.symbols {
    font-size: 1.2rem;
}

.multiplier {
    font-weight: bold;
    color: #2ecc71;
}

/* 金幣掉落動畫 */
.coin-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.coin {
    position: absolute;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle at 30% 30%, #ffd700, #ffb347, #ff8c00);
    border-radius: 50%;
    border: 2px solid #ffa500;
    box-shadow: 
        0 0 10px rgba(255, 215, 0, 0.8),
        inset 0 0 10px rgba(255, 255, 255, 0.3);
    animation: coinFall 2s ease-in forwards;
}

.coin::before {
    content: '$';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #8b4513;
    font-weight: bold;
    font-size: 16px;
}

@keyframes coinFall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: translateY(400px) rotate(720deg);
        opacity: 0;
    }
}

/* 大獎特效 */
.jackpot-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,215,0,0.3) 0%, transparent 70%);
    animation: jackpotPulse 2s ease-in-out;
    pointer-events: none;
    z-index: 999;
}

@keyframes jackpotPulse {
    0%, 100% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}
@media (max-width: 768px) {
    .game-container {
        padding: 20px;
        margin: 0;
        width: 100%;
        height: 100vh;
        max-width: 100%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .game-header h1 {
        font-size: 2rem;
    }
    
    .score-board {
        flex-direction: row;
        gap: 10px;
        padding: 15px 20px;
        margin-bottom: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .score-item {
        min-width: 80px;
        text-align: center;
    }
    
    .score-item .label {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }
    
    .score-item .value {
        font-size: 1.4rem;
    }
    
    .reels-container {
        gap: 15px;
        width: 100%;
        max-width: 650px;
        transform: scale(1.05);
    }
    
    .reel {
        width: 120px;
        height: 120px;
    }
    
    .symbol {
        font-size: 3.5rem;
    }
    
    .machine-frame {
        padding: 30px;
        padding-right: 60px;
        margin: 0 auto 25px auto;
        min-height: 250px;
        height: auto;
        max-width: 700px;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .spin-button {
        width: 150px;
        height: 60px;
        font-size: 1.2rem;
    }
    
    .controls {
        gap: 15px;
    }
    
    .bet-controls {
        gap: 15px;
        padding: 15px 20px;
    }
    
    .bet-btn, .max-bet-btn {
        width: 45px;
        height: 45px;
        font-size: 1.6rem;
    }
    
    /* 手機版拉桿樣式 */
    .lever-container {
        position: absolute;
        right: -30px;
        top: 50%;
        transform: translateY(-50%);
        width: 50px;
        height: 180px;
        /* 增加觸控區域 */
        touch-action: none;
    }
    
    .lever-base {
        width: 40px;
        height: 20px;
        border-radius: 10px;
    }
    
    .lever-handle {
        width: 20px;
        height: 140px;
        border-radius: 10px;
        bottom: 12px;
        border: 2px solid #FFD700;
        /* 增加觸控區域 */
        touch-action: none;
    }
    
    .lever-knob {
        width: 60px;
        height: 60px;
        top: -50px;
        /* 增加觸控區域 */
        touch-action: none;
        /* 確保在手機上有足夠的觸控區域 */
        min-width: 44px;
        min-height: 44px;
    }
    
    /* 調整機台框架以容納較小的拉桿 */
    .machine-frame {
        padding-right: 60px;
        min-height: 250px;
        height: auto;
        margin: 0 auto 25px auto;
        max-width: 700px;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 15px;
        margin: 0;
        width: 100%;
        height: 100vh;
        max-width: 100%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .game-header h1 {
        font-size: 1.8rem;
    }
    
    .score-board {
        flex-direction: row;
        gap: 8px;
        padding: 12px 15px;
        margin-bottom: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .score-item {
        min-width: 70px;
        text-align: center;
    }
    
    .score-item .label {
        font-size: 0.8rem;
        margin-bottom: 3px;
    }
    
    .score-item .value {
        font-size: 1.2rem;
    }
    
    .reel {
        width: 100px;
        height: 100px;
    }
    
    .symbol {
        font-size: 2.8rem;
    }
    
    .machine-frame {
        padding: 25px;
        padding-right: 50px;
        margin: 0 auto 20px auto;
        min-height: 200px;
        height: auto;
        max-width: 600px;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .payout-row {
        padding: 5px 10px;
        font-size: 0.9rem;
    }
    
    /* 小手機版拉桿樣式 */
    .lever-container {
        position: absolute;
        right: 0px;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 130px;
        /* 增加觸控區域 */
        touch-action: none;
    }
    
    .lever-base {
        width: 30px;
        height: 15px;
        border-radius: 8px;
    }
    
    .lever-handle {
        width: 15px;
        height: 100px;
        border-radius: 8px;
        bottom: 8px;
        border: 1px solid #FFD700;
        /* 增加觸控區域 */
        touch-action: none;
    }
    
    .lever-knob {
        width: 50px;
        height: 50px;
        top: -40px;
        /* 增加觸控區域 */
        touch-action: none;
        /* 確保在手機上有足夠的觸控區域 */
        min-width: 44px;
        min-height: 44px;
    }
    
    /* 調整機台框架以容納更小的拉桿 */
    .machine-frame {
        padding-right: 50px;
        min-height: 200px;
        height: auto;
        margin: 0 auto 20px auto;
        max-width: 600px;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .bet-controls {
        gap: 10px;
        padding: 10px 12px;
    }
    
    .bet-btn, .max-bet-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
}



/* 拉霸桿子樣式 */
.lever-container {
    position: absolute;
    right: -90px;
    top: 72%;
    transform: translateY(-50%);
    width: 90px;
    height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    perspective: 1000px;
    z-index: 1002; /* 确保在汉堡菜单之上 */
}

.lever-base {
    width: 100px;
    height: 160px;
    background: linear-gradient(145deg, #000000, #1a1a1a, #000000);
    border-radius: 20px;
    position: absolute;
    bottom: -112px;
    left: 55%;
    transform: translateX(-50%);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.6),
        inset 0 3px 10px rgba(255, 215, 0, 0.2),
        inset 0 -3px 10px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 215, 0, 0.3);
    z-index: 1001; /* 确保在汉堡菜单之上 */
    animation: baseGlow 4s ease infinite;
}


@keyframes baseGlow {
    0%, 100% { 
        box-shadow: 
            0 10px 25px rgba(0, 0, 0, 0.6),
            inset 0 3px 10px rgba(255, 215, 0, 0.2),
            inset 0 -3px 10px rgba(0, 0, 0, 0.4),
            0 0 20px rgba(255, 215, 0, 0.3);
    }
    50% { 
        box-shadow: 
            0 10px 25px rgba(0, 0, 0, 0.6),
            inset 0 3px 10px rgba(255, 215, 0, 0.2),
            inset 0 -3px 10px rgba(0, 0, 0, 0.4),
            0 0 30px rgba(255, 215, 0, 0.4);
    }
}

.lever-handle {
    width: 35px;
    height: 240px;
    background: linear-gradient(to right, #C0C0C0, #E5E4E2, #C0C0C0);
    background-size: 200% 200%;
    animation: leverGlow 4s ease infinite;
    border-radius: 18px;
    position: absolute;
    bottom: 25px;
    cursor: pointer;
    transition: all 0.3s ease, height 0.1s ease;
    box-shadow: 
        0 12px 20px rgba(0, 0, 0, 0.5),
        0 0 25px rgba(255, 215, 0, 0.3);
    z-index: 1003; /* 确保在汉堡菜单之上 */
    transform-origin: bottom center;
    perspective: 1000px;
    transform-style: preserve-3d;
    border: 3px solid #FFD700;
}

/* 新增：拉桿下拉時的視覺效果 */
.lever-handle.dragging {
    background: linear-gradient(to right, #FFD700, #FFA500, #FFD700);
    background-size: 200% 200%;
    animation: leverDragging 0.5s ease infinite;
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(255, 215, 0, 0.6),
        0 0 60px rgba(255, 165, 0, 0.4);
    transform: scale(1.05);
}

@keyframes leverDragging {
    0%, 100% { 
        background-position: 0% 50%;
        box-shadow: 
            0 15px 30px rgba(0, 0, 0, 0.7),
            0 0 40px rgba(255, 215, 0, 0.6),
            0 0 60px rgba(255, 165, 0, 0.4);
    }
    50% { 
        background-position: 100% 50%;
        box-shadow: 
            0 20px 40px rgba(0, 0, 0, 0.8),
            0 0 50px rgba(255, 215, 0, 0.8),
            0 0 70px rgba(255, 165, 0, 0.6);
    }
}

.lever-knob {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at center, #FF0000, #DC143C, #FF0000);
    background-size: 200% 200%;
    animation: leverKnobGlow 3s ease infinite;
    border-radius: 50%;
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 
        0 0 30px rgba(255, 0, 0, 0.8),
        0 0 60px rgba(255, 215, 0, 0.6);
    cursor: grab;
    transition: all 0.3s ease;
    z-index: 1004; /* 确保在汉堡菜单之上 */
}

/* 新增：拉桿球下拉時的視覺效果 */
.lever-knob.dragging {
    background: radial-gradient(circle at center, #FFD700, #FFA500, #FFD700);
    background-size: 200% 200%;
    animation: knobDragging 0.3s ease infinite;
    box-shadow: 
        0 10px 20px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(255, 215, 0, 0.8),
        0 0 60px rgba(255, 165, 0, 0.6),
        0 0 80px rgba(255, 0, 0, 0.4);
    /* 暫停原有的發光動畫，避免與JavaScript設置的transform衝突 */
    animation-play-state: paused;
}

@keyframes knobDragging {
    0%, 100% { 
        background-position: 0% 50%;
        box-shadow: 
            0 10px 20px rgba(0, 0, 0, 0.6),
            0 0 40px rgba(255, 215, 0, 0.8),
            0 0 60px rgba(255, 165, 0, 0.6),
            0 0 80px rgba(255, 0, 0, 0.4);
    }
    50% { 
        background-position: 100% 50%;
        box-shadow: 
            0 15px 25px rgba(0, 0, 0, 0.7),
            0 0 50px rgba(255, 215, 0, 1),
            0 0 70px rgba(255, 165, 0, 0.8),
            0 0 90px rgba(255, 0, 0, 0.6);
    }
}

.lever-knob:active {
    cursor: grabbing;
}

/* 新增：拉桿球點擊提示效果 */
.lever-knob:hover {
    cursor: pointer;
    transform: translateX(-50%) scale(1.05);
    box-shadow: 
        0 0 40px rgba(255, 0, 0, 1),
        0 0 80px rgba(255, 215, 0, 0.8);
    transition: all 0.2s ease;
}

.lever-knob:hover::after {
    content: '點擊自動下拉';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeIn 0.3s ease forwards;
}

@keyframes tooltipFadeIn {
    to {
        opacity: 1;
    }
}

/* 手機版拉桿球觸控優化 */
@media (max-width: 768px) {
    .lever-knob {
        /* 增加觸控區域 */
        min-width: 80px;
        min-height: 80px;
        /* 添加觸控反饋 */
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3);
        touch-action: manipulation;
    }
    
    .lever-knob:hover::after {
        /* 手機版隱藏提示文字，避免觸控干擾 */
        display: none;
    }
    
    .lever-knob:active {
        /* 手機版觸控反饋 */
        transform: translateX(-50%) scale(0.95);
        transition: transform 0.1s ease;
        background: radial-gradient(circle at center, #FFD700, #FFA500, #FFD700);
        box-shadow: 
            0 0 30px rgba(255, 215, 0, 0.8),
            0 0 60px rgba(255, 165, 0, 0.6);
    }
    
    /* 手機版觸控點擊提示 */
    .lever-knob::before {
        content: '點擊';
        position: absolute;
        top: -30px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 3px 8px;
        border-radius: 4px;
        font-size: 10px;
        white-space: nowrap;
        pointer-events: none;
        opacity: 0.7;
        animation: mobileTooltipPulse 2s ease-in-out infinite;
    }
    
    @keyframes mobileTooltipPulse {
        0%, 100% { opacity: 0.7; }
        50% { opacity: 1; }
    }
}

@media (max-width: 480px) {
    .lever-knob {
        /* 小手機版進一步優化觸控區域 */
        min-width: 70px;
        min-height: 70px;
    }
}

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

.lever-handle:hover {
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(255, 215, 0, 0.5);
    transform: scale(1.05);
    animation: leverHover 0.5s ease-in-out;
}

@keyframes leverHover {
    0% { transform: scale(1.05); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1.05); }
}

.lever-handle.pulled {
    transform: rotate(90deg);
    box-shadow: 
        0 25px 45px rgba(255, 215, 0, 0.9), 
        0 12px 25px rgba(0, 0, 0, 0.7);
    animation: leverPulled 0.8s ease-out;
}

@keyframes leverPulled {
    0% { 
        transform: rotate(0deg);
        box-shadow: 0 12px 20px rgba(0, 0, 0, 0.5);
    }
    50% { 
        transform: rotate(90deg);
        box-shadow: 0 30px 50px rgba(255, 215, 0, 1), 0 15px 30px rgba(0, 0, 0, 0.8);
    }
    100% { 
        transform: rotate(90deg);
        box-shadow: 0 25px 45px rgba(255, 215, 0, 0.9), 0 12px 25px rgba(0, 0, 0, 0.7);
    }
}

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

/* 新增：拉桿粒子效果 */
.lever-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1005; /* 确保在汉堡菜单之上 */
}

.lever-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #FFD700, #FFA500);
    border-radius: 50%;
    animation: leverParticleFloat 1s ease-out forwards;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

@keyframes leverParticleFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0.5);
    }
}

/* 新增：拉桿下拉時的震動效果 */
.lever-container.shake {
    animation: leverShake 0.1s ease-in-out;
}

@keyframes leverShake {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    25% { transform: translateY(-50%) translateX(-2px); }
    75% { transform: translateY(-50%) translateX(2px); }
}

/* 新增：拉桿下拉時的閃光效果 */
.lever-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.8), transparent);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    z-index: 1006; /* 确保在汉堡菜单之上 */
}

.lever-flash.show {
    animation: leverFlash 0.3s ease-out;
}

@keyframes leverFlash {
    0% {
        opacity: 1;
        transform: scale(0);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.5);
    }
    100% {
        opacity: 0;
        transform: scale(2);
    }
}

/* 調整機台框架以容納拉霸桿子 */
.machine-frame {
    padding: 10px;
    height: auto;
    margin: 0 auto 35px auto;
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 新增統計面板樣式 */
.stats-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    max-width: 400px;
    width: 90%;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.stats-panel.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.stats-header h3 {
    color: #FFD700;
    font-size: 1.5rem;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding-left: 10px;
    padding-right: 10px;
}

.stat-label {
    color: #bdc3c7;
    font-weight: 500;
}

.stat-value {
    color: #FFD700;
    font-weight: bold;
    font-size: 1.1rem;
}

.achievements-section {
    margin-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.achievements-section h4 {
    color: #FFD700;
    margin-bottom: 15px;
    text-align: center;
}

.achievements-list {
    max-height: 200px;
    overflow-y: auto;
}

.achievement {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.achievement.unlocked {
    background: linear-gradient(45deg, rgba(46, 204, 113, 0.2), rgba(39, 174, 96, 0.2));
    border-color: rgba(46, 204, 113, 0.3);
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.2);
}

.achievement.locked {
    background: rgba(149, 165, 166, 0.1);
    opacity: 0.6;
    border-color: rgba(149, 165, 166, 0.2);
}

.achievement:hover {
    transform: translateX(5px);
}

.achievement-icon {
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

.achievement-name {
    flex: 1;
    font-weight: 500;
}

.achievement-status {
    font-size: 1.2rem;
}

/* 統計按鈕樣式 */
.info-btn.stats-btn {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.info-btn.stats-btn:hover {
    background: rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

/* 特效開關按鈕樣式 */
.info-btn.effects-btn {
    background: linear-gradient(145deg, #9b59b6, #8e44ad);
    border: 2px solid #9b59b6;
}

.info-btn.effects-btn:hover {
    background: linear-gradient(145deg, #8e44ad, #7d3c98);
    transform: scale(1.05);
}

.info-btn.effects-btn.disabled {
    background: linear-gradient(145deg, #95a5a6, #7f8c8d);
    border: 2px solid #95a5a6;
    opacity: 0.7;
}

.info-btn.effects-btn.disabled:hover {
    background: linear-gradient(145deg, #7f8c8d, #6c7b7d);
    transform: scale(1.02);
}

/* 特效關閉時的樣式 */
.effects-disabled {
    /* 關閉背景動畫 */
    animation: none !important;
}

.effects-disabled * {
    /* 關閉所有子元素的動畫 */
    animation: none !important;
    transition: none !important;
}

.effects-disabled .reel {
    /* 保留轉輪滾動動畫，只關閉發光動畫 */
    background: #FFD700 !important;
}

.effects-disabled .symbol {
    /* 保留符號滾動動畫，只關閉浮動動畫 */
    animation: none !important;
}

.effects-disabled .reel.spinning .symbol {
    /* 保留轉輪滾動時的符號動畫 */
    animation: spin 0.1s linear infinite !important;
}

.effects-disabled .lever-handle {
    /* 關閉拉桿動畫 */
    animation: none !important;
}

.effects-disabled .lever-knob {
    /* 關閉拉桿旋鈕動畫 */
    animation: none !important;
}

.effects-disabled .lever-particles {
    /* 關閉拉桿粒子效果 */
    display: none !important;
}

.effects-disabled .lever-flash {
    /* 關閉拉桿閃光效果 */
    display: none !important;
}

.effects-disabled .coin-container {
    /* 關閉金幣掉落動畫 */
    display: none !important;
}

.effects-disabled .jackpot-effect {
    /* 關閉頭獎特效 */
    display: none !important;
}

.effects-disabled .firework {
    /* 關閉煙火特效 */
    display: none !important;
}

.effects-disabled .screen-flash {
    /* 關閉螢幕閃光 */
    display: none !important;
}

.effects-disabled .win-text {
    /* 關閉獲勝文字特效 */
    animation: none !important;
}

.effects-disabled .free-spin-trigger-effect {
    /* 關閉免費遊戲觸發特效 */
    display: none !important;
}

.effects-disabled .combo-effect {
    /* 關閉連擊特效 */
    display: none !important;
}

.effects-disabled .special-message {
    /* 關閉特殊訊息動畫 */
    animation: none !important;
}

/* 手機版特效優化 */
@media (max-width: 768px) {
    .effects-disabled .reels-container {
        /* 手機版關閉轉輪容器縮放，但保留滾動 */
        transform: scale(1.1) !important;
    }
    
    .effects-disabled .reel:hover {
        /* 手機版關閉轉輪懸停效果 */
        transform: none !important;
    }
    
    .effects-disabled .symbol:hover {
        /* 手機版關閉符號懸停效果 */
        transform: none !important;
    }
    
    .effects-disabled .reel.spinning .symbol {
        /* 手機版保留轉輪滾動時的符號動畫 */
        animation: spin 0.1s linear infinite !important;
    }
}

@media (max-width: 480px) {
    .effects-disabled .game-container {
        /* 小手機版關閉容器動畫 */
        animation: none !important;
    }
    
    .effects-disabled .score-board {
        /* 小手機版關閉分數板動畫 */
        animation: none !important;
    }
    
    .effects-disabled .machine-frame {
        /* 小手機版關閉機台框架動畫 */
        animation: none !important;
    }
    
    .effects-disabled .reel.spinning .symbol {
        /* 小手機版保留轉輪滾動時的符號動畫 */
        animation: spin 0.1s linear infinite !important;
    }
}

/* 免費遊戲和連擊顯示 */
.free-spins-display, .combo-display {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border-radius: 25px;
    margin: 10px 0;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideInDown 0.5s ease-out;
}

.free-spins-display {
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.3), rgba(255, 165, 0, 0.3));
    border: 2px solid rgba(255, 215, 0, 0.5);
    color: #FFD700;
    transition: all 0.3s ease;
}

.free-spins-display.active {
    background: linear-gradient(45deg, rgba(255, 20, 147, 0.3), rgba(255, 105, 180, 0.3));
    border: 2px solid rgba(255, 20, 147, 0.5);
    color: #FF1493;
    animation: freeSpinPulse 1s ease-in-out infinite;
}

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

/* 免費遊戲觸發特效 */
.free-spin-trigger-effect {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    pointer-events: none;
    animation: freeSpinTrigger 3s ease-out forwards;
}

.free-spin-sparkles {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.free-spin-sparkles span {
    font-size: 2rem;
    animation: sparkleFloat 2s ease-out infinite;
}

.free-spin-sparkles span:nth-child(1) { animation-delay: 0s; }
.free-spin-sparkles span:nth-child(2) { animation-delay: 0.2s; }
.free-spin-sparkles span:nth-child(3) { animation-delay: 0.4s; }
.free-spin-sparkles span:nth-child(4) { animation-delay: 0.6s; }
.free-spin-sparkles span:nth-child(5) { animation-delay: 0.8s; }
.free-spin-sparkles span:nth-child(6) { animation-delay: 1s; }
.free-spin-sparkles span:nth-child(7) { animation-delay: 1.2s; }
.free-spin-sparkles span:nth-child(8) { animation-delay: 1.4s; }
.free-spin-sparkles span:nth-child(9) { animation-delay: 1.6s; }

.free-spin-text {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5);
    border: 3px solid #FFD700;
    animation: freeSpinTextGlow 2s ease-in-out infinite;
}

@keyframes freeSpinTrigger {
    0% { 
        transform: translate(-50%, -50%) scale(0); 
        opacity: 0; 
    }
    20% { 
        transform: translate(-50%, -50%) scale(1.2); 
        opacity: 1; 
    }
    80% { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 1; 
    }
    100% { 
        transform: translate(-50%, -50%) scale(1.1); 
        opacity: 0; 
    }
}

@keyframes sparkleFloat {
    0% { 
        transform: translateY(0) rotate(0deg); 
        opacity: 1; 
    }
    100% { 
        transform: translateY(-50px) rotate(360deg); 
        opacity: 0; 
    }
}

@keyframes freeSpinTextGlow {
    0%, 100% { 
        box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5);
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    }
    50% { 
        box-shadow: 0 15px 40px rgba(255, 215, 0, 0.8);
        text-shadow: 0 0 20px rgba(255, 215, 0, 1);
    }
}

/* 免費遊戲模式下的遊戲容器樣式 */
.game-container.free-spin-mode {
    border-color: #FF1493;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(255, 20, 147, 0.4),
        inset 0 1px 0 rgba(255, 20, 147, 0.6);
    animation: freeSpinModeGlow 2s ease-in-out infinite;
}

@keyframes freeSpinModeGlow {
    0%, 100% { 
        box-shadow: 
            0 25px 50px rgba(0, 0, 0, 0.6),
            0 0 50px rgba(255, 20, 147, 0.4),
            inset 0 1px 0 rgba(255, 20, 147, 0.6);
    }
    50% { 
        box-shadow: 
            0 25px 50px rgba(0, 0, 0, 0.6),
            0 0 70px rgba(255, 20, 147, 0.6),
            inset 0 1px 0 rgba(255, 20, 147, 0.8);
    }
}

.combo-display {
    background: linear-gradient(45deg, rgba(139, 0, 0, 0.3), rgba(178, 34, 34, 0.3));
    border: 2px solid rgba(139, 0, 0, 0.5);
    color: #FFD700;
}

.free-spins-icon, .combo-icon {
    font-size: 1.5rem;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* 特殊消息樣式 */
.special-message {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000000;
    padding: 18px 35px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.3rem;
    z-index: 1001;
    animation: slideDown 0.5s ease-out;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
    border: 2px solid #FFD700;
    text-align: center;
    min-width: 300px;
}

@keyframes slideDown {
    from { 
        transform: translateX(-50%) translateY(-100px); 
        opacity: 0; 
    }
    to { 
        transform: translateX(-50%) translateY(0); 
        opacity: 1; 
    }
}

/* 連擊特效 */
.combo-effect {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(45deg, #8B0000, #B22222);
    color: #FFD700;
    padding: 25px 50px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.8rem;
    z-index: 1001;
    animation: comboPulse 2s ease-in-out;
    box-shadow: 0 15px 35px rgba(139, 0, 0, 0.6);
    border: 3px solid #FFD700;
    text-align: center;
}

@keyframes comboPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1); 
        box-shadow: 0 15px 35px rgba(139, 0, 0, 0.6);
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.3); 
        box-shadow: 0 25px 50px rgba(139, 0, 0, 0.8);
    }
}

/* 改進的大獎特效 */
.jackpot-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,215,0,0.5) 0%, transparent 70%);
    animation: jackpotPulse 4s ease-in-out;
    pointer-events: none;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 
        0 0 30px rgba(255, 215, 0, 0.9),
        0 0 60px rgba(255, 215, 0, 0.7);
}

@keyframes jackpotPulse {
    0%, 100% { 
        opacity: 0; 
        transform: scale(0.8); 
    }
    25% { 
        opacity: 1; 
        transform: scale(1.3); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.6); 
    }
    75% { 
        opacity: 0.9; 
        transform: scale(1.3); 
    }
}

/* 改進的金幣動畫 */
.coin {
    position: absolute;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 30% 30%, #ffd700, #ffb347, #ff8c00, #ffd700);
    background-size: 200% 200%;
    animation: coinGlow 2s ease infinite, coinFall 2.5s ease-in forwards;
    border-radius: 50%;
    border: 3px solid #ffa500;
    box-shadow: 
        0 0 20px rgba(255, 215, 0, 0.9),
        inset 0 0 20px rgba(255, 255, 255, 0.5);
}

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

.coin::before {
    content: '$';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #8b4513;
    font-weight: bold;
    font-size: 20px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

@keyframes coinFall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    20% {
        transform: translateY(50px) rotate(180deg);
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translateY(400px) rotate(720deg);
        opacity: 0;
    }
}

/* 改進的獲勝符號高亮 */
.symbol.winning {
    text-shadow: 0 0 25px rgba(255, 215, 0, 0.9), 
                 0 0 35px rgba(255, 215, 0, 0.7),
                 0 0 45px rgba(255, 215, 0, 0.5);
    animation: gemGlow 1.2s ease-in-out infinite alternate;
}

@keyframes gemGlow {
    0% { 
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        text-shadow: 0 0 25px rgba(255, 215, 0, 0.9);
    }
    100% { 
        transform: translate(-50%, -50%) scale(1.15) rotate(5deg);
        text-shadow: 0 0 40px rgba(255, 215, 0, 1), 
                     0 0 50px rgba(255, 215, 0, 0.8),
                     0 0 60px rgba(255, 215, 0, 0.6);
    }
}

/* 響應式設計改進 */
@media (max-width: 768px) {

    .lever-base {
        width: 80px;
        height: 40px;
        bottom: 0;
        left: 50%;
    }    
    /* 手機版拉桿樣式 */
    .lever-container {
        right: 0px;
    }    
    .stats-panel {
        max-width: 95%;
        padding: 20px;
        margin: 10px;
    }
    
    .stats-header h3 {
    font-size: 1.3rem;
    color: #FFD700;
}
    
    .special-message {
    min-width: 250px;
    font-size: 1.1rem;
    padding: 15px 25px;
    color: #000000;
}
    
    .combo-effect {
    font-size: 1.4rem;
    padding: 20px 35px;
    color: #FFD700;
}
    
    .jackpot-effect {
        font-size: 2.5rem;
    }
    
    .free-spins-display, .combo-display {
    font-size: 1rem;
    padding: 8px 15px;
    color: #FFD700;
}
}

@media (max-width: 480px) {
    .lever-base {
        width: 80px;
        height: 40px;
        bottom: 0;
        left: 50%;
    }
        
    .stats-panel {
        padding: 15px;
    }
    
    .stat-item {
    padding: 8px 0;
    font-size: 0.9rem;
    color: #FFD700;
}
    
    .achievement {
    padding: 8px;
    gap: 8px;
    color: #FFD700;
}
    
    .achievement-icon {
        font-size: 1.2rem;
        width: 25px;
    }
    
    .special-message {
    min-width: 200px;
    font-size: 1rem;
    padding: 12px 20px;
    color: #000000;
}
    
    .combo-effect {
    font-size: 1.2rem;
    padding: 15px 25px;
    color: #FFD700;
}
}

/* 改進的按鈕懸停效果 */
.spin-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.6);
    background: linear-gradient(145deg, #FFA500, #FFD700);
}

.bet-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.6);
}

.max-bet-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(255, 215, 0, 0.5);
    background: linear-gradient(145deg, #FFA500, #FFD700);
}

/* 改進的消息樣式 */
.message.win {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    animation: winPulse 1.5s ease-in-out infinite alternate;
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.message.lose {
    background: linear-gradient(45deg, #c0392b, #e74c3c);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

@keyframes winPulse {
    0% { 
        transform: scale(1); 
        box-shadow: 0 8px 20px rgba(255, 215, 0, 0.6);
    }
    100% { 
        transform: scale(1.02); 
        box-shadow: 0 12px 30px rgba(255, 215, 0, 0.8);
    }
}

/* 遊戲副標題 */
.game-subtitle {
    color: #FFD700;
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    animation: subtitleGlow 2s ease-in-out infinite alternate;
}

@keyframes subtitleGlow {
    0% { 
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
        color: #FFD700;
    }
    100% { 
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
        color: #FFA500;
    }
}

/* 特殊賠率行樣式 */
.special-payout {
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    border: 2px solid rgba(255, 215, 0, 0.4);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    animation: specialPulse 2s ease-in-out infinite alternate;
}

@keyframes specialPulse {
    0% { 
        box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
        transform: scale(1);
    }
    100% { 
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
        transform: scale(1.02);
    }
}

.payout-row .description {
    font-size: 0.8rem;
    color: #bdc3c7;
    font-style: italic;
    margin-left: 10px;
}

/* 遊戲特色區域 */
.game-features {
    margin-top: 25px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.game-features h4 {
    color: #FFD700;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.2rem;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.4);
}

.feature-icon {
    font-size: 2rem;
    animation: featureBounce 2s ease-in-out infinite;
}

.feature-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #ecf0f1;
    text-align: center;
}

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

/* 改進的按鈕工具提示 */
.bet-btn[title]:hover::after,
.spin-button[title]:hover::after,
.max-bet-button[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.bet-btn[title],
.spin-button[title],
.max-bet-button[title] {
    position: relative;
}

/* 改進的標籤樣式 */
.score-item .label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
    font-weight: 500;
    color: #FFD700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* 響應式設計改進 */
@media (max-width: 768px) {
    .game-subtitle {
    font-size: 1rem;
    color: #FFD700;
}
    
    .features-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .feature-item {
    padding: 12px 8px;
    color: #FFD700;
}
    
    .feature-icon {
        font-size: 1.5rem;
    }
    
    .feature-text {
    font-size: 0.8rem;
    color: #FFD700;
}
    
    .payout-row .description {
        display: none;
    }
    
    .payout-section h4 {
    font-size: 1rem;
    color: #FFD700;
}
    
    .payout-row.two-match {
    padding: 6px 10px;
    font-size: 0.9rem;
    color: #FFD700;
}
}

@media (max-width: 480px) {
    .game-subtitle {
    font-size: 0.9rem;
    color: #FFD700;
}
    
    .features-list {
        grid-template-columns: 1fr;
    }
    
    .feature-item {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }
    
    .feature-icon {
        font-size: 1.3rem;
    }
    
    .feature-text {
    font-size: 0.9rem;
    color: #FFD700;
}
    
    .payout-section h4 {
    font-size: 0.9rem;
    color: #FFD700;
}
    
    .payout-row.two-match {
    padding: 5px 8px;
    font-size: 0.8rem;
    color: #FFD700;
}
}

/* 二連組合賠率表樣式 */
.payout-section {
    margin-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.payout-section h4 {
    color: #FFD700;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.1rem;
}

.payout-row.two-match {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.2);
    animation: twoMatchPulse 3s ease-in-out infinite alternate;
}

@keyframes twoMatchPulse {
    0% { 
        box-shadow: 0 2px 6px rgba(255, 215, 0, 0.2);
        transform: scale(1);
    }
    100% { 
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
        transform: scale(1.01);
    }
}

.payout-row.two-match:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateX(5px);
}

.payout-row.two-match .multiplier {
    color: #FFD700;
    font-weight: bold;
}

/* 折叠功能样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.section-header h4 {
    margin: 0;
    color: #FFD700;
    font-size: 1.1rem;
    text-align: left;
}

.toggle-btn {
    background: none;
    border: none;
    color: #FFD700;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: scale(1.1);
}

.toggle-btn.collapsed {
    transform: rotate(-90deg);
}

.section-content {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

.section-content.collapsed {
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .section-header {
        padding: 8px 12px;
    }
    
    .section-header h4 {
    font-size: 1rem;
    color: #FFD700;
}
    
    .toggle-btn {
        font-size: 1rem;
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 480px) {
    .section-header {
        padding: 6px 10px;
    }
    
    .section-header h4 {
    font-size: 0.9rem;
    color: #FFD700;
}
    
    .toggle-btn {
        font-size: 0.9rem;
        width: 22px;
        height: 22px;
    }
}

/* 信息按钮样式 - 已改为折叠菜单，此样式保留用于兼容性 */
.info-buttons.legacy {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 25px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    flex-wrap: wrap;
}

.info-buttons.legacy:hover {
    opacity: 1;
}

.info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.3), rgba(255, 165, 0, 0.3));
    background-size: 200% 200%;
    animation: infoButtonGlow 4s ease infinite;
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 15px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 70px;
    min-height: 70px;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.info-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

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

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

.info-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.6);
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.4), rgba(255, 165, 0, 0.4));
    color: white;
    border-color: rgba(255, 215, 0, 0.6);
    animation: infoButtonHover 0.5s ease-in-out;
}

@keyframes infoButtonHover {
    0% { transform: translateY(-5px) scale(1.1); }
    50% { transform: translateY(-8px) scale(1.15); }
    100% { transform: translateY(-5px) scale(1.1); }
}

.info-btn:active {
    transform: translateY(0) scale(0.95);
}

.btn-icon {
    font-size: 1.8rem;
    animation: iconBounce 2s ease-in-out infinite;
}

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

.btn-text {
    font-size: 0.8rem;
    font-weight: 600;
}

/* 弹出窗口样式 */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    background: linear-gradient(145deg, #8B0000, #B22222, #8B0000, #B22222);
    background-size: 400% 400%;
    animation: popupGlow 8s ease infinite;
    border-radius: 25px;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(255, 215, 0, 0.2);
    z-index: 1001;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    border: 3px solid #FFD700;
}

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

.popup-window.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 3px solid #FFD700;
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    border-radius: 25px 25px 0 0;
    backdrop-filter: blur(10px);
}

.popup-header h3 {
    color: #ffd700;
    font-size: 1.5rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: popupTitleGlow 3s ease-in-out infinite alternate;
}

@keyframes popupTitleGlow {
    0% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 0 0 10px rgba(255, 215, 0, 0.5); }
    100% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.8); }
}

.close-btn {
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.3), rgba(255, 165, 0, 0.3));
    border: 2px solid rgba(255, 215, 0, 0.4);
    color: #FFD700;
    font-size: 2.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.close-btn:hover {
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.4), rgba(255, 165, 0, 0.4));
    transform: scale(1.2) rotate(90deg);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.5);
    animation: closeButtonSpin 0.5s ease-in-out;
}

@keyframes closeButtonSpin {
    0% { transform: scale(1.2) rotate(0deg); }
    100% { transform: scale(1.2) rotate(90deg); }
}

.popup-content {
    padding: 30px;
    color: white;
}

/* 弹出窗口中的赔率表样式 */
.popup-content .payout-row {
    margin-bottom: 15px;
    padding: 15px 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    animation: payoutRowFloat 6s ease-in-out infinite;
}

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

.popup-content .payout-row:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.popup-content .payout-row.special-payout {
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    border: 2px solid rgba(255, 215, 0, 0.4);
    animation: specialPayoutGlow 3s ease-in-out infinite alternate, payoutRowFloat 6s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

@keyframes specialPayoutGlow {
    0% { 
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
        transform: scale(1);
    }
    100% { 
        box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
        transform: scale(1.02);
    }
}

.popup-content .payout-row.two-match {
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    border: 2px solid rgba(255, 215, 0, 0.4);
    animation: twoMatchGlow 3s ease-in-out infinite alternate, payoutRowFloat 6s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

@keyframes twoMatchGlow {
    0% { 
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
        transform: scale(1);
    }
    100% { 
        box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
        transform: scale(1.02);
    }
}

/* 弹出窗口中的游戏特色样式 */
.popup-content .features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.popup-content .feature-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.05));
    border-radius: 15px;
    border: 2px solid rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    animation: featureItemFloat 8s ease-in-out infinite;
}

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

.popup-content .feature-item:hover {
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.1));
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.popup-content .feature-icon {
    font-size: 2.5rem;
    animation: featureIconSpin 4s linear infinite;
}

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

.popup-content .feature-text {
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .info-buttons.show {
        /* 選單展開時啟用互動 */
        pointer-events: auto;
    }
    
    .info-buttons {
        flex-direction: row;
        gap: 6px;
        margin-top: 10px;
    }
    
    .info-btn {
        justify-content: center;
        min-width: 45px;
        min-height: 45px;
        padding: 8px;
        color: #FFD700;
    }
    

    
    .popup-window {
        max-width: 95vw;
        max-height: 85vh;
    }
    
    .popup-header {
        padding: 20px 25px;
    }
    
    .popup-header h3 {
    font-size: 1.3rem;
    color: #FFD700;
}
    
    .popup-content {
        padding: 25px;
    }
    
    .popup-content .features-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .info-buttons.show {
        /* 選單展開時啟用互動 */
        pointer-events: auto;
    }
    
    .info-btn {
        padding: 6px;
        min-width: 40px;
        min-height: 40px;
        color: #FFD700;
    }
    
    .btn-icon {
    font-size: 1.2rem;
    color: #FFD700;
}
    

    
    .popup-header {
        padding: 15px 20px;
    }
    
    .popup-header h3 {
    font-size: 1.1rem;
    color: #FFD700;
}
    
    .popup-content {
        padding: 20px;
    }
    
    .popup-content .payout-row {
    padding: 12px 15px;
    font-size: 0.9rem;
    color: #FFD700;
}
    
    .popup-content .feature-item {
    padding: 15px;
    color: #FFD700;
}
    
    .popup-content .feature-icon {
        font-size: 2rem;
    }
    
    .popup-content .feature-text {
    font-size: 1.1rem;
    color: #FFD700;
}
}

/* 新增活潑動畫關鍵幀 */
@keyframes particleFloat {
    0% {
        transform: translateY(0) scale(0);
        opacity: 1;
    }
    50% {
        transform: translateY(-50px) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }
}

@keyframes symbolSpin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) rotate(180deg) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg) scale(1);
    }
}

@keyframes symbolWin {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        filter: brightness(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        filter: brightness(1.5);
    }
}

@keyframes machineShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

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

@keyframes specialSymbolEffect {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0) rotate(360deg);
        opacity: 0;
    }
}

@keyframes backgroundPulse {
    0%, 100% {
        background-size: 400% 400%;
    }
    50% {
        background-size: 450% 450%;
    }
}

@keyframes soundPulse {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes confettiFall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes scoreCountUp {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes buttonPress {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
    }
}

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

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideInUp {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes rotateIn {
    0% {
        transform: rotate(-200deg);
        opacity: 0;
    }
    100% {
        transform: rotate(0);
        opacity: 1;
    }
}

@keyframes zoomIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes flipInX {
    0% {
        transform: perspective(400px) rotateX(90deg);
        opacity: 0;
    }
    40% {
        transform: perspective(400px) rotateX(-20deg);
    }
    60% {
        transform: perspective(400px) rotateX(10deg);
    }
    80% {
        transform: perspective(400px) rotateX(-5deg);
    }
    100% {
        transform: perspective(400px) rotateX(0deg);
        opacity: 1;
    }
}

@keyframes flipInY {
    0% {
        transform: perspective(400px) rotateY(90deg);
        opacity: 0;
    }
    40% {
        transform: perspective(400px) rotateY(-20deg);
    }
    60% {
        transform: perspective(400px) rotateY(10deg);
    }
    80% {
        transform: perspective(400px) rotateY(-5deg);
    }
    100% {
        transform: perspective(400px) rotateY(0deg);
        opacity: 1;
    }
}





/* 活潑的載入動畫 */
.loading {
    animation: loadingSpin 1s linear infinite;
}

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

/* 活潑的錯誤動畫 */
.error-shake {
    animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* 活潑的成功動畫 */
.success-bounce {
    animation: successBounce 0.6s ease-in-out;
}

@keyframes successBounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-30px);
    }
    70% {
        transform: translateY(-15px);
    }
    90% {
        transform: translateY(-4px);
    }
}

/* 活潑的脈衝動畫 */
.pulse {
    animation: pulse 2s infinite;
}

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

/* 活潑的閃爍動畫 */
.blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* 活潑的搖擺動畫 */
.swing {
    animation: swing 1s ease-in-out infinite;
}

@keyframes swing {
    20% {
        transform: rotate(15deg);
    }
    40% {
        transform: rotate(-10deg);
    }
    60% {
        transform: rotate(5deg);
    }
    80% {
        transform: rotate(-5deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

/* 活潑的彈跳動畫 */
.bounce {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-30px);
    }
    70% {
        transform: translateY(-15px);
    }
    90% {
        transform: translateY(-4px);
    }
}

/* 活潑的旋轉動畫 */
.rotate {
    animation: rotate 2s linear infinite;
}

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

/* 活潑的縮放動畫 */
.scale {
    animation: scale 2s ease-in-out infinite;
}

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

/* 活潑的滑動動畫 */
.slide {
    animation: slide 2s ease-in-out infinite;
}

@keyframes slide {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(20px);
    }
}

/* 活潑的波浪動畫 */
.wave {
    animation: wave 2s ease-in-out infinite;
}

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

/* 宇宙星空彩虹邊框動畫 */
.rainbow-border {
    background: linear-gradient(45deg, #FFD700, #87CEEB, #E6E6FA, #FFD700, #87CEEB, #FFD700);
    background-size: 400% 400%;
    animation: rainbowBorder 3s ease infinite;
    color: #333;
    text-shadow: 
        2px 2px 4px rgba(255, 255, 255, 0.9),
        0 0 10px rgba(255, 255, 255, 0.7);
    font-weight: bold;
/*    padding: 10px 20px;*/
    border-radius: 15px;
    position: relative;
}

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

/* 活潑的霓虹發光效果 */
.neon-glow {
    box-shadow: 
        0 0 5px currentColor,
        0 0 10px currentColor,
        0 0 15px currentColor,
        0 0 20px currentColor;
    animation: neonPulse 2s ease-in-out infinite alternate;
}

@keyframes neonPulse {
    0% {
        box-shadow: 
            0 0 5px currentColor,
            0 0 10px currentColor,
            0 0 15px currentColor,
            0 0 20px currentColor;
    }
    100% {
        box-shadow: 
            0 0 10px currentColor,
            0 0 20px currentColor,
            0 0 30px currentColor,
            0 0 40px currentColor;
    }
}

/* 活潑的3D翻轉效果 */
.flip-3d {
    perspective: 1000px;
    transform-style: preserve-3d;
    animation: flip3D 3s ease-in-out infinite;
}

@keyframes flip3D {
    0%, 100% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(180deg);
    }
}

/* 活潑的彈簧效果 */
.spring {
    animation: spring 1s ease-in-out;
}

@keyframes spring {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* 活潑的搖擺效果 */
.wobble {
    animation: wobble 1s ease-in-out;
}

@keyframes wobble {
    0%, 100% {
        transform: translateX(0);
    }
    15% {
        transform: translateX(-25px) rotate(-5deg);
    }
    30% {
        transform: translateX(20px) rotate(3deg);
    }
    45% {
        transform: translateX(-15px) rotate(-3deg);
    }
    60% {
        transform: translateX(10px) rotate(2deg);
    }
    75% {
        transform: translateX(-5px) rotate(-1deg);
    }
}

/* 活潑的彈跳進入效果 */
.bounceIn {
    animation: bounceIn 1s ease-out;
}

/* 活潑的滑入效果 */
.slideInUp {
    animation: slideInUp 0.5s ease-out;
}

.slideInDown {
    animation: slideInDown 0.5s ease-out;
}

.slideInLeft {
    animation: slideInLeft 0.5s ease-out;
}

.slideInRight {
    animation: slideInRight 0.5s ease-out;
}

/* 活潑的旋轉進入效果 */
.rotateIn {
    animation: rotateIn 0.8s ease-out;
}

/* 活潑的縮放進入效果 */
.zoomIn {
    animation: zoomIn 0.5s ease-out;
}

/* 活潑的翻轉進入效果 */
.flipInX {
    animation: flipInX 0.8s ease-out;
}

.flipInY {
    animation: flipInY 0.8s ease-out;
}

/* 響應式活潑效果 */
@media (max-width: 768px) {
    .game-container:hover {
    transform: scale(1.01);
    border-color: #FFD700;
}
    
    .reel:hover .symbol {
    animation: symbolHoverMobile 0.3s ease-in-out;
    color: #FFD700;
}
    
    @keyframes symbolHoverMobile {
        0%, 100% {
            transform: translate(-50%, -50%) scale(1);
        }
        50% {
            transform: translate(-50%, -50%) scale(1.1);
        }
    }
}

@media (max-width: 480px) {
    .game-container:hover {
        transform: none;
    }
    
    .reel:hover .symbol {
    animation: none;
    color: #FFD700;
}
}

/* 中大奖特效样式 */
.screen-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
}

.mega-flash {
    background: linear-gradient(45deg, #FFD700, #FF6B6B, #4ECDC4, #45B7D1);
    animation: megaFlash 2s ease-out forwards;
}

.super-flash {
    background: linear-gradient(45deg, #FFD700, #FF6B6B, #4ECDC4);
    animation: superFlash 1.5s ease-out forwards;
}

.big-flash {
    background: linear-gradient(45deg, #FFD700, #FF6B6B);
    animation: bigFlash 1s ease-out forwards;
}

.medium-flash {
    background: rgba(255, 215, 0, 0.5);
    animation: mediumFlash 0.8s ease-out forwards;
}

.small-flash {
    background: rgba(255, 215, 0, 0.3);
    animation: smallFlash 0.5s ease-out forwards;
}

/* 屏幕闪光动画 */
@keyframes megaFlash {
    0% { opacity: 0; }
    50% { opacity: 0.9; }
    100% { opacity: 0; }
}

@keyframes superFlash {
    0% { opacity: 0; }
    50% { opacity: 0.7; }
    100% { opacity: 0; }
}

@keyframes bigFlash {
    0% { opacity: 0; }
    50% { opacity: 0.5; }
    100% { opacity: 0; }
}

@keyframes mediumFlash {
    0% { opacity: 0; }
    50% { opacity: 0.3; }
    100% { opacity: 0; }
}

@keyframes smallFlash {
    0% { opacity: 0; }
    50% { opacity: 0.2; }
    100% { opacity: 0; }
}

/* 金币雨样式 */
.falling-coin {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    user-select: none;
}

.mega-coin {
    filter: drop-shadow(0 0 10px #FFD700) drop-shadow(0 0 20px #FFD700);
}

.super-coin {
    filter: drop-shadow(0 0 8px #FFD700) drop-shadow(0 0 16px #FFD700);
}

/* 金币掉落动画 */
@keyframes coinFallMega {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 50px)) rotate(720deg);
        opacity: 0;
    }
}

@keyframes coinFallSuper {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 50px)) rotate(540deg);
        opacity: 0;
    }
}

@keyframes coinFallBig {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 50px)) rotate(360deg);
        opacity: 0;
    }
}

@keyframes coinFallMedium {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 50px)) rotate(180deg);
        opacity: 0;
    }
}

@keyframes coinFallSmall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 50px)) rotate(90deg);
        opacity: 0;
    }
}

/* 烟花效果 */
.firework {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
}

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

@keyframes fireworkParticle {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x, 100px), var(--y, -100px)) scale(0);
        opacity: 0;
    }
}

/* 屏幕震动动画 */
@keyframes screenShakeMega {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-20px, -20px); }
    20% { transform: translate(20px, -20px); }
    30% { transform: translate(-20px, 20px); }
    40% { transform: translate(20px, 20px); }
    50% { transform: translate(-15px, -15px); }
    60% { transform: translate(15px, -15px); }
    70% { transform: translate(-15px, 15px); }
    80% { transform: translate(15px, 15px); }
    90% { transform: translate(-10px, -10px); }
}

@keyframes screenShakeSuper {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-15px, -15px); }
    20% { transform: translate(15px, -15px); }
    30% { transform: translate(-15px, 15px); }
    40% { transform: translate(15px, 15px); }
    50% { transform: translate(-10px, -10px); }
    60% { transform: translate(10px, -10px); }
    70% { transform: translate(-10px, 10px); }
    80% { transform: translate(10px, 10px); }
    90% { transform: translate(-5px, -5px); }
}

@keyframes screenShakeBig {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-10px, -10px); }
    20% { transform: translate(10px, -10px); }
    30% { transform: translate(-10px, 10px); }
    40% { transform: translate(10px, 10px); }
    50% { transform: translate(-5px, -5px); }
    60% { transform: translate(5px, -5px); }
    70% { transform: translate(-5px, 5px); }
    80% { transform: translate(5px, 5px); }
    90% { transform: translate(-3px, -3px); }
}

@keyframes screenShakeMedium {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5px, -5px); }
    20% { transform: translate(5px, -5px); }
    30% { transform: translate(-5px, 5px); }
    40% { transform: translate(5px, 5px); }
    50% { transform: translate(-3px, -3px); }
    60% { transform: translate(3px, -3px); }
    70% { transform: translate(-3px, 3px); }
    80% { transform: translate(3px, 3px); }
    90% { transform: translate(-2px, -2px); }
}

@keyframes screenShakeSmall {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-3px, -3px); }
    20% { transform: translate(3px, -3px); }
    30% { transform: translate(-3px, 3px); }
    40% { transform: translate(3px, 3px); }
    50% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, -2px); }
    70% { transform: translate(-2px, 2px); }
    80% { transform: translate(2px, 2px); }
    90% { transform: translate(-1px, -1px); }
}

/* 获奖文字样式 */
.win-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    text-align: center;
    z-index: 10001;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

.mega-win-text {
    animation: winTextMega 5s ease-in-out forwards;
}

.super-win-text {
    animation: winTextSuper 4s ease-in-out forwards;
}

.big-win-text {
    animation: winTextBig 3s ease-in-out forwards;
}

.medium-win-text {
    animation: winTextMedium 2.5s ease-in-out forwards;
}

.small-win-text {
    animation: winTextSmall 2s ease-in-out forwards;
}

/* 获奖文字动画 */
@keyframes winTextMega {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-180deg);
        opacity: 0;
    }
    20% {
        transform: translate(-50%, -50%) scale(1.2) rotate(0deg);
        opacity: 1;
    }
    80% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8) rotate(180deg);
        opacity: 0;
    }
}

@keyframes winTextSuper {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-90deg);
        opacity: 0;
    }
    25% {
        transform: translate(-50%, -50%) scale(1.1) rotate(0deg);
        opacity: 1;
    }
    75% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.9) rotate(90deg);
        opacity: 0;
    }
}

@keyframes winTextBig {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    30% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
    70% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }
}

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

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

/* 超级大奖详情弹窗 */
.mega-jackpot-details {
    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: 10002;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.mega-jackpot-details.show {
    opacity: 1;
}

.details-content {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    color: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease-in-out;
}

.mega-jackpot-details.show .details-content {
    transform: scale(1);
}

.details-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #FFD700, #FF6B6B, #4ECDC4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.win-amount {
    font-size: 3rem;
    font-weight: bold;
    margin: 20px 0;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.multiplier {
    font-size: 1.5rem;
    color: #4ECDC4;
    margin: 15px 0;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.stats div {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
}

.details-content button {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 20px;
}

.details-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .win-text {
        font-size: 1.5rem !important;
        white-space: normal;
        max-width: 90vw;
    }
    
    .details-content {
        padding: 20px;
        margin: 20px;
    }
    
    .details-content h2 {
        font-size: 1.5rem;
    }
    
    .win-amount {
        font-size: 2rem;
    }
    
    .stats {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .win-text {
        font-size: 1.2rem !important;
    }
    
    .details-content {
        padding: 15px;
        margin: 10px;
    }
    
    .details-content h2 {
        font-size: 1.2rem;
    }
    
    .win-amount {
        font-size: 1.5rem;
    }
    
    .multiplier {
        font-size: 1.2rem;
    }
}

/* 汉堡菜单样式 */
.hamburger-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.8), rgba(255, 165, 0, 0.8));
    border: 2px solid rgba(255, 215, 0, 0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.hamburger-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

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

.hamburger-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.9), rgba(255, 165, 0, 0.9));
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: white;
    margin: 2px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hamburger-btn:hover .hamburger-line {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

/* 汉堡按钮动画 */
.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 折叠菜单样式 */
.info-buttons {
    position: absolute;
    top: 90px;
    right: 20px;
    width: 280px;
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.9), rgba(20, 20, 20, 0.9));
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
    /* 確保選單不會影響佈局 */
    pointer-events: none;
    /* 確保選單不會影響文檔流 */
    transform-origin: right top;
    /* 防止選單影響其他元素的佈局 */
    will-change: transform, opacity;
    /* 確保選單在視口外時不會影響佈局 */
    contain: layout style paint;
}

.info-buttons.show {
/*    transform: translateX(0);*/
    opacity: 1;
    /* 選單展開時啟用互動 */
    pointer-events: auto;
    /* 確保選單展開時也不會影響佈局 */
    will-change: auto;
}

/* 菜单头部 */
.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.menu-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.close-menu-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* 菜单内容 */
.menu-content {
    padding: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.menu-content::-webkit-scrollbar {
    width: 6px;
}

.menu-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

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

.menu-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.7);
}

/* 修改info-btn样式以适应折叠菜单 */
.info-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    background-size: 200% 200%;
    animation: infoButtonGlow 4s ease infinite;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    min-width: 100px;
    min-height: 80px;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.info-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

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

.info-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.3), rgba(255, 165, 0, 0.3));
    color: white;
    border-color: rgba(255, 215, 0, 0.5);
}

.btn-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
    animation: iconBounce 2s ease-in-out infinite;
}

.btn-text {
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hamburger-menu {
        top: 15px;
        right: 15px;
    }
    
    .hamburger-btn {
        width: 55px;
        height: 55px;
    }
    
    .hamburger-line {
        width: 22px;
        height: 2.5px;
    }
    
    .info-buttons {
        top: 80px;
        left: -100px;
        width: 260px;
        /* 確保選單不會影響佈局 */
        pointer-events: none;
        /* 相對於game-container定位 */
        position: absolute;
    }
    
    .menu-content {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 12px;
    }
    
    .info-btn {
        min-width: 90px;
        min-height: 70px;
        padding: 12px 8px;
    }
    
    .btn-icon {
        font-size: 1.3rem;
    }
    
    .btn-text {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .hamburger-menu {
        top: 10px;
        right: 10px;
    }
    
    .hamburger-btn {
        width: 50px;
        height: 50px;
    }
    
    .hamburger-line {
        width: 20px;
        height: 2px;
    }
    
    .info-buttons {
        top: 70px;
        right: 10px;
        width: 240px;
        /* 確保選單不會影響佈局 */
        pointer-events: none;
        /* 相對於game-container定位 */
        position: absolute;
    }
    
    .menu-content {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 10px;
    }
    
    .info-btn {
        min-width: 100%;
        min-height: 60px;
        padding: 10px;
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .btn-icon {
        font-size: 1.2rem;
        margin-bottom: 0;
        margin-right: 10px;
    }
    
    .btn-text {
        font-size: 0.7rem;
        text-align: left;
    }
    
    .menu-header h3 {
        font-size: 1rem;
    }
}


