body {
  margin: 0;
  overflow: hidden;
  font-family: Arial;
  background: #1a1a1a;
  color: rgb(255, 255, 255);
}

button {
  --green: #ffffff;
  font-size: 50px;
  padding: 0.7em 2.7em;
  letter-spacing: 0.06em;
  position: relative;
  font-family: inherit;
  border-radius: 0.6em;
  overflow: hidden;
  transition: all 0.3s;
  line-height: 1.4em;
  border: 2px solid var(--green);
  background: linear-gradient(to right, rgba(255, 255, 255, 0.1) 2%, transparent 40%,transparent 60% , rgb(254, 254, 254) 100%);
  color: var(--green);
  box-shadow: inset 0 0 10px #c1c7c466, 0 0 9px 3px rgba(255, 255, 255, 0.1);
  background: var(--bg) center/cover no-repeat;
}

button:hover {
  color: #3634bc;
  box-shadow: inset 0 0 10px rgba(125, 153, 255, 0.6), 0 0 9px 3px rgba(117, 164, 226, 0.2);
}

button:before {
  content: "";
  position: absolute;
  left: -4em;
  width: 4em;
  height: 100%;
  top: 0;
  transition: transform .4s ease-in-out;
  background: linear-gradient(to right, transparent 1%, rgba(27, 253, 156, 0.1) 40%,rgba(27, 253, 156, 0.1) 60% , transparent 100%);
}

button:hover:before {
  transform: translateX(15em);
}

#startScreen {
  position: fixed;
  width: 100vw;
  height: 100vh;
  background: url("images/screenshot.jpg") center/cover no-repeat;
}

h1 {
  position: relative;
  padding: 10;
  margin: 10;
  font-family: "impact", sans-serif;
  font-weight: 300;
  font-size: 120px;
  color: #d3cece;
  -webkit-transition: all 0.4s ease 0s;
  -o-transition: all 0.4s ease 0s;
  transition: all 0.4s ease 0s;
  left: 1%;
}

#screenshot {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 0;
}

#mapContainer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10;
}

#mapContainer:hover #mapViewport {
  width: 800px;
  height: 679px;
}

#mapViewport {
  width: 320px;
  height: 220px;
  overflow: hidden;
  border-radius: 10px;
  border: 2px solid white;
  position: relative;
  background: transparent;
  transition: all 0.25s ease;
}

#mapWrapper {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  cursor: grab;
}

#mapWrapper:active {
  cursor: grabbing;
}

#map {
  width: 4334px;
  height: 3680px;
  pointer-events: none;
}

/* Marker */
#marker {
  width: 40px;
  position: absolute;
  transform: translate(-50%, -50%);
  display: none;
}

/* Bossbar */
#bossbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 20px;
  background: #2a2a2a;
  border: 2px solid #000;
  border-radius: 6px;
  overflow: hidden;
  z-index: 20;
}

#bossbar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(to right, #a000ff, #ff00ff);
  transition: width 1s linear;
}

#coords {
  position: fixed;
  top: 1000px;
  left: 20px;
  font-size: 18px;
}

#guessBtn {
  width: 100%;
  margin-top: 5px;
  padding: 8px;
}

/* richtiger Punkt */
#realMarker {
  width: 20px;
  position: absolute;
  transform: translate(-50%, -50%);
  display: none;
}

#line {
  position: absolute;
  height: 4px;

  background: linear-gradient(90deg, #ff0000, #e45151);

  border-radius: 10px;

  box-shadow:
    0 0 10px rgba(255, 0, 0, 0.8),
    0 0 20px rgba(236, 57, 57, 0.5);

  transform-origin: 0 50%;
  pointer-events: none;

  opacity: 0;
  transition: opacity 0.3s ease;
  animation: pulseline 1.5s infinite;
}

@keyframes pulseLine {
  0% { box-shadow: 0 0 5px rgba(255, 0, 0, 0.6); }
  50% { box-shadow: 0 0 20px rgb(255, 58, 58); }
  100% { box-shadow: 0 0 5px rgba(243, 4, 4, 0.6); }
}

