*{
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

@import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Quicksand:wght@500;700&display=swap');

:root {
    --board-light: #e4d8a5;
    --board-dark: #a67c52;
    --piece-white: #ffffff;
    --piece-black: #000000;
    --highlight: #7ea354;
    --threat: #cc5449;
    --selected: #f7e98e;
    --border-color: #000000;
    --bg-overlay: rgba(240, 230, 200, 0.95);
}

#canvas {
    display: inline-block;
}
h1 .icon { height: 96px; margin-right: 20px; }
        h1 {
            font-family: 'Lilita One', cursive; font-weight: normal; letter-spacing: 1px;
    color: #ffffff;
}
.times {
    display: flex;
    flex-direction: row;
    justify-content: space-between;

}

.row {
    display: flex;
    flex-direction: row;
    justify-content:space-around;
    align-items: center;
    flex-wrap: wrap;

}

.forfeitText{
    margin-top:auto;
    margin-bottom:auto;
    font-size: 28px;
    font-family:monospace;
    color:#ed5e75;
    font-weight:600;
    margin-right:20px;
}

.exitButton{
    margin-left:auto;
    margin-right:auto;
    margin-top:10px;
    border-radius: 12px;
    border:solid 2px 2px 2px 2px;
    border-color:var(--black-square-color);
    cursor:pointer;
    background:none;
    background:var(--white-square-color);
}

.message{
    background:none;
    color:var(--black-square-color);
    justify-content:center;
    width:fit-content;
    height:fit-content;
    margin-top:50px;
    margin-left:auto;
    margin-right:auto;
    /* display:none; */
}

body {
    min-width:fit-content;
    margin:0;
    background: url('/static/bigMap/plains1.png') center center / cover fixed;
    
    font-family: 'Quicksand', sans-serif; font-weight: 700;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
            font-size: 18px;
}

img, canvas {
    
}


html{
    min-width:fit-content;
}

.canvasContainer{
    justify-content: center;
}



.lobbyGame{
    grid-row-start:span 1;
    grid-column-start:span 1;
}

.black{
    background:var(--black-square-color);
    color: var(--white-square-color);
    width:25vw;
    height:25vw;
    font-size:2vw;
    
}

.container{
    margin-left: auto;
    max-width: fit-content;
    margin-right: auto;
}

.white{
    background:white;
    color: var(--black-square-color);
    width:25vw;
    height:25vw;
    font-size:2vw;
}

.column{
    display:flex;
    flex-direction: column;
    align-items:center;
    gap:20px;
}

.mode-row{
    display:flex;
    flex-direction: row;
    align-items: center;
}



