/* ═══════════════════════════════════════════════════════════════
   Elevation 168 — Mountain Focal Point + 3D Cinematic Overlay
   ═══════════════════════════════════════════════════════════════ */

/* ── FOCAL TRIGGER ──────────────────────────────────────────── */
.mountain-focal-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 52px;
}

.mountain-focal {
  position: relative;
  width: 100px;
  height: 100px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.focal-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(225, 6, 0, 0.4);
  animation: ringOut 2.8s ease-out infinite;
  pointer-events: none;
}
.focal-ring:nth-child(1) { width: 100px; height: 100px; animation-delay: 0s;    }
.focal-ring:nth-child(2) { width: 138px; height: 138px; animation-delay: 0.75s; opacity: 0.55; }
.focal-ring:nth-child(3) { width: 176px; height: 176px; animation-delay: 1.5s;  opacity: 0.28; }

@keyframes ringOut {
  0%   { transform: scale(0.82); opacity: 0.9; }
  100% { transform: scale(1.2);  opacity: 0;   }
}

.focal-core {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #0b0f13;
  border: 1.5px solid rgba(225, 6, 0, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 240ms ease, box-shadow 240ms ease, transform 220ms ease;
}
.mountain-focal:hover .focal-core {
  border-color: rgba(225, 6, 0, 0.9);
  box-shadow: 0 0 22px rgba(225, 6, 0, 0.28), 0 0 60px rgba(225, 6, 0, 0.1);
  transform: scale(1.08);
}
.focal-core img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  transition: transform 220ms ease;
}
.mountain-focal:hover .focal-core img { transform: scale(1.08); }

.focal-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(247, 247, 244, 0.28);
  transition: color 220ms ease;
}
.mountain-focal-wrap:hover .focal-label { color: rgba(225, 6, 0, 0.65); }


/* ═══════════════════════════════════════════════════════════════
   3D CINEMATIC OVERLAY
   ═══════════════════════════════════════════════════════════════ */

.mt3d-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: #030508;
  overflow: hidden;
}
.mt3d-overlay.open {
  display: block;
  animation: mt3dFadeIn 400ms ease both;
}
@keyframes mt3dFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Full-bleed WebGL canvas */
.mt3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Cinematic vignette */
.mt3d-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 60%, transparent 35%, rgba(2, 4, 8, 0.72) 100%),
    linear-gradient(to bottom, rgba(2, 4, 8, 0.18) 0%, transparent 18%, transparent 78%, rgba(2, 4, 8, 0.55) 100%);
  pointer-events: none;
  z-index: 2;
}

/* ── Top bar ────────────────────────────────────────────────── */
.mt3d-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: linear-gradient(to bottom, rgba(3, 5, 8, 0.85) 0%, transparent 100%);
  pointer-events: none;
  z-index: 10;
}

.mt3d-topbar-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.mt3d-topbar-label {
  font-family: Anton, sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  text-transform: uppercase;
  color: #f7f7f4;
  line-height: 1;
  letter-spacing: 0.04em;
}

.mt3d-topbar-sub {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(247, 247, 244, 0.28);
}

.mt3d-close {
  position: absolute;
  top: 20px;
  right: 28px;
  width: 38px;
  height: 38px;
  background: rgba(247, 247, 244, 0.06);
  border: 1px solid rgba(247, 247, 244, 0.12);
  color: rgba(247, 247, 244, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  transition: background 180ms, color 180ms, border-color 180ms;
  z-index: 11;
}
.mt3d-close:hover {
  background: rgba(225, 6, 0, 0.2);
  border-color: rgba(225, 6, 0, 0.45);
  color: #f7f7f4;
}

/* ── User badge (mid-left float) ────────────────────────────── */
.mt3d-userbadge {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(3, 5, 8, 0.72);
  border: 1px solid rgba(225, 6, 0, 0.3);
  padding: 14px 18px;
  backdrop-filter: blur(8px);
  z-index: 10;
  animation: mt3dSlideRight 600ms 2s cubic-bezier(0.34, 1.3, 0.64, 1) both;
}

@keyframes mt3dSlideRight {
  from { opacity: 0; transform: translateY(-50%) translateX(-20px); }
  to   { opacity: 1; transform: translateY(-50%) translateX(0);     }
}

.mt3d-userbadge-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e10600;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(225, 6, 0, 0.8), 0 0 20px rgba(225, 6, 0, 0.3);
  animation: dotPulse 1.6s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(225,6,0,0.9), 0 0 18px rgba(225,6,0,0.3); }
  50%       { box-shadow: 0 0 14px rgba(225,6,0,1),  0 0 36px rgba(225,6,0,0.5); }
}

.mt3d-userbadge-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mt3d-userbadge-nick {
  font-family: Anton, sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  color: #f7f7f4;
  line-height: 1;
  letter-spacing: 0.02em;
}

.mt3d-userbadge-hours {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(247, 247, 244, 0.38);
  text-transform: uppercase;
}

.mt3d-userbadge-pct {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: #e10600;
  letter-spacing: 0.03em;
  margin-left: 4px;
}

/* ── Progress bar strip ─────────────────────────────────────── */
.mt3d-progressbar-wrap {
  position: absolute;
  top: 90px;
  left: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 10;
  animation: mt3dFadeUp 500ms 1.5s ease both;
}

@keyframes mt3dFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.mt3d-track-badge {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid currentColor;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 300ms, border-color 300ms;
}

.mt3d-progressbar {
  flex: 1;
  height: 3px;
  background: rgba(247, 247, 244, 0.08);
  position: relative;
  overflow: hidden;
}

