* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden;
    font-family: 'Press Start 2P', monospace;
    background: #000;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}

#game-container canvas {
    display: block;
}

/* 准星 */
#crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 30px;
    font-weight: bold;
    pointer-events: none;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    z-index: 10;
}

/* 调试信息 */
#debug-info {
    position: fixed;
    top: 10px;
    left: 10px;
    color: #fff;
    font-size: 10px;
    pointer-events: none;
    z-index: 10;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    line-height: 1.6;
}

/* 生命条 */
#health-bar {
    position: fixed;
    bottom: 60px;
    left: 20px;
    pointer-events: none;
    z-index: 10;
    font-size: 20px;
    letter-spacing: 2px;
    color: #ff4444;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* 饥饿条 */
#hunger-bar {
    position: fixed;
    bottom: 60px;
    right: 20px;
    pointer-events: none;
    z-index: 10;
    font-size: 20px;
    letter-spacing: 2px;
    color: #ffaa00;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* 物品栏 */
#hotbar {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    pointer-events: none;
    z-index: 10;
}

.hotbar-slot {
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.6);
    border: 2px solid #555;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    pointer-events: auto;
    cursor: pointer;
}

.hotbar-slot.selected {
    border-color: #fff;
    background: rgba(255,255,255,0.2);
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.hotbar-slot img {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
}

.hotbar-slot .count {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 10px;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
}

.hotbar-slot .slot-number {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 8px;
    color: #aaa;
}

/* 开始画面 */
#start-screen, #pause-screen, #loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.start-content, .pause-content, .loading-content {
    text-align: center;
    color: #fff;
}

.start-content h1 {
    font-size: 48px;
    margin-bottom: 10px;
    color: #8bc34a;
    text-shadow: 3px 3px 0 #3e6b1e;
}

.start-content p {
    font-size: 14px;
    margin: 10px 0;
}

.start-content .hint {
    font-size: 10px;
    color: #ccc;
    margin-top: 20px;
    line-height: 1.8;
}

#start-btn, #resume-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 16px;
    padding: 12px 24px;
    background: #6b8c3e;
    color: #fff;
    border: 3px solid #3e6b1e;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.2s;
}

#start-btn:hover, #resume-btn:hover {
    background: #7da84a;
}

.loading-content h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #ffcc00;
}

.loading-bar {
    width: 300px;
    height: 20px;
    background: #333;
    border: 2px solid #555;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}

#loading-progress {
    width: 0%;
    height: 100%;
    background: #8bc34a;
    transition: width 0.3s;
}