body {
  margin: 0;
  overflow: hidden;
  font-family: "Courier New", monospace;
  color: #ff3333;
  background-color: #000;
}

/* Mobile menu adjustments */
.hamburger-menu {
  display: none;
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 200;
  cursor: pointer;
  background: rgba(10, 0, 0, 0.8);
  padding: 10px;
  border-radius: 3px;
  border: 1px solid #ff0000;
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background-color: #ff0000;
  transition: all 0.3s;
}

#menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 0, 0, 0.8);
  z-index: 100;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid #ff0000;
  box-shadow: 0 0 20px #ff0000;
}

#menu ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
}
#menu li {
  padding: 15px 30px;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 2px;
  position: relative;
  transition: all 0.3s;
}
#menu li:hover {
  background-color: rgba(255, 0, 0, 0.3);
  text-shadow: 0 0 10px #ff0000;
}
#menu li::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #ff0000;
  transition: all 0.3s;
  transform: translateX(-50%);
}
#menu li:hover::after {
  width: 80%;
}
#content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 50;
  opacity: 0;
  transition: opacity 1s;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.5); /* More transparent background */
  overflow: auto;
}
.content-panel {
  background: rgba(20, 0, 0, 0.85); /* Slightly more transparent */
  border: 2px solid #ff0000;
  box-shadow: 0 0 20px #ff0000;
  padding: 30px;
  max-width: 800px;
  max-height: 70vh; /* Reduced height to see more of the city */
  overflow: auto;
  border-radius: 5px;
  pointer-events: auto;
  margin-top: 70px;
  margin-left: auto; /* Changed from 20% to auto for centering */
  margin-right: auto; /* Added for proper centering */
  width: 60%; /* Reduced width */
}
.content-panel h1 {
  color: #ff3333;
  border-bottom: 1px solid #ff0000;
  padding-bottom: 10px;
  margin-top: 0;
}
.content-panel p,
.content-panel li {
  line-height: 1.6;
}
.content-panel a {
  color: #ff6666;
  text-decoration: none;
  transition: all 0.3s;
  border-bottom: 1px dotted #ff6666;
}

.content-panel a:hover {
  color: #ff0000;
  text-shadow: 0 0 5px #ff0000;
  border-bottom: 1px solid #ff0000;
}
.close-btn {
  position: fixed; /* Changed from absolute to fixed */
  top: 80px;
  right: 20px;
  background: transparent;
  color: #ff0000;
  border: 1px solid #ff0000;
  cursor: pointer;
  padding: 8px 15px;
  z-index: 101;
  pointer-events: auto;
  font-family: "Courier New", monospace;
  font-weight: bold;
  transition: all 0.3s;
}
.close-btn:hover {
  background: #ff0000;
  color: #000;
  box-shadow: 0 0 10px #ff0000;
}
.logo {
  position: absolute;
  top: 15px;
  left: 20px;
  font-size: 18px;
  font-weight: bold;
  color: #ff0000;
  text-shadow: 0 0 10px #ff0000;
  z-index: 101;
}
.glitch {
  position: relative;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.glitch::before {
  left: 2px;
  text-shadow: -2px 0 #00ffff;
  clip: rect(24px, 550px, 90px, 0);
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
}
.glitch::after {
  left: -2px;
  text-shadow: -2px 0 #ff00ff;
  clip: rect(85px, 550px, 140px, 0);
  animation: glitch-anim 2.5s infinite linear alternate-reverse;
}
@keyframes glitch-anim {
  0% {
    clip: rect(47px, 9999px, 23px, 0);
  }
  5% {
    clip: rect(58px, 9999px, 21px, 0);
  }
  10% {
    clip: rect(12px, 9999px, 35px, 0);
  }
  15% {
    clip: rect(82px, 9999px, 11px, 0);
  }
  20% {
    clip: rect(61px, 9999px, 49px, 0);
  }
  25% {
    clip: rect(3px, 9999px, 23px, 0);
  }
  30% {
    clip: rect(94px, 9999px, 34px, 0);
  }
  35% {
    clip: rect(68px, 9999px, 89px, 0);
  }
  40% {
    clip: rect(57px, 9999px, 10px, 0);
  }
  45% {
    clip: rect(24px, 9999px, 98px, 0);
  }
  50% {
    clip: rect(57px, 9999px, 35px, 0);
  }
  55% {
    clip: rect(62px, 9999px, 15px, 0);
  }
  60% {
    clip: rect(42px, 9999px, 31px, 0);
  }
  65% {
    clip: rect(22px, 9999px, 35px, 0);
  }
  70% {
    clip: rect(98px, 9999px, 73px, 0);
  }
  75% {
    clip: rect(13px, 9999px, 92px, 0);
  }
  80% {
    clip: rect(57px, 9999px, 24px, 0);
  }
  85% {
    clip: rect(39px, 9999px, 49px, 0);
  }
  90% {
    clip: rect(28px, 9999px, 18px, 0);
  }
  95% {
    clip: rect(67px, 9999px, 42px, 0);
  }
  100% {
    clip: rect(10px, 9999px, 86px, 0);
  }
}
@keyframes glitch-anim-2 {
  0% {
    clip: rect(65px, 9999px, 41px, 0);
  }
  5% {
    clip: rect(24px, 9999px, 87px, 0);
  }
  10% {
    clip: rect(57px, 9999px, 42px, 0);
  }
  15% {
    clip: rect(25px, 9999px, 15px, 0);
  }
  20% {
    clip: rect(95px, 9999px, 30px, 0);
  }
  25% {
    clip: rect(15px, 9999px, 67px, 0);
  }
  30% {
    clip: rect(54px, 9999px, 95px, 0);
  }
  35% {
    clip: rect(9px, 9999px, 24px, 0);
  }
  40% {
    clip: rect(56px, 9999px, 37px, 0);
  }
  45% {
    clip: rect(59px, 9999px, 25px, 0);
  }
  50% {
    clip: rect(45px, 9999px, 72px, 0);
  }
  55% {
    clip: rect(87px, 9999px, 10px, 0);
  }
  60% {
    clip: rect(41px, 9999px, 15px, 0);
  }
  65% {
    clip: rect(68px, 9999px, 21px, 0);
  }
  70% {
    clip: rect(36px, 9999px, 58px, 0);
  }
  75% {
    clip: rect(72px, 9999px, 46px, 0);
  }
  80% {
    clip: rect(91px, 9999px, 67px, 0);
  }
  85% {
    clip: rect(16px, 9999px, 46px, 0);
  }
  90% {
    clip: rect(43px, 9999px, 75px, 0);
  }
  95% {
    clip: rect(12px, 9999px, 46px, 0);
  }
  100% {
    clip: rect(25px, 9999px, 57px, 0);
  }
}
#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  color: #ff0000;
}
#loading h1 {
  font-size: 3em;
  margin-bottom: 20px;
}
.loading-bar {
  width: 300px;
  height: 5px;
  background: rgba(255, 0, 0, 0.3);
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}
.loading-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #ff0000;
  width: 0%;
  box-shadow: 0 0 10px #ff0000;
}
.location-marker {
  cursor: pointer;
  pointer-events: auto;
}

