body {
    font-family: 'Impact', sans-serif;
    background-color: #1a1a1a;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    margin: 0;
}

h1 {
    color: #eece16;
    margin-bottom: 15px;
    text-shadow: 2px 2px #ff4500;
}

.header-info {
    display: flex;
    justify-content: space-between;
    width: 380px; 
    margin-bottom: 15px;
    font-size: 1.2em;
}

/* LOGO */
#header-logo {
    text-align: center;
    margin-bottom: 20px;
}

#header-logo img {
    width: 280px; 
    height: auto;
}

#score-display2 {
    text-align: center;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    font-size: 14px;
    margin-bottom: 20px;
}

#lives-display {
    color: #00ff11;
}

.controls-top {
    margin-bottom: 20px;
}

/* Botones principales */
#restart-button, 
#sound-toggle {
    background-color: #ffc800;
    color: rgb(0, 0, 0);
    border: none;
    padding: 10px 15px;
    margin: 0 5px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
}

#message-display {
    color: #ffd700;
    font-size: 1.5em;
    min-height: 30px;
    margin-top: 10px;
}

/* LABERINTO */
#maze {
    display: grid;
    background-color: rgba(250, 222, 11, 0.893); 
    border: 3px solid #ffffff;
    box-shadow: 0 0 15px rgba(0, 0, 255, 0.5);
}

.grid-cell {
    width: 25px;
    height: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Paredes */
.wall {
    background-color: #036dae;
    border: 1px solid #000000;
}

/* Caminos */
.path {
    background-color: black;
    position: relative;
}

/* EMPANADAS NORMALES */
.dot::after {
    content: '🥟';
    font-size: 0.9em;
    display: block;
}

/* EMPANADAS BONUS (50 puntos) */
.bonus-dot::after {
    content: '🥟';
    font-size: 1.3em;
    display: block;
    animation: bonusBlink 0.7s infinite alternate;
}

@keyframes bonusBlink {
    0% { transform: scale(1); text-shadow: 0 0 5px #ffd700; }
    100% { transform: scale(1.3); text-shadow: 0 0 12px #ffea00; }
}

/* FANTASMAS */
.ghost::after {
    content: '';
    width: 100%;
    height: 100%;
    background-image: url('fantasma.png');
    background-size: contain;
    background-repeat: no-repeat;
    display: block;
}

/* JUGADOR CON PERSONAJE SELECCIONADO */
.player {
    background-color: transparent;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ===== Selector de Personaje ===== */
#character-select {
    margin-bottom: 10px;
    font-size: 0.9em;
    text-align: center;
}

#character-select button {
    margin: 0 4px;
    padding: 4px 8px;
    font-size: 0.8em;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    background-color: #ffc800;
    color: #000;
}

#character-select button.active {
    background-color: #ff4500;
    color: #fff;
}

/* ===== Botones de movimiento ===== */
#controls-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 25px;
}

#controls-buttons button {
    width: 50px;
    height: 50px;
    margin: 3px;
    font-size: 1.5em;
    font-family: inherit;
    background-color: #555;
    color: white;
    border: 2px solid #333;
    border-radius: 5px;
    cursor: pointer;
}

/* ===== Popup de puntos (tipo Pac-Man) ===== */
#score-popup {
    font-size: 0.9em;
    color: #ffd700;
    height: 18px;
    line-height: 18px;
    opacity: 0;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#score-popup.visible {
    opacity: 1;
    transform: translateY(-4px);
}
