/* GTA 6 Videos — Vice City neon theme. Plain CSS, no dependencies. */
* { box-sizing: border-box; }

:root {
  --bg: #0d0618;
  --bg-2: #150a2e;
  --panel: #241243;
  --panel-2: #2a1650;
  --border: #4b2a86;
  --text: #f5efff;
  --muted: #b9a8d9;
  --pink: #ff2e88;
  --pink-soft: #ff6aa9;
  --aqua: #2de2ff;
  --orange: #ff8c42;
  --sunset-1: #ffb347;
  --sunset-2: #ff7b54;
  --sunset-3: #ff2e88;
  --sunset-4: #a93df0;
  --sunset-5: #2de2ff;
  --green: #39d353;
  --red: #ff3b30;
  --blue-badge: #2f7bff;
  --radius: 14px;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(169, 61, 240, 0.28), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 110%, rgba(45, 226, 255, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(255, 46, 136, 0.10), transparent 60%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: var(--aqua); }
button, select, input { font: inherit; color: inherit; }
button { min-height: 44px; }

/* ---------- header ---------- */
.site-header { position: relative; }
.sunset-strip {
  height: 10px;
  background: linear-gradient(90deg,
    var(--sunset-1) 0%, var(--sunset-2) 25%, var(--sunset-3) 50%,
    var(--sunset-4) 75%, var(--sunset-5) 100%);
  box-shadow: 0 0 18px rgba(255, 46, 136, 0.55), 0 0 32px rgba(45, 226, 255, 0.25);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 24px;
  text-align: center;
}
.header-inner h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--sunset-1), var(--pink), var(--sunset-4), var(--aqua));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 24px rgba(255, 46, 136, 0.25);
}
.tagline { margin: 4px 0 0; color: var(--muted); font-size: 1.05rem; }
.totals { margin: 12px 0 0; font-size: 1.15rem; font-weight: 700; }
.progress { margin: 4px 0 0; color: var(--aqua); font-weight: 600; }
.header-actions { margin-top: 14px; }