/* Controls Panel Styles */
#controls-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px; /* Changed from right to left */
  background: rgba(20, 0, 0, 0.8);
  color: #ff0000;
  border: 1px solid #ff0000;
  padding: 8px 15px;
  cursor: pointer;
  z-index: 200;
  font-family: "Courier New", monospace;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
  transition: left 0.3s ease-in; /* For moving in */
  display: none; /* Hide by default */
}

/* Add this new rule to move the button when panel is active */
#controls-panel.active + #controls-toggle,
body:has(#controls-panel.active) #controls-toggle {
  left: 360px; /* width of panel (300px) + margin (20px) */
  transition: left 0.2s ease-out; /* Faster transition for moving out */
}

#controls-panel {
  position: fixed;
  top: 60px;
  left: 0; /* Changed from right to left */
  width: 300px;
  height: calc(100% - 60px);
  background: rgba(10, 0, 0, 0.9);
  border-right: 1px solid #ff0000; /* Changed from border-left to border-right */
  color: #ff3333;
  padding: 20px;
  padding-bottom: 80px; /* Added extra padding at the bottom */
  z-index: 150;
  overflow-y: auto;
  transform: translateX(
    -100%
  ); /* Changed from translateX(100%) to translateX(-100%) */
  transition: transform 0.3s ease-in-out;
  box-shadow: 5px 0 20px rgba(255, 0, 0, 0.3); /* Changed direction of shadow */
}
#controls-panel.active {
  transform: translateX(0);
}
.control-group {
  margin-bottom: 25px;
  border-bottom: 1px solid rgba(255, 0, 0, 0.3);
  padding-bottom: 15px;
}
.control-group h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #ff0000;
  text-shadow: 0 0 5px #ff0000;
}
.control-item {
  margin-bottom: 10px;
}
.control-item label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.9em;
}
.control-item input[type="range"] {
  width: 100%;
  background: rgba(255, 0, 0, 0.2);
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 5px;
  outline: none;
}
.control-item input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  background: #ff0000;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 5px #ff0000;
}
.control-item .value-display {
  display: inline-block;
  width: 50px;
  text-align: right;
  font-size: 0.9em;
  margin-left: 5px;
}
.preset-btn {
  background: rgba(255, 0, 0, 0.2);
  color: #ff3333;
  border: 1px solid #ff0000;
  padding: 5px 10px;
  margin-right: 5px;
  margin-bottom: 5px;
  cursor: pointer;
  font-family: "Courier New", monospace;
  transition: all 0.3s;
}
.preset-btn:hover {
  background: rgba(255, 0, 0, 0.4);
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}
.nav-point-select {
  width: 100%;
  background: rgba(10, 0, 0, 0.8);
  color: #ff3333;
  border: 1px solid #ff0000;
  padding: 5px;
  margin-bottom: 10px;
  font-family: "Courier New", monospace;
}
.save-btn {
  background: rgba(255, 0, 0, 0.3);
  color: #ff3333;
  border: 1px solid #ff0000;
  padding: 8px 15px;
  width: 100%;
  cursor: pointer;
  margin-top: 10px;
  font-family: "Courier New", monospace;
  font-weight: bold;
  transition: all 0.3s;
}
.save-btn:hover {
  background: rgba(255, 0, 0, 0.5);
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}

