::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.03);
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border-radius: 999px;
    border: 2px solid transparent;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0c0f12;
  color: #f4f4f4;
  font-family: Arial, sans-serif;
}

#layout {
  display: flex;
  width: 100vw;
  height: 100vh;
}

#left-panel {
  width: 30%;
  height: 100%;
  padding: 48px;
  padding-top: 30px;
  box-sizing: border-box;
  overflow-y: auto;
  background: #080b0f;
  border-right: 1px solid rgba(255,255,255,0.08);
}

#right-panel {
  position: relative;
  width: 70%;
  height: 100%;
  overflow: hidden;
}

#app {
  width: 100%;
  height: 100%;
}

#app canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;

  margin-bottom: 28px;

  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;

  transition: color 0.18s ease;
}

.breadcrumb a:hover {
  color: #d9b85f;
}

.breadcrumb span {
  color: rgba(255, 255, 255, 0.4);
}

.breadcrumb span:last-child {
  color: rgba(255, 255, 255, 0.82);
}

.eyebrow {
  color: #9fb5c9;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

h1 {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1;
}

.mountain-elevation {
    margin-top: 10px;
    margin-bottom: 22px;
}

.mountain-elevation span {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: none;
    color: rgba(255,255,255,.86);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: .01em;
}

p {
  margin: 0;
  line-height: 1.5;
  color: #c8d0d8;
  font-size: 14px;
}

.stats {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.stats div {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px;
}

.stats span {
  display: block;
  color: #9fb5c9;
  font-size: 11px;
  margin-bottom: 4px;
}

.stats strong {
  font-size: 14px;
}

.section {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 16px;
  margin-top: 18px;
}

.section h2 {
  font-size: 15px;
  margin: 0 0 10px;
}

ul {
  margin: 0;
  padding-left: 18px;
  color: #c8d0d8;
  font-size: 13px;
  line-height: 1.55;
}

#status {
  margin-top: 20px;
  color: #9fb5c9;
  font-size: 13px;
}

.trail-tooltip {
  position: absolute;
  z-index: 30;
  display: none;
  pointer-events: none;
  background: rgba(10, 12, 14, 0.9);
  backdrop-filter: blur(10px);
  color: #f4f4f4;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
}

.trail-tooltip strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}



/*********************************************************/
/************************ Route **************************/
/*********************************************************/

.route-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.route-card {
  padding: 18px;

  border-radius: 18px;

  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}

/* .route-card {
  cursor: pointer;
} */

.route-card.active {
  border-color: #ffcc33;
  box-shadow: 0 0 0 1px rgba(255, 204, 51, 0.45), 0 0 28px rgba(255, 204, 51, 0.16);
}

.route-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-bottom: 10px;
}

.route-header h3 {
  margin: 0;
  font-size: 18px;
}

.route-card p {
  margin: 0;

  color: rgba(255,255,255,0.76);
  line-height: 1.55;
  font-size: 14px;
}

.route-meta {
  display: flex;
  gap: 12px;

  margin-top: 16px;
}

.route-meta div {
  flex: 1;

  padding: 10px 12px;

  border-radius: 12px;

  background: rgba(255,255,255,0.035);
}

.route-meta label {
  display: block;

  margin-bottom: 4px;

  color: #8fa1b5;
  font-size: 11px;
}

.route-meta strong {
  font-size: 13px;
}

.route-difficulty {
  padding: 6px 10px;

  border-radius: 999px;

  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.route-difficulty.easy {
  background: rgba(70,180,110,0.16);
  color: #8cffb0;
}

.route-difficulty.moderate {
  background: rgba(255,190,70,0.16);
  color: #ffd56a;
}

.route-difficulty.hard {
  background: rgba(255,90,90,0.16);
  color: #ff8e8e;
}

.route-difficulty.expert {
  background: rgba(255,60,60,0.2);
  color: #ff5f5f;
}

/*********************************************************/
/******************* Layer-button ***********************/
/*********************************************************/


#layer-control {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 100;
}

#layers-toggle {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 50%;
  background: rgba(12,16,20,0.86);
  backdrop-filter: blur(14px);
  color: rgba(255,255,255,0.88);
  cursor: pointer;
  box-shadow: 0 18px 45px rgba(0,0,0,0.35);
  transition: background .2s, border-color .2s, transform .2s;
}

#layers-toggle:hover {
  background: rgba(20,24,28,0.94);
  border-color: rgba(255,255,255,0.24);
  transform: scale(1.04);
}

#layers-toggle.active {
  background: rgba(38,34,24,0.96);
  border-color: rgba(207,171,55,0.45);
  box-shadow:
    0 0 0 1px rgba(207,171,55,0.15),
    0 8px 24px rgba(0,0,0,0.35);
}

#layers-toggle svg {
  width: 20px;
  height: 20px;
}