/* große Map nach Guess */
#mapContainer.fullscreen {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: auto;
  height: auto;

  background: transparent;
  padding: 20px;
  border-radius: 12px;

  z-index: 999;
}

#mapContainer.fullscreen #guessBtn {
  display: none;
}

#mapContainer.fullscreen #mapViewport {
  width: 900px; 
  height: 760px;  
}

#skinPreview {
  image-rendering: pixelated;
  border-radius: 8px;
}

#playerUI {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
}

#playerSkin {
  width: 100px;
  image-rendering: pixelated;
}

#startOverlay {
  display: flex;
  gap: 60px;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 40px;
  border-radius: 12px;
}

#leftPanel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#rightPanel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#rightPanel h1 {
  margin: 0;
}

#usernameInput {
  margin: 30px;
  background: url("images/Button.jpg") center/cover no-repeat;
  border: none;
  outline: none;
  max-width: 450px;
  padding: 10px 20px;
  font-size: 50px;
  border-radius: 9px;
  box-shadow: inset 2px 5px 10px rgb(255, 255, 255);
  color: #e0f4ea;
  text-align: center;
}

#titleBlock {
  position: absolute;
  top: 50%;
  left: 20%;
  transform: translate(-50%, -50%);
  display: flex;
  background: transparent;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  flex-direction: column;
  gap: 100px;
  z-index: 10;
}

#skinBlock {
  position: absolute;
  top: 75%;
  left: 68%;
  transform: translateY(-50%);
  z-index: 10;
  background: transparent;
  padding: 25px;
  border-radius: 12px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

#skinPreview {
  width: 300px;
  height: 300px;
  image-rendering: pixelated;
  border-radius: 8px;
}

#leaderboard {
  position: absolute;
  right: 10%;
  top: 5%;
  width: 500px;

  background: rgba(0,0,0,0.6);
  padding: 30px;
  border-radius: 10px;

  z-index: 5;
}

#leaderboard h2 {
  margin-top: 0;
  text-align: center;
  font-size: 50px;
}

#leaderboardList {
  font-size: 34px;
}

#leaderboardBox {
  position: fixed;
  right: 10%;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.7);
  padding: 30px;
  border-radius: 20px;
}

.lb-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 6px;
  margin-bottom: 5px;
  background: rgba(255,255,255,0.05);
  transition: transform 0.15s;
}

.lb-entry:hover {
  transform: scale(1.06);
}

.lb-skin {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
}

.rank {
  width: 25px;
}

.name {
  flex: 1;
}

.score {
  font-weight: bold;
}

.gold {
  background: linear-gradient(90deg, #ffd70033, #ffd70088);
  border: 1px solid gold;
}

.silver {
  background: linear-gradient(90deg, #c0c0c033, #c0c0c088);
  border: 1px solid silver;
}

.bronze {
  background: linear-gradient(90deg, #cd7f3233, #cd7f3288);
  border: 1px solid #cd7f32;
}

#bigScore {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);

  font-size: 60px;
  font-weight: bold;

  background: rgba(0,0,0,0.7);
  padding: 20px 40px;
  border-radius: 12px;

  z-index: 999;
  display: none;

  text-shadow: 0 0 20px rgba(0,0,0,0.8);
  animation: pop 0.4s ease;
}

@keyframes pop {
  0% { transform: translateX(-50%) scale(0.5); opacity: 0; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

#popup {
  position: fixed;
  top: 120%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8);
  padding: 30px;
  border-radius: 12px;
  z-index: 9999;
  display: none;
  text-decoration: none;
}

#creator {
  position: absolute;
  right: 10%;
  top: 5%;
  width: 500px;

  background: transparent;
  padding: 30px;
  border-radius: 10px;

  z-index: 5;
}

#creator h2 {
  margin-top: 0;
  text-align: center;
  font-size: 50px;
}

#profilbild {
  width: 150px;
  height: 150px;
  border-radius: 100px;
  display: block;
  margin: 0 auto 20px auto;
}

