body {
    font-family: 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: auto;
    min-height: 100vh;
    background-color: #eff2f8;
    padding-top: 20px;
    font-size: 14px;
}

/*
----------------------------------------------------------------
...Intro Modal... 
----------------------------------------------------------------
*/
.intro-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.096);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000; /* Higher z-index to ensure it appears above other content */
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 60%;
    max-width: 80%;
    text-align: center;
}

.input-group {
    display: flex;
    flex-direction: column; /* This will make the label appear above the input */
    margin-bottom: 10px; /* Space between each input group */
    font-size: 16px;
    color: black;
}

.input-group label {
    margin-bottom: 5px; /* Space between label and input */
    text-align: left; /* Align the label to the left */
}

.input-group input {
    width: 100%; /* Make the input take up full width */
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box; /* This makes sure padding and border are included in the element's total width and height */
    padding: 16px;
}

.intro-modal input:focus, 
.intro-modal select:focus, 
.intro-modal textarea:focus, 
.intro-modal button:focus {
    border-color: blue !important;
}


.modal-content button {
    padding: 15px 40px;
    border: none;
    background-color: rgb(233, 155, 35);
    color: white;
    cursor: pointer;
    border-radius: 4px;
}

#startGameBtn {
    cursor: pointer;
    transition: opacity 0.3s; /* Smooth transition for opacity */
}

#startGameBtn:disabled {
    opacity: 0.5; /* Make the button semi-transparent */
    cursor: not-allowed; /* Change the cursor to indicate it's not clickable */
}

/*
----------------------------------------------------------------
...Game Container... 
----------------------------------------------------------------
*/
.head {
    width: 109%;
    margin-left: -1.7%;
    margin-right: -1.7%;
    padding: 20px 16px;
    background-color: rgb(236, 162, 29);
    color: rgb(255, 255, 255);
    align-items: center;
    text-align: center;
}
.header {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.copyright {
    font-size: 10px;
    margin-top: 10px;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
    min-height:0vh;
    width: 100%;
    max-width: 1200px;
    min-width:10vh;
    margin: 2rem auto;
    position: relative;
    justify-content: center; 
    /* scroll-behavior: unset; */
}

.info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 10px;
    padding: 10px 10px;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.438);
    font-size: 16px;
    font-weight: 500;
}

.info > div {
    display: flex;
    align-items: center;
    gap: 5px;
}

.info i.fa-light.fa-stopwatch {
    font-size: 20px;
    color: #b9bfc2;
}

.info span.label {
    color: #888;
    margin-right: 10px;
}

.info span {
    margin: 0 5px;
}

.board {
    display: grid;
    grid-area: auto;
    gap: 5px;
    margin: -5px;  /* Negative margin equal to the gap size */
    height: 100%;
    border: 3.5px solid #f09b1c;
    border-radius: 2%;
    grid-template-columns: repeat(4, 80px);
    grid-template-rows: repeat(4, 1fr);  /* Change to 1fr */

    justify-content: center;
    align-content: center;
}

.sideboard {
    display: grid;
    grid-area: auto;
    gap: 5px;
    margin: -5px;  /* Negative margin equal to the gap size */
    width: 100%;
    height: 100%;
/*     border: 2px solid #e41b1b; */
    border-radius: 2%;
    grid-template-columns: repeat(2, 80px);
    grid-template-rows: repeat(4, 1fr);  /* Change to 1fr */
    justify-content: center;
    align-content: center;
}

.board-container {
    width:100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 2px;
}

.placeholder {
    border: 1px solid #5f5e5e;  /* Adjusted border */
    border-radius: 2px;  /* Added rounded corners */
    background-color: #f5f5f5;  /* Lighter background color */
}

.card, .placeholder {
    width: 80px;
    height: 80px;
    border: 1px solid #5f5e5e;
    background-color: #fff;
    transition: all 0.2s;
    
}

.card {
    cursor: pointer;
    background-size: cover;
    background-position: center;
    border: none;
}

