@keyframes ticker-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes speedhunt-pulse {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.3); filter: brightness(1.5); }
}

@keyframes vehicle-alarm {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 51, 51, 0.7);
    border-radius: 50%;
  }
  50% {
    transform: scale(1.25);
    box-shadow: 0 0 0 15px rgba(255, 51, 51, 0);
    border-radius: 50%;
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 51, 51, 0);
    border-radius: 50%;
  }
}

@keyframes tactical-rec-blink {
  0% { opacity: 0.8; filter: brightness(1.2); }
  100% { opacity: 0.4; filter: brightness(0.8); }
}

@keyframes overlay-enter {
  0% { opacity: 0; filter: blur(4px); }
  100% { opacity: 1; filter: blur(0); }
}

.overlay-enter {
  animation: overlay-enter 0.5s ease-out both;
}

body, html {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

@media screen and (max-width: 650px) {
  body #game-message-layer {
    width: 371px;
    left: calc(50% - 189px);
  }

  body #game-message-content {
    width: 357px;
  }

  body .game-message-from-other div {
    max-width: 300px;
  }

  body .game-message-from-me div {
    max-width: 300px;
  }

  body #game-message-layer input {
    width: 283px !important;
  }

  body #game-images-content-container {
    width: 410px;
  }

  body #game-images-content-container img {
    margin-left: 5px;
    margin-right: 5px;
  }

  body #game-capture-container,
  body #game-system-message-container {
    width: 351px;
  }

  body .game-permission-pedometer {
    width: 332px;
    left: calc(50% - 190px);
  }

  body #gameplay-button-replay {
    left: calc(50% - 185px);
  }

  body .replay-panel {
    width: 349px;
    left: calc(50% - 185px);
  }

  body .replay-controls-row {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  body .playback-buttons, .speed-buttons {
    justify-content: center;
  }

  body #game-scrolling-info-text {
    font-size: 14px;
    line-height: 24px;
  }

}

body .leaflet-interactive {
  cursor: crosshair;
}

.fix-body {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;

  -webkit-overflow-scrolling: auto;
  touch-action: none;
}

.fix-map {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  touch-action: none;
}


.replay-highlight-repeat {
  position: fixed;
  top: 58px;
  z-index: 4001;
  background-color: var(--backgroundColorContent);
  border-radius: 4px;
  padding: 6px 12px;
  margin-left: 10px;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 12px var(--boxShadowColor);
  animation: tactical-rec-blink 1s infinite alternate ease-in-out;
  opacity: 0.8;
}

.replay-highlight-repeat::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #f00;
  border-radius: 50%;
}

#gameplay-button-replay {
  position: fixed;
  top: 58px;
  left: calc(50% - 289px);
  z-index: 4000;
  width: 170px;
}

.game-my-own-marker svg {
  animation: speedhunt-pulse 1.0s infinite alternate;
  filter: drop-shadow(0px 0px 12px var(--color-hunter)) !important;
}

.game-marker-alarm svg {
  animation: vehicle-alarm 1.2s infinite;
  filter: drop-shadow(0px 0px 15px var(--color-player)) !important;
}

.game-marker-captured {
  opacity: 0.4;
}

.game-permission-pedometer {
  position: absolute;
  top: 60px;
  width: 532px;
  height: 200px;
  background-color: var(--backgroundColorContent);
  z-index: 4000;
  border-radius: 10px;
  left: calc(50% - 290px);
  padding-left: 20px;
  padding-right: 20px;
  padding-top: 35px;
  padding-bottom: 10px;
  box-shadow: 0 2px 12px var(--boxShadowColor);
  border-left: 4px solid var(--backgroundColorInfo);
  border-right: 4px solid var(--backgroundColorInfo);
}

#map {
  height: 100vh;
  width: 100%;
}

.leaflet-control-attribution,
.leaflet-control-zoom {
  display: none;
}

.tactical-marker {
  background: transparent !important;
  border: none !important;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible !important;
}

.tactical-marker svg {
  filter: drop-shadow(0px 0px 6px var(--glow-color, rgba(255,255,255,0.5)));
  transition: transform 0.2s ease;
}

.tactical-marker svg:hover {
  transform: scale(1.2);
}

.tactical-marker-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 30px;
  height: 30px;
  position: relative;
}

.marker-label {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
}

