/* style.ui-assets.css */

/* ============================================================================
   OUTPOST — ASSET-DRIVEN UI SKIN   (art in public/assets/art/ui/)
   Maps the hand-made plates/frames/medals onto the existing markup. Every rule
   layers a fallback colour/gradient UNDER the image, so a missing file still
   looks intentional. Loaded last, so it wins the cascade.
   ============================================================================ */

:root {
  --ui: "assets/art/ui";
}

/* ---------------------------------------------------------------- PANELS ---- */
.panel,
.ars-shop-panel,
.set-panel {
  position: relative;
  border: 0 !important;
  background:
    linear-gradient(165deg, rgba(28, 32, 38, 0.86), rgba(12, 15, 20, 0.92)),
    url("assets/art/ui/panel-bg.webp") center / cover no-repeat !important;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.6) !important;
}

/* ornate frame (stretched over the panel edges; transparent centre) */
.panel::after,
.ars-shop-panel::after,
.set-panel::after {
  content: "";
  position: absolute;
  inset: -10px;
  background: url("assets/art/ui/frame.png") center / 100% 100% no-repeat;
  pointer-events: none;
  z-index: 4;
}
/* keep content above the frame */
.panel > *,
.ars-shop-panel > *,
.set-panel > * { position: relative; z-index: 5; }

/* ------------------------------------------------------- TITLES / KICKERS --- */
.panel-title {
  position: relative;
  padding: 10px 24px;
  background: url("assets/art/ui/header-plate.png") center / 100% 100% no-repeat;
}
.panel-title::after {
  content: "";
  display: block;
  height: 14px;
  margin: 6px auto 0;
  width: min(340px, 86%);
  background: url("assets/art/ui/divider.png") center / contain no-repeat;
}
.panel-kicker {
  display: inline-block;
  padding: 6px 26px;
  background: url("assets/art/ui/banner.png") center / 100% 100% no-repeat;
  color: #f2d9a6 !important;
}