.card::before {
    content: "";
    display: block;
    padding-top: 100%;  /* This ensures a 1:1 aspect ratio */
}

.card.is-dragging {
    opacity: 0.5;
    z-index: 1000;
}

/* Remove top border for the topmost placeholders */
.placeholder:nth-child(-n+4) {
    border-top: none;
}

/* Remove bottom border for the bottommost placeholders */
.placeholder:nth-child(n+13) {
    border-bottom: none;
}

/* Remove right border for every 4th placeholder */
.placeholder:nth-child(4n) {
    border-right: solid 1px #f09b1c;
}

/* Remove left border for every 1st placeholder after the 4th */
.placeholder:nth-child(4n+1) {
    border-left: none;
}


.sideboard .placeholder{
    border: 1px solid #ffffff;  /* Adjusted border */
    border-radius: 2px;  /* Added rounded corners */
    background-color: #f5f5f5;  /* Lighter background color */
}
/*
----------------------------------------------------------------
...Winning Modal... 
----------------------------------------------------------------
*/
/* General Modal Styles */
.winning-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    display: flex;
    justify-content: center;
    align-items: center;
    display: none;
    z-index: 1000;
}

/* Content Holder */
.content-holder {
    width: 60%;
    height: 95%;
    padding: 0% 1.7%;
    border-radius: 20px;
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Header Info */
.header-info {
    width: 109.4%;
    margin-left: -1.7%;
    margin-right: -1.7%;
    color: #fff;
    text-align: center;
    background-color: orange;
}

.header-info h2 {
    font-size: 20px;
    margin-bottom: 0.5rem;
}

.header-info p {
    font-size: 16px;
    margin-bottom: 0.5rem;
}

.header-info small {
    font-size: 10px;
}

/* Image Holder */
.image-holder {
    width: calc(50% + 3.4%); /* Added to account for padding */
    padding-left: 1.7%; 
    padding-right: 1.7%;
    min-height: 120px;  /* Set a minimum height */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    background-image: url('images/thumpsup.jpg');
    background-size: contain; /*cover*/
    background-position: center;
    background-repeat: no-repeat;
}

/* Winning Message */
.winning-message {
    width: 95%;
    height: 40%; /* Adjusted height */
    padding: 20px 25.2px; /* Adjusted for 1.7% of parent width */
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    position: relative;
    text-align: center;
    z-index: 2;
}

.winning-message p {
    font-size: 15px;
    font-weight: 200;
}

/* Winning Header */
.winning-header {
    font-size: 18px;
    font-weight: bold;
    background-color: #ffffff;
    padding: 10px 20px;
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.616);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
}

.yourResultsText {
    font-size: 0.8em;
    color: rgb(120, 120, 120);
    font-weight: lighter;
    
}

.HoursMins {
    /* font-size: 0.7em; */
    font-weight: 400;
}

.smaller-seconds {
    font-size: 0.7em;
    color: rgb(120, 120, 120);
    font-weight: lighter;
}

/* Restart Button */
#restartButton {
    font-size: 16px;
    font-weight:lighter;
    padding: 8px 25px;
    background-color: #fff;
    border: 1px solid rgba(128, 125, 125, 0.3);
    border-radius: 0px;
    box-shadow: 0px 0px 5px rgba(128, 125, 125, 0.3);
    cursor: pointer;
    transition: background-color 0.3s;
}

#restartButton:hover {
    background-color: #f7f7f7;
}