.game-menu-top {
  width: 580px;
  height: 50px;
  text-align: left;
  margin: 0 auto;
  position: fixed;
  top: 0px;
  left: calc(50% - 290px);
  background-color: var(--backgroundColorContent);
  overflow: hidden;
  transition: height 0.5s ease-in-out;
  z-index: 1020;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  box-shadow: 0 2px 12px var(--boxShadowColor);
}

.game-menu-bottom {
  width: 580px;
  height: 50px;
  margin: 0 auto;
  position: fixed;
  bottom: 0px;
  left: calc(50% - 290px);
  background-color: var(--backgroundColorContent);
  overflow: visible;
  transition: height 0.5s ease-in-out;
  z-index: 1020;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  box-shadow: 0 -2px 12px var(--boxShadowColor);
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.icons-gamplay-menu-bottom {
  filter: invert(1);
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.2s, filter 0.3s;
}

.icons-gamplay-menu-bottom:hover {
  opacity: 1;
  filter: invert(1) drop-shadow(0 0 6px rgba(0, 240, 255, 0.4));
}

.icons-gamplay-menu-bottom:active {
  transform: scale(0.85);
  opacity: 0.6;
}

.icon-game-camera {
  width: 35px;
  height: 37px;
}

.icon-game-message {
  width: 35px;
  height: 40px;
}

.icon-game-reload {
  width: 35px;
  height: 30px;
}

.icon-game-back {
  width: 35px;
  height: 30px;
}

.icon-is-tracking-mode {
  opacity: 0.75;
  transition: opacity 0.3s, transform 0.2s;
  font-size: 39px;
  font-weight: 900;
  color: var(--textColorHeadline);
  cursor: pointer;
  margin: -4px 0 0 0;
}

.icon-is-tracking-mode:hover {
  opacity: 1;
  text-shadow: 0 0 12px var(--color-hunter, #00f0ff);
}

.icon-is-tracking-mode:active {
  transform: scale(0.85);
  opacity: 0.6;
}

#game-scrolling-info-text-container {
  position: absolute;
  right: 15px;
  top: 12px;
  max-width: 450px;
  overflow: hidden;
  white-space: nowrap;
  left: 50px;
  min-width: 500px;
}

#game-scrolling-info-text {
  position: relative;
  font-size: 19px;
  top: 0px;
  opacity: 0.8;
}

#game-scrolling-info-text .ticker-cursor {
  display: inline;
  margin-left: 2px;
  animation: ticker-cursor 0.7s step-end infinite;
  color: var(--color-hunter, #00f0ff);
}

#map p {
  margin-top: 0px;
  margin-bottom: 0px;
}

#game-message-layer {
  position: absolute;
  top: 60px;
  width: 571px;
  height: calc(100vh - 220px);
  background-color: var(--backgroundColorContent);
  z-index: 4000;
  border-radius: 10px;
  left: calc(50% - 290px);
  box-shadow: 0 2px 12px var(--boxShadowColor);
  border-left: 4px solid var(--backgroundColorPrimary);
  border-right: 4px solid var(--backgroundColorPrimary);
}

#game-message-content {
  position: relative;
  top: 10px;
  left: 10px;
  width: 555px;
  height: calc(100% - 70px);
  margin-bottom: 20px;
  text-align: left;
  overflow: hidden;
}

#game-message-layer input {
  width: 480px !important;
  margin-right: 3px;
}

.new-gameplay-message-button {
  height: 30px;
  width: 40px;
  cursor: pointer;
}

.new-gameplay-message-button img {
  width: 24px;
  height: 24px;
  filter: invert(1);
  position: relative;
  top: -4px;
  left: -5px;
  opacity: 0.7;
  pointer-events: none;
}

.game-menu-bottom-message-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-new-message {
  pointer-events: none;
  width: 19px;
  height: 19px;
  position: absolute;
  top: 0px;
  right: -8px;
  z-index: 6000;
}

.game-message-from-me {
  margin-bottom: 10px;
}

.game-message-from-me div {
  border-radius: 5px;
  background-color: var(--backgroundColorMyOwnMessage);
  padding: 5px;
  padding-bottom: 1px;
  max-width: 480px;
  margin-left: auto;
  color: #fff;
  border: 1px solid var(--borderColor);
  box-shadow: 0 4px 12px var(--boxShadowColor);
  border-bottom-right-radius: 0px;
}

.game-message-from-other {
  margin-bottom: 10px;
}

