/**
 * Flappy Bird - 像素风格样式
 * @description 8-bit 复古游戏风格样式表
 */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 主体样式 */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(to bottom, #1a1a2e, #16213e);
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* 游戏容器 */
#gameContainer {
    position: relative;
    border: 4px solid #333;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    background: #000;
}

/* 画布样式 - 像素风格渲染 */
canvas {
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
}

/* 操作提示 */
#instructions {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    text-align: center;
    text-shadow: 2px 2px 0 #000;
    opacity: 0.8;
    pointer-events: none;
    z-index: 10;
}

/* 像素字体 */
.pixel-font {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    text-shadow: 
        2px 2px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000;
}

/* 响应式设计 */
@media (max-width: 480px) {
    #gameContainer {
        border-width: 2px;
        border-radius: 4px;
    }
    
    #instructions {
        font-size: 12px;
    }
}

@media (max-height: 600px) {
    body {
        min-height: auto;
        padding: 10px 0;
    }
}

/* 加载动画 */
.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 触摸反馈 */
.touch-active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* 无障碍焦点样式 */
:focus {
    outline: 2px solid #FFD93D;
    outline-offset: 2px;
}

/* 隐藏屏幕阅读器内容 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
