* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

html,
body,
#wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    background-color: #f0f0f0;
}

#wrapper {
    position: relative;
}

.maincontainer {
    width: 780px;
    height: 750px;
    background: #fff;
    position: absolute;
    top: 0;
    left: 0;
    background-image: url(images/bg.png);
    /* Optional background */
    background-size: cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

#game {
    display: grid;
    grid-template-columns: repeat(10, 40px);
    grid-template-rows: repeat(10, 40px);
    border: 2px solid #ffa97e;
    border-radius: 10px;
    overflow: hidden;
    background-color: white;
}

#logo {
    font-size: 70px;
    width: 100%;
    height: 150px;
    text-align: center;
    background:url(images/logo.webp);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.cell {
    width: 40px;
    height: 40px;
    background: white;
    border: none;
}

.wall {
    background: #333;
}

.player {
    background: url(images/monster.webp);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: white;
}

.end {
    background: url(images/man.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: rgb(255, 255, 255);
}

.controls {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.controls button {
    padding: 8px 16px;
    margin: 0 5px;
    font-size: 16px;
}

/* Popup Modal */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.popup-content {
    background: white;
    padding: 30px 50px;
    border-radius: 10px;
    font-size: 24px;
    text-align: center;
    color: green;
}

.hidden {
    display: none;
}

#restart {
    height: 60px;
    width: 150px;
    background-color: #eacb4f;
    color: rgb(52, 52, 52);
    border: none;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 30px;
    cursor: pointer;
    border-radius: 20px;
}

#levelText {
    height: 60px;
    width: 150px;
    background-color: #ea9a4f;
    color: rgb(52, 52, 52);
    border: none;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 20px;
}

#restartgame{
      margin-top: 20px;
      padding: 10px 30px;
      font-size: 20px;
      border: none;
      background-color: #ffc107;
      color: black;
      border-radius: 10px;
      cursor: pointer;
}

.updown, .leftright{
    height: 60px;
    width: 150px;
    cursor: pointer;
    display: flex;
    font-size: 25px;
    font-weight: 700;
    cursor: pointer;
}

.up,  .left  {
    width: 100%;
    height: 100%;
    background-color: #ebe9e1;
    border-radius: 10px 0 0px 10px ;
    display: flex;
    align-items: center;
    justify-content: center;
}
.down, .right {
    width: 100%;
    height: 100%;
    background-color: #ea9a4f;
    border-radius: 0px 10px 10px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.updown:hover,
.leftright:hover,
#restart:hover,
#restartgame:hover {
  transform: scale(1.1);
  transition: transform 0.3s ease-in;
}