/* Add these new styles for content with images */
.content-with-image {
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.content-text {
  flex: 2;
}

.content-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.content-image img {
  max-width: 100%;
  max-height: 300px;
  border: 2px solid #ff0000;
  box-shadow: 0 0 15px #ff0000;
  object-fit: cover;
}

/* Media query for mobile devices */
@media (max-width: 768px) {
  .content-with-image {
    flex-direction: column;
  }

  .content-image {
    margin-top: 20px;
  }
}

.steam-game {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  border-left: 2px solid #ff0000;
  padding-left: 10px;
  transition: all 0.3s;
}

.steam-game:hover {
  background: rgba(255, 0, 0, 0.1);
  transform: translateX(5px);
}

.game-icon {
  width: 32px;
  height: 32px;
  margin-right: 15px;
  border: 1px solid #ff0000;
  box-shadow: 0 0 8px #ff0000;
}

.game-info {
  display: flex;
  flex-direction: column;
}

.game-time {
  font-size: 0.8em;
  color: #ff6666;
  margin-top: 3px;
}

.lego-set {
  display: flex;
  align-items: center;
  margin-bottom: 20px; /* Increased from 15px */
  border-left: 2px solid #ff0000;
  padding-left: 10px;
  transition: all 0.3s;
  text-decoration: none; /* Ensure no underline for the link */
  color: inherit; /* Inherit text color */
  cursor: pointer; /* Add pointer cursor to indicate clickability */
}

.lego-set:hover {
  background: rgba(255, 0, 0, 0.1);
  transform: translateX(5px);
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.3); /* Add glow effect on hover */
}

/* Add a subtle indicator that this is clickable */
.lego-set::after {
  content: "↗";
  position: absolute;
  right: 20px;
  opacity: 0;
  color: #ff6666;
  transition: opacity 0.3s;
}

.lego-set:hover::after {
  opacity: 1;
}

.lego-icon {
  width: 120px; /* Increased from 60px */
  margin-right: 20px; /* Increased from 15px */
  border: 1px solid #ff0000;
  box-shadow: 0 0 8px #ff0000;
  object-fit: cover;
}

.lego-info {
  display: flex;
  flex-direction: column;
}

.lego-pieces {
  font-size: 0.9em;
  color: #ff6666;
  margin-top: 3px;
}

.lego-year {
  font-size: 0.8em;
  color: #dd4444;
  margin-top: 2px;
}

.lego-set-id {
  font-size: 0.8em;
  color: #aa4444;
  margin-top: 2px;
}

.lego-notes {
  font-size: 0.9em;
  font-style: italic;
  color: #ff8888;
  margin-top: 3px;
}

/* Remove bullet points */
.lego-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

/* Responsive design for menu */
@media (max-width: 768px) {
  .hamburger-menu {
    display: block;
  }

  #menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 150;
  }

  #menu.active {
    transform: translateY(0);
  }

  #menu ul {
    flex-direction: column;
    align-items: center;
  }

  #menu li {
    padding: 20px;
    font-size: 1.2rem;
    margin: 5px 0;
    text-align: center;
    width: 80vw;
    max-width: 300px;
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 5px;
  }

  #menu li:hover {
    background-color: rgba(255, 0, 0, 0.2);
  }

  .logo {
    z-index: 201;
  }

  /* Animation for hamburger to X */
  .hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  /* Adjust content panel for mobile */
  .content-panel {
    width: 90%;
    max-height: 80vh;
    margin: 10vh auto 10vh auto;
  }

  .content-with-image {
    flex-direction: column;
  }

  .content-image img {
    max-width: 100%;
    margin-top: 15px;
  }

  /* Show close button only when content is visible */
  #content[style*="opacity: 0"] .close-btn {
    display: none;
  }

  .content-panel {
    /* Add padding at top to accommodate the close button */
    padding-top: 30px; /* Reset padding */
    padding-bottom: 60px; /* Add padding at bottom to avoid button overlap */
  }

  /* Fix for close button stretching across the screen */
  .close-btn {
    position: fixed;
    bottom: 20px;
    top: auto;
    right: 20px;
    width: auto; /* Ensure button takes only needed width */
    height: auto; /* Ensure button takes only needed height */
    padding: 10px 15px;
    font-size: 1rem;
    z-index: 102;
    background: rgba(10, 0, 0, 0.8);
    border-radius: 5px; /* Add rounded corners */
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
    display: inline-block; /* Ensure it behaves like an inline-block element */
  }

  /* Make sure content has proper padding at bottom */
  .content-panel {
    padding-bottom: 70px; /* Increase bottom padding to avoid overlap */
    margin-bottom: 20px; /* Add margin at bottom */
  }
}
