/**
 * 白熊咖啡厅老虎机 - 样式表
 * 温馨咖啡厅主题，响应式设计
 */

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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: url('../assets/images/environment/cafe-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 20px 5%;
    position: relative;
}

.game-container {
    background: linear-gradient(180deg, rgba(245, 222, 179, 0.95) 0%, rgba(222, 184, 135, 0.95) 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow:
        0 20px 60px rgba(0,0,0,0.4),
        inset 0 2px 10px rgba(255,255,255,0.5),
        0 0 0 4px rgba(139, 69, 19, 0.3);
    max-width: 500px;
    width: 100%;
    position: relative;
    backdrop-filter: blur(5px);
    margin-left: 2%;
}

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

.game-header h1 {
    color: #8B4513;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.8);
    margin-bottom: 15px;
    font-family: 'Arial Black', 'Helvetica Neue', sans-serif;
}

/* ===== Logo 样式 ===== */
.logo-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.cafe-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
    transition: transform 0.3s;
}

.cafe-logo:hover {
    transform: scale(1.1);
}

.status-bar {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 18px;
    font-weight: bold;
}

.status-bar .credits {
    color: #228B22;
}

.status-bar .free-spins {
    color: #666;
    transition: color 0.3s;
}

.status-bar .free-spins.active {
    color: #FF6347;
    animation: pulse 1s infinite;
}

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

.slot-machine {
    background: linear-gradient(180deg, #8B4513 0%, #654321 100%);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    box-shadow:
        inset 0 5px 15px rgba(0,0,0,0.5),
        0 5px 15px rgba(0,0,0,0.3);
}

.reels-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    background: #2C1810;
    border-radius: 10px;
    padding: 15px;
    position: relative;
}

.reel {
    width: 100px;
    height: 240px;
    background: linear-gradient(180deg, #FFF8DC 0%, #F5F5DC 100%);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow:
        inset 0 0 20px rgba(0,0,0,0.1),
        0 2px 5px rgba(0,0,0,0.2);
}

.reel-strip {
    display: flex;
    flex-direction: column;
    transition: transform 0.1s linear;
}

.reel.spinning .reel-strip {
    animation: spin-blur 0.1s linear infinite;
}

@keyframes spin-blur {
    0% { transform: translateY(0); }
    100% { transform: translateY(-80px); }
}

@keyframes bounce-stop {
    0% { transform: translateY(-20px); }
    40% { transform: translateY(5px); }
    60% { transform: translateY(-3px); }
    100% { transform: translateY(0); }
}

.symbol {
    width: 100px;
    height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    background: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.4) 100%);
}

.symbol.center {
    background: linear-gradient(180deg, rgba(255,215,0,0.3) 0%, rgba(255,255,255,0.6) 50%, rgba(255,215,0,0.3) 100%);
    border-left: 3px solid #FFD700;
    border-right: 3px solid #FFD700;
}

.symbol.winning {
    animation: win-pulse 0.5s ease-in-out 3;
}

@keyframes win-pulse {
    0%, 100% {
        transform: scale(1);
        background: linear-gradient(180deg, rgba(255,215,0,0.3) 0%, rgba(255,255,255,0.6) 50%, rgba(255,215,0,0.3) 100%);
    }
    50% {
        transform: scale(1.05);
        background: linear-gradient(180deg, rgba(255,215,0,0.6) 0%, rgba(255,255,255,0.8) 50%, rgba(255,215,0,0.6) 100%);
    }
}

.symbol-emoji {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 5px;
}

.symbol-img {
    width: 60px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 2px;
}

.symbol-name {
    font-size: 12px;
    color: #666;
}

.payline {
    position: absolute;
    left: 15px;
    right: 15px;
    top: 50%;
    height: 3px;
    background: rgba(255,0,0,0.3);
    transform: translateY(-50%);
    pointer-events: none;
    border-radius: 2px;
}

.payline.highlight {
    background: linear-gradient(90deg, transparent, #FFD700, transparent);
    height: 5px;
    box-shadow: 0 0 10px #FFD700;
    animation: payline-flash 0.5s ease-in-out 3;
}

@keyframes payline-flash {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.controls {
    text-align: center;
    margin-top: 20px;
}

.win-message {
    min-height: 30px;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.win-message.win {
    color: #228B22;
    animation: message-pop 0.5s ease-out;
}

.win-message.big-win {
    color: #FF6347;
    font-size: 24px;
    animation: big-win-animation 1s ease-out;
}

@keyframes message-pop {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes big-win-animation {
    0% { transform: scale(0.5) rotate(-5deg); opacity: 0; }
    25% { transform: scale(1.2) rotate(5deg); }
    50% { transform: scale(1.1) rotate(-3deg); }
    75% { transform: scale(1.05) rotate(2deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.spin-btn {
    background: linear-gradient(180deg, #FF6347 0%, #DC143C 100%);
    color: white;
    border: none;
    padding: 15px 50px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow:
        0 5px 15px rgba(220,20,60,0.4),
        inset 0 2px 5px rgba(255,255,255,0.3);
    transition: all 0.2s;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.spin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow:
        0 8px 20px rgba(220,20,60,0.5),
        inset 0 2px 5px rgba(255,255,255,0.3);
}

.spin-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow:
        0 3px 10px rgba(220,20,60,0.4),
        inset 0 2px 5px rgba(0,0,0,0.2);
}

.spin-btn:disabled {
    background: linear-gradient(180deg, #999 0%, #666 100%);
    cursor: not-allowed;
    opacity: 0.7;
}

.bet-info {
    margin-top: 10px;
    color: #8B4513;
    font-size: 14px;
}

.audio-controls {
    position: absolute;
    top: 20px;
    right: 20px;
}

#mute-btn {
    background: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

#mute-btn:hover {
    transform: scale(1.1);
    background: white;
}

@media (max-width: 600px) {
    .game-container {
        padding: 20px;
    }

    .game-header h1 {
        font-size: 22px;
    }

    .status-bar {
        flex-direction: column;
        gap: 10px;
        font-size: 16px;
    }

    .reel {
        width: 80px;
        height: 192px;
    }

    .symbol {
        width: 80px;
        height: 64px;
    }

    .symbol-emoji {
        font-size: 32px;
    }

    .symbol-name {
        font-size: 10px;
    }

    .spin-btn {
        padding: 12px 40px;
        font-size: 18px;
    }
}

@media (max-width: 400px) {
    .reel {
        width: 65px;
        height: 156px;
    }

    .symbol {
        width: 65px;
        height: 52px;
    }

    .symbol-emoji {
        font-size: 28px;
    }
}

/* ===== 调试按钮样式 ===== */
.debug-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 100;
}

.debug-controls button {
    background: rgba(139, 69, 19, 0.8);
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 20px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.debug-controls button:hover {
    opacity: 1;
    background: rgba(139, 69, 19, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
