/* ============================================================
   Don't Get Screwed — pure HTML5 + CSS
   Mobile-first, dark, sleek. No JavaScript.
   ============================================================ */

:root {
  --bg:        #0e1116;
  --bg-2:      #151a22;
  --surface:   #1b2330;
  --surface-2: #232d3d;
  --line:      #2a3546;
  --text:      #eef2f7;
  --muted:     #94a3b8;
  --hot:       #ff4d5e;   /* royally screwed */
  --hot-2:     #ff7a45;
  --warm:      #ffb020;   /* mildly pricked  */
  --accent:    #ff5470;
  --accent-2:  #b14bff;
  --safe:      #34d399;
  --radius:    18px;
  --shadow:    0 14px 40px rgba(0,0,0,.45);
  --maxw:      480px;
}

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

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

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(120% 90% at 50% -10%, #1a2230 0%, var(--bg) 55%) fixed;
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- App shell (phone-width, centered) ---------- */
.app {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  box-shadow: 0 0 80px rgba(0,0,0,.5);
  overflow: hidden;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) 18px 14px;
  background: rgba(14,17,22,.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -.02em; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.brand:active { transform: scale(.97); }
.brand__bolt { font-size: 1.25rem; filter: drop-shadow(0 2px 6px rgba(255,84,112,.5)); animation: wiggle 5s ease-in-out infinite; }
.brand__name { font-size: 1.05rem; }
.brand__name em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar__report {
  font-size: .82rem; font-weight: 700;
  padding: 8px 14px; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--hot-2));
  color: #fff; box-shadow: 0 6px 18px rgba(255,84,112,.35);
}
@keyframes wiggle { 0%,92%,100%{transform:rotate(0)} 94%{transform:rotate(-18deg)} 96%{transform:rotate(16deg)} 98%{transform:rotate(-8deg)} }

/* ---------- Tab radios (hidden) ---------- */
.tabstate { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }

/* ---------- Scroll area ---------- */
.screen {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px calc(118px + env(safe-area-inset-bottom));
  scroll-behavior: smooth;
}