/* Results Holder */
.results-holder {
    width: 95%;
    padding-left: 1.7%;
    padding-right: 1.7%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.top-results,
.player-result {
    width: 100%;
    padding: 1rem;
    text-align: center;
}

.top-results h3,
.player-result h3 {
    text-align: left;
    margin-left: 1rem;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.result-entry {
    justify-content: flex-start !important;
    width: 100%;
    padding: 0.5rem 0;
    border-bottom: 1px solid grey;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid grey;
}

.result-entry td {
    padding: 0.5rem 1rem; /* adjusted for table cells */
    text-align: left;
}

.result-entry img {  
    width: 40px;
    height: 40px;
    background-color: orange;
    border-radius: 100%;
}

.result-entry span:nth-child(3) {  
    flex: 3;  
}

.result-entry span:nth-child(4) {   
    flex: 2;
}

.result-entry > * {
    padding: 0 1rem;  
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th, .results-table td {
    padding: 0.5rem 1rem; /* adjusted for table cells */
    text-align: left;
}

/* Column widths */
.results-table td:nth-child(1) { /* Position column */
    width: 10%; /* For position which is likely a smaller number */
}

.results-table td:nth-child(2) { /* Image column */
    width: 15%; /* For the image */
}

.results-table td:nth-child(3) { /* Name column */
    width: 50%; /* For the player's name which might be longer */
}

.results-table td:nth-child(4) { /* Score column */
    width: 25%; /* For the player's score */
}

/* Ensure content wraps properly */
.winning-message, .result-entry {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Specifically for the names in the result-entry, in case they are too long */
.result-entry span {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.highlighted-player {
    background-color: orange;  /* Adjust the color as per your preference */
}

/*  */
.player-result {
    margin-top: 20px;
    width: 100%;
    text-align: center;
  }
  
  .player-result .results-table {
    width: 100%;
    margin: 0 auto;
    text-align: left;
  }
  
  .player-result .result-entry {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ccc;
  }

  /* ellipsis loading animation */
  .ellipsis-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%; /* or any other value based on where you want to display it */
}

.ellipsis-loader > div {
    
    width: 35px;
    height: 35px;
    margin: 0 5px;
    background-color: rgb(21, 175, 202); /* Same color as your spinner */
    border-radius: 50%; /* Makes it a circle */
    animation: ellipsisFade 1.2s infinite;
    justify-content: center;
    align-items: center;
    margin-top: 10px; /* Added space on top */
}

.ellipsis-loader > div:nth-child(1) {
    animation-delay: 0s;
}

.ellipsis-loader > div:nth-child(2) {
    animation-delay: 0.4s;
}

.ellipsis-loader > div:nth-child(3) {
    animation-delay: 0.8s;
}


/*  */
@keyframes ellipsisFade {
    0% { opacity: 0.2; }
    50% { opacity: 1; }
    100% { opacity: 0.2; }
}

  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

/*
----------------------------------------------------------------
...Restart Modal... 
----------------------------------------------------------------
*/

.restart-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.restart-modal .modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.restart-modal button {
    margin: 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    background-color: rgb(196, 135, 21);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
}

.restart-modal button:hover {
    background-color: #0056b3;
}

/** ... MEDIA CONTROLS ... */

/* Media Query for screens with width less than 800px */
@media (max-width: 800px) {
    .winning-message {
        height: 20%;
    }
    .content-holder {
        width: 100%;
        height: 100%;
        padding: 5%;
    }
    .image-holder {
        min-height: 150px;
    }
}

/* Landscape Layout */
@media screen and (min-width: 600px) {
    .board-container {
        flex-direction: row;
    }
}

/* Portrait Layout */
/* @media screen and (max-width: 599px) { */
@media screen and (max-width: 767px) {
    .head {
        width: 109%;
        margin-left: -1.7%;
        margin-right: -1.7%;
        padding: 10px 12px;
        font-size: 13px;
    
    }
        
    .game-container {
        width: 100%;
    }
    .board-container {
        flex-direction: column;
    }

    .sideboard {
        row-gap: 2px;
        column-gap: 2px;
        width: 0%;
        height: auto;
        grid-template-columns: repeat(4, 1fr);
    }
    .sideboard .card {
        margin: 0px; /* Adjust as needed */
      }

    .board {
        margin: 0px 0;
    }

    .board {
        grid-template-columns: repeat(4, 65px);
    }
    .sideboard {
        grid-template-rows: repeat(2, 65px);
        align-content: center;
    }
    .card, .placeholder {
        width: 65px;
        height: 65px;
        
    }
}
