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

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

.game-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    width: max-content;
}

header {
    text-align: center;
    width: 100%;
}

h1 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #0f0;
    text-shadow: 2px 2px #000;
}

.stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
}

button {
    background-color: #333;
    color: #fff;
    border: 2px solid #0f0;
    padding: 10px 15px;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    cursor: pointer;
    text-transform: uppercase;
}

button:hover {
    background-color: #0f0;
    color: #000;
}

#skip-btn {
    display: none;
    margin-right: 10px;
}

main {
    position: relative;
    background-color: #000;
    padding: 0;
    border: none;
}

#game-board {
    display: grid;
    background-color: #000;
    gap: 0;
    position: relative;
}

.cell {
    width: 32px;
    height: 32px;
}

.wall {
    background-color: #005500;
    border: 2px solid #00aa00;
}

.path {
    background-color: #000;
}

.progress-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 40px;
}

.progress-section p {
    font-size: 10px;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.progress-bar-container {
    width: 30px;
    height: 100%;
    background-color: #333;
    border: 2px solid rgba(0, 150, 255, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

#progress-fill {
    width: 100%;
    background-color: rgba(0, 150, 255, 0.7);
    transition: height 0.5s ease-out;
    height: 0%;
    box-shadow: 0 0 10px #00f, inset 0 0 10px #0ff;
}

.powerup-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 40px;
    width: 220px;
}

.powerup-section p {
    font-size: 10px;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 15px;
    text-align: center;
}

#powerup-bank {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
    width: 100%;
    border: 2px solid #555;
    padding: 15px;
    min-height: 100px;
}

.powerup-instructions {
    font-size: 8px !important;
    color: #888 !important;
    margin-top: 15px;
    line-height: 1.6;
}

.powerup-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 9px;
    line-height: 1.5;
    color: #aaa;
    background: #222;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
}

.powerup-item.active {
    color: #fff;
    border-color: #f00;
    box-shadow: 0 0 10px #f00;
    font-weight: bold;
}

.powerup-item .icon {
    font-size: 16px;
    color: red;
    font-weight: bold;
    font-family: sans-serif;
}

.powerup-item .key {
    color: #0f0;
    border: 1px solid #0f0;
    padding: 2px 4px;
    border-radius: 2px;
}

.powerup-board {
    position: absolute;
    width: 32px;
    height: 32px;
    font-size: 18px;
    color: red;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 6;
    animation: pulse 1s infinite alternate;
    font-family: sans-serif;
}

/* Entities */
.entity {
    position: absolute;
    width: 32px;
    height: 32px;
    background-size: cover;
    background-position: top center;
    image-rendering: pixelated;
    z-index: 10;
    transition: left 0.1s linear, top 0.1s linear;
    display: none;
}

.turtle {
}

.shredder {
    background-image: url('images/shredder.jpeg');
}

.data-bit {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: rgba(0, 150, 255, 0.7);
    border: 2px solid #00f;
    box-shadow: 0 0 10px #00f, inset 0 0 10px #0ff;
    animation: pulse 1s infinite alternate;
    z-index: 5;
    margin: 6px;
    display: none;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1.2);
        opacity: 1;
    }
}

#message-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.hidden {
    display: none !important;
}

#message-text {
    font-size: 16px;
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.5;
}

#message-text.win {
    color: #0ff;
}

#message-text.lose {
    color: #f00;
}

footer p {
    font-size: 10px;
    color: #555;
    max-width: 550px;
    text-align: center;
    line-height: 2.2;
    margin: 0 auto;
}

#character-selection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#character-selection-overlay h2 {
    font-size: 24px;
    color: #0f0;
    margin-bottom: 30px;
    text-shadow: 2px 2px #333;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.character-slider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

#char-img {
    width: 350px;
    height: 350px;
    object-fit: contain;
    border: 4px solid #0f0;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.4);
    background-color: #111;
}

#char-name {
    font-size: 22px;
    color: #fff;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#character-selection-overlay p {
    font-size: 12px;
    color: #aaa;
    text-align: center;
    line-height: 1.5;
    text-transform: uppercase;
    animation: pulse 1.5s infinite alternate;
}