/* Compass Page Custom Styles */

/* Glassmorphism Card Style */
.glass-container {
  background: rgba(30, 41, 59, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(212, 160, 23, 0.2);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

/* Compass Outer Ring & Glows */
.compass-outer-glow {
  box-shadow: 0 0 40px rgba(214, 160, 23, 0.15), inset 0 0 25px rgba(214, 160, 23, 0.05);
  border: 4px double rgba(214, 160, 23, 0.4);
}

/* Compass Dial */
.compass-dial {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, #101726 60%, #0d121e 100%);
  transition: transform 0.2s cubic-bezier(0.1, 0.8, 0.3, 1);
  will-change: transform;
}

/* Compass Ticks */
.compass-tick {
  position: absolute;
  width: 2px;
  height: 8px;
  background: rgba(214, 160, 23, 0.3);
  left: calc(50% - 1px);
  top: 6px;
  transform-origin: 50% 124px; /* Half of dial width (260px / 2 = 130px) minus top offset (6px) */
}

.compass-tick.major {
  width: 2px;
  height: 14px;
  background: rgba(214, 160, 23, 0.8);
  transform-origin: 50% 124px;
}

/* Center Pivot */
.compass-pivot {
  position: absolute;
  top: calc(50% - 12px);
  left: calc(50% - 12px);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 10%, #d4a017 60%, #b27a0d 100%);
  box-shadow: 0 0 15px rgba(212, 160, 23, 0.8);
  z-index: 10;
}

/* Static Heading Pointer (Header Indicator) */
.heading-pointer {
  position: absolute;
  top: 10px;
  left: calc(50% - 8px);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 16px solid #ef4444; /* Bright Red indicator pointing straight down at the dial top */
  filter: drop-shadow(0 2px 4px rgba(239, 68, 68, 0.5));
  z-index: 20;
}

/* Dynamic Needle (Only for North Up mode or visual center) */
.compass-needle {
  position: absolute;
  top: 5px; /* (260px - 250px) / 2 = 5px to center it perfectly */
  left: calc(50% - 6px);
  width: 12px;
  height: 250px; /* Spans across the dial */
  pointer-events: none;
  z-index: 5;
  transition: transform 0.2s cubic-bezier(0.1, 0.8, 0.3, 1);
  transform-origin: 50% 125px;
}

/* North side of needle (Red) */
.compass-needle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 125px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 125px solid #ef4444;
}

/* South side of needle (Gold) */
.compass-needle::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 125px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 125px solid #d4a017;
  opacity: 0.8;
}

/* Direction Labels inside dial */
.direction-label {
  position: absolute;
  color: rgba(214, 160, 23, 0.7);
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 500;
  text-anchor: middle;
  transform-origin: 50% 140px;
}

.direction-label.cardinal {
  color: #d4a017;
  font-weight: 600;
  font-size: 16px;
}

.direction-label.north {
  color: #ef4444;
}

/* Slider Custom Styling */
input[type="range"].gold-slider {
  -webkit-appearance: none;
  width: 100%;
  background: rgba(212, 160, 23, 0.2);
  height: 6px;
  border-radius: 3px;
  outline: none;
}

input[type="range"].gold-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #d4a017;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(212, 160, 23, 0.5);
  transition: transform 0.1s;
}

input[type="range"].gold-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

input[type="range"].gold-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #d4a017;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(212, 160, 23, 0.5);
  transition: transform 0.1s;
}

input[type="range"].gold-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}
