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

body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #111;
    color: #FFEE58;
    /* overflow: hidden; */
}

/* Game container for scaling */
.game-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
    z-index: 1;
}

.subject {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
    width: auto;
    min-width: 400px;
    position: relative;
    border: 4px solid #FFEE58;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 238, 88, 0.3);
    background-color: #000;
    padding: 8px;
}

/* Title styling */
.title-game img {
    width: 100%;
    height: 6rem;
    filter: drop-shadow(0 0 5px rgba(255, 238, 88, 0.8));
}

.subject-header, .subject-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0.5rem;
}

.handle-score {
    width: 100%;
    justify-content:space-between;
    display: flex;
    font-size: 1.1rem;
    font-weight: bold;
}

.score, .time, .lives, .btn, .fruit {
    margin-left: 1rem;
    margin-right: 1rem;
    display: flex;
    align-items: center;
}

.subject-body {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 6px 0;
}

.game-board {
    display: grid;
    width: auto;
    height: auto;
    position: relative;
    grid-template-columns: repeat(21, auto);
    grid-template-rows: repeat(21, auto);
}

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

.dot {
    margin-top: 9px;
    margin-left: 9px;
    border-radius: 50%;
    width: 4px;
    height: 4px;
    background-color: #FFEE58;
}

/* .wall {
    background-color: #1A237E;
    border-color: #1A237E;
} */

/* Lives display */
.bxs-game {
    font-size: xx-large;
    filter: drop-shadow(0 0 2px rgba(255, 238, 88, 0.8));
    background-color: #694444;
    color: #FFEE58;
}

/* Game characters */
.pacman, .red, .bleu, 
.orange, .pink {
    position: absolute;
    transition: left 0.15s ease-out, top 0.15s ease-out;
    z-index: 100;
    border-radius: 50%;
}
.pacman {
    transform: translate3d(0, 0, 0);
}

/* Ghost animations */
.red img, .bleu img, 
.orange img, .pink img {
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.7));
    padding: 1px;
}

/* Overlay (dimmed background) */
#overLayer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
    z-index: 999; /* Ensure it's above other elements */
}

/* Popup box */
#popUp {
    display: none;
    width: auto;
    height: auto;
    border: 4px solid #FFEE58;
    border-radius: 10px;
    font-size: 2rem;
    justify-items : center;
    align-content : center;
    text-align: center;
    background: rgba(0, 0, 0, 0.9); /* Semi-transparent background */
    color: #FFEE58;
    box-shadow: 0 0 25px rgba(255, 238, 88, 0.5);
    position: fixed;
    padding: 20px;
    z-index: 1000; /* Higher than overlay */
}

#menuContent {
    color: #FFEE58;
    font-size: 2rem;
    text-shadow: 
        0 0 5px #FFEE58, 
        0 0 10px #FFEE58, 
        0 0 20px #000;
    text-transform: uppercase;
}

#sub-title {
    color:#ffffff;
    padding-top: 0.6rem;
    font-size: medium;
}

button {
    color: #FFEE58;
    font-size: 1.6rem;
    font-weight: 600;
    border: 4px solid #FFEE58;
    border-radius: 4px;
    width: 6rem;
    height: 3rem;
    background-color: #000;
    margin-top: 1.6rem;
    cursor: pointer;
}

button:hover {
    cursor: pointer;
    filter: drop-shadow(0 0 2px rgba(255, 238, 88, 0.9));
    background: rgba(255, 238, 88, 0.08); /* Transparent on hover */
    color: #f7f1b7;                /* Text becomes colored */
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .subject {
        width: 95vw;
        height: 95vh;
    }
    
    .game-board {
        transform: scale(0.9);
    }
    
    .handle-score {
        font-size: 0.9rem;
    }
} 