/* -------------------------------------------------------------- BUTTONS ----- */
.primary-btn,
.hero-play {
  border: 0 !important;
  box-shadow: none !important;
  background:
    url("assets/art/ui/btn.png") center / 100% 100% no-repeat,
    linear-gradient(180deg, #f5c36b, #d5892a) !important;
  color: #2a1c0b !important;
  text-shadow: 0 1px 0 rgba(255, 235, 190, 0.35);
}
.primary-btn:active,
.hero-play:active { filter: brightness(0.94); transform: translateY(1px); }

.secondary-btn {
  border: 0 !important;
  background:
    url("assets/art/ui/btn-secondary.png") center / 100% 100% no-repeat,
    linear-gradient(180deg, rgba(60, 66, 78, 0.9), rgba(28, 32, 40, 0.95)) !important;
  color: #e9dfcb !important;
}
.primary-btn.small,
.ars-shop-close,
.set-close { background-size: 100% 100%; }

/* small square close buttons */
.ars-shop-x {
  border: 0 !important;
  background: url("assets/art/ui/close.png") center / contain no-repeat !important;
  color: transparent !important;
  width: 38px !important;
  height: 38px !important;
}

/* ---------------------------------------------------- TITLE MENU TILES ------ */
.secondary-tile {
  border: 0 !important;
  background:
    url("assets/art/ui/tile.png") center / 100% 100% no-repeat,
    linear-gradient(180deg, rgba(40, 45, 55, 0.9), rgba(20, 24, 30, 0.95)) !important;
  color: #e9dfcb !important;
  transition: filter .12s ease, transform .12s ease;
}
.secondary-tile:hover {
  background-image:
    url("assets/art/ui/tile-selected.png"),
    linear-gradient(180deg, rgba(60, 48, 26, 0.95), rgba(30, 24, 14, 0.98)) !important;
  transform: translateY(-2px);
}

/* the big 2-player card + mode toggle cards */
.menu-action-card,
.mode-option {
  border: 0 !important;
  background:
    url("assets/art/ui/mode-card.png") center / 100% 100% no-repeat,
    linear-gradient(180deg, rgba(40, 45, 55, 0.9), rgba(20, 24, 30, 0.95)) !important;
  color: #e9dfcb !important;
}
.mode-option.selected,
.menu-action-card:hover {
  background-image:
    url("assets/art/ui/mode-card-selected.png"),
    linear-gradient(180deg, rgba(60, 48, 26, 0.95), rgba(30, 24, 14, 0.98)) !important;
}

/* The brown card art made the selected mode hard to read — give it an
   unmistakable amber ring + glow + lift, and a ✓ badge. */
.mode-picker .mode-option {
  position: relative;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.mode-picker .mode-option.selected {
  outline-color: var(--gold, #f5c36b) !important;
  box-shadow: 0 0 0 2px rgba(245,195,107,.5), 0 0 22px rgba(232,161,58,.55) !important;
  transform: translateY(-2px);
}
.mode-picker .mode-option.selected::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 8px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold, #f5c36b);
  color: #241a08;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(0,0,0,.5);
}

/* ------------------------------------------------- SHARED-WATCH LOBBY ------- */
.player-card {
  border: 0 !important;
  background: url("assets/art/ui/player-card.png") center / 100% 100% no-repeat !important;
}
.player-card.waiting {
  background-image: url("assets/art/ui/player-card-waiting.png") !important;
}
/* QR must sit on a SOLID light quiet-zone to scan — the decorative frame image
   behind it broke reading on phones. Keep a themed border instead. */
#game-qr {
  padding: 16px !important;
  background: #ffffff !important;
  border: 3px solid #6b5836 !important;
  border-radius: 10px !important;
}

/* --------------------------------------------------------- INPUTS ---------- */
#name-input,
.room-input {
  border: 0 !important;
  background: url("assets/art/ui/input.png") center / 100% 100% no-repeat !important;
  color: #f0e6d2 !important;
}
.room-select {
  background: url("assets/art/ui/select.png") center / 100% 100% no-repeat !important;
}

/* -------------------------------------------------- GAME-OVER RESULTS ------- */
.result-grid > div {
  border: 0 !important;
  background: url("assets/art/ui/result-card.png") center / 100% 100% no-repeat !important;
}
.rank-callout {
  border: 0 !important;
  background: url("assets/art/ui/rank-callout.png") center / 100% 100% no-repeat !important;
  color: #f2d9a6 !important;
}

/* ---------------------------------------------------- LEADERBOARD ---------- */
.score-row.top1 .rank { background: url("assets/art/ui/medal1.png") center / contain no-repeat; }
.score-row.top2 .rank { background: url("assets/art/ui/medal2.png") center / contain no-repeat; }
.score-row.top3 .rank { background: url("assets/art/ui/medal3.png") center / contain no-repeat; }

/* ------------------------------------------------------ ARROW ICONS -------- */
/* uses assets/art/ui/left.png + right.png */
.hero-arrow {
  color: transparent !important;
  display: inline-block;
  width: 34px; height: 22px;
  background: url("assets/art/ui/right.png") center / contain no-repeat;
}
[data-back]::before,
.room-back-btn::before,
.back-btn::before {
  content: "";
  display: inline-block;
  width: 26px; height: 18px;
  margin-right: 8px;
  vertical-align: -3px;
  background: url("assets/art/ui/left.png") center / contain no-repeat;
}

/* --------------------------------------------- READABLE TITLE / CARD TEXT --- */
/* the hero + map-card text was tiny; bump it (!important beats runtime CSS) */
.hero-kicker { font-size: 13px !important; letter-spacing: 3px !important; }
.tagline { font-size: clamp(16px, 2.1vw, 21px) !important; }
.hero-meta span { font-size: 12.5px !important; padding: 6px 12px !important; }
.hero-tip { font-size: 13px !important; line-height: 1.5 !important; }
.hero-tip .hero-tip-key { font-size: 11px !important; }
.secondary-tile { font-size: 13.5px !important; }
.secondary-tile small { font-size: 11px !important; }
.menu-action-card small { font-size: 11px !important; }
.menu-action-card strong { font-size: 16px !important; }
.map-card { height: 90px !important; }
.map-card strong { font-size: 14px !important; }
.map-card small { font-size: 11px !important; }
.map-card-overlay { padding: 10px !important; }
.map-card.selected::after { font-size: 9px !important; }

/* ------------------------------------------------ BIGGER TITLE EMBLEM ------- */
.game-emblem-wrap {
  width: min(560px, 52vw) !important;
  height: clamp(150px, 26vh, 240px) !important;
  margin: 8px 0 10px !important;
}
.game-emblem {
  height: 100% !important;
  width: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  object-position: left center;
}

/* ------------------------------------------------ MORE ART PUT TO WORK ------ */
/* Armory shop header uses the illustrated ARMORY banner (armory.png) */
.ars-shop-title {
  color: transparent !important;
  background: url("assets/art/ui/armory.png") left center / auto 100% no-repeat;
  min-height: 58px;
  min-width: 220px;
}
/* small text buttons get the small-action plate */
.link-btn {
  border: 0 !important;
  padding: 9px 18px !important;
  background: url("assets/art/ui/small-action.png") center / 100% 100% no-repeat !important;
  color: #e9dfcb !important;
  text-decoration: none !important;
}
.link-btn.danger { color: #f0b0a2 !important; }
/* bolted corner ornaments frame the battlefield cards */
.map-card { position: relative; }
.map-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    url("assets/art/ui/corner-tl.png") left top / 24px no-repeat,
    url("assets/art/ui/corner-tr.png") right top / 24px no-repeat,
    url("assets/art/ui/corner-bl.png") left bottom / 24px no-repeat,
    url("assets/art/ui/corner-br.png") right bottom / 24px no-repeat;
}

/* ---------------------------------------------- TITLE LEFT-COLUMN SPACING --- */
/* breathing room between each hero row (the user asked for more spacing) */
.modern-title-layout {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vh, 22px);
}
.modern-title-layout > * { margin-top: 0 !important; margin-bottom: 0 !important; }
.modern-actions { gap: 12px; }
.secondary-actions { gap: 12px; margin-top: 4px; }
.hero-meta { gap: 10px; }
