*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  background: #0a0a0a;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

.container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ---- Sidebar ---- */
.sidebar {
  width: 200px;
  flex-shrink: 0;
  background: #615232;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #2a2a2a;
}

.sidebar-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #dedddd;
  padding: 0 16px 12px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  user-select: none;
  color: #dedddd;
  transition: color 0.15s, background 0.15s;
}

.toggle:hover {
  background: #222;
}

.toggle.active {
  color: #e0e0e0;
}

.toggle .eye {
  flex-shrink: 0;
  opacity: 0.3;
  transition: opacity 0.15s;
}

.toggle.active .eye {
  opacity: 1;
}

.divider {
  height: 1px;
  background: #2a2a2a;
  margin: 4px 16px;
}

/* ---- Map Area ---- */
.map-area {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: radial-gradient(
    circle at center,
    #614828 0%,
    #4a331a 35%,
    #342a14 65%,
    #0b110c 100%
  );
}

.layers {
  position: absolute;
  inset: 0;
}

.layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transition: opacity 0.1s;
}

.layer.hidden {
  opacity: 0;
}

.map-transform {
  position: absolute;
  inset: 0;
}

.map-title{
  position:absolute;
  top:18px;
  left:50%;
  transform:translateX(-50%);
  background:#d8c295;
  color:#301600;
  padding:14px 34px;
  border-radius:5px;
  border:3px solid #8d6b3f;
  font-size:28px;
  font-weight:700;
  letter-spacing:.15em;
  box-shadow:0 8px 18px rgba(0,0,0,.35);
  z-index:100;
  pointer-events:none;
  white-space:nowrap;
}

/* ---- Pins ---- */
.pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pin {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  z-index: 50;
  transition: transform 0.15s, z-index 0.15s;
}

.pin:hover {
  transform: translate(-50%, -50%) scale(1.3);
  z-index: 60;
}

.pin.hidden {
  opacity: 0;
  pointer-events: none;
}

.pin-icon {
  width: 24px;
  height: 24px;
  display: block;
  pointer-events: none;
}

/* ---- Sidebar Bottom ---- */
.sidebar-bottom {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid #2a2a2a;
}

.picker-btn {
  display: block;
  width: 100%;
  padding: 8px 12px;
  background: #222;
  border: 1px solid #333;
  color: #888;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s, background 0.15s;
}

.picker-btn:hover {
  background: #2a2a2a;
  color: #e0e0e0;
}

.picker-btn.active {
  background: #2e4b80;
  color: #fff;
  border-color: #3a5fa0;
}

.picker-output {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  background: #111;
  border: 1px solid #2a2a2a;
  color: #888;
  font-size: 11px;
  font-family: 'Courier New', monospace;
  resize: none;
  outline: none;
}

.picker-output:focus {
  border-color: #444;
}

/* ---- Side Panel ---- */
.panel {
  position: fixed;
  top: 0;
  right: -340px;
  width: 320px;
  height: 100vh;
  background: #181818;
  border-left: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  transition: right 0.25s ease;
  z-index: 200;
  box-shadow: -4px 0 12px rgba(0,0,0,0.4);
}

.panel.open {
  right: 0;
}

.panel-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #2a2a2a;
  flex-shrink: 0;
}

.panel-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.panel-close {
  background: none;
  border: none;
  color: #555;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
}

.panel-close:hover {
  color: #fff;
}

.panel-image {
  padding: 24px;
  display: none;
  flex-shrink: 0;
}

.panel-image img {
  width: 100%;
  display: block;
  border: 1px solid #2a2a2a;
}

.panel-body {
  padding: 24px;
  color: #999;
  line-height: 1.6;
  font-size: 14px;
  flex: 1;
  overflow-y: auto;
}
