/* "Юрист с Гроув-стрит": a San Andreas–style mission page.
   Everything is scoped under .gta-page / .gta-* so the rest of the site
   keeps the editorial system. HUD colors follow the original game's HUD:
   money green, health red, wanted-star gold, menu blue. */

.gta-page {
  --gta-bg: #120f0c;
  --gta-fg: #efe6d6;
  --gta-muted: #a89a86;
  --gta-line: #2c2620;
  --gta-gold: #e1a32a;
  --gta-green: #3e8a35;
  --gta-red: #c3241f;
  --gta-blue: #a9c6ec;
  --gta-yellow: #f1c84b;
  --gta-display: "Dela Gothic One", "Arial Black", Impact, sans-serif;
  --gta-outline: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000, 0 3px 0 #000, 0 -2px 0 #000, 2px 0 0 #000, -2px 0 0 #000;
  --gta-outline-thin: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 2px 2px rgba(0, 0, 0, 0.6);
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(196, 112, 44, 0.28), transparent 60%),
    var(--gta-bg);
  color: var(--gta-fg);
}


.gta-shared {
  margin: 0 auto 1.5rem;
  max-width: 40rem;
  border-radius: 9999px;
  background: rgba(225, 163, 42, 0.12);
  color: var(--gta-gold);
  padding: 0.7rem 1.25rem;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
}

.gta-head { text-align: center; margin-bottom: 1.75rem; }
.gta-h1 {
  font-family: var(--gta-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 6vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: var(--gta-outline);
  text-wrap: balance;
}

/* ---------- Game frame ---------- */

.gta-frame {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 16 / 10;
  max-height: 82vh;
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #1c1813;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--gta-line);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: "DM Sans", system-ui, sans-serif;
  outline: none;
}
@media (max-width: 640px) {
  .gta-frame {
    aspect-ratio: auto;
    height: min(76svh, 640px);
    margin-inline: -1rem;
    width: calc(100% + 2rem);
    border-radius: 0;
  }
}

.gta-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  transition: filter 1.4s ease;
}
.gta-frame.is-wasted .gta-canvas { filter: grayscale(1) contrast(1.1) brightness(0.75); }

/* Los Santos smog: warm haze toward the edges. */
.gta-smog {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(130% 90% at 50% 45%, transparent 55%, rgba(120, 70, 30, 0.35) 100%),
    linear-gradient(180deg, rgba(255, 170, 90, 0.08), rgba(90, 40, 80, 0.12));
  mix-blend-mode: multiply;
}

.gta-fade {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 30;
}
.gta-fade.is-on { opacity: 1; }

/* ---------- HUD ---------- */