#youtubeLink {
  display: block;
  text-align: center;
  color: #e0f4ea;
  text-decoration: none;
    --green: #ffffff;
  font-size: 20px;
  padding: 0.7em 2.7em;
  letter-spacing: 0.06em;
  position: relative;
  font-family: inherit;
  border-radius: 0.6em;
  overflow: hidden;
  transition: all 0.3s;
  line-height: 1.4em;
  border: 2px solid var(--green);
  background: linear-gradient(to right, rgba(255, 255, 255, 0.1) 2%, transparent 40%,transparent 60% , rgb(254, 254, 254) 100%);
  color: var(--green);
  box-shadow: inset 0 0 10px #c1c7c466, 0 0 9px 3px rgba(255, 255, 255, 0.1);
  background: url("images/Button-yt.png") center/cover no-repeat;
}

#startBtn { --bg: url("images/Button.jpg"); }
#multiplayerBtn { --bg: url("images/Button-multi.png"); }
#wieBtn { --bg: url("images/Button-wie.jpg"); }
#guessBtn { --bg: url("images/Button.jpg"); }
#backBtn { --bg: url("images/Button.jpg"); }

#twitchLink {
  margin-top: 20px;
  display: block;
  text-align: center;
  color: #e0f4ea;
  text-decoration: none;
    --green: #ffffff;
  font-size: 20px;
  padding: 0.7em 2.7em;
  letter-spacing: 0.06em;
  position: relative;
  font-family: inherit;
  border-radius: 0.6em;
  overflow: hidden;
  transition: all 0.3s;
  line-height: 1.4em;
  border: 2px solid var(--green);
  background: linear-gradient(to right, rgba(255, 255, 255, 0.1) 2%, transparent 40%,transparent 60% , rgb(254, 254, 254) 100%);
  color: var(--green);
  box-shadow: inset 0 0 10px #c1c7c466, 0 0 9px 3px rgba(255, 255, 255, 0.1);
  background: url("images/Button-twitch.png") center/cover no-repeat;
}

#dcLink {
  margin-top: 20px;
  display: block;
  text-align: center;
  font-size: 20px;
  color: #e0f4ea;
  text-decoration: none;
    --green: #ffffff;
  padding: 0.7em 2.7em;
  letter-spacing: 0.06em;
  position: relative;
  font-family: inherit;
  border-radius: 0.6em;
  overflow: hidden;
  transition: all 0.3s;
  line-height: 1.4em;
  border: 2px solid var(--green);
  background: linear-gradient(to right, rgba(255, 255, 255, 0.1) 2%, transparent 40%,transparent 60% , rgb(254, 254, 254) 100%);
  color: var(--green);
  box-shadow: inset 0 0 10px #c1c7c466, 0 0 9px 3px rgba(255, 255, 255, 0.1);
  background: url("images/Button.jpg") center/cover no-repeat;
}

#endScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("images/screenshot.jpg") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

#endBox {
  text-align: center;
  background: transparent;
  padding: 40px;
  border-radius: 15px;
}

#finalScore {
  font-size: 80px;
  font-weight: bold;
  margin: 20px 0;
  color: gold;
  text-shadow: 0 0 20px gold;
  animation: pop 0.5s ease;
}

@keyframes pop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

#Icon {
  margin-left: 50px;
  width: 150px;
  height: 150px;
  image-rendering: pixelated;
}

#Icon, h1 {
  display: inline-block;
  vertical-align: middle;
}

@media (max-width: 768px) {
  #mapContainer.fullscreen #mapViewport {
  width: 95vw;
  height: 60vh;
}

#mapWrapper {
  touch-action: none;
}

#guessBtn {
  font-size: 24px;
  padding: 15px;
}

#playerSkin {
  width: 50px;
}

#bossbar {
  width: 80%;
}

h1 {
  font-size: 50px;
}

#finalScore {
  font-size: 40px;
}

#bigScore {
  font-size: 30px;
}

#titleBlock {
  position: static;
  transform: none;
  width: 100%;
  align-items: center;
}

#skinBlock {
  position: static;
  transform: none;
  width: 100%;
}

#titleBlock {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#skinPreview {
  width: 150px;
  height: 150px;
}

@media (max-width: 768px) {
  #mapContainer:hover #mapViewport {
    width: 320px;
    height: 220px;
  }
}

@media (max-width: 768px) {
  #mapViewport {
    width: 90vw;
    height: 50vh;
  }
}
}