/* ===============================
   GLOBAL RESET & SAFETY
================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: sans-serif;
  background: #2e6f95;
}

/* ===============================
   MAP CONTAINER
================================ */
#map-container {
  position: fixed;
  inset: 0;
  display: grid;
  justify-content: center;
  align-content: center;
}

/* ===============================
   LABELS & MAP GRIDS
================================ */
#corner {
  background: #1b4965;
  outline: 1px solid #000;
}

#top-labels,
#left-labels,
#map {
  display: grid;
  position: relative; /* 🔑 anchor for ship positioning */
  min-width: 0;
  min-height: 0;
}

/* ===============================
   LABEL CELLS
================================ */
.label {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1b4965;
  color: white;
  font-weight: bold;
  outline: 1px solid #000;
  user-select: none;
}

/* ===============================
   MAP CELLS
================================ */
.cell {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3a7ca5;
  outline: 1px solid rgba(0, 0, 0, 0.4);
  position: relative;
}

/* ===============================
   ISLAND IMAGES
================================ */
.cell img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: auto;
}

/* Island size presets */
.island-large {
  width: 100%;
  height: 100%;
}

.island-medium {
  width: 70%;
  height: 70%;
}

.island-small {
  width: 40%;
  height: 40%;
}
/* ===============================
   ISLAND HOVER TOOLTIP
================================ */
#island-tooltip {
  position: fixed;
  pointer-events: none;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  font-size: 13px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(10px, 10px);
  transition: opacity 0.15s ease;
  z-index: 1000;
}

/* ===============================
   PLAYER SHIP
================================ */
#ship {
  position: absolute;
  left: 0;
  top: 0;
  /* width: 60%;
  height: 60%; */
  pointer-events: none;
  z-index: 10;

  /* ONLY centering here */
  transform: translate(-50%, -50%);
  
    transition:
    left 2s linear,
    top 2s linear;
}

#ship img {
  /* width: 100%;
  height: 100%; */
  object-fit: contain;

  /* ONLY rotation here */
  transition: transform 0.8s ease;
}