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

body {
    background: #2c2c2c;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Press Start 2P', monospace;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 480px;
    height: 640px;
    border: 4px solid #000;
    image-rendering: pixelated;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

canvas {
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#score-display {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    color: #fff;
    text-shadow: 3px 3px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
    z-index: 10;
    pointer-events: none;
    display: none;
}

#mute-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#home-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 30;
    padding: 10px 12px;
    background: #ffd700;
    color: #000;
    border: 2px solid #000;
    border-radius: 8px;
    box-shadow: 3px 3px 0 #000;
    font-size: 9px;
    line-height: 1;
    text-decoration: none;
    transition: transform 0.1s, box-shadow 0.1s;
}

#home-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 #000;
}

#home-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
}

#mute-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 20;
    color: #fff;
    text-align: center;
    gap: 20px;
}

.overlay.hidden {
    display: none;
}

.overlay h1 {
    font-size: 28px;
    color: #ffd700;
    text-shadow: 3px 3px 0 #000;
    line-height: 1.4;
}

.overlay p {
    font-size: 13px;
    line-height: 1.8;
    color: #fff;
}

.overlay .hint {
    font-size: 10px;
    color: #aaa;
    animation: blink 1s step-end infinite;
}

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

.bird-preview {
    width: 50px;
    height: 36px;
    background: #f5c842;
    border: 3px solid #000;
    border-radius: 50%;
    animation: float 1s ease-in-out infinite;
}

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

#restart-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 14px;
    padding: 14px 28px;
    background: #ffd700;
    color: #000;
    border: 3px solid #000;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.1s;
}

#restart-btn:hover {
    transform: scale(1.05);
}

#restart-btn:active {
    transform: scale(0.95);
}
