/* Skin Guessr */

.screen { padding: 26px 0 40px; }


/* ---------- HUD ---------- */
.hud { display: flex; align-items: center; gap: 7px; }
.hud__item {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 62px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel);
}
.hud__item span { font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.hud__item b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hud__item--streak.is-hot { border-color: rgba(240,147,43,.55); background: rgba(240,147,43,.10); }
.hud__item--streak.is-hot b { color: var(--accent-2); }
.hud__item--lives b { letter-spacing: .1em; color: var(--good); }
.hud__item--lives.is-low { border-color: rgba(242,84,75,.5); background: rgba(242,84,75,.10); }
.hud__item--lives.is-low b { color: var(--bad); }
.hud__item--clock b { font-variant-numeric: tabular-nums; }
.hud__item--clock.is-low { border-color: rgba(242,84,75,.5); background: rgba(242,84,75,.10); }
.hud__item--clock.is-low b { color: var(--bad); animation: pulse .9s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.hud__quit {
  width: 34px; height: 34px; border-radius: var(--r-sm);
  border: 1px solid var(--line); color: var(--dim); font-size: 15px;
}
.hud__quit:hover { color: var(--bad); border-color: rgba(242,84,75,.45); }

/* ═══════════ SETUP ═══════════ */
.setup__intro { text-align: center; padding: 18px 0 30px; }
.setup__intro h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 900; letter-spacing: -0.035em; }
.setup__intro p { margin: 13px auto 0; max-width: 470px; color: var(--muted); font-size: 15px; line-height: 1.6; }

.setup { max-width: 720px; margin: 0 auto; padding: 26px; }
.field + .field { margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--line); }
.field--split { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.field__label {
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 12px;
}

.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: stretch; }
.mode {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  padding: 16px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--bg-soft);
  transition: border-color .15s ease, background .15s ease;
}
.mode:hover { border-color: var(--line-2); }
.mode.is-on { border-color: var(--accent); background: rgba(240,147,43,.09); }
.mode__title { font-size: 15px; font-weight: 800; }
.mode.is-on .mode__title { color: var(--accent-2); }
.mode__desc { font-size: 12.5px; line-height: 1.5; color: var(--muted); flex: 1; }

/* pool size on the left, your record on the right */
.mode__foot {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 11.5px; font-weight: 700;
}
.mode__pool { color: var(--dim); letter-spacing: .02em; }
.mode__best { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mode__best.is-ranked { color: var(--accent-2); }
.mode.is-on .mode__pool { color: var(--muted); }
.mode__title .ranked {
  margin-left: 7px; padding: 2px 7px; border-radius: 999px;
  font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-2); background: rgba(240,147,43,.14); border: 1px solid rgba(240,147,43,.4);
  vertical-align: middle;
}


.setup__foot { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.setup__foot .btn { width: 100%; }

/* ---------- the board under the difficulty choice ---------- */
.setupboard { max-width: 720px; margin: 18px auto 0; padding: 20px 22px; }
.setupboard__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
}
.setupboard__head h2 {
  font-size: 11.5px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--dim);
}
.setupboard__head span { color: var(--accent-2); }
.setupboard__all {
  font-size: 12px; font-weight: 700; color: var(--accent-2);
  text-decoration: none; white-space: nowrap;
}
.setupboard__all:hover { text-decoration: underline; }
.setupboard__list { display: flex; flex-direction: column; gap: 1px; }
.setupboard__empty { padding: 14px 4px; font-size: 13px; color: var(--dim); }

