@font-face {
    font-family: 'Dela Gothic One';
    src: url('../fonts/DelaGothicOne-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ═══════════════════════════════════════════════
     STEP 1 — FONTS
     Replace the Google Fonts URL below with your
     own, or paste @font-face rules directly.
     Then update --font-display and --font-body.
  ═══════════════════════════════════════════════ */
  :root {
    --font-display : 'Dela Gothic One', sans-serif;
    --font-body    : 'Inter',  sans-serif;

    /* ═══════════════════════════════════════════
       STEP 2 — COLOURS  (change freely)
    ═══════════════════════════════════════════ */
    --bg-dark      : #0a0e2a;
    --bg-mid       : #0d1b3e;
    --bg-accent    : #0a2a1a;
    --land-light   : #c8a96e;
    --land-dark    : #b8956a;
    --land-side    : #9a7a50;
    --pin-label    : #ffffff;
    --pin-hover    : #f0c850;
    --modal-bg     : rgba(18,26,60,0.97);
    --modal-border : rgba(255,255,255,0.10);
    --tag-color    : #8b5cf6;
    --play-btn     : #7c3aed;
    --play-hover   : #9155ff;
  }

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

  html, body {
    width: 100%; height: 100%;
    overflow: hidden;
    font-family: var(--font-body);
    background: #080c1e; /* fallback while image loads */
  }

  /* ── OUTER WRAPPER: full viewport, transparent — bg handled by #bg-layer ── */
  #app {
    position: fixed;
    inset: 0;
    background: transparent;
    overflow: hidden;
    touch-action: none;
  }

  /* ── FULL-BLEED BACKGROUND (always covers entire viewport) ── */
  /*
   * ═══════════════════════════════════════════════
   * STEP 4 — BACKGROUND IMAGE
   * Place your 1920×1080 (or similar) image in the
   * same folder as this HTML file, then update the
   * path below. Examples:
   *   url('images/background.jpg')
   *   url('bg.png')
   *   url('https://example.com/your-bg.jpg')
   *
   * The image always stretches to fill the full
   * screen via background-size: cover.
   * ═══════════════════════════════════════════════
   */
  #bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: url('../images/background.jpg');   /* ← YOUR IMAGE HERE */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    /* Dark overlay so map stays readable over any image */
    filter: brightness(0.75);
  }

  /* Overlay tint on top of the image for depth */
  #bg-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
      radial-gradient(ellipse 60% 50% at 90% 10%, rgba(30,80,200,0.25) 0%, transparent 70%),
      radial-gradient(ellipse 40% 40% at 50% 90%, rgba(10,30,10,0.35) 0%, transparent 70%),
      linear-gradient(to bottom, rgba(5,10,30,0.30) 0%, rgba(5,10,20,0.10) 50%, rgba(5,20,5,0.25) 100%);
  }

  /* stadium light beams – purely decorative, full width */
  #bg-beams {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
  }

  /* grass stripe at bottom */
  #bg-grass {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 18%;
    z-index: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
      90deg,
      rgba(10,60,20,0.45) 0px, rgba(10,60,20,0.45) 28px,
      rgba(8,50,16,0.45) 28px, rgba(8,50,16,0.45) 56px
    );
    mask-image: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
  }

  /* ── SCROLL TRACK: horizontal pan container ── */
  #map-track {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    z-index: 1;
    will-change: transform;
    cursor: grab;
    user-select: none;
  }
  #map-track.dragging { cursor: grabbing; }

  /* ── MAP IMAGE fills full height, width proportional ── */
  #map-img {
    display: block;
    height: 100%;
    width: auto;
  }

  /* ── SCROLL HINT arrows (mobile only) ── */
  .scroll-hint {
    position: fixed;
    top: 50%; transform: translateY(-50%);
    z-index: 15;
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.7);
    font-size: 16px;
    pointer-events: none;
    transition: opacity 0.4s;
  }
  .scroll-hint.left  { left: 8px; }
  .scroll-hint.right { right: 8px; }
  .scroll-hint.hidden { opacity: 0; }

  /* ── SCROLLBAR (desktop) ── */
  #scrollbar-track {
    position: fixed;
    bottom: 10px; left: 50%; transform: translateX(-50%);
    width: min(200px, 50vw);
    height: 3px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    z-index: 15;
  }
  #scrollbar-thumb {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    background: rgba(255,255,255,0.45);
    border-radius: 2px;
    transition: left 0.05s linear;
  }

  /* ── HEADER ── */
  .header {
    position: fixed; top: 3%; left: 3%; z-index: 10; color: #fff;
  }
  .header h1 {
    font-family: var(--font-display);
    font-size: clamp(13px, 3vw, 20px);
    line-height: 1.2;
    text-shadow: 0 0 20px rgba(255,200,50,.4);
  }
  .header p {
    font-size: clamp(9px, 1.5vw, 11px);
    color: rgba(255,255,255,.5); margin-top: 3px;
  }

  /* ── TROPHY (inside track, positions scale with map) ── */
  .trophy {
    position: absolute; pointer-events: none;
    font-size: clamp(28px, 5vh, 52px);
    filter: drop-shadow(0 0 14px rgba(255,200,0,.7));
    left: 33%; top: 38%;
    transform: translate(-50%, -50%);
    animation: trophyPulse 2.5s ease-in-out infinite;
  }
  @keyframes trophyPulse {
    0%,100% { transform: translate(-50%,-50%) scale(1); }
    50%      { transform: translate(-50%,-50%) scale(1.08); }
  }

  /* ── PINS ── */
  .stadium-pin {
    position: absolute; z-index: 6; cursor: pointer;
    display: flex; flex-direction: column; align-items: center;
    transform: translate(-50%, -100%);
    transition: transform .15s ease;
  }
  .stadium-pin:hover { transform: translate(-50%, -100%) scale(1.2); z-index: 20; }

  .pin-img {
    width: clamp(64px, 12vh, 128px);
    height: clamp(64px, 12vh, 128px);
    object-fit: contain;
    filter: drop-shadow(0 3px 8px rgba(0,0,0,.8));
    display: block;
    opacity: 0.7;
  }
  .pin-emoji {
    font-size: clamp(20px, 4.5vh, 44px);
    filter: drop-shadow(0 3px 7px rgba(0,0,0,.8));
    line-height: 1;
  }
  .pin-label {
    margin-top: 2px;
    font-family: var(--font-body);
    font-size: clamp(7px, 1.2vh, 10px);
    font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--pin-label);
    text-shadow: 0 1px 5px #000, 0 0 10px rgba(0,0,0,.9);
    white-space: nowrap;
  }
  .stadium-pin:hover .pin-label { color: var(--pin-hover); }

  /* ── LOCKED PIN + CLOUD OVERLAY ── */
  .stadium-pin.locked { cursor: pointer; }
  .stadium-pin.locked .pin-img,
  .stadium-pin.locked .pin-emoji { filter: grayscale(1) brightness(.6); }

  .pin-cloud {
    position: absolute;
    bottom: 0;            /* sit over the top of the pin image */
    left: 50%;
    transform: translateX(-50%);
    width: clamp(72px, 14vh, 160px);
    aspect-ratio: 1 / 1;    /* height now needs a basis; adjust to your png ratio */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 8;             /* above the pin image */
    filter: drop-shadow(0 3px 8px rgba(0,0,0,.5));
    animation: cloudDrift 6s ease-in-out infinite;
    opacity: 0.7;
  }
  @keyframes cloudDrift {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50%     { transform: translateX(-50%) translateY(-4px); }
  }

  /* ── DECORATIVE CLOUDS scattered around the map ── */
  .deco-cloud {
    position: absolute;
    --cloud-scale: 1;
    width: calc(clamp(140px, 22vh, 320px) * var(--cloud-scale));
    aspect-ratio: 1 / 1;     /* match your cloud png ratio if not square */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 2;              /* above map, below pins (pins are z-index 6) */
    filter: drop-shadow(0 4px 16px rgba(0,0,0,.35));
    animation: decoDrift 9s ease-in-out infinite;
    will-change: transform;
  }
  @keyframes decoDrift {
    0%,100% { transform: translateY(0); }
    50%     { transform: translateY(-10px); }
  }

  /* ── LEGEND ── */
  .legend {
    position: fixed; bottom: 22px; left: 3%; z-index: 10;
    display: flex; gap: clamp(6px,2vw,12px);
  }
  .legend-item {
    display: flex; align-items: center; gap: 4px;
    font-size: clamp(8px,1.2vw,10px); color: rgba(255,255,255,.6);
  }
  .legend-dot { width: 8px; height: 8px; border-radius: 50%; }

  /* ── MODAL ── */
  #modal-overlay {
    position: fixed; inset: 0; z-index: 30;
    background: rgba(5,10,30,.75);
    display: none; align-items: center; justify-content: center;
    padding: 16px;
  }
  #modal-overlay.active { display: flex; }

  #modal {
    background: var(--modal-bg);
    border: 1px solid var(--modal-border);
    border-radius: 16px;
    padding: clamp(14px,4vw,28px);
    width: 100%; max-width: 520px;
    max-height: 90vh; overflow-y: auto;
    position: relative; color: #fff;
    box-shadow: 0 16px 60px rgba(0,0,0,.85);
  }
  #modal-close {
    position: absolute; top: 10px; right: 12px;
    background: rgba(255,255,255,.12); border: none; border-radius: 50%;
    color: rgba(255,255,255,.7); font-size: 18px; cursor: pointer;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
  }
  #modal-close:hover { background: rgba(255,255,255,.22); color: #fff; }

  .modal-tag {
    font-size: clamp(10px,2vw,13px); font-weight: 700;
    color: var(--tag-color); margin-bottom: 4px; letter-spacing: .04em;
  }
  .modal-title {
    font-family: var(--font-display);
    font-size: clamp(15px,3.5vw,22px);
    color: #fff; margin-bottom: clamp(12px,3vw,20px); line-height: 1.2;
    padding-right: 32px;
  }
  .modal-title span { color: rgba(255,255,255,.45); font-weight: 400; margin: 0 4px; }

  .quest-row { display: grid; grid-template-columns: repeat(3,1fr); gap: clamp(6px,2vw,12px); }

  .quest-card {
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    padding: clamp(8px,2vw,14px) clamp(8px,2vw,14px) 0;
    display: flex; flex-direction: column; cursor: pointer; min-width: 0;
    transition: border-color .2s, background .2s;
  }
  .quest-card:hover { background: rgba(255,255,255,.09); border-color: rgba(139,92,246,.4); }

  .quest-img-wrap {
    width: 100%; aspect-ratio: 1/.8;
    display: flex; align-items: center; justify-content: center;
    font-size: clamp(22px,5vw,48px);
    margin-bottom: clamp(6px,1.5vw,10px);
    overflow: hidden; border-radius: 6px;
    background: rgba(0,0,0,.2);
  }
  .quest-img-wrap img { width: 100%; height: 100%; object-fit: contain; }

  .quest-footer {
    border-top: 1px solid rgba(255,255,255,.07);
    padding: clamp(6px,1.5vw,10px) 0 clamp(8px,2vw,14px);
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 6px; min-width: 0;
  }
  .quest-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
  .quest-type { font-size: clamp(8px,1.5vw,10px); color: rgba(255,255,255,.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .quest-name { font-size: clamp(10px,2vw,13px); font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .play-btn {
    flex-shrink: 0;
    width: clamp(26px,5vw,34px); height: clamp(26px,5vw,34px);
    border-radius: 50%; background: var(--play-btn); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    box-shadow: 0 0 14px rgba(124,58,237,.5);
    transition: background .15s, transform .1s;
  }
  .play-btn:hover { background: var(--play-hover); transform: scale(1.08); }
  .play-btn svg { width: clamp(9px,2vw,13px); height: clamp(9px,2vw,13px); fill: #fff; margin-left: 2px; }

  .star { position: absolute; border-radius: 50%; background: #fff; pointer-events: none; }

  /* ── POWERED BY VIZIPEDIA ── */
  #powered-by {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 16;
    font-family: var(--font-body);
    font-size: clamp(9px, 1.4vw, 12px);
    font-weight: 600;
    letter-spacing: .03em;
    color: rgba(255,255,255,.45);
    text-decoration: none;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
    transition: color .2s;
  }
  #powered-by span {
    color: var(--pin-hover);
    font-weight: 700;
  }
  #powered-by:hover { color: rgba(255,255,255,.75); }

  /* ── LOCKED POPUP PANEL ── */
  .locked-panel {
    grid-column: 1 / -1;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: clamp(10px,3vw,20px) 0 clamp(4px,1vw,8px);
    position: relative;
  }
  .locked-cloud {
    width: clamp(90px,22vw,150px);
    aspect-ratio: 1 / 1;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.5));
    animation: cloudDrift 6s ease-in-out infinite;
  }
  .locked-lock {
    font-size: clamp(24px,6vw,40px);
    margin-top: clamp(-18px,-3vw,-10px);
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.6));
  }
  .locked-countdown {
    font-family: var(--font-display);
    font-size: clamp(15px,3.5vw,22px);
    color: var(--pin-hover);
    margin-top: clamp(8px,2vw,14px);
    text-shadow: 0 0 16px rgba(240,200,80,.4);
  }
  .locked-date {
    font-size: clamp(11px,2.2vw,14px);
    color: #fff; font-weight: 700;
    margin-top: 4px;
  }
  .locked-sub {
    font-size: clamp(9px,1.8vw,12px);
    color: rgba(255,255,255,.5);
    margin-top: 6px; letter-spacing: .04em;
  }
