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

/* 
*
*
*/
header {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    z-index: 10000;
}

#restart, #github, #rules {
    width: 30px;
    padding: 2px;
    background: none;
    border: none;
    box-shadow: 2px 2px black;
    border: 1px solid black;
    cursor: pointer;
}

#restart:hover, #github:hover, #rules:hover {
    box-shadow: 4px 4px black;
}

/* 
*
*
*/

.super-container {
  width: 100%;
  padding: 0.75rem 0 0.75rem 0;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

#black-shield, #white-shield, #black-skip, #white-skip, #white-nuke, #black-nuke {
    width: 30px;
    padding: 2px;
    background: none;
    border: none;
    box-shadow: 2px 2px black;
    border: 1px solid black;
}

#black-shield:hover, #white-shield:hover, #black-skip:hover, #white-skip:hover, #white-nuke:hover, #black-nuke:hover {
    box-shadow: 4px 4px black;
}

/* 
*
*
*/
#main {
    background-color: rgb(255, 255, 255);
    width: 100vw;
    /* padding: 0.85rem 0 .85rem 0; */
    display: flex;
    justify-content: center;
    align-items: center;
}

#container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;

  padding: 1rem;
}

.grid-black {
    background-color: black;
    /* position: absolute; */
}

.grid-white {
    background-color: white;
    /* position: absolute; */
}

.tile-white {
    position: absolute;
    color: black;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: small;
    padding: 0.125rem;

}

.tile-black {
    position: absolute;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: small;
    padding: 0.125rem;
}
#board {
  /* position: absolute; */
    display: grid;
    /* position: absolute; */
    grid-template-columns: repeat(8, 60px);
    grid-template-rows: repeat(8, 60px);
    border: 2px solid black;
}

.pieces {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
  /* position: relative; */
}

.available { background-color: lightgreen !important; border: 2px solid black }
.highlight-capture { background-color: lightcoral !important; border: 2px solid black }


.replay-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}


.replay-content {
  background: #fff;
  border-radius: 16px;
  padding: 5rem;
  max-width: 500px;
  margin: 40px auto;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  animation: popIn 0.5s ease-in-out;
  font-family: Arial, sans-serif;
}

.replay-content h2 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: #2c3e50;
}

.replay-content p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 20px;
}

.replay-buttons {
  display: flex;
  justify-content: center;
}

.replay-buttons button {
  background: #3498db;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.replay-buttons button:hover {
  background: #2980b9;
  transform: scale(1.05);
}

/* Animation */
@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}


#chat {
    /* position: absolute; */
    background-color: red;
    width: 250px;
    right: 0;
    height: 484px;
    background: #1e1e1e;
    padding: 10px;
    overflow-y: scroll;
    font-family: Arial, sans-serif;
}
@media (max-width: 760px) {
  #chat {
    display: none;
  }
}

@media (max-width: 480px) {
  #board {
      grid-template-columns: repeat(8, minmax(30px, 1fr));
      grid-template-rows: repeat(8, minmax(30px, 1fr));
  }

  #chat {
      height: 150px;
      font-size: 12px;
  }

  .tile-white, .tile-black {
      font-size: clamp(8px, 2.5vw, 12px);
  }
}
/* Common message style */
.message {
  margin: 6px 0;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;
  animation: fadeIn 0.3s ease-in;
}

/* Types of messages */
.message.chat {
  background: #2c2c2c;
  color: #ffffff;
}

.message.alert {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
.message.capture {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.message.power {
    background: #81df81;
    color: #000000;
    border: 1px solid #81df81;
}


/* Smooth appearance */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