/* ═══════════ PLAY ═══════════ */
.stage {
  position: relative; max-width: 760px; margin: 0 auto;
  aspect-ratio: 16 / 9; border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  background: radial-gradient(75% 85% at 50% 42%, #1a2130, #0c1017);
  display: grid; place-items: center; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.stage__glow {
  position: absolute; inset: 0;
  background: radial-gradient(60% 70% at 50% 55%, var(--glow, rgba(255,255,255,.05)), transparent 70%);
  opacity: 0; transition: opacity .45s ease;
}
.stage.is-revealed .stage__glow { opacity: 1; }
.stage__img {
  position: relative; z-index: 1;
  max-width: 84%; max-height: 84%;
  object-fit: contain; opacity: 0;
  filter: drop-shadow(0 14px 34px rgba(0,0,0,.6));
  transition: opacity .3s ease, transform .5s cubic-bezier(.2,.8,.3,1);
  transform: scale(.97);
  -webkit-user-select: none; user-select: none;
}
.stage__img.is-in { opacity: 1; transform: scale(1); }
.stage__spinner {
  position: absolute; width: 30px; height: 30px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.12); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
.stage__spinner[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.stage__wear {
  position: absolute; z-index: 2; left: 14px; bottom: 13px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(9,12,17,.82); border: 1px solid var(--line-2);
  font-size: 11.5px; font-weight: 800; letter-spacing: .04em;
}

/* ---------- the clock ---------- */
.timer {
  position: absolute; z-index: 3; top: 0; left: 0; right: 0; height: 4px;
  background: rgba(255,255,255,.06);
}
.timer__bar {
  height: 100%; width: 100%; transform-origin: left center;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  will-change: transform;
}
.timer.is-low .timer__bar { background: var(--bad); }

/* ---------- guess form ---------- */
.guess { max-width: 620px; margin: 22px auto 0; }
.guess[hidden] { display: none; }

.combo { position: relative; }
.combo__input {
  width: 100%; height: 54px; padding: 0 18px;
  border-radius: var(--r); border: 1px solid var(--line-2);
  background: var(--panel); font-size: 16px; font-weight: 600;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.combo__input::placeholder { color: var(--dim); font-weight: 500; }
.combo__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240,147,43,.14); }

.combo__list {
  position: absolute; z-index: 30; top: calc(100% + 7px); left: 0; right: 0;
  max-height: 292px; overflow-y: auto;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: #10141c; box-shadow: 0 22px 46px rgba(0,0,0,.55);
  padding: 5px;
}
.sugg {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 11px; border-radius: 9px; text-align: left;
}
.sugg:hover, .sugg.is-active { background: rgba(255,255,255,.07); }
.sugg__dot { width: 4px; height: 22px; border-radius: 3px; flex: 0 0 4px; }
.sugg__txt { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sugg__weapon { color: var(--muted); font-weight: 600; }
.sugg__name { font-weight: 700; }
.sugg mark { background: none; color: var(--accent-2); }
.sugg__cat { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); flex: 0 0 auto; }
.combo__empty { padding: 13px; text-align: center; font-size: 13px; color: var(--dim); }

.actions { display: flex; gap: 10px; margin-top: 18px; }
.actions .btn { flex: 1; }
.actions .btn--primary { flex: 1.6; }
.cost { font-size: 11px; font-weight: 800; color: var(--dim); }

/* ---------- reveal ---------- */
.reveal { max-width: 620px; margin: 22px auto 0; text-align: center; animation: rise .3s ease; }
.reveal[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(9px); } }

.reveal__verdict { font-size: 13px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.reveal__verdict.is-good { color: var(--good); }
.reveal__verdict.is-part { color: var(--accent-2); }
.reveal__verdict.is-bad  { color: var(--bad); }
.reveal__points { display: block; margin-top: 4px; font-size: 26px; font-weight: 900; letter-spacing: -0.02em; color: var(--text); }

.reveal__name { margin-top: 10px; font-size: 25px; font-weight: 900; letter-spacing: -0.025em; line-height: 1.2; }
.reveal__name span { color: var(--muted); font-weight: 700; }
.reveal__meta { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-top: 13px; }
.reveal__meta .tag { border-color: var(--line-2); }
.reveal__yours { margin-top: 12px; font-size: 13px; color: var(--muted); min-height: 19px; }
.reveal__yours b { color: var(--text); }
.reveal .btn { margin-top: 18px; min-width: 200px; }
.reveal__hint { margin-top: 9px; font-size: 11.5px; color: var(--dim); }
kbd {
  font: inherit; font-size: 11px; font-weight: 700;
  padding: 2px 6px; border-radius: 5px;
  border: 1px solid var(--line-2); background: var(--panel);
}

/* ═══════════ RESULT ═══════════ */
.result { max-width: 560px; margin: 20px auto 0; padding: 36px 28px; text-align: center; }
.result__label { font-size: 11.5px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--dim); }
.result__score {
  font-size: clamp(48px, 10vw, 80px); font-weight: 900; letter-spacing: -0.045em; line-height: 1.05; margin-top: 12px;
  background: linear-gradient(135deg, #ffd08a, #f0932b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.result__best { font-size: 13px; color: var(--muted); min-height: 19px; margin-top: 10px; }
.result__best b { color: var(--accent-2); }

.result__stats { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin: 26px 0 4px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rstat b.is-diff { text-transform: capitalize; }
.rstat b { display: block; font-size: 21px; font-weight: 900; font-variant-numeric: tabular-nums; }
.rstat span { font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--dim); }

.result__actions { display: flex; gap: 10px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

/* ---------- share card ---------- */
.share {
  margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line);
}
.share__preview {
  display: block; width: min(300px, 78%); margin: 0 auto 18px;
  border-radius: var(--r); border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
}
.share__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.share__status { margin-top: 12px; font-size: 12.5px; color: var(--muted); }

/* social sharing */
.share__social { margin-top: 18px; }
.share__social-label { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.share__social-buttons { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.btn--social {
  min-width: 90px; padding: 9px 14px;
  font-size: 13px; font-weight: 700;
  border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--bg-soft);
  text-decoration: none; text-align: center;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.btn--social:hover { transform: translateY(-1px); border-color: var(--line-2); }
.btn--social.btn--reddit:hover { border-color: #ff4500; background: rgba(255, 69, 0, 0.1); }
.btn--social.btn--discord:hover { border-color: #5865f2; background: rgba(88, 101, 242, 0.1); }
.btn--social.btn--x:hover { border-color: #000; background: rgba(0, 0, 0, 0.08); }

/* ---------- score submit ---------- */
.submit { margin-top: 24px; }
.submit .btn { min-width: 200px; }
.submit__status { margin-top: 13px; font-size: 13px; color: var(--muted); }
.submit__status b { color: var(--accent-2); }

/* ---------- guest nudge ---------- */
.guest {
  margin-top: 24px; padding: 18px;
  border: 1px solid rgba(240,147,43,.32); border-radius: var(--r);
  background: rgba(240,147,43,.07);
}
.guest__text { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 14px; }
.guest .btn { min-width: 220px; }

/* ---------- leaderboard ---------- */
.leaderboard { max-width: 560px; margin: 20px auto 0; padding: 20px 22px; }
.leaderboard__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.leaderboard__all { font-size: 12px; font-weight: 700; color: var(--accent-2); text-decoration: none; white-space: nowrap; }
.leaderboard__all:hover { text-decoration: underline; }
.leaderboard__head h2 { font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }
.leaderboard__head span { color: var(--accent-2); }
.leaderboard__list { display: flex; flex-direction: column; gap: 2px; }
.lbrow {
  display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 12px;
  padding: 9px 8px; border-radius: 9px; font-size: 13.5px;
}
.lbrow.is-you { background: rgba(240,147,43,.11); }
.lbrow__rank { font-size: 12px; font-weight: 800; color: var(--dim); text-align: center; }
.lbrow--1 .lbrow__rank { color: #ffd166; }
.lbrow--2 .lbrow__rank { color: #d6dbe4; }
.lbrow--3 .lbrow__rank { color: #d59a68; }
.lbrow__name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbrow__score { font-weight: 900; font-variant-numeric: tabular-nums; }
.lbempty { padding: 16px 8px; text-align: center; font-size: 13px; color: var(--dim); }

.review { max-width: 900px; margin: 34px auto 0; }
.review__head { font-size: 11.5px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; color: var(--dim); margin-bottom: 13px; text-align: center; }
.review__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 11px; }
.rcard { padding: 11px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.rcard.is-good { border-color: rgba(67,201,107,.34); }
.rcard.is-bad { border-color: rgba(242,84,75,.28); }
.rcard__img { height: 74px; display: grid; place-items: center; margin-bottom: 8px; }
.rcard__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.rcard__name { font-size: 12px; font-weight: 700; line-height: 1.35; }
.rcard__weapon { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.rcard__wear { margin-top: 5px; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); }


/* ═══════════ mobile ═══════════ */
@media (max-width: 720px) {
  .wrap { width: min(1100px, 100% - 26px); }
    .hud__item { min-width: 54px; padding: 5px 8px; }
  .modes, .field--split { grid-template-columns: 1fr; }
  .setup { padding: 20px; }
  .stage { aspect-ratio: 4 / 3; }
  .actions { flex-wrap: wrap; }
  .actions .btn { min-width: calc(50% - 5px); }
  .actions .btn--primary { min-width: 100%; order: -1; }
  .result__score { font-size: 50px; }
  .result__stats { gap: 20px; }
}
