body {
    background-color: #202028;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Press Start 2P', cursive; /* 使用像素字体 */
    color: white;
}

.game-boy {
    background-color: #c0c0c0;
    padding: 20px 20px 40px 20px;
    border-radius: 10px 10px 40px 10px;
    box-shadow: -5px 5px 0px #888;
}

.screen-border {
    background-color: #555;
    padding: 20px;
    border-radius: 10px 10px 30px 10px;
    position: relative;
    width: 320px;  /* 显示宽度 */
    height: 480px; /* 显示高度 */
}

.ui-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 12px;
    color: #ffd700;
}

canvas {
    background-color: #000;
    display: block;
    width: 100%;
    height: 100%;
    /* 关键：强制像素化，不平滑插值 */
    image-rendering: pixelated; 
    image-rendering: crisp-edges;
    border: 2px solid #333;
}

.overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    text-shadow: 2px 2px 0 #000;
}

h1 {
    color: #ff4d4d;
    font-size: 24px;
    line-height: 1.5;
    margin-bottom: 20px;
}

button {
    background: #ffd700;
    border: 2px solid #fff;
    font-family: 'Press Start 2P', cursive;
    padding: 10px 20px;
    cursor: pointer;
    box-shadow: 0 4px 0 #b39700;
}

button:active {
    box-shadow: 0 2px 0 #b39700;
    transform: translateY(2px);
}

.blink {
    animation: blinker 1s linear infinite;
    font-size: 10px;
    margin-bottom: 20px;
}

@keyframes blinker {
    50% { opacity: 0; }
}