.mt3d-progressbar-fill {
  height: 100%;
  width: 0%;
  transition: width 800ms cubic-bezier(0.4, 0, 0.2, 1), background 400ms ease;
  position: relative;
}
.mt3d-progressbar-fill::after {
  content: "";
  position: absolute;
  right: 0;
  top: -2px;
  width: 6px;
  height: 7px;
  background: inherit;
  filter: brightness(1.5);
  border-radius: 50%;
}

/* ── Bottom controls ────────────────────────────────────────── */
.mt3d-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(3, 5, 8, 0.92) 0%, rgba(3, 5, 8, 0.75) 70%, transparent 100%);
  padding: 36px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 10;
  backdrop-filter: blur(4px);
}

/* Track buttons */
.mt3d-track-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mt3d-track-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(247, 247, 244, 0.04);
  border: 1px solid rgba(247, 247, 244, 0.1);
  color: rgba(247, 247, 244, 0.45);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 200ms, border-color 200ms, color 200ms;
}
.mt3d-track-btn:hover {
  border-color: var(--tc);
  color: #f7f7f4;
  background: rgba(247, 247, 244, 0.07);
}
.mt3d-track-btn.active {
  background: rgba(247, 247, 244, 0.06);
  border-color: var(--tc);
  color: var(--tc);
}

.mt3d-track-btn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tc);
  flex-shrink: 0;
}

/* Hours row */
.mt3d-hours-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mt3d-hours-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(247, 247, 244, 0.28);
  flex-shrink: 0;
}

.mt3d-hours-input {
  width: 72px;
  background: rgba(247, 247, 244, 0.05);
  border: 1px solid rgba(247, 247, 244, 0.14);
  color: #f7f7f4;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 8px 10px;
  text-align: center;
  outline: none;
  transition: border-color 180ms;
  -moz-appearance: textfield;
}
.mt3d-hours-input::-webkit-outer-spin-button,
.mt3d-hours-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mt3d-hours-input:focus { border-color: rgba(225, 6, 0, 0.55); }

.mt3d-hours-save {
  background: #e10600;
  border: none;
  color: #fff;
  font-family: Anton, sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 20px;
  cursor: pointer;
  transition: opacity 180ms;
}
.mt3d-hours-save:hover { opacity: 0.82; }

.mt3d-hours-note {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  color: rgba(247, 247, 244, 0.18);
}

/* ── Drag hint ──────────────────────────────────────────────── */
.mt3d-hint {
  position: absolute;
  bottom: 140px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 247, 244, 0.3);
  opacity: 0;
  transition: opacity 600ms ease;
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
}

/* ── Leaderboard panel ──────────────────────────────────────── */
.mt3d-leaderboard {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  width: 210px;
  background: rgba(3, 5, 8, 0.78);
  border: 1px solid rgba(247, 247, 244, 0.10);
  backdrop-filter: blur(10px);
  z-index: 10;
  animation: mt3dSlideLeft 600ms 2.4s cubic-bezier(0.34, 1.3, 0.64, 1) both;
}

@keyframes mt3dSlideLeft {
  from { opacity: 0; transform: translateY(-50%) translateX(20px); }
  to   { opacity: 1; transform: translateY(-50%) translateX(0);    }
}

.mt3d-leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(247, 247, 244, 0.07);
}

.mt3d-leaderboard-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(247, 247, 244, 0.38);
}

.mt3d-live-badge {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 2px 7px;
  border: 1px solid;
}
.mt3d-live-badge[data-mode="live"] {
  color: #3ddc84;
  border-color: rgba(61, 220, 132, 0.45);
  animation: livePulse 2s ease-in-out infinite;
}
.mt3d-live-badge[data-mode="demo"] {
  color: rgba(247, 247, 244, 0.25);
  border-color: rgba(247, 247, 244, 0.12);
}
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

.mt3d-leader-list {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
  max-height: 340px;
  overflow-y: auto;
}
.mt3d-leader-list::-webkit-scrollbar { width: 2px; }
.mt3d-leader-list::-webkit-scrollbar-track { background: transparent; }
.mt3d-leader-list::-webkit-scrollbar-thumb { background: rgba(247,247,244,0.12); }

.mt3d-leader-row {
  display: grid;
  grid-template-columns: 24px 8px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  transition: background 150ms;
}
.mt3d-leader-row:hover {
  background: rgba(247, 247, 244, 0.04);
}
.mt3d-leader-row.me {
  background: rgba(225, 6, 0, 0.08);
  border-left: 2px solid rgba(225, 6, 0, 0.55);
  padding-left: 12px;
}

.mt3d-leader-rank {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.56rem;
  font-weight: 700;
  color: rgba(247, 247, 244, 0.22);
  text-align: right;
}
.mt3d-leader-row.me .mt3d-leader-rank { color: rgba(225, 6, 0, 0.7); }

.mt3d-leader-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mt3d-leader-nick {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(247, 247, 244, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mt3d-leader-row.me .mt3d-leader-nick { color: #f7f7f4; }

.mt3d-leader-pct {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .mt3d-topbar  { padding: 16px 18px; }
  .mt3d-close   { top: 16px; right: 18px; }
  .mt3d-userbadge {
    left: 16px;
    top: auto;
    bottom: 200px;
    transform: none;
    animation: mt3dFadeUp 600ms 2s ease both;
  }
  .mt3d-progressbar-wrap { left: 16px; right: 16px; top: 76px; }
  .mt3d-controls { padding: 24px 16px 20px; }
  .mt3d-track-btn { padding: 7px 12px; font-size: 0.58rem; }
  .mt3d-hint { bottom: 220px; }
  .mt3d-leaderboard {
    right: 16px;
    width: 180px;
    top: auto;
    bottom: 200px;
    transform: none;
    animation: mt3dFadeUp 600ms 2.4s ease both;
  }
}
