/* Cyber Gyn Bestiary — modern medieval monster catalogue */
.monsters-page {
  --bestiary-ink: #2a160d;
  --bestiary-gold: #c99a45;
  --bestiary-green: #163c22;
  --bestiary-parchment: #d9c29a;
  padding: 18px;
  background:
    linear-gradient(rgba(255, 244, 207, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 244, 207, .04) 1px, transparent 1px),
    linear-gradient(135deg, #d8c39d, #c5a878 52%, #d8c39d);
  background-size: 22px 22px, 22px 22px, auto;
}

.monsters-page .monsters-topbar {
  position: relative;
  margin: -4px -4px 16px;
  padding: 14px 18px 16px;
  border: 2px solid #28160d;
  outline: 1px solid #b88a3d;
  background:
    radial-gradient(circle at 50% 0, rgba(226, 184, 87, .2), transparent 48%),
    linear-gradient(180deg, #214d2c, #102f1a);
  color: #f5dfaa;
  box-shadow: inset 0 0 0 3px rgba(227, 191, 111, .13), 0 4px 9px rgba(43, 23, 10, .32);
}

.monsters-page .monsters-topbar::after {
  content: "◆  ⚔  ◆";
  display: block;
  margin-top: 8px;
  color: #e2b85b;
  font-size: 13px;
  letter-spacing: 5px;
}

.monsters-page .monsters-topbar h2 {
  margin: 3px 0 2px;
  color: #ffe39a;
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1;
  text-shadow: 0 2px #080f09, 0 0 13px rgba(255, 207, 91, .2);
}

.monsters-page .monsters-help {
  color: #ead9b4;
  font-size: 16px;
}

.monsters-page .support-language-switch,
.monsters-page .support-language-switch a {
  color: #f3d78f;
}

.bestiary-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) minmax(155px, 1fr) minmax(155px, 1fr);
  gap: 12px;
  margin-bottom: 12px;
  padding: 13px;
  border: 2px solid #3c2212;
  outline: 1px solid #a57838;
  background: linear-gradient(180deg, rgba(73, 43, 20, .96), rgba(42, 24, 13, .98));
  box-shadow: inset 0 0 0 3px rgba(226, 183, 97, .08), 0 3px 8px rgba(36, 18, 8, .25);
}

.bestiary-tools label {
  display: block;
  margin: 0 0 5px;
  color: #f0d89b;
  font-size: 14px;
  font-weight: 700;
}

.bestiary-input-wrap {
  position: relative;
}

.bestiary-input-wrap > span {
  position: absolute;
  left: 11px;
  top: 50%;
  color: #795221;
  font-size: 22px;
  font-weight: 900;
  transform: translateY(-52%);
  pointer-events: none;
}

.bestiary-tools input,
.bestiary-tools select {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  border: 1px solid #110b07;
  border-radius: 2px;
  outline: 1px solid #9d763d;
  background: linear-gradient(#f1e1bd, #d7bd8d);
  color: #28150b;
  font: 600 16px Georgia, "Times New Roman", serif;
  box-shadow: inset 0 2px 5px rgba(62, 35, 14, .18);
}

.bestiary-tools input {
  padding: 8px 12px 8px 39px;
}

.bestiary-tools select {
  padding: 8px 34px 8px 10px;
  cursor: pointer;
}

.bestiary-tools input:focus,
.bestiary-tools select:focus {
  outline: 2px solid #e2b858;
  box-shadow: 0 0 0 3px rgba(226, 184, 88, .2), inset 0 2px 5px rgba(62, 35, 14, .18);
}

.bestiary-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 13px;
  padding: 8px 12px;
  border: 1px solid #815b2d;
  background: rgba(239, 218, 177, .58);
  color: #42220f;
  font-size: 15px;
  box-shadow: inset 0 1px rgba(255,255,255,.35);
}

