/* =========================================================
   Inbox Defender — game-specific styles
   ========================================================= */

.game-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.5rem 0; flex-wrap: wrap;
}
.back { color: var(--muted); text-decoration: none; font-size: .9rem; }
.back:hover { color: var(--accent); }

/* ---------------- start ---------------- */

.start-inner { padding: clamp(1.5rem, 6vw, 4rem) 0 2rem; max-width: 60ch; }

.how { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.75rem; }
.how-item { color: var(--muted); font-size: .95rem; }
.how-k {
  display: inline-block; min-width: 2.2rem; text-align: center;
  padding: .18rem .5rem; margin-right: .4rem;
  border: 1px solid var(--line-hi); border-radius: var(--r-sm);
  background: var(--panel); color: var(--text);
  font-family: var(--mono); font-size: .8rem;
}

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

.hud {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: .5rem; margin-bottom: .6rem;
}
.hud-cell {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: .55rem .8rem;
  display: flex; flex-direction: column; gap: .1rem;
}
.hud-label { font-size: .62rem; text-transform: uppercase; letter-spacing: .16em; color: var(--dim); font-weight: 700; }
.hud-val   { font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 800; font-variant-numeric: tabular-nums; }

.hud-cell.is-low .hud-val { color: var(--danger); }
.hud-cell.is-hot .hud-val { color: var(--warn); }

.timebar { height: 5px; background: var(--panel); border-radius: 99px; overflow: hidden; margin-bottom: 1.25rem; }
.timebar-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: left;
  transition: background .3s ease;
}
.timebar-fill.is-low { background: var(--danger); }

/* ---------------- the card ---------------- */

.deck {
  position: relative;
  min-height: 340px;
  display: flex; align-items: flex-start; justify-content: center;
  perspective: 1000px;
}

.card {
  position: relative;
  width: min(640px, 100%);
  background: linear-gradient(180deg, #f7fafc, #e8eef6);
  color: #10192b;
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  animation: card-in .28s cubic-bezier(.2,.8,.3,1) both;
}
.card:active { cursor: grabbing; }
.card.is-leaving { transition: transform .3s ease, opacity .3s ease; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(24px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

.card-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #d3dde9;
  background: #fff;
}
.card-from { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; }
.card-name { font-weight: 800; font-size: 1.02rem; }
.card-addr { font-family: var(--mono); font-size: .82rem; color: #56657f; word-break: break-all; }
.card-subject { margin-top: .55rem; font-size: 1.18rem; font-weight: 700; line-height: 1.3; }

.card-meta { margin-top: .45rem; font-size: .76rem; color: #6b7a94; font-family: var(--mono); }

.card-body { padding: 1.15rem 1.25rem 1.35rem; }
.card-body p { margin-bottom: .6rem; font-size: 1rem; color: #24314a; }

.card-link {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: .5rem; padding: .6rem .9rem;
  background: #dbe7f7; border: 1px solid #b9cde8; border-radius: var(--r-sm);
  color: #14458f; font-weight: 700; font-size: .95rem;
}
.card-href {
  display: block; margin-top: .45rem;
  font-family: var(--mono); font-size: .76rem; color: #6b7a94; word-break: break-all;
}

.card-attach {
  display: inline-flex; align-items: center; gap: .6rem;
  margin-top: .7rem; padding: .55rem .85rem;
  background: #eef2f7; border: 1px solid #cfd9e6; border-radius: var(--r-sm);
  font-size: .88rem; color: #2c3a53;
}
.card-attach .size { color: #7b8aa3; font-size: .8rem; }

/* drag hint overlays */
.card-stamp {
  position: absolute; top: 1.4rem;
  padding: .35rem 1rem;
  border: 3px solid; border-radius: var(--r-sm);
  font-weight: 900; letter-spacing: .12em; font-size: 1.05rem;
  opacity: 0; transition: opacity .12s ease;
  pointer-events: none;
}
.stamp-phish { left: 1.4rem; color: #d21f3c; border-color: #d21f3c; transform: rotate(-12deg); }
.stamp-safe  { right: 1.4rem; color: #0a8f5f; border-color: #0a8f5f; transform: rotate(12deg); }

/* ---------------- verdict flash ---------------- */

.verdict {
  position: absolute; inset: 0;
  display: none; align-items: center; justify-content: center;
  flex-direction: column; gap: .5rem;
  border-radius: var(--r-lg);
  z-index: 5;
  pointer-events: none;
  text-align: center;
  padding: 1.5rem;
}
.verdict.is-on { display: flex; animation: pop .25s ease both; }
.verdict-mark { font-size: 3.2rem; line-height: 1; }
.verdict-word { font-size: 1.5rem; font-weight: 900; letter-spacing: .04em; }
.verdict-tell { max-width: 46ch; color: var(--text); font-size: .95rem; line-height: 1.5; }
.verdict-flag { margin-top: .2rem; }

.verdict.ok    { background: rgba(9, 42, 32, .93); border: 2px solid var(--ok); }
.verdict.ok .verdict-word { color: var(--ok); }
.verdict.bad   { background: rgba(48, 10, 18, .94); border: 2px solid var(--danger); }
.verdict.bad .verdict-word { color: var(--danger); }

@keyframes pop {
  from { opacity: 0; transform: scale(.94); }
  to   { opacity: 1; transform: none; }
}

/* ---------------- choices ---------------- */

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.choice { padding: 1.1rem; font-size: 1.15rem; font-weight: 800; }
.choice-key { font-family: var(--mono); opacity: .55; font-size: .95rem; }
.choice-phish:hover { border-color: var(--danger); background: rgba(255,93,115,.14); color: var(--danger); }
.choice-safe:hover  { border-color: var(--ok);     background: rgba(47,227,166,.14); color: var(--ok); }
.choice[disabled] { opacity: .4; pointer-events: none; }

/* ---------------- end screen ---------------- */

.result-head { text-align: center; padding: 2rem 0 2.25rem; }
.result-head .title { font-size: clamp(3rem, 11vw, 5.5rem); font-variant-numeric: tabular-nums; }

.result-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: 1.35fr 1fr;
  align-items: start;
  margin-bottom: 1.5rem;
}
@media (max-width: 820px) { .result-grid { grid-template-columns: 1fr; } }

.missed-list { margin-top: .9rem; display: flex; flex-direction: column; gap: .9rem; max-height: 420px; overflow-y: auto; padding-right: .3rem; }
.missed-item { border-left: 3px solid var(--danger); padding: .1rem 0 .1rem .85rem; }
.missed-item.ok { border-left-color: var(--ok); }
.missed-subject { font-weight: 700; font-size: .98rem; }
.missed-addr { font-family: var(--mono); font-size: .76rem; color: var(--dim); word-break: break-all; margin: .2rem 0 .4rem; }
.missed-tell { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.missed-none { color: var(--muted); }

/* ---------------- responsive ---------------- */

@media (max-width: 560px) {
  .hud { grid-template-columns: repeat(2, 1fr); }
  .deck { min-height: 400px; }
  .choices { gap: .6rem; }
  .choice { padding: 1rem .5rem; font-size: 1rem; }
  .card-subject { font-size: 1.05rem; }
}
