/* Extracted from index.html for easter UI */
#e-vignette {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 8000;
    background: radial-gradient(
      ellipse at center,
      transparent 60%,
      rgba(0,0,0,0.0) 100%
    );
    transition: background 3s ease;
  }

  /* Progress ring for easter 1 */
  #e-ring {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 8001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease;
  }
  #e-ring svg {
    width: 98vw;
    height: 98vh;
    position: absolute;
  }
  #e-ring circle {
    fill: none;
    stroke: rgb(227 227 227 / 39%);
    stroke-width: 4;
    filter: drop-shadow(0 0 5px rgba(126, 190, 126, 0.45));
    stroke-linecap: round;
    transform-origin: center;
    transform: rotate(-90deg);
    transition: stroke-dashoffset 1s linear;
  }

  /* Dot counter for easter 3 */
  #e-dots {
    pointer-events: none;
    position: fixed;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 8002;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 1s ease;
  }
  #e-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    transition: background 0.5s ease;
  }
  #e-dots span.lit {
    background: rgba(255,255,255,0.7);
  }

  /* Easter 5 terrain message */
  #e-terrain-msg {
    pointer-events: none;
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 8003;
    font-family: 'Roboto Slab', serif;
    font-size: 13px;
    color: #333;
    opacity: 0;
    text-align: center;
    max-width: 320px;
    line-height: 1.6;
    font-style: italic;
    transition: opacity 3s ease;
    display: none;
  }

  /* Startup hint */
  #e-start-hint {
    pointer-events: none;
    position: fixed;
    top: 26px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 8004;
    font-family: 'Roboto Slab', serif;
    font-size: 12px;
    letter-spacing: 0.2px;
    color: #333;
    text-shadow: 0 0 8px rgba(255,255,255,0.45);
    opacity: 0;
    transition: opacity 1.2s ease;
  }
  #e-start-hint.show {
    opacity: 1;
  }

  /* Fragment reveal popup */
  #e-popup {
    pointer-events: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    z-index: 9999;
    background: rgb(255 255 255 / 54%);
    padding: 28px 36px;
    border-radius: 10px;
    font-family: 'Roboto Slab', serif;
    font-size: 15px;
    text-align: center;
    box-shadow: 0 4px 32px rgba(0,0,0,0.15);
    max-width: 340px;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
  #e-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
  }
  #e-popup code {
    display: inline-block;
    margin: 0;
    background: #f5f5f5;
    padding: 8px 14px;
    border-radius: 5px;
    font-size: 12px;
    letter-spacing: 0.5px;
    word-break: break-all;
  }
  #e-popup .fragment-row {
    margin: 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
  #e-popup .copy-btn {
    border: 0;
    background: #e9e9e9;
    color: #444;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
  }
  #e-popup .copy-btn:hover {
    background: #dedede;
  }
  #e-popup .copy-status {
    margin-top: 6px;
    font-size: 11px;
    color: #7a7a7a;
    min-height: 14px;
  }
  #e-popup .hint {
    margin-top: 12px;
    font-size: 12px;
    color: #1c1c1c;
    font-style: italic;
    line-height: 1.5;
  }

  /* Found fragments list */
  #e-found-list {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 9005;
    font-family: 'Roboto Slab', serif;
    font-size: 12px;
    line-height: 1.5;
    color: #2f2f2f;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    padding: 8px 10px;
    min-width: 180px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
  }
  #e-found-list.show {
    opacity: 1;
  }
  #e-found-list .row {
    display: block;
    white-space: nowrap;
  }

  /* Idle distortion for easter 8 */
#e-glitch {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 8050;
  opacity: 0;
  mix-blend-mode: overlay;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.00) 0px,
      rgba(0, 0, 0, 0.00) 2px,
      rgba(18, 18, 18, 0.22) 3px,
      rgba(0, 0, 0, 0.00) 5px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.00) 0px,
      rgba(255,255,255,0.00) 22px,
      rgba(255,255,255,0.07) 23px,
      rgba(255,255,255,0.00) 28px
    );
  background-size: 100% 100%, 140% 100%;
  transition: opacity 0.2s linear;
}

#e-glitch.active {
  animation: e-glitch-shift 180ms steps(2, end) infinite;
}

@keyframes e-glitch-shift {
  0%   { transform: translateX(0px); }
  25%  { transform: translateX(-2px); }
  50%  { transform: translateX(1px); }
  75%  { transform: translateX(-1px); }
  100% { transform: translateX(0px); }
}

#e-keypad {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 9010;
  width: 220px;
  background: rgba(255,255,255,0.93);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.15);
  padding: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  font-family: 'Roboto Slab', serif;
}
#e-keypad.show {
  opacity: 1;
  pointer-events: auto;
}
#e-keypad-code {
  text-align: center;
  font-size: 12px;
  letter-spacing: 2px;
  color: #444;
  margin-bottom: 8px;
  min-height: 16px;
}
#e-keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
#e-keypad-grid button,
#e-keypad-actions button {
  border: 1px solid rgba(0,0,0,0.12);
  background: #f2f2f2;
  color: #333;
  border-radius: 6px;
  font-size: 13px;
  padding: 8px 0;
  cursor: pointer;
}
#e-keypad-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}
#e-keypad-status {
  min-height: 14px;
  margin-top: 6px;
  text-align: center;
  font-size: 11px;
  color: #666;
}

#credits-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 180px;
    height: 35px;
}
#tram-passenger-count {
    min-width: 1ch;
    text-align: right;
    font-family: 'Roboto Slab', serif;
    font-size: 11px;
    color: #333;
}
#tram-passenger-label {
    font-family: 'Roboto Slab', serif;
    font-size: 11px;
    color: #333;
}