.move-history {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.move-history::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

@media only screen and (max-width: 600px), (max-aspect-ratio: 1/1) {
    .responsive-modal-buttons {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .board-wrapper {
        flex-direction: column !important;
        align-items: center !important;
        width: 100%;
    }

    .move-history {
        width: 100% !important;
        max-width: 100vw !important;
        max-height: 250px !important;
        box-sizing: border-box;
        margin-top: 10px;
    }

    .times {
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box;
        padding: 0 10px;
        align-items: center;
    }

    .clock {
        font-size: 16px !important;
        white-space: nowrap;
        margin: 0 5px;
        font-variant-numeric: tabular-nums;
        width: 70px;
    }

    .exitButton {
        flex-wrap: nowrap !important;
        transform: scale(0.7);
        margin: 0 !important;
    }

    html, body {
        min-width: 0 !important;
        width: 100%;
        overflow-x: hidden;
    }
    body {
        background-attachment: scroll;
    }
    .black{
        background:var(--black-square-color);
        color: var(--white-square-color);
        width:100vw;
        height:100vw;
    }
    .white{
        background:var(--white-square-color);
        color: var(--black-square-color);
        width:100vw;
        height:100vw;
    }
  }


  #gameName{
      background:var(--white-square-color);
      border:solid;
      padding:32px;
      border-radius: 12px;
      color:var(--black-square-color);
      font-size: 26px;   
      font-weight:600;
  }

  #gameName::placeholder{
      color:var(--black-square-color);
      font-weight:500;
      text-align:center;
  }

  .createButton .icon { height: 48px; margin-right: 15px; }
        .createButton {
            font-family: 'Lilita One', cursive; font-weight: normal; letter-spacing: 1px;
      /* background:var(--black-square-color);
      color:var(--white-square-color);
      padding:25px;
      padding-left:100px;
      padding-right:100px;
      font-size: 26px;
      font-weight:600;
      border-radius:50px;
      cursor:pointer;
      margin-top:50px;
      box-shadow:none;
      border:var(--black-square-color); */
      all: unset;
      cursor: pointer;
      padding-top: 20px;
      padding-bottom: 20px;
      padding-left: 40px;
      padding-right: 40px;
      border-radius: 20px;
      background: #F7DFDA;
      color: #7D6650;
      font-size: 2em;
      font-weight: bolder;
      text-align: center;
  }

  select{
    all:unset;
    cursor: pointer;
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 5px;
    padding-right: 5px;
    border-radius: 20px;
    background: #F7DFDA;
    color: #7D6650;
    font-size: 1em;
    font-weight: bolder;
    text-align: center;
  }   

  .createButton:hover{
      color: #ffffff;
      background:var(--danger-square-color);
  }
 
  .games{
      display:flex;
      flex-direction:row;
      flex-wrap:wrap;
      align-items:center;
      justify-content:space-around;
      padding:20px;
      text-align:center;
      padding-bottom:50px;
  }


  .games > lobby-game{
      margin-top:10px;
      margin-bottom:10px;
      margin-left:15px;
      margin-right:15px;
  }
  html{
      font-family: 'Quicksand', sans-serif; font-weight: 700;
      height:100vh;
      background:#B0A875;

  }

  .cWhite{
      color:var(--white-square-color);
  }

  .gameModeSelected{
      color:var(--black-square-color);
      border:solid;
      background:var(--white-square-color);
      border:solid;
      padding:10px;
      cursor:pointer;
  }

  .gameMode{
    color:var(--white-square-color);
    border:solid;
    border-color:var(--white-square-color);
    border: 2px 2px 2px 2px;
    border:solid;
    padding:10px;
    cursor:pointer;
}

.gameMode:hover{
    color:var(--black-square-color);
    border:solid;
    background:var(--white-square-color);
    border:solid;
    padding:10px;
    cursor:pointer;
}
.topMenu{
    width:100%;
    z-index:1000;
    top:0;
}
 
.text{
    background:var(--black-square-color); margin-top:50px; width:50%;
    margin-left:auto; margin-right:auto;
    font-size:1.5vh !important;
    padding:50px;
    border-radius: 12px;
}


.clock{
    font-size: 28px;
    /* margin-left:50px;
    margin-right:50px; */
    margin-top:auto;
    margin-bottom:auto;
    font-variant-numeric: tabular-nums;
    width: 120px;
    /* color:var(--black-square-color); */
}

#blackClock{
    text-align:left;
}

#whiteClock{
    text-align:right;
}