/* ---------- buttons ---------- */
.btn {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
}
.btn:hover, .btn:focus-visible {
  border-color: var(--pink);
  box-shadow: 0 0 12px rgba(255, 46, 136, 0.45);
  outline: none;
}
.btn.active { background: var(--pink); border-color: var(--pink); color: #fff; }

/* ---------- panels / collapsing sections ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 0 12px 24px; }
.panel {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 0 24px rgba(75, 42, 134, 0.35);
}
.section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  min-height: 52px;
}
.section-toggle:hover { background: rgba(255, 46, 136, 0.08); }
.section-title { font-size: 1.2rem; font-weight: 800; letter-spacing: 0.02em; }
.section-hint { flex: 1; color: var(--muted); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron { font-size: 1.1rem; color: var(--pink-soft); transition: transform 0.2s ease; }
section.collapsed .chevron { transform: rotate(-90deg); }
section.collapsed .section-body { display: none; }
.section-body { padding: 0 16px 16px; }

/* ---------- map ---------- */
.map-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.map-btn { min-width: 48px; font-size: 1.3rem; padding: 6px 12px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-left: auto; color: var(--muted); font-size: 0.88rem; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 2px solid #fff3; }
.dot-current { background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot-open { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.dot-done { background: var(--red); box-shadow: 0 0 8px var(--red); }
.dot-provisional { background: transparent; border: 2px dashed var(--aqua); }
.map-viewport {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0a4d6e;
  touch-action: none;
  aspect-ratio: 2676 / 3446;
  max-height: 78vh;
}
.map-viewport.map-fs {
  position: fixed;
  inset: 0;
  z-index: 100;
  border-radius: 0;
  max-height: none;
  aspect-ratio: auto;
  background: #000;
}
.map-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-origin: 0 0; will-change: transform; }
.map-canvas img { width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
#map-pins { position: absolute; inset: 0; }
.map-pin {
  position: absolute;
  width: 30px; height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
.map-pin .pin-count {
  position: absolute; inset: 0;
  transform: rotate(45deg);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
}
.map-pin.pin-open { background: var(--orange); box-shadow: 0 0 10px rgba(255, 140, 66, 0.9); }
.map-pin.pin-done { background: var(--red); box-shadow: 0 0 10px rgba(255, 59, 48, 0.9); }
.map-pin.pin-current { background: var(--green); box-shadow: 0 0 12px rgba(57, 211, 83, 0.95); z-index: 2; }
.map-pin.pin-provisional { border-style: dashed; }
.map-pin:hover, .map-pin:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; z-index: 3; }
.map-note { color: var(--muted); font-size: 0.88rem; margin: 10px 0 0; }

/* ---------- filters ---------- */
.filter-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.filter-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.filter-field select, .filter-field input {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 44px;
  width: 100%;
}
.filter-field select:focus, .filter-field input:focus { outline: 2px solid var(--aqua); outline-offset: 1px; border-color: var(--aqua); }
.filter-search { grid-column: 1 / -1; }
.filter-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.result-count { margin-left: auto; color: var(--muted); font-size: 0.92rem; }

/* ---------- video cards ---------- */
.video-group { margin-bottom: 18px; }
.group-head {
  display: flex; align-items: baseline; gap: 10px;
  padding: 10px 4px 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.group-head .group-name { font-size: 1.05rem; font-weight: 800; color: var(--pink-soft); }
.group-head .group-meta { color: var(--muted); font-size: 0.9rem; }
.group-head .group-toggle { margin-left: auto; background: none; border: 1px solid var(--border); border-radius: 8px; min-height: 36px; padding: 4px 12px; cursor: pointer; color: var(--muted); }
.video-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin: 10px 0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}
.video-card.flash { animation: flash 1.6s ease; }
@keyframes flash {
  0%, 100% { box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35); }
  25% { box-shadow: 0 0 0 3px var(--aqua), 0 0 24px var(--aqua); }
}
.video-card.is-current { border-color: var(--green); box-shadow: 0 0 16px rgba(57, 211, 83, 0.35); }
.video-card.is-done { opacity: 0.55; }
.video-card.is-done .card-title { text-decoration: line-through; text-decoration-color: var(--pink); }
.card-top { display: flex; align-items: flex-start; gap: 10px; }
.card-rank { font-size: 0.85rem; color: var(--muted); font-weight: 700; min-width: 30px; padding-top: 4px; }
.card-title { margin: 0; font-size: 1.08rem; line-height: 1.35; flex: 1; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.badge {
  display: inline-block;
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em;
  padding: 3px 8px; border-radius: 999px;
}
.badge-new { background: var(--blue-badge); color: #fff; box-shadow: 0 0 10px rgba(47, 123, 255, 0.7); }
.badge-part { background: var(--sunset-4); color: #fff; }
.badge-done { background: var(--red); color: #fff; }
.badge-current { background: var(--green); color: #06210c; }
.badge-prov { background: transparent; border: 1px dashed var(--aqua); color: var(--aqua); }
.badge-unverified { background: transparent; border: 1px solid var(--sunset-2); color: var(--sunset-2); }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 0.92rem; margin-top: 8px; }
.card-meta .author { color: var(--aqua); font-weight: 700; }
.card-desc { margin: 10px 0 0; }
.card-note { margin: 8px 0 0; color: var(--muted); font-size: 0.92rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  color: var(--muted);
}
.tag-loc { color: var(--sunset-1); border-color: #7a5a2e; }
.tag-type { color: var(--pink-soft); border-color: #6e2a4d; }
.card-player { margin-top: 12px; }
.card-player video {
  width: 100%;
  max-height: 560px;
  border-radius: 10px;
  background: #000;
  display: block;
}
.video-unavailable { color: var(--muted); font-size: 0.9rem; margin: 0; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.check-done {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; background: var(--bg-2); font-weight: 600;
}
.check-done input { width: 20px; height: 20px; accent-color: var(--pink); cursor: pointer; }
.source-link { color: var(--aqua); font-weight: 600; }
.completed-heading {
  margin: 26px 0 4px;
  padding: 10px 4px 6px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 1rem;
}
.empty-note { color: var(--muted); text-align: center; padding: 24px 8px; }

.site-footer { max-width: 1100px; margin: 0 auto; padding: 0 16px 28px; color: var(--muted); font-size: 0.88rem; text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 700px) {
  .filter-row { grid-template-columns: 1fr; }
  .map-legend { margin-left: 0; }
  .result-count { margin-left: 0; width: 100%; }
  .card-rank { display: none; }
  .section-hint { display: none; }
}
@media (min-width: 701px) {
  #video-list, #completed-list { display: block; }
}
