.board {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(7, 1fr);
    gap: 0.2rem; 

    max-width: 100%;
    aspect-ratio: 7 / 7; 
    box-sizing: border-box;

    margin-top: 5em;

    position: relative;

  }
  @media screen and (orientation: landscape) {
    .board {
        margin: 0 auto; 
    }
}
  
  .tile {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.4rem;
    min-height: 2.4rem;
    width: 100%;
    height: 100%;
    border: 3px solid black;
    border-radius: 10px;
    box-sizing: border-box;

  }
#player {
    position: absolute;

    width : 1.5em;
    height: auto;

    transition: top 0.3s ease, left 0.3s ease;

    transform: translate(25%, 27%);
}

.tile-number.hidden-text {
  visibility: hidden;   /* Or use opacity: 0 if you want it to occupy space */
}
.instruction-container{ 
    max-height: 75%;
    font-size: small;

    border: 2px solid #434242; /* Dark gray border */
    padding: 1em;
    border-radius: 10px;
    background-color: rgba(250, 247, 247, 0.609); 
    max-width: 80%;
    margin: 1em auto;
    list-style-position: inside; 
}


.dice {
    font-size: 3rem;
    height: 3rem;
    animation-duration: 1s;
    animation-fill-mode: forwards;
} /* animation fill mode applies a select style to its target before/after its execution, in this case forwards, making the animation keep going until its limit is finished.*/

.roll-animation{
    animation-name: roll;
}

@keyframes roll { 
    0%{
        transform: rotateY(0deg) rotateX(0deg);
    }
    100%{
        transform: rotateY(720deg) rotateX(720deg);
    }


}
.tile:nth-child(1) { grid-area: 1 / 1; }
.tile:nth-child(2) { grid-area: 1 / 2; }
.tile:nth-child(3) { grid-area: 1 / 3; }
.tile:nth-child(4) { grid-area: 1 / 4; }
.tile:nth-child(5) { grid-area: 1 / 5; }
.tile:nth-child(6) { grid-area: 1 / 6; }
.tile:nth-child(7) { grid-area: 1 / 7; }

.tile:nth-child(8) { grid-area: 2 / 7; }
.tile:nth-child(9) { grid-area: 3 / 7; }
.tile:nth-child(10) { grid-area: 4 / 7; }

.tile:nth-child(11) { grid-area: 4 / 6; }
.tile:nth-child(12) { grid-area: 4 / 5; }
.tile:nth-child(13) { grid-area: 4 / 4; }
.tile:nth-child(14) { grid-area: 4 / 3; }
.tile:nth-child(15) { grid-area: 4 / 2; }
.tile:nth-child(16) { grid-area: 4 / 1; }

.tile:nth-child(17) { grid-area: 5 / 1; }
.tile:nth-child(18) { grid-area: 6 / 1; }
.tile:nth-child(19) { grid-area: 7 / 1; }

.tile:nth-child(20) { grid-area: 7 / 2; }
.tile:nth-child(21) { grid-area: 7 / 3; }
.tile:nth-child(22) { grid-area: 7 / 4; }
.tile:nth-child(23) { grid-area: 7 / 5; }
.tile:nth-child(24) { grid-area: 7 / 6; }
.tile:nth-child(25) { grid-area: 7 / 7; } 
  
  
  
.main-container,
.welcome-page {
    display: flex;
    margin: 1rem 1rem 15px !important;
    padding: 0 1rem;
    border-radius: 15px;
    flex-direction: column;
    align-items: center;
    flex-wrap: nowrap;
    text-align: center;
    gap: 5vh;
    border: 0.5rem ridge black;
    background-color: seashell;
    background-blend-mode: color;
    outline: 0.5rem ridge lightgray;
    min-height: 85vh;
    max-height: 100vh; 
}

.intro-title{
    font-size: 2.0rem;
    color: rgb(206, 135, 2);
}

.score {
    margin: 0;
    font-weight: bold;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-content: flex-end;
    align-items: flex-end;
    padding: 0 0.8rem 0 0;
}


.logo {
    margin: 0;
    padding: 0 0 0 0.8rem;
}

.notification-bar {
    display: flex;
    background: black;
    width: calc(100% + 2.5rem);
    color: white;
    justify-content: space-between;
}


/* Quiz Button Container */
.answer-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    row-gap: 3vh;
    margin: 1.5rem 0 2rem;
    width: 100%;
}

/* Quiz Buttons */
.quiz-btn {
    font-size: 1rem;
    text-align: center;
    width: 40%;
    background-color: white;
    padding: 1vh;
    border: 0.2vh solid gold;
    border-radius: 10px;
    box-shadow: 0.5vh 0.5vh;
}

.submit-button {
    background-color: #3ea959;
    border: none;
    border-radius: 15px;
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: x-large;
    margin: 1rem 0 2rem;
    cursor: pointer;
    color: white;
}