.lobbyGame{
    display:flex;
    flex-direction:column;
    border:solid;
    border: 2px 2px 2px 2px;
    border-color:white;
    border-radius: 12px;
    padding:16px;
    color:white;
  }



  .linkHeader{
            font-family: 'Lilita One', cursive; font-weight: normal; letter-spacing: 1px;
    text-align:center;
    color:white;
    text-decoration:none;
    font-weight:bold;
    font-size:25px;
    font-family: 'Quicksand', sans-serif; font-weight: 700;
  }


  .startGame .icon { height: 40px; margin-right: 10px; }
        .startGame {
            font-family: 'Lilita One', cursive; font-weight: normal; letter-spacing: 1px;
    color:white;
    border:solid;
    border-color:white;
    padding:15px;
    font-size: 26px;
    border:2px 2px 2px 2px;
    cursor:pointer;
    text-decoration:none;
  }
  .startGame:hover{
    color: #ffffff;
    background:white;
  }
  .span{
    margin-left:auto;
    margin-right:auto;
    margin-top:15px;
    margin-bottom:15px;
  }

  .games{
    display:flex;
    flex-direction:row;
    justify-content:space-around;
  }

  .racePickImage {  
      max-width:5vw;
      min-width:50px;
  }

  .racePickImage:hover{
    background-color:white;
    border-radius:50px;
  }

  .racePickImageSelectedWhite{
    background-color:white;
    border-radius:50px;
  }

  .racePickImageSelectedBlack{
    background-color:white;
    border-radius:50px;
  }

 .marginMedium {
     margin:50px;
     display:flex;
     flex-direction: column;
     justify-content: stretch;
     gap:20px;
 }
 .pieces{
    display:flex;
    flex-direction:column;
    width:50vw;
    max-width:300px;
}
 .modal{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width:600px;
    height:max-content;
    width:90%;
    background:rgb(204,166,131,0.5);
    padding:20px;
 }
.row-hotseat{
    display:flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    margin-top:20px;
    padding:20px;
    line-height:2ch;
    background:#F7DFDA;
    border:solid black;
}

.row-hotseat > img{
    max-width:50px;
    margin-left:20px;
}

.row-hotseat > h4{
    margin-left:20px;
    margin-right:20px;
}

 @media only screen and (max-width: 600px) {
   .modal{
    /* top:auto; */
    top:0;
    min-height:100%;
    transform: translate(-50%, 0%);

    width:90%;
   }
 }

 .displayNone{
    display:none !important;
 }

 .pieceModal{
    top: 0;
    left: 0;
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: row;
    justify-content: center;
    position:absolute;
    background-color: rgb(204,166,131,0.5);
    align-items: center;
 }

 .campaign > h2 .icon { height: 72px; margin-right: 15px; }
        h2 {
            font-family: 'Lilita One', cursive; font-weight: normal; letter-spacing: 1px;
    margin-bottom:0px;
 }
 .campaign > a{
    display:inline-flex;
    align-items: center;
    text-decoration: none;
    margin-top:15px;
 }
 .campaign > a > img{
    width:50px;    
 }

 #blackPlayerSelect, #whitePlayerSelect{
    margin-left:10px;
 }

 .movesFirstRow{
    margin-top:10px;
 }

 #menuDialog{
    max-width:600px;
    height:max-content;
    background:rgb(204,166,131,0.5);
    padding:20px;
 }
 .dialogContent{
    display:flex;
    flex-direction: column;
    gap:10px;
 }

 .dialogButton{
    all:unset;
    cursor:pointer;
    padding-top:10px;
    padding-bottom:10px;
    padding-left:20px;
    padding-right:20px;
    border-radius:20px;
    background:var(--white-square-color);
    color:var(--black-square-color);
    background:#F7DFDA;

    text-align:center;
 }

 .dialogButton:hover{
    color:var(--white-square-color);
    background:var(--danger-square-color);
}

/* Loading Screen Styles */
#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--black-square-color); /* Solid background to hide content */
    color: var(--white-square-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-size: 2em;
    font-family: 'Quicksand', sans-serif; font-weight: 700;
}

/* Spinner Animation */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--white-square-color);
    border-top: 5px solid var(--danger-square-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

/* Fade out animation */
.fade-out {
    animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
}

@media only screen and (max-width: 600px), (max-aspect-ratio: 1/1) {
    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: flex !important;
    }
}

@media only screen and (min-width: 601px) and (min-aspect-ratio: 1/1) {
    .desktop-only {
        display: flex !important;
    }
    .mobile-only {
        display: none !important;
    }
}

@media only screen and (min-width: 601px) {
    .food-icon-responsive {
        width: 2em !important;
        height: 2em !important;
    }
}