/* ---------- Hero ---------- */
.hero { padding: 26px 4px 18px; }
.hero__kicker {
  display: inline-block;
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--hot-2);
  padding: 5px 12px; border-radius: 999px;
  background: rgba(255,122,69,.12); border: 1px solid rgba(255,122,69,.25);
}
.hero__title { margin: 14px 0 10px; font-size: 2rem; line-height: 1.08; font-weight: 900; letter-spacing: -.03em; }
.hero__title span { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { color: var(--muted); font-size: .96rem; max-width: 36ch; }
.hero__stats { display: flex; gap: 10px; margin-top: 20px; }
.stat {
  flex: 1; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 6px;
}
.stat strong { display: block; font-size: 1.15rem; font-weight: 800; }
.stat span { font-size: .68rem; color: var(--muted); }

/* ---------- Panels: show only the active tab ---------- */
.panel { display: none; animation: fade .35s ease both; }
#tab-map:checked  ~ .screen .panel--map  { display: block; }
#tab-list:checked ~ .screen .panel--list { display: block; }
#tab-safe:checked ~ .screen .panel--safe { display: block; }
/* hero only on the map tab to keep list/safe focused */
.panel--list, .panel--safe { padding-top: 26px; }
#tab-list:checked ~ .screen .hero,
#tab-safe:checked ~ .screen .hero { display: none; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.panel__title { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 14px; }
.panel__hint { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 12px; }

/* ---------- Map ---------- */
.map {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
  background: #1a2433;
}
.map__frame { width: 100%; height: 100%; border: 0; filter: grayscale(.25) contrast(1.05) brightness(.92); }

/* Pins overlaid on the map */
.pin { position: absolute; transform: translate(-50%, -100%); z-index: 5; }
.pin__dot {
  display: block; width: 20px; height: 20px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,.5);
}
.pin--hot  .pin__dot { background: var(--hot);  animation: pulseHot 1.8s ease-out infinite; }
.pin--warm .pin__dot { background: var(--warm); }
/* Featured red flag pin */
.pin--flag { z-index: 8; }
.pin__flag {
  display: block; font-size: 1.9rem; line-height: 1;
  transform-origin: 12% 95%;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.55)) drop-shadow(0 0 10px rgba(255,77,94,.45));
  animation: wave 2.6s ease-in-out infinite;
}
@keyframes wave { 0%,100%{transform:rotate(-4deg)} 50%{transform:rotate(6deg)} }
.pin__tip {
  position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%) scale(.9);
  white-space: nowrap; font-size: .72rem; font-weight: 600;
  background: #0b0e13; color: #fff; padding: 6px 10px; border-radius: 9px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: .18s ease;
}
.pin:hover .pin__tip, .pin:focus .pin__tip { opacity: 1; transform: translateX(-50%) scale(1); }
@keyframes pulseHot {
  0%   { box-shadow: 0 4px 10px rgba(0,0,0,.5), 0 0 0 0 rgba(255,77,94,.55); }
  100% { box-shadow: 0 4px 10px rgba(0,0,0,.5), 0 0 0 16px rgba(255,77,94,0); }
}
.map__legend {
  position: absolute; left: 12px; bottom: 12px; z-index: 6;
  display: flex; flex-direction: column; gap: 5px;
  font-size: .72rem; font-weight: 600;
  background: rgba(11,14,19,.82); backdrop-filter: blur(6px);
  padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line);
}
.map__legend span { display: flex; align-items: center; gap: 7px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot--hot { background: var(--hot); } .dot--warm { background: var(--warm); }
.flag-mini { font-size: .8rem; font-style: normal; line-height: 1; }

/* ---------- Hot-spot cards ---------- */
.card {
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px; margin-bottom: 12px;
  scroll-margin-top: 80px;
  transition: border-color .25s, transform .15s;
}
.card:active { transform: scale(.99); }
.card:target { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.card__rank {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.4rem;
}
.card__rank--hot  { background: rgba(255,77,94,.14);  border: 1px solid rgba(255,77,94,.3); }
.card__rank--warm { background: rgba(255,176,32,.14); border: 1px solid rgba(255,176,32,.3); }
.card__body h3 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card__body p { color: var(--muted); font-size: .86rem; margin: 5px 0 8px; }
.risk { font-size: .64rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.risk--hot  { background: rgba(255,77,94,.16);  color: var(--hot); }
.risk--warm { background: rgba(255,176,32,.16); color: var(--warm); }
.card__meta { display: flex; gap: 7px; flex-wrap: wrap; font-size: .74rem; color: var(--muted); }

/* ---------- Tips ---------- */
.tips { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.tip {
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 15px;
}
.tip__ico { font-size: 1.5rem; flex: none; }
.tip strong { display: block; font-size: .96rem; }
.tip p { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.cta {
  display: block; text-align: center; margin-top: 18px;
  font-weight: 800; padding: 15px; border-radius: 14px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 10px 24px rgba(177,75,255,.32);
}

/* ---------- Bottom tab bar ---------- */
.tabbar {
  position: sticky; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  gap: 2px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(14,17,22,.82);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar__btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: .66rem; font-weight: 600; color: var(--muted);
  padding: 6px 2px; border-radius: 12px; cursor: pointer;
  transition: color .2s, background .2s;
}
.tabbar__ico { font-size: 1.15rem; filter: grayscale(.4); transition: filter .2s; }
.tabbar__btn:hover { color: var(--text); }
/* active states driven by the radios */
#tab-map:checked  ~ .tabbar [data-tab="map"],
#tab-list:checked ~ .tabbar [data-tab="list"],
#tab-safe:checked ~ .tabbar [data-tab="safe"] {
  color: var(--accent);
  background: rgba(255,84,112,.1);
}
#tab-map:checked  ~ .tabbar [data-tab="map"]  .tabbar__ico,
#tab-list:checked ~ .tabbar [data-tab="list"] .tabbar__ico,
#tab-safe:checked ~ .tabbar [data-tab="safe"] .tabbar__ico { filter: none; }
.tabbar__fab {
  align-self: center;
  width: 54px; height: 54px; margin-top: -22px;
  display: grid; place-items: center;
  font-size: 1.6rem; font-weight: 400; color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--hot-2));
  box-shadow: 0 10px 24px rgba(255,84,112,.5);
  border: 3px solid var(--bg-2);
}
.tabbar__fab:active { transform: scale(.94); }

/* ---------- Modals (CSS :target) ---------- */
.modal { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.modal:target { visibility: visible; }
.modal__scrim {
  position: absolute; inset: 0;
  background: rgba(4,6,10,.6); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .3s;
}
.modal:target .modal__scrim { opacity: 1; }
.modal__sheet {
  position: absolute; left: 50%; bottom: 0;
  width: min(var(--maxw), 100%); transform: translate(-50%, 100%);
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 22px 22px 0 0; padding: 8px 20px calc(26px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow); transition: transform .34s cubic-bezier(.22,1,.36,1);
  max-height: 88dvh; overflow-y: auto;
}
.modal:target .modal__sheet { transform: translate(-50%, 0); }
.modal__grip { width: 42px; height: 5px; border-radius: 999px; background: var(--line); margin: 8px auto 14px; }
.modal__x {
  position: absolute; top: 16px; right: 18px;
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 50%; background: var(--surface); color: var(--muted); font-size: .8rem;
}
.modal__sheet h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.modal__lead { color: var(--muted); font-size: .9rem; margin: 6px 0 16px; }

/* ---------- Form ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: .8rem; font-weight: 600; color: var(--text); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 14px; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder, .field textarea::placeholder { color: #5d6b7e; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,84,112,.18);
}
.field textarea { resize: vertical; }
.form__submit {
  font: inherit; font-weight: 800; color: #fff; cursor: pointer;
  border: 0; border-radius: 14px; padding: 15px;
  background: linear-gradient(90deg, var(--accent), var(--hot-2));
  box-shadow: 0 10px 24px rgba(255,84,112,.35);
  transition: transform .12s;
}
.form__submit:active { transform: scale(.98); }
.form__note { font-size: .72rem; color: var(--muted); text-align: center; }

/* ---------- About modal ---------- */
.about__list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 4px 0 16px; font-size: .92rem; }
.about__list strong { font-weight: 700; }
.about__fine { font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- Larger screens: frame it like a phone ---------- */
@media (min-width: 540px) {
  body { padding: 24px 0; }
  .app { border-radius: 30px; min-height: calc(100dvh - 48px); border: 1px solid var(--line); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
