@font-face {
  font-family: 'CutePixel';
  src: url('./fonts/CutePixel.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

body {
  margin: 0;
  background-image: url("./bg.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  font-family: "CutePixel", monospace, sans-serif;
}

p {
  font-family: "CutePixel", monospace, sans-serif;
  line-height: 1.4;
  font-size: 1.125rem;
  text-align: center;
  width: 50vw;
}

@media (max-width: 768px) {
  p {
    width: 90vw;
  }
}

span, p, button, .killscreen-message, h2, .facit-item-wrapper {
  font-size: 2rem;
  color: rgb(255, 255, 255);
  font-family: "CutePixel", monospace, sans-serif;
  text-shadow: 
  -0.06rem -0.06rem 0 #000, 
  0.06rem -0.06rem 0 #000, 
  -0.06rem 0.06rem 0 #000, 
  0.06rem 0.06rem 0 #000, 
  0.1rem 0.1rem rgb(169, 169, 169),
  0.2rem 0.2rem rgb(169, 169, 169),
  0.25rem 0.25rem rgb(169, 169, 169);
}

@keyframes dragDemo {
  0% {
    transform: translateX(0) translateY(0) scale(1);
    z-index: 10;
  }
  30% {
    transform: translateX(120px) translateY(150px) scale(0.9);
    z-index: 10;
  }
  100% {
    transform: translateX(0) translateY(0) scale(1);
    z-index: 10;
  }
}

.in-game-button {
  font-size: 2rem;
}

.drag-demo {
  animation: dragDemo 2.5s ease-in-out;
  position: relative;
  display: hidden;
}

h1 {
  font-family: "CutePixel", monospace, sans-serif;
  font-weight: 700;
  color: rgb(240, 239, 237);
  text-shadow: 
    -0.1rem -0.1rem 0 #000,
     0.1rem -0.1rem 0 #000,
    -0.1rem 0.1rem 0 #000,
     0.1rem 0.1rem 0 #000,
     0.1rem 0.1rem rgb(169, 169, 169),
     0.1rem 0.2rem rgb(169, 169, 169),
     0.3rem 0.3rem rgb(169, 169, 169),
    0.4rem 0.4rem rgb(169, 169, 169);
  letter-spacing: 0.2rem;
  font-size: 3rem;
}


h2, h3, h4, h5, h6 {
  font-family: "CutePixel", monospace, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
}

header {
  h1 {
    font-size: 5rem;
    margin: 0;
  }
}

.game-wrapper,
.lobby-wrapper,
.killscreen,
header {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hidden {
  display: none !important;
}

.timeline {
  width: 100%;
  height: 30vh;
  display: flex;
  list-style-type: none;
  padding: 0;
  gap: 10px;
  padding: 10px 0;
  justify-content: space-around;
  position: relative;
  perspective: 1000px;

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.5);
    clip-path: polygon(
      0% 0%,
      95% 0%,
      100% 50%,
      95% 100%,
      0% 100%,
      5% 50%
    );
    z-index: -1;
  }

  img {
    object-fit: cover;
    display: flex;
    height: 100%;
    transition: transform 0.3s ease, margin 0.3s ease;
    margin: 0 -40px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
  }
}


button {
  font-family: "CutePixel", monospace, sans-serif;
  align-items: center;
  border: 2px solid black;
  border-radius: 8px;
  box-sizing: border-box;
  display: inline-flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  background: white;
  cursor: pointer;
  font-size: 1.1em;
  height: 48px;
  line-height: normal;
  padding: 15px 30px;
  transition: all 0.3s ease;
}

button:hover {
  background: #f5f5f5;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Lobby Styles */
.killscreen,
.lobby-container {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 5px 10px 5px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-width: 90vw;
}

.lobby-container {
  .lobby-title {
    height: 3.5em;
    width: auto;
    margin: 0 0 20px 0;
    object-fit: contain;
  }

  .game-themes-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
  }

  .game-theme-wrapper {
    position: relative;
    cursor: pointer;
  }

  .game-theme-button {
    width: 100%;
    background: rgb(232, 229, 223);
    border: 2px solid black;
    padding: 15px 30px;
    border-radius: 8px;
    font-family: "CutePixel", monospace, sans-serif;
    font-weight: 400;
    font-size: 1.1em;
    text-transform: uppercase;
    color: black;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .game-theme-button img {
    max-width: 100%;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
  }

  .game-theme-wrapper:hover .game-theme-button {
    background: #f5f5f5;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
}

.killscreen {
  position: fixed;
  top: 200px;
  z-index: 2;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 1024 / 703;
  background-position: center;
  max-width: 90vw;

  &.happy-boy {
    background-image: url("images/runny-boy.png");
  }

  &.bikey-boy {
    background-image: url("images/bikey-boy.png");
  }

  &.crashy-boy {
    background-image: url("images/crashy-boy.png");
  }

  &.fally-boy {
    background-image: url("images/fally-boy.png");
  }

  &.thinky-boy {
    background-image: url("images/fally-boy.png");
  }

  .killscreen-message {
    margin-top: 0;
    font-size: 2em;
  }
}

.card-holder {
  height: 300px;
  min-width: 175px;
  background: rgba(255,255,255,.5);

  img {
    height: 100%;
  }
}

.arrow {
  opacity: 1;
  position: absolute;
  left: 50%;
  top: 42vh;
  transform: translateY(-50%) translateX(50%);
  z-index: 2;
  transition: opacity 7s linear;
  pointer-events: none;
}

.dragging {
  outline: dashed 10px rgba(100,100,100,0.5);
  transform: scale(0.85);
}

img[draggable="true"] {
  cursor: grab;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: auto;
}

@media (max-width: 768px) {
  .arrow {
    display: none;
  }
}

.facit {
  margin-top: 20px;
  background-color: #caba64;
  text-align: center;

  .facit-list {
    background-color: #caba64;
  }

  .facit-list {
    margin-top: 0;
    padding-bottom: 20px;
  }

  .facit-headline {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 4px;
    display: inline-block;
    font-style: italic;
    padding: 5px 34px 10px 24px;
    color: #caba64;
    background-color: black;
  }

  .facit-item-wrapper {
    font-family: "CutePixel", monospace, sans-serif;
    font-size: 1.5em;
    text-align: center;
  }
}