#layers-panel {
  position: absolute;
  top: 64px;
  right: 0;
  min-width: 180px;
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(12,16,20,.94);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0,0,0,.4);
}

#layers-panel.open {
  display: flex;
}

.layer-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  color: rgba(255,255,255,.88);
  font-size: 13px;
  font-weight: 600;
  transition: background .15s ease;
}

.layer-option:hover {
  background: rgba(255,255,255,.04);
}

.layer-option input {
  display: none;
}

.layer-option .toggle {
  position: relative;
  width: 34px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  transition: .2s;
}

.layer-option .toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  transform: translateY(-50%);
  transition: .2s;
}

.layer-option input:checked + .toggle {
  background: rgba(207,171,55,.25);
  border-color: rgba(207,171,55,.55);
}

.layer-option input:checked + .toggle::after {
  left: 16px;
  background: #cfab37;
}


/**********************************************************************/
/**************************** Map Loader *****************************/
/**********************************************************************/

#app {
  position: relative;
  width: 100%;
  height: 100%;
}

#map-loader {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: radial-gradient(circle at center, #14202a, #070a0d 68%);
  color: white;
}

.loader-ring {
  width: 54px;
  height: 54px;
  border: 4px solid rgba(255,255,255,0.12);
  border-top-color: #ffcc33;
  border-radius: 50%;
  animation: loader-spin 0.9s linear infinite;
}

.loader-text {
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@keyframes loader-spin {
  to {
    transform: rotate(360deg);
  }
}

#app canvas {
  position: relative;
  z-index: 1;
}

/**********************************************************************/
/****************************** Compass *******************************/
/**********************************************************************/

#compass {
  position: absolute;
  top: 24px;
  right: 90px;

  z-index: 10000;

  width: 50px;
  height: 50px;

  border-radius: 50%;

  background: rgba(8, 12, 16, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.22);

  backdrop-filter: blur(8px);

  opacity: 0.7;
}

#compass {
  cursor: pointer;
  transition:
    transform .2s ease,
    border-color .2s ease,
    background .2s ease;
}

#compass:hover {
  transform: scale(1.05);
  border-color: rgba(207,171,55,.35);
}

#compass-needle {
  position: absolute;
  inset: 0;

  transform-origin: center center;
}

.compass-label {
  position: absolute;
  top: 9px;
  left: 50%;

  transform: translateX(-50%);

  color: rgba(217, 184, 95, 0.8);

  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.compass-arrow {
  position: absolute;
  top: 27px;
  left: 50%;

  transform: translateX(-50%);

  width: 2px;
  height: 8px;

  background: rgba(217, 184, 95, 0.8);

  border-radius: 999px;

  box-shadow:
    0 0 8px rgba(217, 184, 95, 0.3);
}

.compass-arrow::before {
  content: "";

  position: absolute;
  top: -6px;
  left: 50%;

  transform: translateX(-50%);

  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 6px solid rgba(217, 184, 95, 0.9);
}



body.is-resizing-elevation {
  cursor: ns-resize;
}

body.is-resizing-elevation canvas {
  pointer-events: none;
}

canvas {
  touch-action: none;
}

body:not(.map-ready) #compass,
body:not(.map-ready) #layer-control {
  opacity: 0;
  pointer-events: none;
}

#compass,
#layer-control {
  transition: opacity .25s ease;
}



@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  #layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    min-height: 100vh;
  }

  #right-panel {
    order: 1;
    position: relative;
    width: 100%;
    height: 52vh;
    min-height: 360px;
    flex-shrink: 0;
    overflow: hidden;
  }

  #left-panel {
    order: 2;
    width: 100%;
    height: auto;
    padding: 24px 16px 90px;
    border-right: 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    overflow: visible;
    background: #080c0f;
  }

  #app {
    width: 100%;
    height: 100%;
  }

  .breadcrumb {
    margin-bottom: 18px;
    font-size: 14px;
  }

  h1 {
    font-size: 34px;
    line-height: 1;
    margin-bottom: 18px;
  }

  #left-panel > p {
    font-size: 15px;
    line-height: 1.55;
  }

  .stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 24px;
  }

  .stats > div {
    padding: 16px;
    border-radius: 14px;
  }

  #map-layers {
    top: 12px;
    left: 12px;
    right: 12px;
    width: auto;
    display: flex;
    overflow-x: auto;
    padding: 6px;
    z-index: 20;
    scrollbar-width: none;
  }

  #map-layers::-webkit-scrollbar {
    display: none;
  }

  #compass {
    width: 40px;
    height: 40px;
  }

  #layers-toggle {
    width: 44px;
    height: 44px;
  }

  #compass svg {
    width: 14px;
    height: 14px;
  }

  #mini-map {
    display: none;
  }

  #status {
    display: none;
  }
}

