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

body {
    font-family: 'Courier New', monospace;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #fff;
}

#game-container {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#hud {
    width: 512px;
    background-color: #222;
    padding: 15px;
    border: 3px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
}

#mini-map {
    border: 2px solid #ffd700;
    background-color: #000;
}

#miniMapCanvas {
    display: block;
}

.hud-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hud-label {
    color: #ffd700;
}

#hearts-container {
    display: flex;
    gap: 5px;
}

.heart {
    width: 16px;
    height: 16px;
    background-color: #ff0000;
    clip-path: polygon(50% 20%, 80% 0%, 100% 20%, 100% 50%, 50% 100%, 0% 50%, 0% 20%, 20% 0%);
}

.heart.empty {
    background-color: #555;
}

#gameCanvas {
    border: 4px solid #444;
    background-color: #000;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

#controls-info {
    width: 512px;
    background-color: #222;
    padding: 10px;
    border: 3px solid #444;
    text-align: center;
    font-size: 12px;
}

#start-screen, #game-over-screen {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #1a4d2e 0%, #0d2818 100%);
    border: 5px solid #ffd700;
    border-radius: 10px;
    max-width: 600px;
}

#start-screen h1, #game-over-screen h1 {
    font-size: 48px;
    color: #ffd700;
    text-shadow: 3px 3px 0 #000;
    margin-bottom: 20px;
}

#start-screen h2 {
    font-size: 20px;
    color: #fff;
    margin-bottom: 30px;
}

#start-button, #restart-button {
    background-color: #228b22;
    color: #fff;
    border: 3px solid #ffd700;
    padding: 15px 40px;
    font-size: 20px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    margin: 5px;
}

#start-button:hover, #restart-button:hover {
    background-color: #32cd32;
    transform: scale(1.05);
}

.editor-btn {
    background-color: #0058f8;
    color: #fff;
    border: 3px solid #3cbcfc;
    padding: 12px 35px;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    margin: 5px;
}

.editor-btn:hover {
    background-color: #3cbcfc;
    transform: scale(1.05);
}

.instructions {
    margin-top: 30px;
    text-align: left;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 5px;
}

.instructions h3 {
    color: #ffd700;
    margin-bottom: 15px;
    text-align: center;
}

.instructions ul {
    list-style-position: inside;
    line-height: 1.8;
}

.instructions li {
    margin-bottom: 8px;
}

.instructions strong {
    color: #32cd32;
}

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

.blinking {
    animation: blink 0.5s infinite;
}

.world-selector-btn {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px;
}

.world-selector-btn:hover {
    background: linear-gradient(45deg, #44a08d, #4ecdc4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
}

