body{
  background-color: #787878;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif
}

h1{
  text-align: center;
}

/* 
=======================
TOOL BAR
=======================
*/

#toolbar {
  position: fixed;
  top: 10px;
  left: 10px;

  display: flex;
  align-items: center;   
  gap: 10px;           

  background: white;
  border: 1px solid #ccc;
  padding: 8px;
  border-radius: 6px;

  z-index: 1000;
}

.toolbar-button {
  border-radius: 4px;
  padding: 8px;
  border-color: transparent;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif
}

.toolbar-button:hover {
  transform: scale(1.1);
  background-color: rgb(42, 42, 42) !important;
  color: white;
  transition-duration: 0.4s
}

/* 
=======================
COLOR CHOICE BUTTONS
=======================
*/
#colorControls {
  display: flex;
  gap: 5px;
}

.color-button {
  width: 30px;
  height: 30px;
  margin: 2px;
  border: 2px solid #555;
  cursor: pointer;
  outline: none;
  padding: 0;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
  display: inline-block;
}

.color-button[data-color="#c3e7ee"] { background-color: #c3e7ee; }
.color-button[data-color="#ff8383"] { background-color: #ff8383; }
.color-button[data-color="#a1d6b5"] { background-color: #a1d6b5; }
.color-button[data-color="#fff574"] { background-color: #fff574; }
.color-button[data-color="#a19ad3"] { background-color: #a19ad3; }
.color-button[data-color=""] { background-color: transparent; border: 2px dashed #aaa; }

.color-button:hover {
  transform: scale(1.1);
}

.color-button.active-color {
  border: 1.5px solid #0f0f0f;
  box-shadow: 0 0 6px 1px #0f0f0f;
  transform: scale(1.2);
}

#timer {
  margin-left: auto;
}

/* 
=======================
GAME BOARD
=======================
*/


#container {
  display: grid;
  grid-template-columns: repeat(45, 120px);
  grid-auto-rows: 120px;                    
  gap: 4px;
  width: max-content;  
  border: 1px solid transparent;
  margin-top: 80px;
  border-top: transparent;

  scrollbar-width: 1px;
  scrollbar-color: rgba(0,0,0,0.4) transparent;
}

.grid-cell {
  width: 120px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.group-button {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center; 
  align-items: center;
  box-sizing: border-box;
  padding: 4px;
  font-size: 11px;

  background-color: #f7f7f7;
  border-radius: 4px;
  border: 2px solid #555;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;


}

.group-button:hover {
  background-color: rgb(42, 42, 42) !important;
  color: white;
  transition-duration: 0.4s;

  scrollbar-width: 2px;
  scrollbar-color: rgba(196, 196, 196, 0.4) transparent
}

.group-button.has-count {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.group-button .count {
  font-weight: bold;
  color: rgb(71, 71, 255);
  font-size: 18px;
  flex-shrink: 0;
}

.group-button .items {
  font-size: 10px;
  text-align: center;
  margin-top: 2px;
  overflow-y: auto;
  width: 100%;
  flex-grow: 0.3;
}

/* 
=======================
BUTTON SELECTIONS
=======================
*/

.group-button.selected {
  outline: 3px solid rgb(39, 223, 39);
  transform: scale(1.08);
}
  
.group-button.mismatch {
  outline: 3px solid red;
  transform: scale(1.08);
}



/* 
=======================
INFO POP UP INFORMATION
=======================
*/

.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 18px;
  border: none;
  background: transparent;
  cursor: pointer;
}


/* 
=======================
WIN
=======================
*/

#winOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.6); 
  z-index: 9999;
}

#winContent {
  color: white;
  text-align: center;
  font-size: 40px;
  font-weight: bold;
  z-index: 2;
}

#confettiCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}