.game-message-from-other div {
  border-radius: 5px;
  background-color: var(--backgroundColorContentContainer);
  padding: 5px;
  padding-bottom: 1px;
  max-width: 480px;
  border: 1px solid var(--borderColor);
  box-shadow: 0 4px 12px var(--boxShadowColor);
  border-bottom-left-radius: 0px;
}

.game-message-from-me div p,
.game-message-from-other div p {
  width: 100%;
  text-align: right;
  font-size: 13px;
  margin-top: 5px;
}

.game-message-footer {
  margin-bottom: 5px;
}

#game-images-content-container {
  width: 595px;
  margin-left: -4px;
  text-align: left;
}

#game-images-content-container img {
  margin-left: 6px;
  margin-right: 6px;
  margin-bottom: 6px;
}

.delete-game-image-button {
  position: absolute;
  width: 25px;
  height: 25px;
  background-color: #000000;
  opacity: 0.5;
  top: 7px;
  right: 12px;
  border-radius: 13px;
  cursor: pointer;
}

.delete-game-image-button img {
  width: 15px;
  height: 15px;
  filter: invert(1);
  position: absolute;
  top: 4px;
  left: 5px;
  pointer-events: none;
  margin-left: 0px !important;
  margin-right: 0px !important;
}

#game-capture-container {
  position: fixed;
  top: 58px;
  background-color: var(--backgroundColorContent);
  width: 552px;
  height: 200px;
  padding: 10px;
  padding-left: 0px;
  padding-right: 0px;
  overflow: hidden;
  z-index: 5000;
  margin-left: 10px;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 2px 12px var(--boxShadowColor);
  border-left: 4px solid var(--backgroundColorDanger);
  border-right: 4px solid var(--backgroundColorDanger);
}

#game-capture-ok-button {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: calc(100% - 20px);
}

#game-capture-container input[type="checkbox"] {
  position: relative;
  top: 1px;
  margin-right: 7px;
}

#game-system-message-container {
  position: fixed;
  top: 58px;
  background-color: var(--backgroundColorContent);
  width: 552px;
  height: 200px;
  padding: 10px;
  padding-left: 0px;
  padding-right: 0px;
  overflow: hidden;
  z-index: 5000;
  margin-left: 10px;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 2px 12px var(--boxShadowColor);
  border-left: 4px solid var(--backgroundColorWarning);
  border-right: 4px solid var(--backgroundColorWarning);
}

#game-system-message-container .game-system-message {
  background-color: var(--backgroundColorContentContainer);
  text-align: left;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.game-info-small {
  font-size: 14px;
}

#game-system-message-container input[type="checkbox"] {
  position: relative;
  top: 1px;
  margin-right: 7px;
}

#game-system-messages {
  height: calc(100% - 32px);
  overflow: hidden;
}

#game-system-messages-ok-button {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: calc(100% - 20px);
}

.replay-panel {
  background-color: var(--backgroundColorContent);
  border-radius: 10px 10px 10px 10px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: fixed;
  bottom: 59px;
  z-index: 5000;
  width: 550px;
  left: calc(50% - 290px);
  box-shadow: 0 -2px 12px var(--boxShadowColor);
}

.replay-timeline-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

#replay-slider {
  flex-grow: 1;
  -webkit-appearance: none;
  appearance: none;
  background: var(--backgroundColorContentContainer);
  height: 6px;
  border-radius: 3px;
  outline: none;
  border: 1px solid var(--borderColor);
}

#replay-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--textColorHeadline);
  cursor: pointer;
  box-shadow: 0 0 8px var(--textColorHeadline);
  opacity: 0.8;
}

#replay-clock {
  font-size: 1.1rem;
  color: var(--color-system);
  min-width: 80px;
  text-align: right;
}

.replay-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-tactical, .btn-speed {
  background: transparent;
  border: 1px solid var(--borderColor);
  color: var(--color-text);
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-tactical:hover, .btn-speed:hover {
  border-color: var(--color-hunter);
  color: var(--color-hunter);
}

.btn-active {
  background-color: rgba(0, 240, 255, 0.1) !important;
  border-color: var(--color-hunter) !important;
  color: var(--color-hunter) !important;
}

.playback-buttons, .speed-buttons {
  display: flex;
  gap: 8px;
}

#icon-game-state-stop {
  position: absolute;
  top: 8px;
  left: 10px;
  width: 30px;
  height: 30px;
}