body {
    margin: 0;
    font-family: sans-serif;
}

header, footer {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 100;
}

header {
  top: 0;
}

footer {
  bottom: 0;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 999px;
}

/* Chrome/Safari track must be transparent */
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: transparent;
}

/* Chrome/Safari thumb */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: -5px;
  width: 32px;
  height: 16px;
  border-radius: 8px;
  box-shadow: 1px 1px 2px 0 rgba( 0, 0, 0, 0.3 );
  border: 3px solid #fefefe;
}

input[type="range"].red {
  --thumb-color: #f00;
}

input[type="range"].green {
  --thumb-color: #0f0;
}

input[type="range"].blue {
  --thumb-color: #00f;
}

input[type="range"]::-webkit-slider-thumb {
  background: var(--thumb-color);
} 

/* Firefox */
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: transparent;
}

input[type="range"]::-moz-range-thumb {
  width: 32px;
  height: 16px;
  border-radius: 8px;
  background: white;
  box-shadow: 1px 1px 2px 0 rgba( 0, 0, 0, 0.3 );
}

.game {
    height: 100dvh;
    position: relative;
}

.hidden {
  display: none;
}

#target, #result {
  filter: brightness(0.8) saturate(0.8);
}

#target {
    height: 40%;
}

#result {
    height: 60%;
    background-color: #eee;
    transition: background-color 300ms ease;
}

.polaroid-effect {
    background-color: white;
    box-shadow: 0 4px  10px 0 rgba( 0, 0, 0, 0.3 ),
                0 0 4rem rgba( 255, 255, 235, 0.5 ) inset;
}

#polaroid-container {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-3deg);
  display: flex;
  align-items: flex-end;
}

#polaroid {
    position: relative;
    width: 12rem;
    height: 16rem;
    padding: 1rem;
    background-color: white;
    box-shadow: 0 4px  10px 0 rgba( 0, 0, 0, 0.3 ),
                0 0 4rem rgba( 255, 255, 235, 0.5 ) inset;
    z-index: 2;
}

#polaroid::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.24;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.3'/%3E%3C/svg%3E");
    pointer-events: none;
}

#polaroid-result, #polaroid-target {
  width: 100%;
  height: 6rem;
  box-sizing: border-box;
  border: none;
  transition: background-color 300ms ease;
}

#score {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  font-weight: bold;
  mix-blend-mode: difference;
  color: rgba(255, 255, 255, 1);
}

#polaroid-content {
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#hint-ribbons {
  width: 90px;
  z-index: 1;
}

.hint {
  background-color: white;
  margin-bottom: 4px;
  padding: 2px 0px 2px 10px;
  font-size: 0.6rem;
  box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.4);

  clip-path: polygon(
    0 0,
    100% 0,
    86% 50%,
    100% 100%,
    0 100%
  );
}

#input-section {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, 0%);
    width: 90%;
}

#sliders-overlay {
    position: relative;
    top: 2rem;
}

#show-guesses-btn {
  height: 2rem;
  font-size: 0.8rem;
  padding: 0px 8px 0px 8px;
  background-color: white;
  border: none;
  border-radius: 4px;
}

#guess-section {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

#submit {
  margin-top: 3rem;
  margin-left: 10%;
  border-radius: 16px;
  width: 80%;
  height: 3rem;
  font-size: 1rem;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 0 2px 4px 0 rgba( 0, 0, 0, 0.3 );
  cursor: pointer;

  transition:
    transform 80ms ease,
    box-shadow 80ms ease,
    filter 80ms ease;
}

#submit:active {
  transform: translateY(2px) scale(0.99);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
  filter: brightness(0.95);
}

/* copy-pasted */
.hex-input-slider-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.hex-input-slider-entity {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding: 1px 16px 1px 16px;
  margin-bottom: 4px;
  background-color: white;
  border-radius: 2px;
}

.hex-input-slider-entity::before,
.hex-input-slider-entity::after {
  content: '';
  position: absolute;
  bottom: 7px;
  width: 40%;
  height: 3px;
  box-shadow: 0 3px 6px rgba(0,0,0,.7);
  z-index: -1;
  transition: all .3s ease-in-out;
}

.hex-input-slider-entity::before {
  left: 12px;
  transform: skew(-5deg) rotate(-5deg);
}

.hex-input-slider-entity::after {
  right: 12px;
  transform: skew(5deg) rotate(5deg);
}

.hex-input-slider-entity:hover::before,
.hex-input-slider-entity:hover::after {
  box-shadow: 0 2px 14px rgba(0,0,0,.4);
}

.hex-input-slider-entity:hover::before {
  left: 5px;
}

.hex-input-slider-entity:hover::after {
  right: 5px;
}

.hex-input-slider {
  width: 100%;
  box-sizing: border-box;
}

.slider-wrapper {
    position: relative;
    width: 100%;
}

.slider-wrapper input {
    width: 100%;
}

.marker {
    position: absolute;
    top: 50%;
    width: 4px;
    height: 10px;
    background: white;
    transform: translate(0, -50%);
    pointer-events: none;
}

.guess-box-container {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.guess-box {
  padding: 5px;
  border-radius: 3px;
}

.guess-box-color {
  width: 22px;
  height: 22px;
}

.hex-container {
  display: flex;
  justify-content: center;
  gap: 4px;
  font-size: 2.5rem;
  font-weight: bold;
}

.modal {
  position: fixed;
  background-color: white;
  top: 50%;
  left: 30%;
  min-width: 70%;
  transform: translate(-30%, -50%);
  border-radius: 8px;
  padding: 36px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.overlay.show {
  display: block;
}

.pill {
  width: fit-content;
  color: #333;

  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}