body {
  font-family: Arial, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color:#9f9f9f
}

h1 {
  text-align: center;
}

img {
  -webkit-user-drag: none;
  user-select: none;
}

.statblock {
  font-size: 30px;
  float: left;
  width: 33.33%;
  text-align: center;
}

/*             MAP            */

#map-padding-container {
  display: block;
  padding: 10px;
  overflow: auto;
  text-align: center;
}

#map-container {
  position: relative;
  display: inline-block;
  min-width: 1376px;
}


#bunny-map {
  width: 100%;
  height: auto;
  display: block;
  -webkit-touch-callout: none; /* Disable iOS long-press menu */
  -webkit-user-drag: none;
  user-select: none;
}


/*            ADVANCED SETTINGS            */


#advanced-panel {
  background: #222;
  color: white;
  border: 1px solid #555;
  padding: 20px;
  margin-top: 10px;
  max-width: 100vw;
  box-sizing: border-box;
  border-radius: 8px;
}

/* Layout grid for desktop */
#advanced-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* Style for sub-panels */
#advanced-panel > div {
  background-color: #2a2a2a;
  padding: 12px;
  border-radius: 6px;
  box-shadow: 0 0 5px #00000055;
}

/* Tidy form elements */
#advanced-panel label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95em;
}

#advanced-panel select,
#advanced-panel input[type="number"],
#advanced-panel input[type="color"] {
  width: 100%;
  padding: 5px;
  margin-bottom: 10px;
  border-radius: 4px;
  border: 1px solid #444;
  background-color: #1a1a1a;
  color: white;
}

/* Button style */
#advanced-panel button {
  background: #444;
  color: white;
  border: none;
  padding: 6px 10px;
  margin: 5px 2px 10px 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#advanced-panel button:hover {
  background: #666;
}

.header-btn {
  background-color: #333;
  color: white;
  border: 1px solid #666;
  border-radius: 5px;
  padding: 8px 14px;
  font-size: 1rem;
  cursor: pointer;
  margin: 10px 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease;
  
}

.header-btn:hover {
  background-color: #444;
}

#zoom-controls {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Responsive fallback for small screens */
@media (max-width: 600px) {
  #advanced-panel {
    grid-template-columns: 1fr;
  }
}

#advanced-panel.collapsed {
  max-height: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  opacity: 0;
  transition: all 0.3s ease;
}

#advanced-panel {
  transition: all 0.3s ease;
}

#bg-color-wrapper {
  transition: max-height 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

#bg-color-wrapper.hidden {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

/*          MODALS         */
#ignore-info-btn {
    padding-left: 10px;
    border-radius: 10px;
    cursor: pointer;
}

.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 5; /* Sit on top */
    padding-top: 100px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

.modal-content {
  background-color: #d8d8d8;
  margin: 5% auto; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* Could be more or less, depending on screen size */
}

/* Add Animation */
.modal {  
    animation-name: fade-in;
    animation-duration: 0.2s;
}
  
@keyframes fade-in {
    from {transform: opacity(0.1)} 
    to {transform: scale(1)}
}

/* The Close Button */
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}


/*            ZOOM CONTROLS           */


#zoom-controls {
  display: flex;
  gap: 10px;
  margin: 10px 0;
  flex-wrap: wrap;
  justify-content: center;
}

#zoom-controls button {
  background-color: #444;
  color: white;
  border: 1px solid #666;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
    display: flex;
  align-items: center;
  gap: 6px;
}

#zoom-controls button:hover {
  background-color: #555;
  transform: scale(1.05);
}

#zoom-controls button:active {
  background-color: #333;
  transform: scale(0.98);
}

#zoom-controls i {
  font-size: 1.1rem;
}


/*            BUNNIES           */


.bunny-wrapper {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.bunny-wrapper .bunny-label {
  font-family: Arial, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 30px;
  font-weight: bold;
  color: white;
  text-shadow: 0 0 2px black, 0 0 2px black;
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  -webkit-text-stroke-width: 1px;
  -webkit-text-stroke-color: black;
}

.bunny {
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-drag: none;
  user-select: none;
  transform-origin: center center;
  width: 30px;
  height: auto;
  /* transform: translate(-50%, -50%); */
  cursor: pointer;
  z-index: 2;
  transition: opacity 0.2s, box-shadow 0.2s;
}

.bunny.pulse {
  animation: pulse-bunny 1.2s ease-in-out infinite;
}

@keyframes pulse-bunny {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

/* Bunny States */
.bunny.needed {
  opacity: 1;
  box-shadow: none;
}

.bunny.obtained {
  opacity: 0.3;
  box-shadow: none;
}

.bunny.missed {
  opacity: 1;
  box-shadow: 0 0 0 7px red;
}

.bunny-wrapper.next {
  opacity: 1;
  box-shadow: 0 0 0 7px yellow;
}

.ignored-dot {
  position: absolute;
  top: -0.5em;
  right: 0.3em;
  width: 0.9em;
  height: 0.9em;
  /* top: -10px;
  right: 4px;
  width: 15px;
  height: 15px; */
  background-color: rgb(255, 85, 235);
  border-radius: 50%;
  z-index: 3;
  pointer-events: auto;
  box-shadow: 0 0 0 2px black;
}

/* Tooltip for ignored bunnies */
.ignored-dot .tooltip {
  visibility: hidden;
  width: 90px;
  background-color: black;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  bottom: 100%;
  left: 50%;
  margin-left: -45px; /* Use half of the width to center */

  /* Position the tooltip */
  position: absolute;
  z-index: 4;
}

.ignored-dot:hover .tooltip {
  visibility: visible;
}

.row::after {
  content: "";
  display:table;
  clear: both;
}

/*            WARP GATES            */
.gate {
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-drag: none;
  user-select: none;
  transform-origin: center center;
  width: 30px;
  height: auto;
  /* transform: translate(-50%, -50%); */
  cursor: pointer;
  z-index: 2;
  transition: transform 0.2s;
}

.gate-wrapper {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

/* .gate:hover {
  transform: scale(1.25);
} */

.gate.hovering {
  transform: scale(1.25);
}

.gate.selected {
  transform: scale(1.25);
  z-index: 10;
}

@keyframes hover-gate {
  0% { transform: scale(1); }
  100% { transform: scale(1.25); }
}

#map-fade {
  transition: opacity 0.2s;
  opacity: 0;
  position: absolute; /* Stay in place */
  z-index: -1; /* hide until needed */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding-top: 100px; /* Location of the box */
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: black;
}

/*            FERRUS            */
.ferrus {
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-drag: none;
  user-select: none;
  transform-origin: center center;
  width: 40px;
  height: auto;
  /* transform: translate(-50%, -50%); */
  z-index: 2;
  transition: transform 0.2s;
}

.ferrus-wrapper {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  display: none;
}

/* .ferrus:hover {
  transform: scale(1.25);
} */