.bestiary-summary-crest {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid #6e451b;
  border-radius: 50%;
  background: linear-gradient(#f3d889, #bc812b);
  color: #3b1c09;
}

.monsters-page .monsters-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.monsters-page .monster-card-link {
  display: block;
  min-width: 0;
}

.monsters-page .monster-card-link[hidden] {
  display: none !important;
}

.monsters-page .monster-card {
  position: relative;
  box-sizing: border-box;
  min-height: 218px;
  height: 100%;
  overflow: hidden;
  padding: 13px 13px 12px;
  border: 2px solid #28170d;
  outline: 1px solid #8e6532;
  background:
    radial-gradient(circle at 75% 30%, rgba(255, 235, 176, .42), transparent 36%),
    linear-gradient(145deg, #d8c198, #b99664);
  box-shadow: inset 0 0 0 3px rgba(255,241,200,.16), inset 0 -18px 28px rgba(72,38,15,.08), 0 4px 9px rgba(44,23,10,.24);
  transition: transform .18s ease, box-shadow .18s ease, outline-color .18s ease;
}

.monsters-page .monster-card::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(77, 43, 18, .2);
  pointer-events: none;
}

.monsters-page .monster-card-clickable:hover,
.monsters-page .monster-card-link:focus-visible .monster-card {
  z-index: 1;
  outline-color: #e1b85c;
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 3px rgba(255,241,200,.2), 0 10px 18px rgba(42,21,8,.34), 0 0 0 2px rgba(208,160,67,.22);
}

.monsters-page .monster-card-body {
  position: relative;
  z-index: 1;
  min-height: 166px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
}

.monsters-page .monster-card-figure {
  order: -1;
  display: grid;
  width: 92px;
  height: 92px;
  flex: 0 0 92px;
  place-items: center;
  border: 1px solid #5e3d1d;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(247,225,167,.7) 0 42%, rgba(66,39,20,.2) 44% 46%, rgba(38,24,15,.58) 47% 100%);
  box-shadow: inset 0 0 11px rgba(0,0,0,.45), 0 2px 0 rgba(255,238,188,.42);
}

.monsters-page .monster-card-image {
  width: 76px;
  height: 76px;
  margin: 0;
  object-fit: contain;
  filter: drop-shadow(0 4px 3px rgba(28,14,6,.46));
  transition: transform .18s ease;
}

.monsters-page .monster-card-link:hover .monster-card-image {
  transform: scale(1.08);
}

.monsters-page .monster-card-copy {
  width: 100%;
  text-align: center;
}

.monsters-page .monster-card h3 {
  margin: 2px 0 0;
  padding: 7px 5px 5px;
  border: 0;
  border-bottom: 1px solid #8c6533;
  background: transparent;
  color: #2b160b;
  font-size: 20px;
  line-height: 1.15;
  text-shadow: 0 1px rgba(255,240,196,.8);
}

.monsters-page .monster-card-category {
  display: block;
  margin: 5px 0 0;
  color: #68401e;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.monster-level-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  padding: 4px 7px;
  border: 1px solid #090f0a;
  border-radius: 2px;
  background: linear-gradient(#2d6338, #12351c);
  color: #ffe39a;
  font: 800 12px Georgia, "Times New Roman", serif;
  letter-spacing: .04em;
  box-shadow: inset 0 1px rgba(255,255,255,.17), 0 2px 4px rgba(0,0,0,.3);
}

.monster-card-action {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  color: #174728;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.monster-card-action span {
  transition: transform .18s ease;
}

.monster-card-link:hover .monster-card-action span {
  transform: translateX(3px);
}

.monsters-page .monster-tier-1 {
  background: radial-gradient(circle at 75% 30%, rgba(239,225,181,.45), transparent 36%), linear-gradient(145deg, #d2c49e, #a99b70);
}

.monsters-page .monster-tier-2 {
  background: radial-gradient(circle at 75% 30%, rgba(220,235,209,.4), transparent 36%), linear-gradient(145deg, #c5c39a, #939264);
}

.monsters-page .monster-tier-3:not(.monster-card-boss) {
  outline-color: #9b7635;
  background: radial-gradient(circle at 75% 30%, rgba(244,211,126,.42), transparent 36%), linear-gradient(145deg, #d0b577, #9e7b43);
}

.monsters-page .monsters-bosses {
  margin-top: 24px;
  padding: 12px;
  border: 2px solid #38120d;
  outline: 1px solid #b68838;
  background: linear-gradient(135deg, rgba(70,20,15,.13), rgba(126,75,26,.14));
  box-shadow: inset 0 0 18px rgba(72, 19, 13, .16);
}

.monsters-page .monsters-grid-bosses {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.monsters-page .monster-card-boss {
  min-height: 245px;
  border-color: #48150f;
  outline-color: #c18e36;
  background:
    radial-gradient(circle at 50% 25%, rgba(255,197,84,.25), transparent 35%),
    linear-gradient(145deg, #bd8a55, #79502e);
  box-shadow: inset 0 0 0 3px rgba(255,220,145,.13), inset 0 -30px 38px rgba(50,12,9,.17), 0 5px 11px rgba(47,17,10,.34);
}

.monsters-page .monster-card-boss .monster-card-figure {
  width: 112px;
  height: 112px;
  flex-basis: 112px;
  border-color: #6d2316;
  background: radial-gradient(circle, rgba(245,196,100,.66) 0 42%, rgba(107,34,21,.35) 44% 47%, rgba(45,14,11,.72) 48% 100%);
}

.monsters-page .monster-card-boss .monster-card-image {
  width: 92px;
  height: 92px;
}

.monsters-page .monster-card-boss h3 {
  color: #44140d;
  border-bottom-color: #7b321e;
}

.monsters-page .monster-card-boss .monster-card-category,
.monsters-page .monster-card-boss .monster-card-action {
  color: #4f160f;
}

.monster-boss-badge {
  background: linear-gradient(#8a2a1c, #43120e);
  color: #ffdc79;
}

.bestiary-empty {
  margin: 18px 0 4px;
  padding: 28px 18px;
  border: 2px dashed #79562d;
  background: rgba(226, 203, 161, .6);
  color: #45240f;
  text-align: center;
}

.bestiary-empty[hidden] {
  display: none;
}

.bestiary-empty > span {
  display: block;
  margin-bottom: 5px;
  color: #69281c;
  font-size: 34px;
}

.bestiary-empty strong {
  display: block;
  font-size: 21px;
}

.bestiary-empty p {
  margin: 5px 0 0;
}

@media (max-width: 900px) {
  .bestiary-tools {
    grid-template-columns: 1fr 1fr;
  }

  .bestiary-search-field {
    grid-column: 1 / -1;
  }

  .monsters-page .monsters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .monsters-page {
    padding: 11px;
  }

  .bestiary-tools,
  .monsters-page .monsters-grid,
  .monsters-page .monsters-grid-bosses {
    grid-template-columns: 1fr;
  }

  .bestiary-search-field {
    grid-column: auto;
  }

  .monsters-page .monster-card {
    min-height: 154px;
  }

  .monsters-page .monster-card-body {
    min-height: 124px;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    align-content: center;
    column-gap: 10px;
  }

  .monsters-page .monster-card-figure {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 76px;
    height: 76px;
    flex-basis: 76px;
  }

  .monsters-page .monster-card-image {
    width: 62px;
    height: 62px;
  }

  .monsters-page .monster-card-copy,
  .monster-card-action {
    grid-column: 2;
    text-align: left;
  }

  .monsters-page .monster-card h3 {
    padding-right: 42px;
    text-align: left;
  }

  .monster-card-action {
    justify-content: flex-start;
    margin-top: 0;
  }

  .monsters-page .monster-card-boss .monster-card-figure {
    width: 82px;
    height: 82px;
    flex-basis: 82px;
  }

  .monsters-page .monster-card-boss .monster-card-image {
    width: 68px;
    height: 68px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .monsters-page .monster-card,
  .monsters-page .monster-card-image,
  .monster-card-action span {
    transition: none;
  }
}
