:root {
  --bg: #f4f4f4;
  --text: #111;
  --slot-bg: #fff;
  --border: #aaa;
  --mainback:rgba(255,255,255,.30);
}
* {
  box-sizing: border-box;
}
@font-face {
  font-family: pirates;
  src: url('fonts/JackPirate.ttf');
}
body {
  font-family: pirates, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, "sans-serif";
  font-size: 1.2em;
  text-align: center;
  background: var(--bg);
  color: var(--text);
  background-image: url("../media/pirateShipBackground.jpg");
  width: 80%;
  margin-left: auto;
  margin-right: auto;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  padding-left: 0px;
  padding-right: 0px;
}
body.dark {
  --bg: #1e1e1e;
  --text: #eee;
  --slot-bg: #333;
  --border: #666;
  --mainback:rgba(100,100,100,.50);
}
body.coins {
  --bg: #797b80;
  --text: #111;
  --slot-bg: #d6c372;
  --border: #c69426;
  --mainback:rgba(250,250,210,.50);	
}
#navbar {
  overflow: hidden;
  background-color: #333;
  margin-top: 0;
  padding: 10px;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
#navbar a {
  float: left;
  display: block;
  color: #f2f2f2;
  text-align: center;
  padding: 5px 10px;
  text-decoration: none;
  font-size: 17px;
}
#navbar a:hover {
  background-color: silver;
  color: black;
}
#navbar a.active {
  background-color: darkblue;
  color: white;
}
h1, h3 {
  margin-top: 10px;
  color: white;
  text-shadow: 2px 2px black;
}
.controls {
  margin: 10px;
}
button, select {
  padding: 8px 12px;
  margin: 3px;
}
main{
	background:var(--mainback);
	width:90%;
	margin-right:auto;
	margin-left:auto;
	margin-top:-10px;
}
/* Palette Emojis */
#palette {
  margin: 10px;
}
.emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  width: 60px;
  height: 60px;
  margin: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 12px;
  transition: transform 0.15s;
}
.emoji:hover {
  transform: scale(1.15);
}
.emoji.selected {
  border-color: #007bff;
}
/* Slots */
.slot {
  width: 70px;
  height: 70px;
  border: 2px dashed var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 5px;
  background: var(--slot-bg);
  transition: all 0.15s;
  font-size: 40px;
  position: relative;
}
.slot.filled {
  animation: pop 0.2s;
}
.slot.hover {
  border-color: #28a745;
  transform: scale(1.08);
  z-index: 500;
}
@keyframes pop {
  from {
    transform: scale(0.6);
  }
  to {
    transform: scale(1);
  }
}
/* Feedback Pegs */
.feedback {
  display: inline-grid;
  grid-template-columns: repeat(2, 12px);
  gap: 3px;
  margin-left: 8px;
}
.peg {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.5);
  animation: pegPop 0.3s forwards;
}
.peg.black {
  background: black;
}
.peg.white {
  background: white;
  border: 1px solid #999;
}
@keyframes pegPop {
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* Solution row */
#solutionContainer {
  display: none;
  margin-top: 10px;
}
.solution-slot {
  width: 70px;
  height: 70px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 4px;
  border: 2px solid var(--text);
  background: var(--slot-bg);
  font-size: 50px;
  opacity: 0;
  transform: scale(0.5);
  animation: revealPop 0.4s forwards;
}
@keyframes revealPop {
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* Message */
#message {
  margin-top: 10px;
  font-size: 18px;
  font-weight: bold;
}
.win {
  animation: bounce 0.5s infinite alternate;
  font-size:2em;
}
@keyframes bounce {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-4px);
  }
}
/* Modal background */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}
/* Modal content box */
.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 50%;
  border-radius: 5px;
  position: relative;
}
/* Close button */
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 15px;
}
.close:hover, .close:focus {
  color: black;
  text-decoration: none;
}