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

body {
    font-family: 'Arial', sans-serif;
    background-color: #121212;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(100, 100, 100, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(100, 100, 100, 0.1) 0%, transparent 20%),
        linear-gradient(to bottom, #121212, #0a0a0a);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #fff;
    padding: 20px;
    overflow-x: hidden;
}

/* 游戏机整体样式 */
.arcade-machine {
    width: 700px;
    background: linear-gradient(45deg, #333, #444);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.1), 0 0 50px rgba(0, 0, 255, 0.2);
    overflow: hidden;
    position: relative;
    border: 8px solid #222;
    border-bottom: 20px solid #222;
    transform: perspective(1000px) rotateX(2deg);
}

/* 添加游戏机侧面阴影效果 */
.arcade-machine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -15px;
    width: 15px;
    height: 100%;
    background: #222;
    transform: skewY(45deg) translateY(-15px);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.arcade-machine::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: #2a2a2a;
    transform: skewX(45deg) translateX(15px);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

/* 游戏机顶部 */
.arcade-top {
    background: linear-gradient(to right, #d32f2f, #f44336);
    padding: 15px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid #222;
    position: relative;
    overflow: hidden;
}

/* 添加顶部装饰光效 */
.arcade-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: lightSweep 3s infinite;
}

@keyframes lightSweep {
    0% { left: -100%; }
    100% { left: 200%; }
}

.arcade-logo {
    font-family: 'Arial Black', sans-serif;
    font-size: 24px;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    letter-spacing: 2px;
    font-weight: bold;
}

.arcade-speakers {
    display: flex;
    gap: 10px;
}

.speaker-holes {
    width: 40px;
    height: 20px;
    background-color: #222;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.speaker-holes::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(255, 255, 255, 0.1) 3px, rgba(255, 255, 255, 0.1) 5px);
}

/* 游戏屏幕区域 */
.arcade-screen-container {
    padding: 30px;
    background-color: #333;
    background-image: radial-gradient(circle at 15% 15%, #444 1%, transparent 8%), 
                      radial-gradient(circle at 85% 85%, #444 1%, transparent 8%);
}

.screen-frame {
    background-color: #111;
    padding: 20px;
    border-radius: 10px;
    border: 8px solid #222;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    position: relative;
}

/* 添加CRT屏幕效果 */
.screen-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px;
    z-index: 2;
    pointer-events: none;
    opacity: 0.15;
}

/* 添加屏幕反光效果 */
.screen-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    z-index: 3;
    pointer-events: none;
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
    padding: 0 10px;
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

#gameCanvas {
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 0, 255, 0.2);
    margin: 0 auto;
    display: block;
    border: 3px solid #444;
}

/* 控制区域 */
.arcade-controls {
    background: linear-gradient(to bottom, #333, #222);
    padding: 20px;
    border-top: 4px solid #222;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0, 0, 0, 0.1) 10px, rgba(0, 0, 0, 0.1) 20px),
        linear-gradient(to bottom, #333, #222);
}

.control-panel {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* 摇杆 */
.joystick-area {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.joystick-base {
    width: 100px;
    height: 100px;
    background-color: #111;
    border-radius: 50%;
    border: 5px solid #444;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.joystick-stick {
    width: 40px;
    height: 40px;
    background: linear-gradient(to bottom, #d32f2f, #b71c1c);
    border-radius: 50%;
    border: 3px solid #222;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    position: relative;
}

.joystick-stick::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15px;
    height: 15px;
    background-color: #ff5252;
    border-radius: 50%;
}

/* 按钮区域 */
.buttons-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.arcade-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 5px 0 rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.3);
    transition: all 0.1s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.arcade-button:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.3);
}

.start-button {
    background: linear-gradient(to bottom, #4CAF50, #2E7D32);
    width: 120px;
    height: 40px;
    border-radius: 20px;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.red-button {
    background: linear-gradient(to bottom, #f44336, #b71c1c);
}

.blue-button {
    background: linear-gradient(to bottom, #2196F3, #0D47A1);
}

.instructions {
    margin-top: 15px;
    text-align: center;
    color: #aaa;
    font-size: 14px;
    max-width: 200px;
}

/* 游戏机底部 */
.arcade-bottom {
    background-color: #222;
    padding: 15px;
    display: flex;
    justify-content: center;
    border-top: 2px solid #333;
    position: relative;
}

/* 添加底部装饰灯光 */
.arcade-bottom::before {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 20px;
    width: 10px;
    height: 10px;
    background-color: #4CAF50;
    border-radius: 50%;
    box-shadow: 0 0 10px #4CAF50;
    animation: blinkLight 2s infinite alternate;
}

.arcade-bottom::after {
    content: '';
    position: absolute;
    bottom: 5px;
    right: 20px;
    width: 10px;
    height: 10px;
    background-color: #f44336;
    border-radius: 50%;
    box-shadow: 0 0 10px #f44336;
    animation: blinkLight 2s infinite alternate-reverse;
}

@keyframes blinkLight {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.coin-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.coin-slot-hole {
    width: 50px;
    height: 10px;
    background-color: #111;
    border-radius: 5px;
    border: 2px solid #444;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.8);
}

.coin-slot span {
    font-size: 12px;
    color: #aaa;
}