.🏁,
.incorrect {
    font-size: 1rem;
    text-align: center;
    border-radius: 1vh;
}

.correct {
    background: lightgreen !important;
    color: black;
}

.incorrect {
    background: salmon !important;
    color: black;
}

.game-featured-image {
    max-width: 70%;
    height: auto;
    border-radius: 5%;
}

.hide {
    opacity: 0;
    pointer-events: none;
    z-index: -1;
    scale: 0;
}


/* The following styles are for the main page -> modal */
.modal {
    display: none; 
    flex-direction: column;
    position: fixed;
    z-index: 2; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgb(0,0,0); 
    background-color: rgba(0,0,0,0.4); 
}


  .modal-content {
    background-color: #fefefe;
    margin: 8em auto;
    width: 20em;
    height: 20em;
    border: 4px solid darkcyan;
    border-radius: 20px;
    text-align: center;
    padding-bottom: 2em;
  }

  
.modal-flex-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: popIn 1s ease-out;
  transition: all 0.3s ease;
}

.challenge-content {
    background-color: #fefefe;
    margin: -7.5em 0;
    width: 20em;
    height: 2em;
    border: 4px solid gold;
    border-radius: 20px;
    text-align: center;
    padding-bottom: 2em;
}

.challenge-desc {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.challenge-desc img {
    width: 24px;
    height: 24px;
}
/* Remove large vertical margins so they stack */


  .modal-heading {
      display: flex;
      flex-direction: row;
      justify-content: center;
  }
  
  .close {
    color: #aaa;
    float: right;
    font-size: 30px;
    font-weight: bold;
    padding-right: 0.3em;
  }
  
  .close:hover,
  .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
  }
  @keyframes popIn {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
.button-container {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 8em;
    height: 10em;
}

.second-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 3em;
}
.modal-image {
    width: 6em;
}

.modal-container {
    padding: 0 1em;
}

.how-to-play {
    padding-left: 1rem;
    list-style-position: outside;
}

.instruction-container {
    padding-left: 1.2rem;
    margin-top: 0.5rem;
}

.instruction-container ul {
    text-align: left;
    margin-bottom: 0.5rem;
    list-style-type: square;
}

/* Tile Colors */
.tile.type-start {background-color: #87CEEB;}
.tile.type-finish {background-color: #FFD700;}
.tile.type-progress {background-color: #C8E6C9;}
.tile.type-event {background-color: #FFF9C4;}
.tile.type-penalty {background-color: #FFCDD2;}

/* Tile Text & Emoji Placement */
.tile.type-start,
.tile.type-finish {
    align-items: flex-end;
    font-size: 0.6rem;
}
.tile.type-progress,
.tile.type-event,
.tile.type-penalty {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    font-size: 0.8rem;
}

.final-btn {
    font-size: 1rem;
    text-align: center;
    width: 40%;
    background-color: white;
    padding: 1vh;
    border: 0.2vh solid gold;
    border-radius: 10px;
    box-shadow: 0.5vh 0.5vh;

    margin-top: 5em;
}

.end-screen {
    position: fixed;
    top: 12%;
    border-radius: 10px;
    background-color: rgba(250, 247, 247, 0.609); 

    width: 65%;
    height: 50%;
}
.score-container {
    display: flex;
    flex-direction: row;
    height: 25%;
    justify-content: center;
    padding: 5% auto;
}
.score-text {
    font-size: 2.0rem;
    color: rgb(206, 135, 2);
}
.final-container {  
    height: 1em;
    width: 6em;
    font-size: 1.3em;
    font-weight: bold; 
    white-space: nowrap; 
    padding-top: 0.4em;
    padding-right: 0.5em;
}
.end-description-container  {
    flex-direction: column;
}

.tile-image {
    width: 10em;
}

.achievements-container{ 
    font-size: small;

    padding: 0.2em;
    border-radius: 10px;
    background-color: rgba(250, 247, 247, 0.609); 
    width: 100%;
    height : 47%;

    border: 2px solid #434242; /* Dark gray border */
    margin: 1em auto;
    list-style-position: inside; 

    overflow-y: auto;
}

ul {
    padding-inline-start: 0px;
}
li {
    padding-bottom: 2%;
}
.end-title {
    margin-top: 2%;
}
.roll-button,
.play-button {
    background: forestgreen;
    border: none;
    color: white;
    padding: 5px 15px;
    font-size: 13px;
    border-radius: 5px;
    cursor: pointer;
    margin: 15px 0;
}
.roll-button:hover,
.play-button:hover {
    background: darkgreen;
}

.reset-button {
    background: gray;
    border: none;
    color: white;
    padding: 5px 15px;
    font-size: 13px;
    border-radius: 5px;
    cursor: pointer;
    margin: 15px 0;
}
.reset-button:hover {
    background: darkgray;
}

.hide {
    display: none;
}