.gta-hud {
  position: absolute;
  top: 3.2cqw;
  right: 3.2cqw;
  display: flex;
  align-items: flex-start;
  gap: 1.4cqw;
  z-index: 10;
  pointer-events: none;
}
.gta-weapon {
  width: clamp(44px, 8.5cqw, 84px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #f3eadb, #b9ab94);
  border: 3px solid #000;
  color: #2b2219;
  display: grid;
  place-items: center;
}
.gta-weapon svg { width: 62%; height: 62%; }
.gta-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5cqw; }
.gta-clock,
.gta-money {
  font-family: var(--gta-display);
  line-height: 1;
  text-shadow: var(--gta-outline);
  letter-spacing: 0.02em;
}
.gta-clock { color: #e8e3da; font-size: clamp(15px, 2.6cqw, 28px); }
.gta-money { color: var(--gta-green); font-size: clamp(17px, 3.2cqw, 34px); font-variant-numeric: tabular-nums; }
.gta-money.is-up { color: #6fd25e; }
.gta-money.is-down { color: var(--gta-red); }
.gta-bar {
  width: clamp(80px, 15cqw, 150px);
  height: clamp(8px, 1.3cqw, 13px);
  background: #3b0b0a;
  border: 2px solid #000;
}
.gta-bar i { display: block; height: 100%; width: 100%; background: var(--gta-red); transition: width 0.3s ease; }
.gta-stars { display: flex; gap: 0.2cqw; font-size: clamp(14px, 2.6cqw, 26px); line-height: 1; }
.gta-stars span { color: rgba(0, 0, 0, 0.5); text-shadow: var(--gta-outline-thin); -webkit-text-stroke: 1px #6b5a3a; }
.gta-stars span.is-on { color: var(--gta-gold); -webkit-text-stroke: 0; }
.gta-stars.is-blink span.is-on { animation: gta-blink 0.35s steps(2, jump-none) 8; }
@keyframes gta-blink { 50% { opacity: 0; } }

.gta-radar {
  position: absolute;
  left: 3cqw;
  bottom: 3cqw;
  width: clamp(92px, 17cqw, 150px);
  height: auto;
  aspect-ratio: 1;
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.gta-zone {
  position: absolute;
  right: 3.4cqw;
  bottom: 3.4cqw;
  z-index: 10;
  font-family: var(--gta-display);
  font-size: clamp(18px, 3.4cqw, 38px);
  color: #e7e3dc;
  text-shadow: var(--gta-outline);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}
.gta-zone.is-on { opacity: 1; transform: none; }

.gta-help {
  position: absolute;
  top: 3.2cqw;
  left: 3.2cqw;
  max-width: min(46cqw, 380px);
  z-index: 12;
  background: rgba(0, 0, 0, 0.72);
  color: #f2f2f2;
  font-size: clamp(12px, 1.7cqw, 15px);
  line-height: 1.45;
  padding: 0.75em 0.95em;
  border-radius: 4px;
  pointer-events: none;
}

.gta-objective {
  position: absolute;
  left: 50%;
  bottom: 9cqw;
  width: min(78%, 640px);
  transform: translateX(-50%);
  z-index: 12;
  text-align: center;
  font-weight: 700;
  font-size: clamp(14px, 2.2cqw, 21px);
  line-height: 1.35;
  color: #f4f4f4;
  text-shadow: var(--gta-outline-thin);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.gta-objective.is-on { opacity: 1; }
.gta-c-y { color: var(--gta-yellow); }
.gta-c-r { color: #ff5a4f; }
.gta-c-b { color: #7fb0ff; }
.gta-c-g { color: #74d66a; }

.gta-toast {
  position: absolute;
  left: 50%;
  top: 22%;
  transform: translate(-50%, -6px);
  z-index: 14;
  max-width: 84%;
  text-align: center;
  font-family: var(--gta-display);
  font-size: clamp(14px, 2.3cqw, 22px);
  color: #fff;
  text-shadow: var(--gta-outline-thin);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.gta-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.gta-controls {
  position: absolute;
  right: 3cqw;
  bottom: 3cqw;
  z-index: 13;
  display: flex;
  gap: 8px;
}
.gta-frame.has-zone .gta-controls { bottom: calc(3.4cqw + clamp(18px, 3.4cqw, 38px) + 10px); }
.gta-chip {
  border: 0;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.66);
  color: #f2f2f2;
  font: 600 clamp(12px, 1.6cqw, 14px)/1 "DM Sans", system-ui, sans-serif;
  padding: 0.75em 1.05em;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.gta-chip:hover { background: rgba(0, 0, 0, 0.82); }
.gta-chip-icon { padding: 0; width: 2.6em; height: 2.6em; display: grid; place-items: center; }
.gta-chip-icon svg { width: 1.1em; height: 1.1em; }

/* ---------- Cutscenes ---------- */

.gta-bars { position: absolute; inset: 0; z-index: 15; pointer-events: none; }
.gta-bars i {
  position: absolute;
  left: 0;
  right: 0;
  height: 11%;
  background: #000;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.gta-bars i:first-child { top: 0; transform: translateY(-100%); }
.gta-bars i:last-child { bottom: 0; transform: translateY(100%); }
.gta-frame.is-cine .gta-bars i { transform: none; }
.gta-frame.is-menu .gta-bars i:first-child { transform: translateY(-100%); }
.gta-frame.is-menu .gta-bars i:last-child { transform: translateY(100%); }
.gta-frame.is-cine .gta-hud,
.gta-frame.is-cine .gta-radar,
.gta-frame.is-cine .gta-controls,
.gta-frame.is-cine .gta-objective { opacity: 0; }
.gta-hud, .gta-radar, .gta-controls { transition: opacity 0.3s ease; }

.gta-sub {
  position: absolute;
  left: 50%;
  bottom: 13%;
  width: min(86%, 720px);
  transform: translateX(-50%);
  z-index: 16;
  text-align: center;
  color: #fff;
  font-weight: 700;
  font-size: clamp(14px, 2.25cqw, 21px);
  line-height: 1.4;
  text-shadow: var(--gta-outline-thin);
  cursor: pointer;
  text-wrap: balance;
}
.gta-sub b { color: var(--gta-yellow); font-weight: 700; }
.gta-sub small {
  display: block;
  margin-top: 0.7em;
  font-size: 0.66em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  animation: gta-pulse 1.6s ease-in-out infinite;
}
@keyframes gta-pulse { 50% { opacity: 0.35; } }
.gta-skip {
  position: absolute;
  right: 2.6cqw;
  top: calc(11% + 10px);
  z-index: 17;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.72);
  font: 600 13px/1 "DM Sans", system-ui, sans-serif;
  padding: 8px;
  cursor: pointer;
}
.gta-skip:hover { color: #fff; }

/* ---------- Case menu (the shop / pause menu look) ---------- */

.gta-menu {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 18;
  width: min(92%, 640px);
  max-height: 88%;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.84);
  border-radius: 6px;
  padding: clamp(14px, 2.6cqw, 26px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  overscroll-behavior: contain;
}
.gta-menu-place {
  font-family: var(--gta-display);
  color: var(--gta-blue);
  font-size: clamp(13px, 1.8cqw, 17px);
  margin-bottom: 0.5em;
}
.gta-menu-title {
  color: #fff;
  font-weight: 700;
  font-size: clamp(15px, 2.25cqw, 21px);
  line-height: 1.35;
  margin-bottom: 0.9em;
  text-wrap: pretty;
}
.gta-menu-options { display: grid; gap: 4px; }
.gta-menu-item {
  display: flex;
  align-items: baseline;
  gap: 0.7em;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #e9e9e9;
  font: 500 clamp(14px, 1.95cqw, 18px)/1.35 "DM Sans", system-ui, sans-serif;
  padding: 0.6em 0.75em;
  cursor: pointer;
}
.gta-menu-item kbd {
  font: inherit;
  font-family: var(--gta-display);
  color: var(--gta-blue);
  min-width: 1em;
}
.gta-menu-item:hover,
.gta-menu-item:focus-visible,
.gta-menu-item.is-sel { background: rgba(169, 198, 236, 0.18); color: #fff; outline: none; }
.gta-menu-item:disabled { cursor: default; opacity: 0.45; }
.gta-menu-item[hidden] { display: none; }
.gta-menu-item.is-right { background: rgba(62, 138, 53, 0.5); color: #fff; opacity: 1; }
.gta-menu-item.is-wrong { background: rgba(195, 36, 31, 0.5); color: #fff; opacity: 1; }
.gta-menu-explain {
  margin-top: 1.1em;
  padding: 0 0.75em;
  color: #e6e6e6;
  font-size: clamp(13px, 1.8cqw, 16px);
  line-height: 1.55;
}
.gta-menu-explain strong { display: block; font-family: var(--gta-display); font-weight: 400; margin-bottom: 0.3em; }
.gta-menu-explain .is-right { color: #7ed36f; }
.gta-menu-explain .is-wrong { color: #ff6b5f; }
.gta-menu [data-menu-next] { margin-top: 1em; }

/* ---------- Big screen text ---------- */

.gta-big {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.gta-big.is-on { opacity: 1; }
.gta-big-main {
  font-family: var(--gta-display);
  font-size: clamp(30px, 8cqw, 86px);
  line-height: 1;
  color: var(--gta-gold);
  text-shadow: var(--gta-outline);
  letter-spacing: 0.01em;
}
.gta-big-sub {
  margin-top: 0.4em;
  font-family: var(--gta-display);
  font-size: clamp(16px, 3.4cqw, 34px);
  color: #fff;
  text-shadow: var(--gta-outline);
}
.gta-big-wasted .gta-big-main { color: #b51d18; font-size: clamp(40px, 11cqw, 120px); }
.gta-big-mission .gta-big-main { color: #f0eadf; font-size: clamp(26px, 6.5cqw, 66px); }
.gta-big-mission .gta-big-sub { color: var(--gta-gold); }

/* ---------- Full screens: title, pause, result ---------- */

.gta-screen {
  position: absolute;
  inset: 0;
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6cqw 5cqw;
  background: radial-gradient(90% 80% at 50% 40%, rgba(18, 12, 8, 0.5), rgba(10, 6, 4, 0.88));
  overflow-y: auto;
}
.gta-screen[hidden] { display: none; }

.gta-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--gta-display);
  line-height: 0.86;
  color: #fff;
  text-shadow: var(--gta-outline);
  transform: rotate(-3deg);
}
.gta-logo span:nth-child(1) { font-size: clamp(30px, 6.4cqw, 66px); }
.gta-logo span:nth-child(2) { font-size: clamp(46px, 11cqw, 112px); color: var(--gta-gold); }
.gta-logo span:nth-child(3) { font-size: clamp(26px, 5.4cqw, 56px); }
.gta-title-mission {
  margin-top: 1.1em;
  font-family: var(--gta-display);
  font-size: clamp(15px, 2.6cqw, 26px);
  color: var(--gta-blue);
  text-shadow: var(--gta-outline-thin);
}
.gta-title-text {
  margin-top: 0.5em;
  color: #e6ddcf;
  font-size: clamp(13px, 1.9cqw, 17px);
  max-width: 34em;
}
.gta-title-actions { margin-top: 1.4em; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.gta-title-hint { margin-top: 1.1em; font-size: clamp(12px, 1.6cqw, 14px); color: rgba(255, 255, 255, 0.55); }
.gta-hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .gta-hint-desk { display: none; }
  .gta-hint-touch { display: inline; }
}

.gta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font: 700 0.9375rem/1 "DM Sans", system-ui, sans-serif;
  padding: 0.95em 1.4em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.gta-btn:hover { background: rgba(255, 255, 255, 0.12); }
.gta-btn:active { transform: translateY(1px); }
.gta-btn-main { background: var(--gta-gold); border-color: var(--gta-gold); color: #1d1206; }
.gta-btn-main:hover { background: #f0b743; }

.gta-pause { gap: 4px; }
.gta-pause-title {
  font-family: var(--gta-display);
  font-size: clamp(26px, 5cqw, 48px);
  color: #fff;
  text-shadow: var(--gta-outline);
  margin-bottom: 0.4em;
}
.gta-pause .gta-menu-item { justify-content: center; max-width: 320px; background: rgba(0, 0, 0, 0.5); }
.gta-pause .gta-menu-item:hover,
.gta-pause .gta-menu-item:focus-visible { background: rgba(169, 198, 236, 0.22); }
.gta-cheat, .gta-share { margin-top: 1.2em; width: min(100%, 360px); text-align: left; }
.gta-cheat label, .gta-share label { display: block; font-size: 12px; color: rgba(255, 255, 255, 0.6); margin-bottom: 6px; }
.gta-cheat-row { display: flex; gap: 8px; }
.gta-cheat-row input {
  flex: 1;
  min-width: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font: 600 15px/1 "DM Sans", system-ui, sans-serif;
  padding: 0.8em 1.1em;
  letter-spacing: 0.06em;
}
.gta-cheat-row input:focus { outline: none; border-color: var(--gta-blue); }
.gta-cheat-row .gta-btn { padding: 0.8em 1.1em; white-space: nowrap; }

.gta-result { justify-content: flex-start; background: rgba(10, 7, 5, 0.86); }
.gta-result-card { margin: auto; width: min(100%, 520px); }
.gta-result-score {
  font-family: var(--gta-display);
  color: var(--gta-blue);
  font-size: clamp(13px, 1.9cqw, 17px);
}
.gta-result-title {
  margin-top: 0.25em;
  font-family: var(--gta-display);
  font-weight: 400;
  font-size: clamp(26px, 5.4cqw, 52px);
  line-height: 1.05;
  color: var(--gta-gold);
  text-shadow: var(--gta-outline);
  text-wrap: balance;
}
.gta-result-perks { margin-top: 0.7em; color: #ece4d6; font-size: clamp(13px, 1.9cqw, 16px); line-height: 1.55; }
.gta-result-cases {
  margin: 1em auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.gta-result-cases li {
  font-size: 12px;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.4em 0.8em;
  background: rgba(195, 36, 31, 0.35);
  color: #ffd9d6;
}
.gta-result-cases li.is-right { background: rgba(62, 138, 53, 0.4); color: #dcf7d6; }
.gta-share { margin-inline: auto; }
.gta-result-actions { margin-top: 1em; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* ---------- Below the frame ---------- */

.gta-card {
  margin-top: 2.5rem;
  border-radius: 18px;
  background: #1b1612;
  box-shadow: 0 0 0 1px var(--gta-line);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
}
.gta-card-title {
  font-family: var(--gta-display);
  font-weight: 400;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  line-height: 1.15;
  color: #fff;
  text-wrap: balance;
}
.gta-card-actions { margin-top: 1.2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.gta-page footer { background: transparent; }

@media (prefers-reduced-motion: reduce) {
  .gta-bars i, .gta-zone, .gta-objective, .gta-toast, .gta-big, .gta-canvas { transition: none; }
  .gta-stars.is-blink span.is-on, .gta-sub small { animation: none; }
}

/* Narrow frames (phones): no weapon icon, objective sits above the radar. */
@container (max-width: 560px) {
  .gta-weapon { display: none; }
  .gta-objective {
    bottom: calc(3cqw + clamp(92px, 17cqw, 150px) + 12px);
    width: 92%;
  }
  .gta-help { max-width: 52cqw; }
}

/* ---------- Full screen ---------- */

.gta-frame:fullscreen,
.gta-frame.is-full {
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}
.gta-frame:-webkit-full-screen { width: 100%; height: 100%; max-height: none; border-radius: 0; }
.gta-frame.is-full {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}
html.gta-noscroll, html.gta-noscroll body { overflow: hidden; }
.gta-fs-out { display: none; }
[data-fullscreen].is-on .gta-fs-in { display: none; }
[data-fullscreen].is-on .gta-fs-out { display: inline; }
.gta-title-fs { position: absolute; top: 3.2cqw; right: 3.2cqw; }

/* During cutscenes the help box sits below the top letterbox bar. */
.gta-frame.is-cine:not(.is-menu) .gta-help { top: calc(11% + 12px); z-index: 16; }

/* ---------- Share card on the result screen ---------- */

.gta-card-preview { margin: 1.1em auto 0; width: min(46%, 190px); }
.gta-card-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: rotate(-2deg);
}
.gta-share-name {
  width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font: 600 15px/1 "DM Sans", system-ui, sans-serif;
  padding: 0.8em 1.1em;
}
.gta-share-name:focus { outline: none; border-color: var(--gta-blue); }
.gta-share-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.gta-share-actions .gta-btn { flex: 1 1 auto; }
.gta-share-actions [hidden] { display: none; }
.gta-share-links { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.gta-share-links .gta-chip { text-decoration: none; }
