﻿@import url("https://fonts.googleapis.com/css2?family=MedievalSharp&family=Poppins:wght@400;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Crimson+Text:wght@400;600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap");

* {
  box-sizing: border-box;
}

body {
  font-family: "Nunito", sans-serif;
  max-width: 600px;
  margin: auto !important;
  background-color: #4f483cc7;
  color: #26231c;
  position: relative;
  overflow-x: hidden;
  background-image: url(../images/light-scenery.png);
  background-size: 1910px;
  background-position: center;
  background-blend-mode: overlay;
  font-size: 14px;
  background-attachment: fixed;
}

/* main { ... }  (intentionally left empty) */

.font-bold {
  font-weight: 600 !important;
}

/*

    Main classes

*/

header.header {
  background-color: #d1c3ac;
  padding: 4px;
  border-color: #8b817b;
  border-bottom-width: 0px;
  border-left-width: 4px;
    border-right-width: 4px;
    border-style: double;
  max-width: 600px;
  width: 100%;
  top: 0px;
  position: fixed;
  backdrop-filter: blur(4px);
  /* font-family: 'Cinzel Decorative', cursive; */
  border-radius: 0 0 6px 6px;
  box-shadow: 0px 0px 2px 2px #00000061;
  left: 0;
  right: 0;
  margin: auto;
}

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(139, 0, 0, 0.2);
  border: 2px solid #8b0000;
  border-radius: 6px;
  color: #8b0000;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
}

.logout-btn:hover {
  background: rgba(139, 0, 0, 0.4);
  border-color: #a00000;
  color: #a00000;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(139, 0, 0, 0.3);
}

.logout-btn i {
  font-size: 18px;
}

/* Go to battle / Go to menu button in player card */
.switch-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: rgb(0 0 0 / 41%);
  border: 1px solid #f5deb366;
  border-radius: 6px;
  color: #f3ead9;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.25s ease;
  margin: 5px 0;

}

.switch-page-btn:hover {
  background: rgb(0 0 0 / 41%);
  /* border-color: #a03030; */
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(41, 33, 7, 0.35);
}

.switch-page-btn i {
  font-size: 0.9em;
  opacity: 0.95;
}

.flex-l {
  display: flex;
  flex-direction: row;
  align-items: center;
  align-content: center;
  flex-wrap: nowrap;
  border: 4px double #8b817b;
  border-top: 0;
  background: #d1c3ac;
  position: fixed;
  top: 30px;
  max-width: 600px;
  width: 100%;
  border-radius: 0 0 6px 6px;
  z-index: 999;
  padding-bottom: 3px;
  padding-right: 12px;
  box-shadow: 0px 4px 2px 2px #00000061;
  left: 0;
  right: 0;
  margin: auto;
}

.level {
  flex: 1 0 10%;
  text-align: center;
  background: #ff000000;
  max-width: max-content;
  max-height: max-content;
  padding: 0 5px;
  margin-right: -20px;
  z-index: 8;
}

.level img {
  filter: drop-shadow(-4px 4px 3px rgba(0, 0, 0, 0.5));
}

.bar.fl {
  flex: 1 0 90%;
}

.bar {
  background: #0c0c0c40;
  color: white;
  border: 1px solid #1c1c1c80;
  border-top: 0;
  border-bottom: 0;
  position: relative;
  border-radius: 4px;
}

.xp-bar {
  padding: 2px 0;
  position: relative;
  background: #cfb90e !important;
  /* background: #d9dd13fc; */
  color: #000000c9;
  font-size: 10px;
  height: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 3px;
  font-style: italic;
  font-weight: bold;
  max-width: 100%;
  box-shadow: inset 0px -3px 7px 0px #0000007a;
}

.bar-values {
  position: absolute;
  top: -0.5px;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  text-align: center;
  width: max-content;
  color: #fffcfc;
  font-size: 8px;
  /* background: #00000061; */
  padding: 0 6px;
  border-radius: 5px;
  text-shadow: 0 0 3px black;
  font-weight: bold;
}

.logo {
  color: #6c5241;
  font-family: "FontAwesome";
  font-size: 14px !important;
}

.logo-new {
  color: #cab79c;
  text-shadow: 0 0 1px #644b3d;
}

.currencies {
  background-color: rgb(255 255 255 / 13%);
  border-radius: 6px;
  margin-right: 0.5rem;
  color: rgb(66 66 66);
  font-size: 10.5px;
  line-height: 1.25rem;
  padding: 0.3rem;
  /* font-family: monospace; */
  letter-spacing: -0.5px;
  padding-bottom: 0px;
  padding-top: 0px;
  font-weight: 700;
}

.footer {
  --footer-bg-top: #2a241f;
  --footer-bg-bot: #1e1a16;
  --footer-edge: #5a4836;
  --footer-gold: #e2c07a;
  --footer-gold-soft: #c89c58;
  --footer-ink: #efdbad;
  --footer-ink-muted: #b7a078;

  padding: 0;
  background: linear-gradient(180deg, var(--footer-bg-top) 0%, var(--footer-bg-bot) 100%);
  max-width: 600px;
  width: 100%;
  bottom: 0;
  position: fixed;
  border-top: 1px solid var(--footer-edge);
  border-radius: 10px 10px 0 0;
  box-shadow:
    0 -8px 24px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(226, 192, 122, 0.15);
  z-index: 10000;
  left: 0;
  right: 0;
  margin: auto;
}

/* Thin gold seam along the very top */
.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(226, 192, 122, 0.55) 20%,
    rgba(226, 192, 122, 0.85) 50%,
    rgba(226, 192, 122, 0.55) 80%,
    transparent 100%);
  pointer-events: none;
}

.footer .footer-nav {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  padding: 4px 4px 2px;
  gap: 2px;
}

.footer a.menu {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  color: var(--footer-ink-muted);
  padding: 6px 4px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.footer a.menu .menu-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(226, 192, 122, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.footer a.menu .menu-icon i {
  font-size: 15px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.footer a.menu .menu-label {
  color: inherit;
  opacity: 0.9;
}

/* Primary tab (Battle / Menu) â€” slightly more prominent */
.footer a.menu.menu--primary .menu-icon {
  background: linear-gradient(180deg, rgba(226, 192, 122, 0.18), rgba(226, 192, 122, 0.06));
  border-color: rgba(226, 192, 122, 0.35);
  color: var(--footer-gold);
}

.footer a.menu.menu--primary {
  color: var(--footer-ink);
}

/* Hover */
.footer a.menu:hover {
  color: var(--footer-ink);
}

.footer a.menu:hover .menu-icon {
  background: rgba(226, 192, 122, 0.12);
  border-color: rgba(226, 192, 122, 0.45);
  color: var(--footer-gold);
}

.footer a.menu:hover .menu-icon i {
  transform: translateY(-1px);
}

.footer a.menu:active .menu-icon {
  transform: scale(0.96);
}

/* Active state â€” shown on the tab whose drop-up is currently open */
.footer a.menu.is-active {
  color: #fff4d1;
}

.footer a.menu.is-active .menu-icon {
  background: linear-gradient(180deg, rgba(226, 192, 122, 0.35), rgba(200, 156, 88, 0.18));
  border-color: rgba(226, 192, 122, 0.75);
  color: #fff4d1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 0 1px rgba(226, 192, 122, 0.25),
    0 2px 10px rgba(226, 192, 122, 0.25);
}

.footer a.menu.is-active::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, transparent, var(--footer-gold) 50%, transparent);
  box-shadow: 0 0 8px rgba(226, 192, 122, 0.6);
  pointer-events: none;
}

.footer a.menu.is-active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--footer-gold);
  box-shadow: 0 0 6px rgba(226, 192, 122, 0.8);
  pointer-events: none;
}

/* Quest alert badge â€” small, crisp, readable on dark bar */
.footer .menu-alert {
  display: none;
  position: absolute;
  top: -4px;
  right: -5px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: #c2281f;
  color: #fff4d1;
  font-weight: 900;
  font-size: 10px;
  line-height: 15px;
  text-align: center;
  border: 1px solid #1e1a16;
  box-shadow: 0 0 0 1px rgba(226, 192, 122, 0.5), 0 0 6px rgba(194, 40, 31, 0.6);
  font-family: 'Poppins', sans-serif;
}

@media (max-width: 420px) {
  .footer a.menu { font-size: 9px; padding: 5px 2px 4px; }
  .footer a.menu .menu-icon { width: 28px; height: 28px; }
  .footer a.menu .menu-icon i { font-size: 14px; }
}

.blood-text {
  color: #6c5241;
}

.blood-text-light {
  color: #c3c5c9;
}

.blood-text-dark {
  color: #2a2411;
}

.info-div {
  background: #f9efca45;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 5px;
  margin: 5px;
  border-radius: 4px;
  background: #f9efca45;
  color: #2a2411;
  font-weight: bold;
}

.card {
  background-color: rgb(192 178 157) !important;
    /* background-image: url(../images/design/card.png); */
    /* background-size: 118% 150%; */
    /* background-position: center; */
    /* background-repeat: no-repeat; */
    border-color: rgb(171 153 133);
    color: #2a2411;
    border-width: 1px;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    /* box-shadow: 0px 0px 2px 2px #00000061; */
    padding: 10px !important;
    /* filter: drop-shadow(4px 4px 10px black);*/
}
.card-light {
  background: #e9e7e33d !important; 
}
.card-dark {
  /* background-color: rgb(83 76 66); */
  background-color: #29070782;
}

.card.card-darker {
  background-color: #000000bf;
}

.card-darker .blood-text {
  color: #665739;
}

.card-information {
  background: rgb(0 0 0 / 81%);
  border: 0;
  box-shadow: unset;
  color: #f9e7c5;
  padding: 14px;
  border: 0px solid #adadadbf;
  border-radius: 6px;
  border: 4px double #938365;
}

.card-information .blood-text {
  color: rgb(242 101 101);
}

.lore-hero-card,
.lore-menu-card {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(127, 29, 29, 0.28), transparent 60%),
    linear-gradient(145deg, #0e0b0b 0%, #24150f 58%, #111 100%);
  border: 2px solid rgba(147, 131, 101, 0.8);
  border-radius: 10px;
  color: #f9e7c5;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), inset 0 0 28px rgba(0, 0, 0, 0.45);
}

.lore-hero-card {
  padding: 18px;
  margin-bottom: 14px;
}

.lore-hero-card h2 {
  margin: 0 0 6px;
  font-family: "Cinzel Decorative", "Cinzel", serif;
  color: #f2c46d;
  font-size: 24px;
}

.lore-kicker,
.lore-menu-kicker,
.lore-chapter-range {
  color: rgba(242, 196, 109, 0.82);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.lore-subtitle {
  color: #f26565;
  font-weight: 700;
  margin-bottom: 10px;
}

.lore-keeper-intro {
  color: rgba(249, 231, 197, 0.78);
  font-style: italic;
}

.lore-hero-card blockquote {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-left: 3px solid rgba(242, 196, 109, 0.7);
  color: #ead9b2;
  font-style: italic;
  background: rgba(0, 0, 0, 0.24);
}

.lore-current-chapter {
  border-color: rgba(242, 196, 109, 0.85);
}

.lore-reader {
  margin-bottom: 14px;
}

.lore-reader-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px;
  margin-bottom: 12px;
  color: #f9e7c5;
  background: rgba(0, 0, 0, 0.78);
  border: 4px double rgba(147, 131, 101, 0.85);
  border-radius: 8px;
}

.lore-reader-top p {
  margin: 0;
  color: rgba(249, 231, 197, 0.78);
}

.lore-oath-btn {
  flex: 0 0 auto;
  color: #1f120b;
  background: linear-gradient(180deg, #f2c46d, #b98b3d);
  border: 1px solid rgba(0, 0, 0, 0.45);
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.lore-oath-btn.is-sworn {
  color: #ead9b2;
  background: rgba(38, 80, 46, 0.72);
  border-color: rgba(153, 201, 133, 0.5);
}

.lore-chapter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
  margin-bottom: 6px;
}

.lore-tab {
  min-width: 160px;
  padding: 9px 10px;
  color: rgba(249, 231, 197, 0.72);
  text-align: left;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(147, 131, 101, 0.45);
  border-radius: 8px;
}

.lore-tab span {
  display: block;
  color: rgba(242, 196, 109, 0.78);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lore-tab.is-active {
  color: #f9e7c5;
  border-color: rgba(242, 196, 109, 0.86);
  background: rgba(127, 29, 29, 0.34);
}

.lore-tab.lore-tab-locked {
  opacity: 0.52;
  cursor: not-allowed;
}

.lore-tab-lock-icon {
  margin-left: 6px;
  font-size: 10px;
  opacity: 0.85;
}

.lore-chapter-locked .lore-chapter-locked-msg {
  color: rgba(249, 231, 197, 0.78);
  font-style: italic;
}

.lore-unlock-hint {
  color: rgba(249, 231, 197, 0.72);
}

.lore-chapter-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.lore-chapter-card {
  display: none;
  background: rgb(0 0 0 / 81%);
  color: #f9e7c5;
  padding: 14px;
  border-radius: 8px;
  border: 4px double #938365;
}

.lore-chapter-card.is-visible {
  display: block;
}

.lore-chapter-card.is-current {
  box-shadow: inset 0 0 0 1px rgba(242, 196, 109, 0.35), 0 0 18px rgba(127, 29, 29, 0.22);
}

.lore-chapter-short {
  color: rgba(249, 231, 197, 0.82);
  font-style: italic;
}

.lore-scene-box {
  margin: 12px 0 0;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(147, 131, 101, 0.38);
  border-radius: 8px;
}

.lore-scene-box strong,
.lore-whisper {
  color: #f2c46d;
}

.lore-scene-box p {
  margin: 7px 0 0;
}

.lore-hook-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.lore-hook-grid div {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(147, 131, 101, 0.35);
  border-radius: 6px;
  padding: 9px;
}

.lore-hook-grid strong,
.lore-hook-grid span {
  display: block;
}

.lore-hook-grid strong {
  color: #f2c46d;
  margin-bottom: 4px;
}

.lore-whisper {
  margin: 12px 0 0;
  padding: 9px 12px;
  font-style: italic;
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid rgba(242, 196, 109, 0.65);
}

.lore-menu-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin: 0 0 16px;
  text-decoration: none;
}

.lore-menu-card:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 196, 109, 0.88);
}

.lore-menu-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #f2c46d;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(242, 196, 109, 0.45);
}

.lore-menu-copy {
  flex: 1;
  min-width: 0;
}

.lore-menu-copy h3 {
  margin: 1px 0 3px;
  color: #f9e7c5;
}

.lore-menu-copy p {
  margin: 0;
  color: rgba(249, 231, 197, 0.76);
  font-size: 13px;
  line-height: 1.4;
}

.lore-menu-cta {
  color: #f2c46d;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .lore-hook-grid {
    grid-template-columns: 1fr;
  }

  .lore-menu-card {
    align-items: flex-start;
  }

  .lore-reader-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .lore-menu-cta {
    display: none;
  }
}

.dark-frame {
  padding: 4px;
  background: #222120;
  border-radius: 6px;
  border: 4px solid #181717;
  box-shadow: 0px 0px 2px 2px #00000061;
}

.title-card {
  background-color: rgb(52 47 43);
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  color: #dac291;
  background-image: url(../images/design/corner.png);
  background-size: 55px;
  background-repeat: no-repeat;
  padding: 35px;
  border-radius: 30px;
}

.border-card {
  background-color: rgb(219 204 181);
  border-color: rgb(134 108 91);
  color: #2a2411;
  border-left-width: 4px;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  padding: 1rem;
  box-shadow: -2px -1px 2px 0px #00000061;
}

.crumb {
  background-color: rgb(152 140 122);
  border-color: rgb(134 108 91);
  color: #2a2411;
  /* border-width: 4px; */
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  padding: 1rem;
}

.crumb-light {
  background-color: rgb(211 192 160);
}

.label {
  padding: 4px;
  background: #a38968b8;
  color: #00000094;
  border-radius: 4px;
  font-weight: bold;
  margin: 5px;
}

h3 {
  font-size: 20px !important;
  font-weight: 600 !important;
  color: #6c5749;
}

.lines {
  width: 100%;
  height: 28px;
  opacity: 0.5;
}

.line1 {
  background: url(../images/design/line1.png);
  background-size: 160px;
  background-repeat: no-repeat;
  background-position: center;
}

.line2 {
  background: url(../images/design/line2.png);
  background-size: 160px;
  background-repeat: no-repeat;
  background-position: center;
}

.line3 {
  background: url(../images/design/line3.png);
  background-size: 160px;
  background-repeat: no-repeat;
  background-position: center;
}

.line4 {
  background: url(../images/design/line4.png);
  background-size: 160px;
  background-repeat: no-repeat;
  background-position: center;
}

.line5 {
  background: url(../images/design/line5.png);
  background-size: 160px;
  background-repeat: no-repeat;
  background-position: center;
}

#monster-img {
  max-height: 125px !important;
}

.grid-card {
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  /* background-color: rgb(219 204 181); */
  background-image: url(../images/design/card.png);
  background-size: 118% 150%;
  background-position: center;
  background-repeat: no-repeat;
  border-color: rgb(134 108 91 / 57%);
  color: #2a2411;
  border-width: 4px;
  border-radius: 0.5rem;
  /* margin-bottom: 1rem; */
  /* padding: 1rem; */
  /* box-shadow: 0px 0px 2px 2px #00000061; */
  /* padding: 10px !important; */
  filter: drop-shadow(4px 4px 10px black);
}

.game-area-card {
  cursor: pointer;
  color: #e0e0e0 !important;
  border-radius: 0.5rem;
  min-height: 140px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 2px solid #0000006b;
}

.game-area-card .name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #fdeeb4;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.85);
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 12px;
  border-radius: 8px;
}

.game-area-card .description {
  font-size: .8rem;
  font-weight: 400;
  color: #ffffffcc;
  text-shadow: 0 0 10px #000000;
  /* border-bottom: 1px solid goldenrod; */
  width: 65%;
  position: relative;
}

.game-area-card .description:after {
  content: "";
  width: 100%;
  height: 1px;
  background: linear-gradient(45deg, transparent, #ffb100, transparent);
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  margin: auto;
}

.game-area-card:hover {
  transform: translateY(-5px);
  background-size: 400px !important;
  /* background-position: 50% 50% !important; */
  background-color: transparent !important;
}

.grid-card.info-card {
  border: 0;
  margin-bottom: 0;
  box-shadow: none;
  background: #fff9d969;
  filter: unset;
}

.grid-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.1),
      transparent);
  transition: left 0.5s ease;
  z-index: 0;
}

.grid-card:hover::before {
  left: 100%;
}

.grid-card:hover {
  transform: translateY(-5px);
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.3), 0px 4px 8px rgba(0, 0, 0, 0.2);
  border-color: rgba(166, 124, 82, 0.8);
}

.grid-card:hover i {
  transform: scale(1.15) rotate(5deg);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.grid-card i {
  transition: all 0.3s ease;
  display: inline-block;
}

.card-btn {
  color: #ffffff;
  font-size: 0.875rem;
  line-height: 1.25rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  background: linear-gradient(135deg,
      rgb(60, 154, 150) 0%,
      rgb(45, 125, 120) 100%);
  border: none;
  border-bottom: 3px solid rgb(32, 102, 99);
  border-radius: 0.5rem;
  width: 100%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.card-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.3),
      transparent);
  transition: left 0.5s ease;
  z-index: 1;
}

.card-btn:hover::before {
  left: 100%;
}

.card-btn:hover {
  background: linear-gradient(135deg,
      rgb(97, 193, 189) 0%,
      rgb(60, 154, 150) 100%);
  transform: translateY(-4px);
  box-shadow: 0 8px 12px rgba(60, 154, 150, 0.4), 0 4px 6px rgba(0, 0, 0, 0.3);
  border-bottom-color: rgb(45, 125, 120);
}

.card-btn:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(60, 154, 150, 0.3);
}

.card-btn span {
  position: relative;
  z-index: 2;
}

p.text-xs.text-gray-400,
span.text-xs.text-gray-400,
p.text-sm.text-gray-400,
span.text-sm.text-gray-400 {
  color: #3e3838 !important;
}

.info-crumb {
  padding: 5px;
  text-align: center;
  background-color: rgb(175 150 113 / 47%);
  border-radius: 4px;
  color: #2a2216;
  border: 2px solid #00000000;
  margin: 5px;
}

.menu-link {
  background-color: rgb(128 110 87);
  color: #cbbca2;
}

.title-2 {
  color: rgb(219 204 181);
  font-size: 1.125rem;
  line-height: 1.75rem;
  padding-left: 1rem;
  padding-right: 1rem;
  background-color: rgb(72 68 56);
}

.title-border {
  border-color: rgb(219 204 181);
  border-top-width: 1px;
  width: 100%;
}

.page-link {
  transition-property: color, background-color, border-color, fill, stroke,
    opacity, box-shadow, transform, filter, -webkit-text-decoration-color,
    -webkit-backdrop-filter;
  transition-property: color, background-color, border-color,
    text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter,
    backdrop-filter;
  transition-property: color, background-color, border-color,
    text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter,
    backdrop-filter, -webkit-text-decoration-color, -webkit-backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
  color: rgb(0 0 0);
  background-color: rgb(201 187 165);
  border-color: rgb(88 87 87 / 84%);
  padding: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-width: 1px;
  border-radius: 0.375rem;
}

.page-link.active {
  pointer-events: none;
  background: #888472;
  color: #ffffffc7;
}

.page-link.disabled {
  pointer-events: none;
  background: #888472;
  color: #ffffff42;
}

.page-link:hover {
  background: rgb(223 218 211);
}

.title-font {
  font-weight: 800;
  letter-spacing: 0.6px;
}

.title-text {
  color: #ffda93;
}

.blood-splatter {
  position: absolute;
  opacity: 0.9;
  z-index: 2;
  pointer-events: none;
}

.blood-splatter.fade-out {
  animation: fadeOut 1s ease-out forwards;
}

.prevent-select {
  -webkit-user-select: none;
  /* Safari */
  -ms-user-select: none;
  /* IE 10 and IE 11 */
  user-select: none;
  /* Standard syntax */
}

.logo-header {
  background-image: url(../images/wopy-header-logo.png);
  background-size: 600px;
  background-position: center;
  background-repeat: no-repeat;
}

.header-shadow {
  filter: drop-shadow(7px 7px 7px #000000);
}

a {
  transition: 0.4s;
}

a.link {
  color: #cb1f0e;
}

a.link:hover {
  color: red;
}

label.error {
  color: #e74c3c;
  font-size: 0.8em;
  font-style: italic;
  display: block;
  margin-top: 10px;
  padding: 3px 5px;
  border-left: 3px solid #e74c3c;
  border-radius: 3px;
  width: fit-content;
  flex: 1 0 100%;
  background: #0000007d;
}

input.error,
textarea.error {
  border: 1px solid #e74c3c;
}

.error-container {
  margin-top: 5px;
}

.sign-up-form {
  position: relative;
  z-index: 1;
  background: transparent;
}

.sign-up-form:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(../images/registration-form-scenery.png);
  background-size: cover;
  background-position: center;
  filter: opacity(0.5) blur(5px);
  z-index: -1;
}

.title {
  font-size: 1.2rem;
  color: #dfd8a8 !important;
  border-bottom: 1px solid #dfd8a8;
  padding: 6px;
}

.alert {
  padding: 8px;
  border-radius: 4px;
  text-align: center;
  margin: 6px;
}

.alert.success {
  background: #74b974d9;
  border-left: 5px solid #48cb48;
  color: #025e02;
}

.alert.error {
  background: #ff0400d9;
  border-left: 5px solid #f5002e;
  color: #730101;
}

.alert.warning {
  background: #b9ae74d9;
  border-left: 5px solid #efdd79;
  color: #504505;
}

.alert.info {
  background: #74afb9d9;
  border-left: 5px solid #5ca6ff;
  color: #003b96;
}

.hp-display {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  background-color: rgb(128 85 85);
  border-radius: 9999px;
  display: inline-block;
  color: #ffe3e3;
}

.monster-health-bar {
  background: linear-gradient(139deg, #d13232 0%, #c00808 50%, #d13232 100%);
  box-shadow: 0 0 3px rgb(225 4 4 / 32%);
  height: 0.25rem !important;
}

.boss-timer-bar {
  background: linear-gradient(90deg, #ff6f00 0%, #ffaa00 50%, #ffcc00 100%);
  box-shadow: 0 0 4px rgba(255, 170, 0, 0.726);
  transition: width 0.3s ease;
  height: 4px !important;
}

.attack-counter-bar {
  background: linear-gradient(to right, #4d483c, #3baeaf, #14dede);
  border-radius: 9999px;
}

.hand-attack-counter-bar {
  background: linear-gradient(to right, #4d483c, #3baf45, #87de14);
  border-radius: 9999px;
}

.companion-attack-counter-bar {
  background: linear-gradient(to right, #4d483c, #af693b, #dea214);
  border-radius: 9999px;
}

#attack-btn.disabled {
  filter: grayscale(1);
  pointer-events: none;
}

@keyframes progress-left {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

.damage-dealt {
  font-family: "Oswald", sans-serif;
  /* background: #0000004f; */
  color: #ffffff;
  font-size: 14px;
  position: absolute;
  padding: 4px;
  border-radius: 50px;
  animation: damage-fade 1s linear forwards;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.9);
}

.damage-dealt.crit {
  font-weight: bold;
  font-size: 15px;
  color: #df0c00;
  animation: damage-fade-crit 1.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.damage-dealt.high-dmg {
  font-weight: 700;
  font-size: 15px;
  color: #f1e6b7;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.35);
  animation: damage-fade 1.25s linear forwards;
}

.damage-dealt.high-dmg-2 {
  font-weight: 800;
  font-size: 15px;
  color: #ffb84d;
  text-shadow: 0 0 7px rgba(255, 184, 77, 0.4);
  animation: damage-fade 1.5s linear forwards;
}

.damage-dealt.high-dmg-3 {
  font-weight: 900;
  font-size: 16px;
  color: #ff8c42;
  text-shadow: 0 0 8px rgba(255, 140, 66, 0.45);
  animation: damage-fade 1.75s linear forwards;
}

.damage-dealt.high-dmg-4 {
  font-weight: 900;
  font-size: 16px;
  color: #ff6b1a;
  text-shadow: 0 0 10px rgba(255, 107, 26, 0.5);
  animation: damage-fade-lucky-strike 2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.damage-dealt.lucky-strike {
  font-weight: 900;
  font-size: 16px;
  color: #f65271;
  text-shadow: 0 0 8px rgba(246, 82, 113, 0.5);
  animation: damage-fade-lucky-strike 2.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.damage-dealt.defeat {
  color: orange;
  font-size: 15px;
  font-weight: 100;
  animation: damage-fade 2s linear forwards;
}

@keyframes damage-fade {
  0% {
    transform: scale(1);
    opacity: 1;
    margin-top: 50px;
  }

  50% {
    transform: scale(1.5);
    opacity: 1;
    margin-top: -50px;
  }

  100% {
    transform: scale(1);
    opacity: 0;
    margin-top: -150px;
  }
}

@keyframes damage-fade-crit {
  0% {
    transform: scale(3) rotate(-10deg);
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(223, 12, 0, 0.8));
    margin-top: 50px;
  }

  10% {
    transform: scale(1.8) rotate(5deg);
    opacity: 1;
    filter: drop-shadow(0 0 15px rgba(223, 12, 0, 0.8));
    margin-top: 25px;
  }

  25% {
    transform: scale(2.2) rotate(0deg);
    margin-top: 0px;
  }

  50% {
    transform: scale(1.5);
    opacity: 1;
    filter: drop-shadow(0 0 5px rgba(223, 12, 0, 0.5));
    margin-top: -50px;
  }

  100% {
    transform: scale(1);
    opacity: 0;
    margin-top: -150px;
  }
}

@keyframes damage-fade-lucky-strike {
  0% {
    transform: scale(4) rotate(-15deg);
    opacity: 1;
    filter: drop-shadow(0 0 20px rgba(246, 82, 113, 1)) brightness(1.5);
    margin-top: 80px;
  }

  15% {
    transform: scale(2) rotate(10deg);
    opacity: 1;
    filter: drop-shadow(0 0 25px rgba(246, 82, 113, 0.9)) brightness(1.2);
    margin-top: 20px;
  }

  30% {
    transform: scale(2.8) rotate(-5deg);
    margin-top: -20px;
  }

  60% {
    transform: scale(1.8) rotate(0deg);
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(246, 82, 113, 0.6));
    margin-top: -80px;
  }

  100% {
    transform: scale(1.2);
    opacity: 0;
    filter: drop-shadow(0 0 0 rgba(246, 82, 113, 0));
    margin-top: -200px;
  }
}

/* Hit animations - temporarily override floating animation with scale effect */
.hit-normal {
  animation: hitNormal 0.2s ease-out forwards !important;
}

.hit-high-dmg {
  animation: hitHighDmg 0.2s ease-out forwards !important;
}

.hit-high-dmg-2 {
  animation: hitHighDmg2 0.25s ease-out forwards !important;
}

.hit-high-dmg-3 {
  animation: hitHighDmg3 0.3s ease-out forwards !important;
}

.hit-high-dmg-4 {
  animation: hitHighDmg4 0.35s ease-out forwards !important;
}

.hit-crit {
  animation: hitCrit 0.4s ease-out forwards !important;
}

.hit-lucky-strike {
  animation: hitLuckyStrike 0.5s ease-out forwards !important;
}

@keyframes hitNormal {
  0% {
    transform: translateY(0px) scale(1);
  }

  50% {
    transform: translateY(0px) scale(0.98);
  }

  100% {
    transform: translateY(0px) scale(1);
  }
}

@keyframes hitHighDmg {
  0% {
    transform: translateY(0px) scale(1);
  }

  50% {
    transform: translateY(0px) scale(0.95);
  }

  100% {
    transform: translateY(0px) scale(1);
  }
}

@keyframes hitHighDmg2 {
  0% {
    transform: translateY(0px) scale(1);
  }

  50% {
    transform: translateY(0px) scale(0.92);
  }

  100% {
    transform: translateY(0px) scale(1);
  }
}

@keyframes hitHighDmg3 {
  0% {
    transform: translateY(0px) scale(1);
  }

  50% {
    transform: translateY(0px) scale(0.88);
  }

  100% {
    transform: translateY(0px) scale(1);
  }
}

@keyframes hitHighDmg4 {
  0% {
    transform: translateY(0px) scale(1) translateX(0px);
    filter: brightness(1) drop-shadow(0 0 0 #ff6b1a);
  }

  20% {
    transform: translateY(-5px) scale(0.85) translateX(-8px);
    filter: brightness(1.3) drop-shadow(0 0 15px #ff6b1a);
  }

  40% {
    transform: translateY(8px) scale(0.9) translateX(8px);
    filter: brightness(1.1) drop-shadow(0 0 10px #ff6b1a);
  }

  60% {
    transform: translateY(-8px) scale(0.9) translateX(-8px);
    filter: brightness(1.2) drop-shadow(0 0 5px #ff6b1a);
  }

  80% {
    transform: translateY(5px) scale(0.95) translateX(5px);
    filter: brightness(1.1);
  }

  100% {
    transform: translateY(0px) scale(1) translateX(0px);
    filter: brightness(1);
  }
}

@keyframes hitCrit {
  0% {
    transform: translateY(0px) scale(1) rotate(0deg);
    filter: brightness(4) sepia(1) hue-rotate(-50deg) saturate(10) contrast(2);
  }

  25% {
    transform: translateY(-3px) scale(0.95) rotate(-3deg);
    filter: brightness(0.8) sepia(1) hue-rotate(-50deg) saturate(5);
  }

  50% {
    transform: translateY(5px) scale(0.85) rotate(4deg);
    filter: brightness(0.9) sepia(1) hue-rotate(-50deg) saturate(5) drop-shadow(0 0 10px red);
  }

  75% {
    transform: translateY(-2px) scale(0.95) rotate(-2deg);
    filter: brightness(0.95) sepia(0.5) hue-rotate(-25deg) saturate(2);
  }

  100% {
    transform: translateY(0px) scale(1) rotate(0deg);
    filter: brightness(1) sepia(0) hue-rotate(0deg) saturate(1);
  }
}

@keyframes hitLuckyStrike {
  0% {
    transform: translateY(0px) scale(1.1);
    filter: brightness(6) contrast(3) saturate(0);
  }

  10% {
    transform: translateY(-10px) scale(1.1);
    filter: brightness(2) contrast(1.5) drop-shadow(0 0 40px #f65271) hue-rotate(-20deg);
  }

  30% {
    transform: translateY(15px) scale(0.8) rotate(15deg);
    filter: brightness(1.5) drop-shadow(0 0 20px #f65271);
  }

  50% {
    transform: translateY(-15px) scale(0.9) rotate(-15deg);
    filter: brightness(1.8) drop-shadow(0 0 30px #f65271) saturate(2);
  }

  70% {
    transform: translateY(10px) scale(0.95) rotate(5deg);
    filter: brightness(1.2) drop-shadow(0 0 10px #f65271);
  }

  85% {
    transform: translateY(-5px) scale(0.98) rotate(-2deg);
    filter: brightness(1.1);
  }

  100% {
    transform: translateY(0px) scale(1);
    filter: brightness(1);
  }
}

.attack-btn {
  background: linear-gradient(180deg, #00d52a 0%, #279260 100%);
  box-shadow: 0 4px 0 #1d5a41, 0 5px 10px rgba(0, 0, 0, 0.5);
  transition: all 0.1s;
}

.attack-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #450a0a, 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Auto-Fight Widget */
.auto-fight-widget {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 600px;
  width: calc(100% - 20px);
  z-index: 999;
  padding: 0 10px;
}

.auto-fight-widget.hidden {
  display: none;
}

/*
 * Hidden variant used when the player toggles the widget off while the fight
 * should continue in the background. We intentionally keep the widget in the
 * render tree (not display:none) so the CSS animation on
 * #auto-fight-attack-bar keeps firing `animationend`, which drives the
 * auto-fight loop in autoFightWidget.js. Moving it off-screen hides it from
 * view without pausing animations.
 */
.auto-fight-widget.auto-fight-widget-offscreen {
  left: -9999px !important;
  right: auto !important;
  transform: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: visible !important;
}

.auto-fight-widget-content {
  position: relative;
  background: rgb(34 33 32);
  border: 2px solid rgb(255 176 61 / 77%);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 8px rgba(139, 26, 26, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.auto-fight-widget-toggle-standalone {
  position: fixed;
  bottom: 60px;
  right: 10px;
  background: rgba(139, 26, 26, 0.9);
  border: 2px solid rgba(139, 26, 26, 0.8);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #d4c5a9;
  font-size: 14px;
  z-index: 1000;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  max-width: 600px;
}

.auto-fight-widget-toggle-standalone:hover {
  background: rgba(139, 26, 26, 1);
  transform: scale(1.1);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
}

.auto-fight-widget-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
}

.auto-fight-widget-left-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auto-fight-monster-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px;
}

.auto-fight-monster-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auto-fight-monster-name {
  font-size: 13px;
  font-weight: bold;
  color: #d4c5a9;
  line-height: 1.2;
}

.auto-fight-monster-name .boss {
  color: #ff6f6f;
}

.auto-fight-monster-level {
  font-size: 11px;
  color: #888;
}

.auto-fight-widget-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.auto-fight-progress-container {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.auto-fight-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #aaa;
}

.auto-fight-attack-speed {
  font-weight: 600;
  color: #14dede;
}

.auto-fight-progress-bar-container {
  width: 100%;
  height: 7px;
  border: 1px solid #453a35c7;
  background: #301610;
  border-radius: 2px;
  box-shadow: inset 0 0 0px 1px #00000069;
  padding: .8px;
  overflow: hidden;
}

.auto-fight-attack-speed-container {
  height: 7px;
  border: 1px solid #453a35c7;
  background: #0f1f1f;
  border-radius: 2px;
  padding: .8px;
  overflow: hidden;
  box-shadow: inset 0 0 0px 1px #00000069;
}

.auto-fight-health-bar {
  height: 100%;
  background: linear-gradient(90deg, #641313 0%, #9c1b1b 100%);
  box-shadow: inset 0 1px 0px 0px rgb(255 255 255 / 43%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.auto-fight-attack-bar {
  height: 100%;
  background: linear-gradient(to right, #4d483c, #3baeaf, #14dede);
  box-shadow: inset 0 1px 0px 0px rgb(255 255 255 / 43%);
  border-radius: 3px;
}

.auto-fight-timer-container {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.auto-fight-timer-text {
  font-weight: 600;
  color: #ffaa00;
}

.auto-fight-timer-bar-container {
  height: 7px;
  border: 1px solid #453a35c7;
  background: #1f1a10;
  border-radius: 2px;
  padding: .8px;
  overflow: hidden;
  box-shadow: inset 0 0 0px 1px #00000069;
}

.auto-fight-timer-bar {
  height: 100%;
  background: linear-gradient(90deg, #ff6f00 0%, #ffaa00 50%, #ffcc00 100%);
  box-shadow: inset 0 1px 0px 0px rgb(255 255 255 / 43%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.auto-fight-timer-container-left {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 4px;
}

.auto-fight-timer-label-left {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #aaa;
  width: 100%;
}

.auto-fight-timer-text-left {
  font-weight: 600;
  color: #ffaa00;
}

.auto-fight-timer-bar-container-left {
  width: 100%;
  height: 7px;
  border: 1px solid #453a35c7;
  background: #1f1a10;
  border-radius: 2px;
  padding: .8px;
  overflow: hidden;
  box-shadow: inset 0 0 0px 1px #00000069;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.demon-eye {
  animation: glow 2s infinite alternate;
}

@keyframes glow {
  from {
    filter: drop-shadow(0px 0px 1px #ffd94d20);
  }

  to {
    filter: drop-shadow(0px 0px 3px #f7c71690);
  }
}

.sword-swing {
  animation: swing 3s infinite ease-in-out;
  transform-origin: top center;
}

@keyframes swing {

  0%,
  100% {
    transform: rotate(-10deg);
  }

  50% {
    transform: rotate(10deg);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

.pulse-coin {
  animation: pulse-coin 0.5s forwards;
}

@keyframes pulse-coin {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.25);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.animate-idle-mob {
  animation: idle-mob 3s infinite;
}

@keyframes idle-mob {

  0%,
  100% {
    transform: translateY(-5%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }

  50% {
    transform: none;
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

.header-tooltip {
  background: #091940;
  color: white;
}

/* Profile */

.progress-bar {
  height: 8px;
  background-color: #1a1a1a24;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(#d5cebf 55%, #928d80);
  transition: width 0.5s ease;
}

/* Upgrades */

.tooltip {
  background: #3a3403;
  color: white;
}

.upgrade-btn {
  transition: all 0.2s ease;
  background: #1fb0c9;
  color: #373636 !important;
  border-bottom: 4px solid #138295;
}

.upgrade-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgb(8, 146, 156);
}

.upgrade-btn:active {
  transform: translateY(0);
  border: 0;
}

input[type="submit"] {
  background: #1d7b7f;
  width: 100%;
  padding: 9px;
  border-radius: 1rem;
  margin: 5px;
  font-family: "FontAwesome";
  font-size: 14px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: 0.5s ease-out;
}

input[type="submit"]:hover {
  background: #2ab1b6;
}

input[type="text"],
input[type="password"]Ð± textarea {
  background: #ffffff36;
  margin: 6px !important;
  padding: 9px !important;
  border-radius: 1rem;
  border: 1px solid #ffffff00;
  width: 100%;
  color: #281708;
  outline: double;
}

button.primary {
  background: #1bb18f;
  outline: solid 1px black;
  transition: 0.5s;
  width: 8px;
  height: 100%;
}

button.primary:hover {
  background: #30edc1;
}

/* =========================
   Chat (game menu)
   ========================= */
.chat-card {
  padding-top: 14px;
  padding-bottom: 14px;
}

.chat-card .chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  padding: 0 2px 8px;
  background: transparent;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(134, 108, 91, 0.22);
}

.chat-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chat-header-rune {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(127, 29, 29, 0.1);
  border: 1px solid rgba(127, 29, 29, 0.25);
  color: #7f1d1d;
  font-size: 14px;
  flex: 0 0 34px;
}

.chat-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.chat-header-eyebrow {
  display: inline-block;
  width: fit-content;
  text-transform: uppercase;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.4px;
  color: rgba(58, 47, 37, 0.65);
}

.chat-card .chat-header-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(58, 47, 37, 0.82);
  margin: 0;
  line-height: 1.2;
}
.chat-card .chat-header-heading i {
  color: #7f1d1d;
  font-size: 13px;
}

.chat-header-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.chat-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(134, 108, 91, 0.28);
  color: rgba(58, 47, 37, 0.9);
  font-size: 11px;
  font-weight: 800;
}

.chat-header-pill i {
  color: #7f1d1d;
  font-size: 10px;
}

.chat-header-pill--online {
  background: rgba(47, 127, 29, 0.12);
  border-color: rgba(47, 127, 29, 0.32);
  color: #2d5a19;
}

.chat-header-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ea32a;
  box-shadow: 0 0 0 2px rgba(62, 163, 42, 0.25);
  animation: chat-dot-pulse 2.2s ease-in-out infinite;
}

@keyframes chat-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(62, 163, 42, 0.25); }
  50%      { box-shadow: 0 0 0 5px rgba(62, 163, 42, 0.05); }
}

/* Mute banner */
.chat-mute-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: rgba(234, 179, 8, 0.14);
  border: 1px solid rgba(234, 179, 8, 0.45);
  color: #7a5a0f;
}

.chat-mute-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(234, 179, 8, 0.25);
  color: #7a5a0f;
  flex: 0 0 30px;
  font-size: 13px;
}

.chat-mute-body { flex: 1 1 auto; min-width: 0; }
.chat-mute-title {
  margin: 0 0 2px;
  font-weight: 800;
  color: #5a410b;
  font-size: 13px;
}
.chat-mute-line {
  margin: 0;
  font-size: 11.5px;
  color: rgba(90, 65, 11, 0.9);
}

/* Input row */
.chat-input-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: 4px 0 12px;
}

.chat-input {
  flex: 1 1 auto;
  min-width: 0;
  background: rgba(255, 255, 255, 0.55) !important;
  border: 1px solid rgba(134, 108, 91, 0.45) !important;
  border-radius: 999px !important;
  padding: 9px 14px !important;
  font-size: 13px;
  color: #2a221d;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: 0.15s;
  margin: 0 !important;
}
.chat-input:focus {
  outline: none;
  border-color: rgba(127, 29, 29, 0.45) !important;
  background: rgba(255, 255, 255, 0.75) !important;
  box-shadow: 0 0 0 3px rgba(127, 29, 29, 0.08), inset 0 1px 2px rgba(0, 0, 0, 0.06);
}
.chat-input.is-disabled { opacity: 0.6; cursor: not-allowed; }

.chat-send-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(24, 140, 78, 0.95), rgba(16, 110, 62, 0.95));
  color: #fff;
  border: 1px solid rgba(10, 58, 34, 0.45);
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: 0.15s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}
.chat-send-btn:hover:not(.is-disabled):not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.chat-send-btn:active { transform: translateY(0); filter: brightness(0.98); }
.chat-send-btn.is-disabled,
.chat-send-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.chat-send-btn-label { display: inline; }

@media (max-width: 420px) {
  .chat-send-btn-label { display: none; }
  .chat-send-btn { padding: 0 12px; }
}

/* Message stream â€“ compact (scoped to game-menu chat card) */
.chat-card .chat-messages {
  height: 320px;
  overflow-y: auto;
  padding: 2px 4px;
  display: block;
  gap: 0;
}

.chat-card .chat-messages a {
  font-weight: 600;
  color: #7f1d1d;
  text-decoration: none;
}
.chat-card .chat-messages a:hover { text-decoration: underline; }

.chat-card .chat-message {
  position: relative;
  padding: 3px 4px 4px;
  margin: 0;
  line-height: 1.35;
  font-size: 13px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  border-bottom: 1px solid rgba(134, 108, 91, 0.12);
  background: transparent;
  border-radius: 0;
}
.chat-card .chat-message:last-child { border-bottom: 0; }
.chat-card .chat-message:hover { background: rgba(255, 255, 255, 0.22); }

.chat-card .chat-message .sender {
  font-weight: 800;
  margin-right: 2px;
}

.chat-card .chat-message.replied {
  background: rgba(253, 234, 36, 0.1);
  border-left: 2px solid #cfb90e;
  padding-left: 6px;
}

.chat-card .chat-message .time-ago {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  color: rgba(58, 47, 37, 0.5) !important;
  line-height: 1;
}

/* Reply / delete â€“ tiny inline glyphs (JS still matches by class) */
.chat-card .chat-message .replyTag,
.chat-card .chat-message .deleteMessage {
  display: inline-block;
  margin-left: 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  color: rgba(58, 47, 37, 0.4);
  transition: 0.15s;
  vertical-align: baseline;
}
.chat-card .chat-message .replyTag:hover    { color: #2d5a19; }
.chat-card .chat-message .deleteMessage:hover { color: #7f1d1d; }

.rainbow {
  text-align: center;
  font-family: monospace;
  letter-spacing: 2px;
}

.luminose {
  background-blend-mode: luminosity;
}

.golden {
  background: linear-gradient(to right,
      #ffc066,
      #ffad66,
      #ffd766,
      #fbba04,
      #eddeb4,
      #f9c32d,
      #f9d12d,
      #f9a62d) !important;
  background-size: 250% 200% !important;
  text-shadow: 0px 0px 3px #ffdd00;
}

.rainbow_text_animated {
  /* Made By Grazv33 */
  background: linear-gradient(to right,
      #6666ff,
      #0099ff,
      #00ff00,
      #ff3399,
      #ff3333,
      #edff33,
      #33ff8c,
      #6666ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbow_animation 8s ease-in-out infinite;
  background-size: 500% 200%;
}

@keyframes rainbow_animation {

  /* Made By Grazv33 */
  0%,
  100% {
    background-position: 0 0;
  }

  50% {
    background-position: 100% 0;
  }
}

.market {
  max-width: 100%;
}

.market-link {
  background-position: center;
  flex: 1 0 32%;
  flex-direction: column;
  width: 30px;
  height: 150px;
  display: block;
  /* background: #1a1a1a; */
  margin: 3px;
  border-radius: 4px;
  border: 1px solid #383838;
  color: #c1c1c1;
  transition: 0.3s;
  border: 62px solid transparent;
  border-image: url(https://static.vecteezy.com/system/resources/thumbnails/029/200/674/small/stone-brick-frame-border-ancient-medieval-in-cartoon-game-ui-png.png) 170 stretch;
  padding: 45px;

  background-size: 213px;
  background-repeat: no-repeat;
  background-position-x: -37px;
  background-position-y: -35px;
  position: relative;
  max-width: 258px;
  max-height: 212px;
}

.market-link:hover {
  color: white;
  /* background-color: #ffffff2e; */
  /* background-blend-mode: saturation; */
  filter: drop-shadow(2px 4px 6px #00000080) brightness(1.2) saturate(1.5);
}

.market-item {
  background: #ffffff4f;
  margin: 4px;
  border-radius: 4px;
  padding: 6px;
  flex: 1 0 46%;
  border: 6px double #866c5b9e;
}

.market-item:hover {
  transform: translateY(-5px);
}

/* Player Marketplace (player-to-player listings) */
.pm-market-item {
  flex-direction: column;
  position: relative;
  /* border: 2px solid var(--rarity-color, #866c5b); */
  border-radius: 8px;
  padding: 12px;
  margin: 8px;
  min-width: 200px;
  max-width: 250px;
  background: #d1c3ac7d;
  transition: .5s;
}

.ratings-card {
  padding: 12px !important;
}

.ratings-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 700;
  color: #6c5241;
}

.ratings-sortbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.ratings-sort-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 700;
}

.ratings-sort-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #2a2411;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.ratings-sort-pill:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.ratings-sort-pill.active {
  background: rgba(127, 29, 29, 0.18);
  border-color: rgba(127, 29, 29, 0.35);
}

.ratings-your-rank {
  background: rgb(175 154 117 / 58%);
  border: 3px solid rgb(126 100 37 / 35%);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  color: #55331d;
}

.ratings-your-rank-number {
  color: #b41a09;
  font-weight: 800;
}

.ratings-your-rank-sep {
  margin: 0 8px;
  opacity: 0.7;
}

.ratings-your-stat-value {
  font-weight: 900;
}

.ratings-table-wrap {
  overflow-x: auto;
}

.ratings-table {
  width: 100%;
  border-collapse: collapse;
}

.ratings-table thead tr {
  border-bottom: 2px solid rgba(0, 0, 0, 0.15);
}

.ratings-table-wrap {
  background: #a38b637a;
  padding: 8px;
  border-radius: 8px;
  padding-bottom: 0;
  border: 3px solid #73603c5e;
}

.ratings-table th,
.ratings-table td {
  padding: 8px 6px;
  font-size: 12px;
}

.ratings-table th {
  color: #6c5241;
  font-weight: 800;
}

.ratings-table td {
  color: #2a2411;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.ratings-table tr:hover {
  background: rgba(0, 0, 0, 0.06);
}

.ratings-table tr.is-current-user {
  background: rgba(127, 29, 29, 0.12);
}

.ratings-table .t-left {
  text-align: left;
}

.ratings-table .t-right {
  text-align: right;
}

.ratings-table .top-rank {
  color: #b45309;
  font-weight: 900;
}

.ratings-table .rank {
  color: #33363d;
  font-weight: 800;
}

.ratings-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.ratings-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #2a2411;
  font-weight: 800;
  text-decoration: none;
}

.ratings-page-btn:hover {
  filter: brightness(1.06);
}

.ratings-page-info {
  font-size: 12px;
  color: #5a4612;
  font-weight: 800;
}

.pm-market-item-image {
  text-align: center;
}

.pm-market-item-img {
  max-width: 64px;
}

.pm-market-item-name {
  margin-top: 8px;
  color: #656060;
}

/* .pm-market-item-name b {
  color: var(--rarity-color, #6c5749);
} */

.pm-market-item-rarity {
  font-size: 11px;
  color: var(--rarity-color, #6c5749);
  margin: 4px 0;
}

.pm-market-item-seller {
  font-size: 10px;
  color: #4e5155;
  margin-bottom: 8px;
}

.pm-market-item-seller img {
  max-width: 16px !important;
}

.pm-market-item-price {
  text-align: center;
  margin: 8px 0;
}

.pm-market-item-price-title {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 4px;
}

.pm-market-item-price-label {
  margin: 2px 0;
}

.pm-market-item-actions {
  text-align: center;
  margin-top: 8px;
}

.pm-market-item-buy,
.pm-market-item-view {
  width: 100%;
}

.pm-market-item-rank-required {
  font-size: 11px;
  margin-bottom: 8px;
}

.pm-market-item-insufficient {
  font-size: 11px;
  margin-bottom: 8px;
  padding: 4px 8px;
}

/* .pm-detail-card {
  border: 2px solid var(--rarity-color, #866c5b);
} */

.pm-detail-image {
  max-width: 128px;
}

.pm-detail-rarity {
  color: var(--rarity-color, #6c5749);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.pm-seller {
  font-size: 12px;
  color: #555960;
}

.pm-seller img {
  max-width: 16px !important;
}

.pm-seller-link {
  color: #26a6d9;
}

.pm-detail-buy-btn {
  width: 200px;
}

span.shop-text {
  color: #c3bda0;
  font-weight: 800;
  letter-spacing: 0.4px;
  font-size: 17px;
  text-shadow: 0 0 1px black;
  /* font-weight: bold; */
  background: #00000082;
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  margin: auto;
  text-align: center;
}

.biomes {
  max-width: 100%;
}

.biome-link {
  flex: 1 0 48.5%;
  width: 30px;
  height: 150px;
  display: block;
  background: #1a1a1a;
  margin: 3px;
  border-radius: 4px;
  border: 2px solid #f1ebb566;
  color: #fff8bd;
  background-color: #00000054 !important;
  background-blend-mode: overlay;
  transition: 1s;
  font-weight: bold;
  font-size: 12px;
  box-shadow: inset 0px 0px 6px 5px #00000045;
  overflow: visible;
  position: relative;
}

.biome-link>div:not(.biome-overlay-dark) {
  position: relative;
  z-index: 2;
}

.biome-link .absolute {
  z-index: 3;
}

.biome-link.active {
  background-color: #193e1d40 !important;
  border: 2px solid #8bd98bcf;
}

.biome-link.locked {
  background-color: #000000 !important;
  border: 1px solid #000000;
  background-blend-mode: luminosity;
  pointer-events: none;
}

.biome-link:hover {
  color: white;
  background-color: #06060626 !important;
}

/* Blur overlay for biome background edges */
.biome-blur-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 70px;
  height: 370px;
  pointer-events: none;
  z-index: 1;
  background-size: 400px 400px;
  background-repeat: repeat;
  filter: blur(3px) brightness(1.25);
  -webkit-filter: blur(3px) brightness(1.25);
  opacity: 1;
  background-size: cover;
}

.biome-blur-left {
  left: 0;
  right: auto;
}

.biome-blur-right {
  right: 0;
  left: auto;
}

/* Scale blur overlays width down proportionally between 468px and 600px, height stays the same */
@media (max-width: 600px) and (min-width: 469px) {
  .biome-blur-overlay {
    width: calc(70px * (100vw - 468px) / (600px - 468px));
  }
}

/* Hide blur overlays on smaller screens where background doesn't repeat */
@media (max-width: 468px) {
  .biome-blur-overlay {
    display: none;
  }
}

/* Inventory tooltip bonuses - scoped styling using data attribute */
.tooltip-bonuses-content .info-div {
  background: transparent !important;
  margin: 2px 0 !important;
  padding: 2px 0 !important;
  border: none !important;
  border-radius: 0 !important;
  color: #d1d5db !important;
  font-weight: normal !important;
}

.tooltip-bonuses-content .info-div p {
  margin: 0 !important;
  color: #d1d5db !important;
}

.tooltip-bonuses-content .info-div b {
  font-weight: 600 !important;
}

/* Prevent image long-press context menu on mobile */
img {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

/* Allow tooltip images to be selectable if needed */
.item-tooltip img,
.item-tooltip-bonuses img,
.profile-slot-tooltip img {
  -webkit-touch-callout: default;
  -webkit-user-select: text;
  user-select: text;
}

.title-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.line {
  height: 1px;
  background: #ffffff42;
  width: 33%;
}

.title-group .line:first-child {
  display: inline;
}

a.button,
button.button {
  text-align: center;
  padding: 10px;
  background: #26a6d900;
  /* border-bottom: 5px solid #167194 !important; */
  color: #e7e3e3;
  border-radius: 6px;
  border: 0;
  transition: 0.5s;
  background-image: url(../images/design/wopy-btn-blue.png);
  background-size: 99% 106%;
  background-position: center;
  max-width: 250px;
  padding: 12px 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 14px;
  color: wheat;
  font-weight: bold;
  text-shadow: 0 0 2px black;
}

.read-news-btn {
  background-image: url(../images/design/wopy-btn.png) !important;
  padding-bottom: 24px !important;
  margin: auto;
  display: flex !important;
}

a.button:hover,
button.button:hover {
  background-color: transparent;
  filter: brightness(1.4);
}

a.button.button-red,
button.button.button-red {
  background-image: url(../images/design/wopy-btn-red.png);
}

a.button.button-green {
  background-image: url(../images/design/wopy-btn-blue.png);
  filter: hue-rotate(120deg);
}

a.button.button-yellow {
  background-image: url(../images/design/wopy-btn-blue.png);
  filter: hue-rotate(60deg);
}

/* Admin CP Styles */
.admin-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(134, 108, 91, 0.1);
  border-radius: 0.5rem;
  border: 1px solid rgba(134, 108, 91, 0.3);
}

.admin-section-title {
  font-weight: bold;
  margin-bottom: 1rem;
  color: #2a2411;
  font-size: 1rem;
}

.admin-subsection {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(134, 108, 91, 0.05);
  border-radius: 0.25rem;
}

.admin-subsection-title {
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #2a2411;
  font-size: 0.9rem;
}

.admin-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin-input {
  padding: 0.5rem 0.75rem;
  background: rgba(134, 108, 91, 0.2);
  border: 1px solid rgba(134, 108, 91, 0.4);
  border-radius: 0.25rem;
  color: #2a2411;
  font-size: 0.9rem;
}

.admin-input:focus {
  outline: none;
  border-color: #866c5b;
  background: rgba(134, 108, 91, 0.3);
}

.admin-input-small {
  width: 120px;
}

.admin-input-select {
  min-width: 200px;
}

.admin-input-large {
  flex: 1;
  min-width: 250px;
}

.admin-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.admin-info-item {
  font-size: 0.9rem;
  color: #2a2411;
}

.admin-message {
  color: rgba(42, 41, 17, 0.7);
  font-size: 0.85rem;
  font-style: italic;
  padding: 0.5rem;
}

/* Input and textarea placeholder styling */
input::placeholder,
textarea::placeholder {
  color: #141212ba;
  opacity: 1;
}

input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  color: #141212ba;
  opacity: 1;
}

input::-moz-placeholder,
textarea::-moz-placeholder {
  color: #141212ba;
  opacity: 1;
}

input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
  color: #141212ba;
  opacity: 1;
}

/* Clickable guild tag in userInfo() */
.guild-tag-link {
  font-weight: 800;
  text-decoration: none;
}

.guild-tag-link:hover {
  text-decoration: underline;
  filter: brightness(1.2);
}



a.inactive {
  background: #606060 !important;
  pointer-events: none !important;
}

.boss {
  color: #0e0e0e;
  text-shadow: 0 0 2px #d70a0a;
  font-weight: bold;
}

/* =========================
   Battle screen typography
   ========================= */
.battle-entity-name {
  font-family: "Cinzel Decorative", cursive;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #3a2f25;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 10px rgba(127, 29, 29, 0.12);
}

.battle-entity-name .boss {
  color: #3a2f25;
  text-shadow: 0 0 10px rgba(213, 10, 10, 0.25);
}

.battle-entity-subtitle {
  letter-spacing: 0.2px;
}

.battle-reward-box {
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(134, 108, 91, 0.35);
  border-radius: 12px;
  padding: 10px 10px 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.battle-reward-line {
  margin: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.battle-reward-label {
  text-transform: uppercase;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.9px;
  color: rgba(58, 47, 37, 0.75);
}

.battle-reward-value {
  font-weight: 900;
  color: #7f1d1d;
}

.battle-reward-value i {
  color: #cfb90e;
  margin-right: 6px;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.25));
}

.battle-reward-sub {
  margin: 2px 0 0;
}

/* Reward pills (coins + xp) */
.battle-reward-title {
  text-transform: uppercase;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.9px;
  color: rgba(58, 47, 37, 0.75);
  margin-bottom: 8px;
}

.battle-reward-pills {
  display: grid;
  gap: 8px;
}

.battle-reward-pill {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(134, 108, 91, 0.28);
}

.battle-reward-pill i {
  color: #cfb90e;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.20));
}

.battle-reward-pill:nth-child(2) i {
  color: #7f1d1d;
}

.battle-reward-pill-label {
  font-weight: 900;
  color: rgba(58, 47, 37, 0.82);
}

.battle-reward-pill-value {
  font-weight: 900;
  color: #7f1d1d;
}

.battle-return-btn {
  background: rgb(122 108 16 / 14%) !important;
    border-color: rgb(122 104 16 / 28%) !important;
    color: #5a510f !important;
    border-radius: 26px;
    text-align: center;
}

.battle-return-btn:hover {
  background: rgb(122 116 16 / 20%) !important
  color: #3a310a !important
}

.battle-return-btn i {
  color: #5a510f;
}

.battle-enemy-header {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(134, 108, 91, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.battle-entity-name {
  font-size: 18px;
  line-height: 1.15;
}

.battle-entity-subtitle {
  margin-top: 2px;
  color: rgba(58, 47, 37, 0.72) !important;
}

.battle-enemy-description {
  max-width: 520px;
  margin: 7px 0 0;
  color: rgba(249, 231, 197, 0.72);
  font-size: 12px;
  line-height: 1.35;
  font-style: italic;
}

.battle-log-line {
  margin: 0;
  color: rgba(58, 47, 37, 0.88);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}

.battle-log-entity {
  font-weight: 900;
  color: #7f1d1d;
}

.battle-log-lore {
  color: rgba(91, 68, 42, 0.86);
  font-style: italic;
}

.battle-player-name {
  font-family: "Cinzel Decorative", cursive;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 10px rgba(127, 29, 29, 0.12);
}

.battle-meta-line {
  margin-top: 6px;
}

.battle-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(134, 108, 91, 0.28);
  color: rgba(58, 47, 37, 0.9);
  font-weight: 800;
  font-size: 12px;
}

.battle-meta-pill i {
  color: #7f1d1d;
}

.battle-attack-btn {
  position: relative;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(16, 122, 67, 0.92);
  border: 2px solid rgba(10, 58, 34, 0.55);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

.battle-attack-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.battle-attack-btn:active {
  transform: translateY(0px);
  filter: brightness(0.98);
}

#xp-bar {
  background: #cfb90e !important;
}

.monster-avatar {
  background-color: rgb(197 196 180);
  box-shadow: 0 0 6px 1px black;
}

.levelUpContainer {
  background: #e7debc;
  color: #4c4a41;
  border-color: #c7906e61 !important;
  box-shadow: 0px 0px 17px 3px #f5b9597d;
  background-image: url(../images/design/card.png);
  background-size: 118% 150%;
  background-position: center;
  background-repeat: no-repeat;
  border-color: rgb(134 108 91 / 57%);
}

/* Modal backdrop fade-in */
.level-up-modal,
.idle-rewards-modal {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.level-up-modal.modal-show,
.idle-rewards-modal.modal-show {
  opacity: 1;
}

/* Container entrance animation */
.level-up-container,
.idle-rewards-container {
  opacity: 0;
  transform: scale(0.5) translateY(-50px);
  transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.level-up-container.animate-in,
.idle-rewards-container.animate-in {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Icon bounce and spin */
.level-up-icon,
.idle-rewards-icon {
  opacity: 0;
  transform: scale(0) rotate(-180deg);
  transition: opacity 0.5s ease-out, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}

.level-up-icon.animate-in,
.idle-rewards-icon.animate-in {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  animation: iconBounce 0.8s ease-out 0.3s;
}

@keyframes iconBounce {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }

  25% {
    transform: scale(1.2) rotate(5deg);
  }

  50% {
    transform: scale(0.95) rotate(-5deg);
  }

  75% {
    transform: scale(1.05) rotate(2deg);
  }
}

/* Title slide-in from top */
.level-up-title,
.idle-rewards-title {
  opacity: 0;
  transform: translateY(-30px);
  transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.level-up-title.animate-in,
.idle-rewards-title.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Subtitle fade-in */
.level-up-subtitle,
.idle-rewards-subtitle {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease-out 0.1s, transform 0.4s ease-out 0.1s;
}

.level-up-subtitle.animate-in,
.idle-rewards-subtitle.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Time display pulse */
.idle-rewards-time {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.idle-rewards-time.animate-in {
  opacity: 1;
  transform: scale(1);
  animation: pulseGlow 1s ease-out 0.2s;
}

@keyframes pulseGlow {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

/* Reward items slide-in from right */
.reward-item {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reward-item.animate-in {
  opacity: 1;
  transform: translateX(0);
}

/* Reward value number animation */
.reward-value {
  display: inline-block;
  transition: transform 0.2s ease-out;
}

.reward-item.animate-in .reward-value {
  animation: numberPop 0.3s ease-out;
}

@keyframes numberPop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

/* Unlock text fade-in */
.level-up-unlock {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.level-up-unlock.animate-in {
  opacity: 1;
  transform: translateY(0);
  animation: shimmer 2s ease-in-out infinite;
}

/* Static variant used in the redesigned level-up modal — no shimmer */
.level-up-unlock.levelup-unlock-static.animate-in {
  animation: none;
}

@keyframes shimmer {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

/* Button slide-in from bottom */
.level-up-button,
.idle-rewards-button {
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.level-up-button.animate-in,
.idle-rewards-button.animate-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.level-up-button.animate-in:hover,
.idle-rewards-button.animate-in:hover {
  transform: translateY(-2px) scale(1.05);
  transition: transform 0.2s ease-out;
}

.tab-group {
  display: flex;
  background: #dbccb5;
  border: 4px solid #866c5b;
  border-radius: 0.5rem 0.5rem 0 0;
  box-shadow: 0px 0px 2px 2px #00000061;
  /* justify-content: center; */
  overflow-x: auto;
}

.tab {
  flex: 1;
  background: #dbdad957;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3px;
  margin-right: 1px;
  margin-top: 0;
  border: 2px solid #382e28;
  transition: 0.5s;
  color: #ede4ba9e;
}

.tab.active {
  background: #342f2b !important;
  border-color: #efe19a;
  color: wheat;

}

.tab:hover {
  background: #342f2b;
}

.tab:last-child {
  margin-right: 0px;
}

.inventory {
  display: flex;
  background: #c1b29b;
  padding: 8px;
  gap: 4px;
  border-radius: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.slot {
  /* flex: 1 0 51px; */
  /* background: #301a0226; */
  display: flex;
  padding: 3px;
  max-width: 52px;
  max-height: 52px;
  /* border: 3px solid #000000; */
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  transition: 0.5s;
  position: relative;
  height: 52px;
  width: 52px;
  padding: 4px;
}

.slot:hover {
  background: #fdf0cccc;
  transform: translateY(-5px);
  filter: drop-shadow(2px 4px 4px #00000064);
}

.slot .item-count {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 10px;
  background: #000000bd;
  color: #ffeecf;
  padding: 0px;
  border-radius: 18%;
  font-weight: 700;
  padding-left: 2px;
  padding-right: 1px;
  font-family: monospace;
}

.slot.chest {
  max-width: unset;
  max-height: unset;
  width: auto;
  height: auto;
  background: #fffcf724;
  margin: 1px;
}

.item-tooltip {
  position: absolute;
  top: -35px;
  background: #e9ddcc;
  padding: 2px;
  width: 105px;
  left: -30px;
  right: 0;
  margin: auto;
  border-radius: 3px;
  font-weight: bold;
  text-align: center;
  z-index: 18;
  border: 2px solid #866c5b;
  font-size: 12px;
}

.item-tooltip:before {
  content: "";
  width: 7px;
  height: 7px;
  position: absolute;
  transform: rotate(45deg);
  left: 3px;
  border: 2px solid #866c5b;
  z-index: 14;
  top: 0;
  bottom: 0;
  margin: auto;
  background: #ffe69b;
}

.item-tooltip:after {
  content: "";
  width: 6px;
  height: 6px;
  background: #e9ddcc;
  position: absolute;
  bottom: -4px;
  transform: rotate(45deg);
  left: 50px;
  border: 2px solid #866c5b;
  border-left: 0;
  border-top: 0;
  z-index: 14;
}

/* ====================================================================
   MODERN INVENTORY
   Slim, low-gradient inventory refresh. Scoped to inventory pages so
   older slot users (chests/relics) keep their existing behavior.
   ==================================================================== */

.inventory-hero {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 18px !important;
  border-radius: 18px !important;
  color: #ead9b2 !important;
}

.inventory-hero-kicker,
.inventory-section-kicker {
  display: block;
  color: rgb(136 128 114);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.inventory-hero strong {
  font-size: 15px;
  color: #f8edcf;
}

.inventory-tabs.tab-group {
  gap: 6px;
  padding: 8px;
  margin-top: 12px;
  background: rgba(27, 21, 16, 0.88);
  border: 1px solid rgba(147, 131, 101, 0.46);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  scrollbar-width: thin;
}

.inventory-tabs .inventory-tab.tab {
  flex: 0 0 auto;
  min-width: 82px;
  gap: 6px;
  padding: 8px 10px;
  margin: 0;
  color: rgba(249, 231, 197, 0.72);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(147, 131, 101, 0.24);
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.inventory-tabs .inventory-tab img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.inventory-tabs .inventory-tab span {
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
}

.inventory-tabs .inventory-tab:hover {
  transform: translateY(-1px);
  color: #f8edcf;
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(242, 196, 109, 0.46);
}

.inventory-tabs .inventory-tab.active {
  color: #1f160d;
  background: #e5c878 !important;
  border-color: #f1d98b;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.22);
}

.inventory-modern-card {
  margin-top: 10px;
  padding: 14px !important;
  background: rgba(28, 22, 16, 0.92) !important;
  border: 1px solid rgba(147, 131, 101, 0.44) !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26) !important;
  color: #f4e6c2;
}

.inventory-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(147, 131, 101, 0.28);
}

.inventory-section-head h3 {
  color: #f3c96f !important;
  line-height: 1.1;
}

.inventory-section-count {
  flex: 0 0 auto;
  padding: 5px 9px;
  color: rgba(249, 231, 197, 0.78);
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(147, 131, 101, 0.26);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.inventory-modern-card .inventory.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
  justify-content: stretch;
  gap: 10px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(147, 131, 101, 0.22);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.inventory-modern-card .inventory.inventory-equipped-grid {
  grid-template-columns: repeat(auto-fill, minmax(70px, 70px));
  justify-content: center;
}

.inventory-modern-card .inventory-gear-preview-grid {
  grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
}

.inventory-gear-preview-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.inventory-gear-preview-item.inventory-empty-link:hover .inventory-equipped-label {
  color: #f3c96f;
}

.inventory-modern-card .slot.inventory-slot {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 68px;
  max-height: none;
  padding: 7px;
  cursor: pointer;
  color: #ead9b2;
  /* background: rgba(255, 255, 255, 0.045); */
  border: 1px solid rgba(147, 131, 101, 0.24);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
  overflow: hidden;
}

.inventory-modern-card .slot.inventory-slot:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.075);
  border-color: var(--slot-rarity, rgba(242, 196, 109, 0.58));
  box-shadow: 0 9px 18px rgba(0, 0, 0, 0.26);
  filter: none;
}

.inventory-modern-card .slot.inventory-slot img {
  position: relative;
  z-index: 1;
  max-width: 54px;
  max-height: 54px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.inventory-slot-frame {
  position: absolute;
  inset: 0;
  border: 2px solid var(--slot-rarity, rgba(242, 196, 109, 0.44));
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.84;
}

.inventory-modern-card .slot.inventory-slot.is-locked img {
  filter: grayscale(0.4) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  opacity: 0.74;
}

.inventory-rarity-mark {
  position: absolute;
  top: 4px;
  right: 5px;
  z-index: 2;
  min-width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.56);
  border-radius: 999px;
}

.inventory-modern-card .slot .item-count {
  right: 4px;
  bottom: 4px;
  z-index: 3;
  min-width: 18px;
  padding: 1px 5px;
  color: #f8edcf;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(242, 196, 109, 0.32);
  border-radius: 999px;
  font-family: inherit;
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
}

.inventory-equipped-card {
  margin-top: 12px;
}

.inventory-help-note {
  margin: 0 0 12px !important;
  padding: 9px 11px !important;
  color: rgba(249, 231, 197, 0.76) !important;
  background: rgba(0, 0, 0, 0.18) !important;
  border: 1px solid rgba(147, 131, 101, 0.24) !important;
  border-radius: 10px !important;
  font-size: 12px;
  text-align: center;
}

.inventory-equipped-inner {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.inventory-equipped-type {
  position: absolute;
  top: 4px;
  left: 6px;
  z-index: 2;
  max-width: calc(100% - 12px);
  overflow: hidden;
  color: rgba(249, 231, 197, 0.78);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

.inventory-equipped-label {
  min-height: 14px;
  overflow: hidden;
  color: rgba(249, 231, 197, 0.72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.inventory-modern-card .slot.inventory-slot-empty {
  cursor: default;
  opacity: 0.62;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
}

.inventory-modern-card .slot.inventory-slot-empty:hover {
  transform: none;
  border-color: rgba(147, 131, 101, 0.3);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
}

.inventory-modern-card .slot.inventory-slot-empty span {
  color: rgba(249, 231, 197, 0.48);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.inventory-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 18px !important;
  color: rgba(249, 231, 197, 0.74) !important;
  background: rgba(0, 0, 0, 0.2) !important;
  border: 1px dashed rgba(147, 131, 101, 0.34) !important;
  border-radius: 12px !important;
}

@media (max-width: 640px) {
  .inventory-hero {
    padding: 18px 14px !important;
  }

  .inventory-tabs.tab-group {
    gap: 5px;
    padding: 6px;
  }

  .inventory-tabs .inventory-tab.tab {
    min-width: 58px;
    padding: 7px 8px;
  }

  .inventory-tabs .inventory-tab span {
    display: none;
  }

  .inventory-tabs .inventory-tab img {
    width: 28px;
    height: 28px;
  }

  .inventory-modern-card {
    padding: 11px !important;
  }

  .inventory-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .inventory-modern-card .inventory.inventory-grid {
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
    gap: 8px;
    padding: 9px;
  }

  .inventory-modern-card .inventory-gear-preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .inventory-modern-card .slot.inventory-slot {
    height: 60px;
    padding: 6px;
    border-radius: 10px;
  }

  .inventory-modern-card .slot.inventory-slot img {
    max-width: 48px;
    max-height: 48px;
  }
}

.info-tooltip {
  position: absolute;
  top: -35px;
  background: #e9ddcc;
  padding: 3px;
  width: 225px;
  left: 0;
  right: 0;
  margin: auto;
  border-radius: 3px;
  font-weight: bold;
  text-align: center;
  z-index: 18;
  border: 2px solid #866c5b;
  font-size: 12px;
  pointer-events: none;
}

.info-tooltip:before {
  content: "";
  width: 7px;
  height: 7px;
  position: absolute;
  transform: rotate(45deg);
  left: 3px;
  border: 2px solid #5b8286;
  z-index: 14;
  top: 0;
  bottom: 0;
  margin: auto;
  background: #9bfffa;
  pointer-events: none;
}

.info-tooltip:after {
  content: "";
  width: 8px;
  height: 8px;
  background: #e9ddcc;
  position: absolute;
  bottom: -5px;
  transform: rotate(45deg);
  left: 0;
  margin: auto;
  right: 0;
  border: 2px solid #866c5b;
  border-left: 0;
  border-top: 0;
  z-index: 14;
  pointer-events: none;
}

.chest-shake {
  animation: chestShake 0.5s infinite;
}

@keyframes chestShake {

  0%,
  100% {
    transform: translateX(0) translateY(0) rotate(0deg);
  }

  10% {
    transform: translateX(-5px) translateY(-3px) rotate(-2deg);
  }

  20% {
    transform: translateX(5px) translateY(3px) rotate(2deg);
  }

  30% {
    transform: translateX(-5px) translateY(3px) rotate(-2deg);
  }

  40% {
    transform: translateX(5px) translateY(-3px) rotate(2deg);
  }

  50% {
    transform: translateX(-3px) translateY(-2px) rotate(-1deg);
  }

  60% {
    transform: translateX(3px) translateY(2px) rotate(1deg);
  }

  70% {
    transform: translateX(-3px) translateY(2px) rotate(-1deg);
  }

  80% {
    transform: translateX(3px) translateY(-2px) rotate(1deg);
  }

  90% {
    transform: translateX(-2px) translateY(-1px) rotate(-0.5deg);
  }
}

.online-players-title {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
}

.online-players-icon {
  margin-right: 8px;
}

.online-players-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.online-player-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.online-player-card:hover {
  text-decoration: none;
}

.online-player-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #866c5b00;
  background-color: #b2a79047;
  transition: all 0.2s ease;
  border-bottom: 4px solid #93775f57;
}

.online-player-item:hover {
  background-color: #8d806547;
  border-color: #a67c5200;
  border-bottom: 0px;
  /* box-shadow: 0 4px 1px 1px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05); */
}

.online-player-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.online-player-avatar {
  flex-shrink: 0;
  position: relative;
}

.online-player-companion {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 4px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.online-player-default-avatar {
  width: 48px;
  height: 48px;
  background-color: #3a342d;
  border: 2px solid #866c5b;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.online-player-default-avatar i {
  color: #866c5b;
  font-size: 20px;
}

.online-player-rank-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  border: 2px solid #2a2520;
  border-radius: 50%;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
  background: #342e28;
}

.online-player-info {
  flex: 1;
  min-width: 0;
}

.online-player-username-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.online-player-username {
  font-weight: bold;
  color: #6e685d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.online-player-username.rainbow {
  background: linear-gradient(to right,
      #6666ff,
      #0099ff,
      #00ff00,
      #ff3399,
      #ff3333,
      #edff33,
      #33ff8c,
      #6666ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbow_animation 8s ease-in-out infinite;
  background-size: 500% 200%;
}

.online-player-guild-tag {
  font-size: 0.85rem;
  color: #7f1d1d;
  margin-left: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.online-player-guild-tag:hover {
  color: #9a1f1f;
  text-decoration: underline;
}

.online-player-admin-badge {
  font-size: 12px;
  color: #fbbf24;
}

.online-player-level-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.online-player-level {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 600;
}

.online-player-time-container {
  flex-shrink: 0;
  margin-left: 12px;
}

.online-player-time {
  font-size: 11px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  background-color: #1c12050a;
  color: #281a08;
}

.online-player-time.recent {
  color: #079662;
  background: #ffffff87;
}

.game-links-section {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  margin-bottom: 20px;
}

.game-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg,
      rgba(134, 108, 91, 0.3) 0%,
      rgba(166, 124, 82, 0.2) 100%);
  color: #fbebcf;
  text-decoration: none;
  border-radius: 8px;
  border: 2px solid rgba(134, 108, 91, 0.5);
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.game-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.15),
      transparent);
  transition: left 0.5s ease;
  z-index: 0;
}

.game-link:hover::before {
  left: 100%;
}

.game-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2), 0 0 20px rgba(166, 124, 82, 0.3);
  border-color: rgba(166, 124, 82, 0.8);
  background: linear-gradient(135deg,
      rgba(166, 124, 82, 0.4) 0%,
      rgba(134, 108, 91, 0.3) 100%);
  text-decoration: none;
  color: #fff8e1;
}

.game-link:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.game-link-icon {
  width: 18px;
  height: 18px;
  position: relative;
  z-index: 1;
}

.game-link span {
  position: relative;
  z-index: 1;
}

.game-link-online {
  background: linear-gradient(135deg,
      rgba(7, 150, 98, 0.2) 0%,
      rgba(34, 197, 94, 0.15) 100%);
  border-color: rgba(7, 150, 98, 0.4);
  color: #a8f5d0;
}

.game-link-online:hover {
  background: linear-gradient(135deg,
      rgba(34, 197, 94, 0.3) 0%,
      rgba(7, 150, 98, 0.25) 100%);
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2), 0 0 20px rgba(34, 197, 94, 0.3);
  color: #d1fae5;
}

.game-link-admin {
  background: linear-gradient(135deg,
      rgba(102, 126, 234, 0.3) 0%,
      rgba(118, 75, 162, 0.25) 100%);
  border-color: rgba(102, 126, 234, 0.5);
  color: #c7d2fe;
}

.game-link-admin:hover {
  background: linear-gradient(135deg,
      rgba(118, 75, 162, 0.4) 0%,
      rgba(102, 126, 234, 0.35) 100%);
  border-color: rgba(118, 75, 162, 0.7);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2), 0 0 20px rgba(102, 126, 234, 0.4);
  color: #e0e7ff;
}

.admin-edit-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg,
      rgba(239, 68, 68, 0.2) 0%,
      rgba(220, 38, 38, 0.15) 100%);
  color: #ff0000;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-edit-link:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg,
      rgba(220, 38, 38, 0.3) 0%,
      rgba(239, 68, 68, 0.25) 100%);
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
  color: #fee2e2;
  text-decoration: none;
}

.admin-edit-link:active {
  transform: translateY(0);
}

.admin-edit-icon {
  width: 14px;
  height: 14px;
}

/* Administrator's Notice Styles */
/* =========================
   Administrator's Notice (compact)
   ========================= */
.admin-notice-card {
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(134, 108, 91, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.admin-notice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.admin-notice-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: rgba(58, 47, 37, 0.72);
  margin: 0;
}

.admin-notice-title i {
  color: #7f1d1d;
  font-size: 11px;
}

.admin-notice-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(127, 29, 29, 0.08);
  color: #7f1d1d !important;
  border: 1px solid rgba(127, 29, 29, 0.22);
  text-decoration: none !important;
  font-size: 11px;
  transition: 0.15s;
}

.admin-notice-edit-btn:hover {
  background: rgba(127, 29, 29, 0.16);
}

.admin-notice-message {
  margin: 0 0 6px;
  color: #2a221d;
  line-height: 1.5;
  font-size: 13px;
  white-space: normal;
  word-break: break-word;
}

.admin-notice-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
  color: rgba(58, 47, 37, 0.62);
}

.admin-notice-footer strong {
  color: rgba(58, 47, 37, 0.88);
  font-weight: 700;
}

.admin-notice-sep {
  opacity: 0.5;
}

/* Relics Page Styles */
.relic-card {
  border: 4px solid #9ca3af;
  border-radius: 8px;
  padding: 12px;
  background: rgb(40 40 40 / 78%);
  color: #fef5e6;
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
  background: url(../images/design/artifact_placeholder.png);
  background-size: cover;
  background-position: center;
}

.relic-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.relic-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #9ca3af 0%, #9ca3af80 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  box-shadow: 0 0 12px rgba(156, 163, 175, 0.4);
}

.relic-icon i,
.relic-icon svg {
  width: 24px;
  height: 24px;
  color: #fff;
}

.relic-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

/* Rarity-specific colors for relics */
.relic-card[data-rarity="common"] {
  border-color: #9ca3af;
}

.relic-card[data-rarity="uncommon"] {
  border-color: #22c55e;
}

.relic-card[data-rarity="rare"] {
  border-color: #3b82f6;
}

.relic-card[data-rarity="epic"] {
  border-color: #a855f7;
}

.relic-card[data-rarity="legendary"] {
  border-color: #f59e0b;
}

.relic-card[data-rarity="mythic"] {
  border-color: #ef4444;
}

.relic-upgrade-btn {
  background: linear-gradient(183deg, #2fc546 0%, #00872a 100%);
  /* border: 2px solid #e7eee9; */
  transition: all 0.3s;
}

.relic-upgrade-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #2fc546 0%, #00872a 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgb(0 0 0 / 40%);
}

.relic-upgrade-btn:active:not(:disabled) {
  transform: translateY(0);
}

.relic-upgrade-btn:disabled {
  background: #606060;
  border-color: #404040;
  cursor: not-allowed;
}

.equip-relic-btn {
  background: linear-gradient(179deg, rgb(50 223 215) 0%, rgb(6 90 85) 100%);
  border: 0px solid #e7eee9;
  transition: all 0.3s;
}

.equip-relic-btn:hover {
  background: linear-gradient(135deg, rgb(50 223 215) 0%, rgb(6 90 85) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgb(0 0 0 / 40%);
}

.unequip-relic-btn {
  background: linear-gradient(179deg, rgb(220 38 38) 0%, rgb(185 28 28) 100%);
  border: 0px solid #e7eee9;
  transition: all 0.3s;
}

.unequip-relic-btn:hover {
  background: linear-gradient(135deg, rgb(220 38 38) 0%, rgb(185 28 28) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgb(0 0 0 / 40%);
}

.equiped-relic {
  background: #0bf53430;
  color: #dddddd;
  padding: 4px;
  border-radius: 4px;
}

.companion-slot-locked {
  position: relative;
}

.companion-lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid #666;
  border-radius: 4px;
  z-index: 10;
}

.companion-lock-overlay:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: #888;
}

.unlock-companion-slot-btn {
  background: linear-gradient(135deg, #1d7b7f 0%, #2ab1b6 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  margin-top: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid #167194;
  font-size: 11px;
}

.unlock-companion-slot-btn:hover {
  background: linear-gradient(135deg, #2ab1b6 0%, #30edc1 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(45, 177, 182, 0.4);
}

.unlock-companion-slot-btn:active {
  transform: translateY(0);
}

.unlock-companion-slot-btn:disabled {
  background: #606060;
  border-color: #404040;
  cursor: not-allowed;
  opacity: 0.7;
}

.companion-unlock-item {
  transition: all 0.3s;
}

.companion-unlock-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.companion-unlock-button {
  background: linear-gradient(135deg, #1d7b7f 0%, #2ab1b6 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  border: 1px solid #167194;
  transition: all 0.3s;
}

.companion-unlock-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #2ab1b6 0%, #30edc1 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(45, 177, 182, 0.4);
}

.companion-unlock-button:active:not(:disabled) {
  transform: translateY(0);
}

.companion-unlock-button:disabled {
  background: #606060;
  border-color: #404040;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Relic tooltip styles */
.relic-tooltip-container {
  position: relative;
}

.relic-tooltip {
  pointer-events: none;
  /* Prevent tooltip from interfering with hover */
}

.relic-tooltip-container:hover .relic-tooltip {
  display: block !important;
}

/* Upgrade Tabs */
.upgrade-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid rgba(139, 0, 0, 0.3);
  padding-bottom: 0.5rem;
}

.upgrade-tab {
  background: rgba(139, 0, 0, 0.2);
  border: 1px solid rgba(139, 0, 0, 0.3);
  color: #ccc;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem 0.375rem 0 0;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.upgrade-tab:hover {
  background: rgba(139, 0, 0, 0.3);
  border-color: rgba(139, 0, 0, 0.5);
  color: #fff;
}

.upgrade-tab.active {
  background: rgba(139, 0, 0, 0.4);
  border-color: rgba(139, 0, 0, 0.6);
  border-bottom-color: transparent;
  color: #fff;
  transform: translateY(-2px);
}

.upgrade-tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.upgrade-tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Messages System Styles */
.messages-container {
  max-width: 100%;
  margin: 0 auto;
}

.messages-layout {
  display: flex;
  height: calc(100vh - 200px);
  min-height: 600px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0px 0px 2px 2px #00000061;
}

.messages-sidebar {
  width: 300px;
  background: rgb(34 33 32);
  border-right: 1px solid rgba(139, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  border: 4px solid #866c5b;
  border-right: 1px solid;
}

/* Mobile responsive design */
@media (max-width: 768px) {
  .messages-layout {
    flex-direction: column;
    height: calc(100vh - 150px);
    min-height: 500px;
  }

  .messages-sidebar {
    width: 100%;
    border-right: 4px solid #866c5b;
    border-bottom: 1px solid;
    max-height: 40vh;
    min-height: 200px;
  }

  .messages-chat {
    flex: 1;
    min-height: 60vh;
    border-left: 4px solid #866c5b !important;
    /* border-bottom: 4px solid #866c5b !important; */
  }

  .chat-header {
    padding: 10px;
  }

  .chat-messages {
    padding: 15px;
  }

  /* Mobile bubble layout */
  .conversations-list {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0px 10px;
    gap: 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .conversations-list::-webkit-scrollbar {
    height: 4px;
  }

  .conversations-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
  }

  .conversations-list::-webkit-scrollbar-thumb {
    background: rgb(27 177 143);
    border-radius: 2px;
  }

  .conversation-item {
    flex: 1 0 auto;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px;
    margin-bottom: 0;
    min-width: 70px;
    max-width: 70px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
  }

  .conversation-item:hover {
    background: rgba(139, 0, 0, 0.2);
    transform: translateY(-2px);
  }

  .conversation-item.active {
    background: rgb(139 85 0 / 29%);
    border-left: none;
    border-bottom: 3px solid #8b5800;
    transform: translateY(-2px);
  }

  .conversation-content {
    display: none;
  }

  .conversation-avatar {
    width: 50px;
    height: 50px;
    margin-right: 0;
    margin-bottom: 6px;
    font-size: 20px;
    position: relative;
  }

  .conversation-name-mobile {
    display: block;
    font-size: 11px;
    color: #fff;
    font-weight: 600;
    text-align: center;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70px;
  }

  .conversation-badge-mobile {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #8b0000;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    border: 2px solid rgb(34 33 32);
  }

  .message {
    max-width: 85%;
  }

  .chat-input-wrapper {
    padding: 0 10px;
  }

  #messageInput {
    font-size: 13px;
    padding: 8px 12px;
  }

  .send-message-btn {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .messages-container {
    padding: 0;
  }

  .messages-layout {
    height: calc(100vh - 120px);
    border-radius: 0;
  }

  .messages-sidebar {
    max-height: 35vh;
    min-height: 150px;
  }

  .messages-header {
    padding: 12px;
  }

  .messages-header .blood-text {
    font-size: 16px;
  }

  .conversations-list {
    /* padding: 12px 8px; */
    gap: 12px;
  }

  .conversation-item {
    /* min-width: 65px; */
    max-width: 65px;
    padding: 0px 6px;
    background: none !important;
  }

  .conversation-avatar {
    width: 45px;
    height: 45px;
    font-size: 18px;
    margin-right: 0px !important;
  }

  .conversation-name-mobile {
    font-size: 10px;
    max-width: 65px;
  }

  .conversation-badge-mobile {
    width: 18px;
    height: 18px;
    font-size: 9px;
  }

  .chat-header {
    padding: 8px;
  }

  .chat-avatar {
    width: 35px;
    height: 35px;
  }

  .view-profile-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .chat-messages {
    padding: 10px;
    gap: 10px;
  }

  .message {
    max-width: 80%;
  }

  .message-content {
    padding: 8px 12px;
  }

  .message-text {
    font-size: 13px;
  }

  .chat-input-container {
    padding: 10px;
  }

  #messageInput {
    font-size: 12px;
    padding: 8px 10px;
  }

  .send-message-btn {
    width: 32px;
    height: 32px;
  }

  .char-counter {
    font-size: 10px;
  }
}

/* Ruby Shop Styles */
.ruby-shop-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.ruby-shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  border: 2px solid #866c5b;
}

.ruby-shop-title {
  font-size: 28px;
  font-weight: 800;
  color: #eedaac;
  margin: 0;
}

.ruby-shop-balance {
  display: flex;
  align-items: center;
  font-size: 18px;
  color: #fff;
  font-weight: 600;
}

.buy-rubies-section {
  text-align: center;
  padding: 25px;
  margin-bottom: 30px;
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.3), rgba(184, 134, 11, 0.3));
  border-radius: 10px;
  border: 2px solid #8b5800;
}

.buy-rubies-btn {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(135deg, #8b0000, #a00000);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 18px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
}

.buy-rubies-btn:hover {
  background: linear-gradient(135deg, #a00000, #b80000);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 0, 0, 0.6);
}

.buy-rubies-note {
  margin-top: 10px;
  color: #d1d5db;
  font-size: 14px;
}

.ruby-shop-section {
  margin-bottom: 40px;
}

.ruby-shop-section-title {
  font-size: 24px;
  font-weight: 700;
  color: #eedaac;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(139, 0, 0, 0.3);
}

.ruby-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.ruby-shop-item {
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid #866c5b;
  border-radius: 10px;
  padding: 20px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ruby-shop-item:hover {
  border-color: #8b5800;
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(139, 0, 0, 0.3);
}

.ruby-shop-item-icon {
  font-size: 48px;
  color: #ef4444;
  margin-bottom: 15px;
}

.ruby-shop-item-content {
  width: 100%;
}

.ruby-shop-item-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.ruby-shop-item-desc {
  font-size: 14px;
  color: #d1d5db;
  margin-bottom: 15px;
  min-height: 40px;
}

.ruby-shop-item-price {
  font-size: 20px;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.ruby-shop-buy-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #1ac587, #14adb7);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
}

.ruby-shop-buy-btn:hover:not(.disabled):not(:disabled) {
  background: linear-gradient(135deg, #14adb7, #1ac587);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 197, 135, 0.4);
}

.ruby-shop-buy-btn.disabled,
.ruby-shop-buy-btn:disabled {
  background: #6b7280;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Ruby Shop Category Navigation */
.ruby-shop-welcome {
  text-align: center;
  padding: 20px;
  margin-bottom: 30px;
  color: #d1d5db;
  font-size: 16px;
}

.ruby-shop-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.ruby-shop-category-card {
  display: flex;
  align-items: center;
  padding: 25px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid #866c5b;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  cursor: pointer;
}

.ruby-shop-category-card:hover {
  border-color: #8b5800;
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(139, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.5);
}

.ruby-shop-category-icon {
  font-size: 48px;
  color: #ef4444;
  margin-right: 20px;
  flex-shrink: 0;
}

.ruby-shop-category-content {
  flex: 1;
}

.ruby-shop-category-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.ruby-shop-category-desc {
  font-size: 14px;
  color: #d1d5db;
  margin: 0;
}

.ruby-shop-category-arrow {
  font-size: 24px;
  color: #9ca3af;
  margin-left: 15px;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.ruby-shop-category-card:hover .ruby-shop-category-arrow {
  transform: translateX(5px);
  color: #ef4444;
}

.ruby-shop-back-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  margin-bottom: 15px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #866c5b;
  border-radius: 6px;
  color: #d1d5db;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s;
}

.ruby-shop-back-btn:hover {
  background: rgba(139, 0, 0, 0.2);
  border-color: #8b5800;
  color: #fff;
}

.ruby-shop-empty {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}

.ruby-shop-empty i {
  color: #6b7280;
  margin-bottom: 15px;
}

/* Ruby Purchase Page Styles */
.buy-rubies-intro {
  text-align: center;
  padding: 30px 20px;
  margin-bottom: 40px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  border: 2px solid #866c5b;
}

.buy-rubies-intro h3 {
  font-size: 28px;
  font-weight: 800;
  color: #eedaac;
  margin-bottom: 15px;
}

.buy-rubies-intro>p {
  font-size: 16px;
  color: #d1d5db;
  margin-bottom: 25px;
}

.buy-rubies-features {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 600;
}

.feature-item i {
  color: #1ac587;
  font-size: 20px;
}

.ruby-bundles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.ruby-bundle-card {
  position: relative;
  background: rgba(0, 0, 0, 0.4);
  border: 3px solid #866c5b;
  border-radius: 15px;
  padding: 30px 20px;
  text-align: center;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ruby-bundle-card:hover {
  border-color: #8b5800;
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(139, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.5);
}

.ruby-bundle-card.popular {
  border-color: #fbbf24;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

.ruby-bundle-card.best-value {
  border-color: #ef4444;
}

.bundle-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.popular-badge {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.5);
}

.value-badge {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.5);
}

.ruby-bundle-icon {
  font-size: 64px;
  color: #ef4444;
  margin-bottom: 15px;
}

.ruby-bundle-name {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
}

.ruby-bundle-amounts {
  width: 100%;
  margin-bottom: 20px;
}

.ruby-amount-main {
  font-size: 36px;
  font-weight: 800;
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ruby-amount-bonus {
  font-size: 14px;
  color: #1ac587;
  font-weight: 600;
  margin-bottom: 8px;
}

.ruby-amount-total {
  font-size: 16px;
  color: #d1d5db;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(139, 0, 0, 0.3);
}

.ruby-bundle-price {
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(139, 0, 0, 0.2);
  border-radius: 8px;
  width: 100%;
}

.price-currency {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  vertical-align: top;
}

.price-amount {
  font-size: 48px;
  font-weight: 800;
  color: #fbbf24;
  line-height: 1;
}

.price-per-ruby {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 5px;
}

.ruby-bundle-buy-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #1ac587, #14adb7);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(26, 197, 135, 0.3);
}

.ruby-bundle-buy-btn:hover {
  background: linear-gradient(135deg, #14adb7, #1ac587);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 197, 135, 0.5);
}

.buy-rubies-info {
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid #866c5b;
  border-radius: 10px;
  padding: 30px;
  margin-top: 30px;
}

.buy-rubies-info h4 {
  font-size: 22px;
  font-weight: 700;
  color: #eedaac;
  margin-bottom: 20px;
  text-align: center;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.info-item {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.info-item i {
  font-size: 32px;
  color: #1ac587;
  flex-shrink: 0;
  margin-top: 5px;
}

.info-item strong {
  display: block;
  color: #fff;
  font-size: 16px;
  margin-bottom: 5px;
}

.info-item p {
  color: #d1d5db;
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

.buy-rubies-warning {
  margin-top: 30px;
  padding: 20px;
  background: rgba(184, 134, 11, 0.2);
  border: 2px solid #b8860b;
  border-radius: 10px;
}

.warning-content {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.warning-content i {
  font-size: 32px;
  color: #fbbf24;
  flex-shrink: 0;
  margin-top: 5px;
}

.warning-content strong {
  display: block;
  color: #fbbf24;
  font-size: 18px;
  margin-bottom: 8px;
}

.warning-content p {
  color: #d1d5db;
  font-size: 14px;
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .ruby-shop-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .ruby-shop-grid {
    grid-template-columns: 1fr;
  }

  .ruby-shop-categories {
    grid-template-columns: 1fr;
  }

  .ruby-shop-category-card {
    padding: 20px;
  }

  .ruby-shop-category-icon {
    font-size: 36px;
    margin-right: 15px;
  }

  .ruby-bundles-grid {
    grid-template-columns: 1fr;
  }

  .buy-rubies-features {
    flex-direction: column;
    gap: 15px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}

.messages-header {
  padding: 15px;
  border-bottom: 1px solid rgb(245 245 245 / 30%);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.messages-header .blood-text {
  color: #eedaac;
}

.new-message-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #8b6e00;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.new-message-btn:hover {
  background: #af8b06;
  transform: scale(1.1) rotate(45deg);
}

.conversations-list {
  flex: 1;
  overflow-y: auto;
  /* padding: 10px; */
}

.no-conversations {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
}

.new-conversation-btn {
  padding: 12px 24px;
  background: #8b0000;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
}

.new-conversation-btn:hover {
  background: #a00000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 0, 0, 0.4);
}

.conversation-item {
  display: flex;
  /* padding: 12px; */
  /* margin-bottom: 8px; */
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(0, 0, 0, 0.2);
  justify-content: center;
  align-items: center;
}

.conversation-item:hover {
  background: rgba(139, 0, 0, 0.2);
}

.conversation-item.active {
  background: rgb(139 85 0 / 29%);
  border-left: 3px solid #8b5800;
}

.conversation-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #8b6800;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 12px;
  flex-shrink: 0;
}

.conversation-content {
  flex: 1;
  min-width: 0;
}

.conversation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.conversation-name {
  font-weight: 600;
  color: #fff;
  font-size: 14px;
}

.conversation-name-mobile {
  /* display: none; */
  color: #f5deb3d9;
}

.conversation-badge-mobile {
  display: none;
}

.conversation-time {
  font-size: 11px;
  color: #9ca3af;
}

.conversation-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.conversation-message {
  font-size: 12px;
  color: #d1d5db;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.unread-badge {
  background: #8b0000;
  color: white;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}

.messages-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgb(209 195 172);
  border: 4px solid #866c5b;
  border-left: 0;
  /* padding: 8px;*/
}

.chat-header {
  padding: 12px;
  border-bottom: 0px solid rgb(134 108 91);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgb(255 255 255 / 30%);
  border-radius: 7px 7px 0 0;
}

.chat-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #8b6800;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.view-profile-btn {
  padding: 8px 16px;
  background: #463e36c7;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
}

.view-profile-btn:hover {
  background: #6a625b;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.no-messages {
  text-align: center;
  padding: 40px;
  color: #4e4c43;
}

.message {
  max-width: 90%;
  animation: fadeIn 0.3s;
}

.message-sent {
  align-self: flex-end;
}

.message-received {
  align-self: flex-start;
}

.message-sent .message-content {
  background: #2b9ca3;
}

.message-received .message-content {
  background: #eaf1f1 !important;
  color: black !important;
}

.message-content {
  padding: 10px 14px;
  border-radius: 12px;
  position: relative;
}

.message-sent .message-content {
  /* background: #2b9ca3; */
  color: white;
  border-bottom-right-radius: 4px;
}

.message-received .message-content {
  background: rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
  border-bottom-left-radius: 4px;
}

.message-text {
  margin: 0;
  word-wrap: break-word;
  line-height: 1.4;
}

.message-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  gap: 8px;
}

.message-time {
  font-size: 10px;
  opacity: 0.7;
}

.delete-message-btn {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.6;
  padding: 2px 4px;
  transition: all 0.2s;
}

.delete-message-btn:hover {
  opacity: 1;
}

.messages-chat .chat-input-container {
  display: flex;
  justify-content: center;
}

.chat-input-wrapper {
  display: flex;
  gap: 0px;
  align-items: center;
  justify-content: center;
}

#messageInput {
  flex: 1;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(139, 0, 0, 0.3);
  border-radius: 20px;
  color: white;
  resize: none;
  max-height: 120px;
  font-family: inherit;
  font-size: 14px;
}

#messageInput:focus {
  outline: none;
  border-color: #1bb18f;
}

.send-message-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #00838b;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
}

.send-message-btn:hover:not(:disabled) {
  background: #14adb7;
  transform: scale(1.05);
}

.send-message-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.char-counter {
  text-align: right;
  font-size: 11px;
  color: #32373e;
  margin-top: 4px;
  padding-right: 4px;
}

.no-chat-selected {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #414449;
  padding: 8px;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #262421;
  padding: 30px;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  position: relative;
  border: 2px solid #866c5b;
  max-height: 60%;
  overflow-y: auto;
}

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(139, 0, 0, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(139, 0, 0, 0.2);
  color: #fff;
}

.modal-body {
  padding: 20px;
}

/* Scrollbar Styles */
.conversations-list::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.conversations-list::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.conversations-list::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
  background: rgb(27 177 143);
  border-radius: 3px;
}

.conversations-list::-webkit-scrollbar-thumb:hover,
.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgb(47, 224, 183);
}

/* Lucky Hour Styles */
@keyframes luckyHourPulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  }

  50% {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
  }
}

.lucky-hour-card {
  display: block;
}

.lucky-hour-title {
  color: #40bb75;
  text-shadow: 0px 0px 1px rgb(0 0 0 / 50%);
  font-size: 16px !important;
}

.lucky-hour-text {
  color: #48423b;
}

.lucky-hour-icon {
  animation: pulse 2s ease-in-out infinite;
}

/* Quest System Styles */
.quest-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quest-card {
  background-color: rgb(219 204 181);
  border: 4px solid rgb(134 108 91);
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0px 0px 2px 2px #00000061;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.quest-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #866c5b, #d1c3ac);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.quest-card:hover {
  transform: translateY(-2px);
  box-shadow: 0px 4px 8px 4px #00000061;
}

.quest-card:hover::before {
  opacity: 1;
}

.quest-card.quest-completed {
  border-color: #40bb75;
  /* background: linear-gradient(135deg,
      rgb(219 204 181) 0%,
      rgba(64, 187, 117, 0.1) 100%); */
}

.quest-card.quest-completed::before {
  background: linear-gradient(90deg, #40bb75, #2d8f5a);
  opacity: 1;
}

.quest-card.quest-claimed {
  opacity: 0.7;
  border-color: #866c5b;
}

.quest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quest-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2a2411;
  margin: 0;
  flex: 1;
}

.quest-status {
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quest-status.quest-active {
  background: rgba(134, 108, 91, 0.2);
  color: #866c5b;
}

.quest-status.quest-completed {
  background: rgba(64, 187, 117, 0.2);
  color: #2d8f5a;
}

.quest-status.quest-claimed {
  background: rgba(134, 108, 91, 0.1);
  color: #866c5b;
}

.quest-description {
  color: #48423b;
  margin-bottom: 0.75rem;
  line-height: 1.5;
  font-size: 0.9rem;
}

.quest-objective-hint {
  color: #5c5346;
  margin: -0.35rem 0 0.85rem;
  line-height: 1.45;
  font-size: 0.85rem;
}

.quest-objective-hint em {
  font-style: italic;
}

.quest-objective {
  margin-bottom: 0.75rem;
  color: #2a2411;
  font-size: 0.9rem;
}

.quest-progress {
  margin-bottom: 1rem;
}

.quests-progress-bar-container {
  width: 100%;
  height: 24px;
  background: rgba(134, 108, 91, 0.2);
  border-radius: 0.25rem;
  overflow: hidden;
  border: 2px solid #866c5b;
  margin-bottom: 0.5rem;
  position: relative;
}

.quests-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #40bb75, #2d8f5a);
  transition: width 0.5s ease;
  position: relative;
  overflow: hidden;
}

.quests-progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.3),
      transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.progress-text {
  text-align: center;
  font-size: 0.85rem;
  color: #2a2411;
  font-weight: 600;
}

.quest-rewards {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(134, 108, 91, 0.1);
  border-radius: 0.25rem;
  border: 1px solid rgba(134, 108, 91, 0.3);
}

.quest-rewards strong {
  display: block;
  margin-bottom: 0.5rem;
  color: #2a2411;
  font-size: 0.9rem;
}

.rewards-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.quest-rewards .reward-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(219, 204, 181, 0.5);
  opacity: 1 !important;
  transform: none !important;
  border-radius: 0.25rem;
  font-size: 0.85rem;
  color: #2a2411;
  font-weight: 600;
  border: 1px solid rgba(134, 108, 91, 0.3);
}

.quest-claim-btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #40bb75, #2d8f5a);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.quest-claim-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #2d8f5a, #40bb75);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.quest-claim-btn:active:not(:disabled) {
  transform: translateY(0);
}

.quest-claim-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.loading-quests,
.no-quests,
.error-quests {
  text-align: center;
  padding: 2rem;
  color: #866c5b;
}

.error-quests {
  color: #d32f2f;
}

/* Achievement specific styles */
.quest-card.quest-claimed.achievement-unlocked {
  animation: achievementUnlock 0.8s ease-out;
}

@keyframes achievementUnlock {
  0% {
    transform: scale(1);
    box-shadow: 0px 0px 2px 2px #00000061;
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0px 0px 20px 10px rgba(255, 215, 0, 0.6);
  }

  100% {
    transform: scale(1);
    box-shadow: 0px 0px 2px 2px #00000061;
  }
}

/* Quest Quality of Life Improvements */
.quest-stats-summary {
  background: #dbccb5;
  border: 4px solid #866c5b;
  border-top: 0;
  border-radius: 0 0 0.5rem 0.5rem;
  box-shadow: 0px 0px 2px 2px #00000061;
  padding: 0.75rem 1rem;
  margin: 0;
  margin-top: -1rem;
  position: relative;
}

.quest-stats-summary::before {
  content: "";
  position: absolute;
  top: 0px;
  left: 0;
  right: 0;
  height: 0px;
  background: #dbccb5;
  z-index: 1;
}

/* Connect quest controls with tabs and stats */
.quest-controls::before {
  content: "";
  position: absolute;
  top: 0px;
  left: 0;
  right: 0;
  height: 4px;
  background: #dbccb5;
  z-index: 1;
}

.quest-stats-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #2a2411;
}

.quest-stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: rgba(42, 36, 17, 0.12);
  border: 1px solid rgba(134, 108, 91, 0.25);
  border-radius: 0.375rem;
  min-width: fit-content;
  flex: 0 1 auto;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.quest-stat-item:hover {
  background: rgba(42, 36, 17, 0.18);
  border-color: rgba(134, 108, 91, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quest-stat-item strong {
  color: #2a2411;
  font-weight: 600;
  margin-right: 0.25rem;
}

.quest-stat-completed {
  color: #2d8f5a;
}

.quest-stat-completed strong {
  color: #2d8f5a;
}

.quest-stat-claimed {
  color: #866c5b;
}

.quest-stat-claimed strong {
  color: #866c5b;
}

.quest-stat-ready {
  color: #2d8f5a;
  font-weight: 600;
  background: rgba(64, 187, 117, 0.15);
  border-color: rgba(64, 187, 117, 0.35);
  box-shadow: 0 0 8px rgba(64, 187, 117, 0.2);
}

.quest-stat-ready strong {
  color: #2d8f5a;
  font-weight: 700;
}

.quest-card.quest-newly-completed {
  animation: questNewlyCompleted 1s ease-out;
  border-color: #40bb75 !important;
  box-shadow: 0px 0px 15px 5px rgba(64, 187, 117, 0.4) !important;
}

@keyframes questNewlyCompleted {
  0% {
    transform: scale(1);
    box-shadow: 0px 0px 2px 2px #00000061;
  }

  25% {
    transform: scale(1.02);
    box-shadow: 0px 0px 20px 8px rgba(64, 187, 117, 0.6);
  }

  50% {
    transform: scale(1.01);
    box-shadow: 0px 0px 15px 5px rgba(64, 187, 117, 0.5);
  }

  100% {
    transform: scale(1);
    box-shadow: 0px 0px 15px 5px rgba(64, 187, 117, 0.4);
  }
}

/* Scroll to top button */
#quest-scroll-to-top {
  display: flex;
  align-items: center;
  justify-content: center;
}

#quest-scroll-to-top:hover {
  background: linear-gradient(135deg, #a67c52, #866c5b) !important;
}

/* Quest completion pulse animation */
.quest-card.quest-completed:not(.quest-claimed) {
  animation: questReadyPulse 2s ease-in-out infinite;
}

@keyframes questReadyPulse {

  0%,
  100% {
    box-shadow: 0px 0px 2px 2px #00000061;
  }

  50% {
    box-shadow: 0px 0px 10px 5px rgba(64, 187, 117, 0.5);
  }
}

/* Profile Achievements Section */
.achievements-header {
  user-select: none;
}

.profile-section-toggle {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-section-chevron {
  transition: transform 0.3s ease;
}

.profile-section-content {
  margin-top: 1rem;
}

.achievements-title-icon {
  color: #f59e0b;
  margin-right: 8px;
}

.achievements-count {
  font-size: 0.75rem;
  color: #866c5b;
  font-weight: normal;
  margin-left: 8px;
}

.achievements-empty {
  text-align: center;
  padding: 2rem;
  color: #866c5b;
}

.achievements-empty-icon {
  font-size: 3rem;
  opacity: 0.3;
  margin-bottom: 1rem;
}

.achievements-header:hover {
  opacity: 0.9;
}

.achievements-grid {
  animation: fadeIn 0.3s ease-in;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.achievement-badge {

  position: relative;
  overflow: hidden;
  padding: 1rem;
  background: radial-gradient(rgb(239 220 190) 80%, rgb(166 124 82 / 38%));
  border: 3px solid var(--ach-border, #f59e0b);
  border-radius: 0.5rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.achievement-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.achievement-icon i {
  color: var(--ach-icon, #f59e0b);
  filter: drop-shadow(0 2px 4px var(--ach-glow, rgba(245, 158, 11, 0.3)));
}

.achievement-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: #2a2411;
  line-height: 1.3;
}

.achievement-tier-name {
  font-size: 0.65rem;
  color: var(--ach-border, #f59e0b);
  margin-top: 0.25rem;
  font-weight: 500;
  text-transform: uppercase;
}

.achievement-date {
  font-size: 0.7rem;
  color: #503b2d;
  margin-top: 0.5rem;
  opacity: 0.8;
}

.achievement-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 0.5rem;
  box-shadow: inset 0 0 20px var(--ach-glow, rgba(245, 158, 11, 0.3));
  pointer-events: none;
}

.achievement-badge::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg,
      transparent,
      rgba(255, 255, 255, 0.1),
      transparent);
  transform: rotate(45deg);
  transition: all 0.5s;
  opacity: 0;
}

.achievement-badge:hover::before {
  animation: achievementShine 1s ease-in-out;
}

.achievement-badge:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 16px rgba(245, 158, 11, 0.4) !important;
  border-color: #fbbf24 !important;
}

@keyframes achievementShine {
  0% {
    opacity: 0;
    left: -50%;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    left: 50%;
  }
}

.achievement-glow {
  animation: achievementGlow 2s ease-in-out infinite;
}

@keyframes achievementGlow {

  0%,
  100% {
    box-shadow: inset 0 0 20px rgba(245, 158, 11, 0.3);
  }

  50% {
    box-shadow: inset 0 0 30px rgba(245, 158, 11, 0.5);
  }
}

/* Achievement Tier Colors */
.achievement-tier-yellow {
  border-color: #f59e0b !important;
}

.achievement-tier-yellow .fa-trophy {
  color: #f59e0b !important;
}

.achievement-tier-green {
  border-color: #10b981 !important;
}

.achievement-tier-green .fa-trophy {
  color: #10b981 !important;
}

.achievement-tier-blue {
  border-color: #3b82f6 !important;
}

.achievement-tier-blue .fa-trophy {
  color: #3b82f6 !important;
}

.achievement-tier-purple {
  border-color: #8b5cf6 !important;
}

.achievement-tier-purple .fa-trophy {
  color: #8b5cf6 !important;
}

.achievement-tier-gold {
  border-color: #fbbf24 !important;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4) !important;
}

.achievement-tier-gold .fa-trophy {
  color: #fbbf24 !important;
  filter: drop-shadow(0 2px 6px rgba(251, 191, 36, 0.6)) !important;
}

/* Quest System QoL Improvements */
.quest-controls {
  background: #dbccb5;
  border-left: 4px solid #866c5b;
  border-right: 4px solid #866c5b;
  border-top: 0;
  border-bottom: 0;
  padding: 0.7rem 1rem;
  margin: 0;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0px 0px 2px 2px #00000061;
  position: relative;
  flex-wrap: wrap;
  overflow-x: hidden;
}

.quest-controls-left {
  display: flex;
  align-items: center;
  flex: 1 0 auto;
  overflow-x: auto;
  max-width: 100%;
  text-align: center;
  justify-content: center;
}

.quest-controls-center {
  display: flex;
  justify-content: center;
  flex: 1 1 260px;
  min-width: 0;
  align-items: center;
  width: 100%;
}

/* On small screens: search drops to a new row and becomes full width */
@media (max-width: 640px) {
  .quest-controls-left {
    order: 1;
  }

  .quest-controls-right {
    order: 2;
  }

  .quest-controls-center {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    justify-content: stretch;
  }

  .quest-control-input {
    width: 100%;
  }
}

.quest-controls-right {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.quest-filter-group {
  display: flex;
  gap: 0.5rem;
  min-width: 250px;
}

.quest-control-select {
  flex: 1 1 auto;
  min-width: 120px;
  max-width: 100%;
  padding: 0.5rem;
  background: rgba(134, 108, 91, 0.2);
  border: 1px solid rgba(134, 108, 91, 0.4);
  border-radius: 4px;
  color: #453830;
  font-size: 0.9rem;
  cursor: pointer;
  box-sizing: border-box;
}

.quest-control-select:focus {
  outline: none;
  border-color: #866c5b;
  box-shadow: 0 0 0 2px rgba(134, 108, 91, 0.3);
}

.quest-control-input {
  width: 100%;
  max-width: 400px;
  padding: 0.5rem 0.75rem;
  background: rgba(134, 108, 91, 0.2);
  border: 1px solid rgba(134, 108, 91, 0.4);
  border-radius: 4px;
  color: #dbc4b5;
  font-size: 0.9rem;
  box-sizing: border-box;
  text-align: left;
}

.quest-control-input:focus {
  outline: none;
  border-color: #866c5b;
  box-shadow: 0 0 0 2px rgba(134, 108, 91, 0.3);
}

.quest-control-input::placeholder {
  color: #141212ba;
  opacity: 1;
}

.quest-bulk-claim-btn {
  padding: 0.5rem 0.5rem;
  background: rgba(134, 108, 91, 0.25);
  border: 1px solid rgba(134, 108, 91, 0.5);
  border-radius: 4px;
  color: #2a2411;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  position: relative;
}

.quest-bulk-claim-btn::before {
  content: "";
  position: absolute;
  left: -0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 70%;
  background: rgba(134, 108, 91, 0.3);
}

.quest-bulk-claim-btn:hover {
  background: rgba(64, 187, 117, 0.2);
  border-color: rgba(64, 187, 117, 0.5);
  color: #2d8f5a;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(64, 187, 117, 0.3);
}

.quest-bulk-claim-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.quest-bulk-claim-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  background: linear-gradient(135deg, #5a7a6a, #6a8a7a);
  border-color: #4a6a5a;
}

.quest-bulk-claim-btn i {
  font-size: 0.85rem;
}

/* Progress Milestones */
.progress-milestone {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.4);
  z-index: 1;
}

.quests-progress-bar-container {
  position: relative;
}

/* Quest Badge on Tabs */
.tab {
  position: relative;
}

.quest-badge {
  position: absolute;
  top: -2px;
  right: 1px;
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
  border: 2px solid #2a2411;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  animation: badgePulse 2s ease-in-out infinite;
  z-index: 10;
}

@keyframes badgePulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

/* Monster idle floating animation */
@keyframes monsterFloat {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-3px);
  }
}

/* Apply floating animation to monster images (main page only) - but not bosses */
#monster-img:not(.boss-image) {
  animation: monsterFloat 3s ease-in-out infinite;
}

/* Loading spinner animation */
@keyframes spinnerRotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Enemy loading spinner */
.enemy-loading-spinner {
  display: none;
  width: 64px;
  height: 64px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #ff6f6f;
  border-radius: 50%;
  animation: spinnerRotate 1s linear infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -32px;
  /* Half of height */
  margin-left: -32px;
  /* Half of width */
  z-index: 10;
}

.enemy-loading-spinner.active {
  display: block;
}

/* Smaller spinner for widget */
#auto-fight-loading-spinner {
  width: 32px;
  height: 32px;
  border-width: 3px;
  margin-top: -16px;
  /* Half of height */
  margin-left: -16px;
  /* Half of width */
}

/* Hide monster image when loading */
#monster-img.loading,
.auto-fight-monster-img.loading {
  display: none !important;
}

/* Guild Page Styles */
.guild-vault-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid #7f1d1d;
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.guild-upgrade-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid #7f1d1d;
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.guild-member-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(127, 29, 29, 0.3);
  border-radius: 0.5rem;
  padding: 0.75rem;
  transition: all 0.2s ease;
}

.guild-member-card:hover {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(127, 29, 29, 0.5);
}

.guild-member-card>div:first-child {
  color: #9ca3af;
  font-size: 10px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.guild-member-card>div:last-child {
  font-weight: 600;
  font-size: 12px;
}

.guild-info-box {
  background: rgba(127, 29, 29, 0.1);
  border-left: 3px solid #7f1d1d;
  border-radius: 0.25rem;
  padding: 0.75rem;
}

.guild-text-xs {
  font-size: 12px;
  color: #ffffffd1;
}

.guild-text-sm {
  font-size: 11px;
  color: #ffffffd1;
}

.guild-text-muted {
  color: #ffffffd1;
}

.guild-text-success {
  color: #10b981;
}

.guild-text-info {
  color: #3b82f6;
}

.guild-text-warning {
  color: #fbbf24;
}

.guild-text-error {
  color: #ef4444;
}

.guild-text-warning-alt {
  color: #a17a49;
}

.guild-btn-width-unset {
  width: unset;
}

.guild-btn-leave {
  background: #9a3938;
  color: #fff6c7;
}

.guild-btn-leave:hover {
  background: #5e4333;
}

.guild-btn-manage {
  background: #226664;
  color: wheat;
  /* border: 1px solid #5f1515; */
}

.guild-btn-manage:hover {
  background: #2d827f;
}

.guild-btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.guild-progress-bar-flex {
  flex: 1;
}

.guild-progress-bar-margin {
  margin-top: 4px;
}

.guild-dropdown-hidden {
  display: none;
  min-width: 280px;
  bottom: 100%;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
  border: 0;
  background: #292721 !important;
}

.guild-dropdown-hidden[style*="block"] {
  display: block !important;
  animation: guildDropdownFadeIn 0.2s ease;
}

@keyframes guildDropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.guild-input-styled {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #7f1d1d;
  color: #fff;
}

.guild-form-inline {
  display: inline;
}

.guild-flex-display {
  display: flex;
}

.guild-grid-stats {
  font-size: 11px;
}

.guild-grid-stats-sm {
  font-size: 10px;
}

.guild-stat-label {
  color: #ece5e1;
  font-size: 11px;
  background: #00000040;
  border-radius: 4px;
  padding: 2px 8px;
  text-align: center;
}

.guild-stat-label>div:first-child {
  color: #f3e2c1;
  font-size: 10px;
  margin-bottom: 2px;
}

.guild-stat-label .blood-text {
  color: #d5baa9;
}

.guild-stat-label>div:last-child {
  font-weight: 600;
}

.guild-stat-value {
  color: #ffffffd1;
}

.guild-stat-value-coins {
  color: #ffd66bdb !important;
  font-weight: 600;
}

.guild-stat-value-rubies {
  color: #ff5f5f !important;
  font-weight: 600;
}

/* Guild dropdown action links */
.guild-dropdown-hidden a {
  color: #dbc4b5;
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.guild-dropdown-hidden a:hover {
  background-color: rgba(127, 29, 29, 0.2);
  color: #fff;
}

.guild-dropdown-hidden a i {
  width: 16px;
  text-align: center;
}

.guild-level-text {
  font-size: 12px;
  color: #ffffffd1;
}

.guild-level-text-sm {
  font-size: 11px;
  color: #ffffffd1;
}

.guild-level-number {
  color: #7f1d1d;
}

.guild-upgrade-name {
  font-size: 12px;
  font-weight: bold;
}

.guild-upgrade-level {
  font-size: 12px;
  color: #ffffffd1;
}

.guild-bonus-current {
  font-size: 11px;
  color: #ffffffd1;
  margin-bottom: 4px;
}

.guild-bonus-next {
  font-size: 11px;
  color: #ffffffd1;
  margin-bottom: 4px;
}

.guild-cost-label {
  font-size: 11px;
  color: #ffffffd1;
  margin-bottom: 4px;
}

.guild-cost-value {
  font-size: 10px;
  color: #ffffffd1;
  margin-top: 2px;
  text-align: center;
}

.guild-description-text {
  font-size: 14px;
  color: #ffffffd1;
  margin-bottom: 16px;
}

.guild-vault-label {
  font-size: 12px;
  color: #ffffffd1;
  margin-bottom: 4px;
}

.guild-vault-value {
  font-size: 18px;
  font-weight: bold;
}

.guild-vault-value-coins {
  color: #fbbf24;
}

.guild-vault-value-rubies {
  color: #ef4444;
}

.guild-donation-label {
  font-size: 11px;
  color: #ffffffd1;
  margin-bottom: 8px;
}

.guild-donation-total {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 8px;
}

.guild-donation-stats {
  font-size: 12px;
}

.guild-member-info {
  font-size: 11px;
  color: #d8ccc4;
  line-height: 1.5;
}

.guild-member-info strong {
  color: #e97474;
  font-weight: 600;
}

.guild-member-info.manage {
  font-size: 11px;
  color: #323131;
  line-height: 1.5;
}

.guild-member-info.manage strong {
  color: #ffec8a;
  font-weight: 600;
}

.guild-member-stats-grid {
  font-size: 11px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.guild-member-stats-grid>div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.guild-member-stats-grid-sm {
  font-size: 10px;
}

.guild-inline-display {
  display: inline;
}

/* Guild Upgrade Row Layout (matching reference image) */
.guild-upgrade-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px;
  background: rgb(0 0 0 / 7%);
  /* border: 1px solid #7f1d1d; */
  transition: all 0.2s ease;
  border-radius: 6px;
}

.guild-upgrade-row:hover {
  background: rgba(0, 0, 0, 0.3);
  border-color: #9a1f1f;
}

.guild-upgrade-icon-container {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: help;
}

.guild-upgrade-icon-container {
  position: relative;
}

.guild-upgrade-icon-container[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.95);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: normal;
  margin-bottom: 0;
  z-index: 1000;
  /* border: 1px solid #7f1d1d; */
  pointer-events: none;
  max-width: 250px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.guild-upgrade-icon-container[data-tooltip]:hover::before {
  content: "";
  position: absolute;
  bottom: calc(100% + -7px);
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: #010101;
  z-index: 1001;
  pointer-events: none;
}

.guild-upgrade-value .text-white {
  color: #432f14d1 !important;
}

.guild-upgrade-value {
  min-width: 60px;
  text-align: center;
  font-weight: bold;
  color: #fff;
}

.guild-upgrade-btn {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  position: relative;
}

.guild-upgrade-btn-enabled {
  background: linear-gradient(135deg, #00ffdb, #0066ff);
  color: white;
  box-shadow: 0 2px 8px rgb(16 17 19 / 40%);
}

.guild-upgrade-btn-enabled:hover {
  transform: scale(1.1);
}

.guild-upgrade-btn-disabled {
  background: #606060;
  color: #999;
  cursor: not-allowed;
  opacity: 0.6;
}

.guild-upgrade-btn {
  position: relative;
}

.guild-upgrade-btn-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: rgba(0, 0, 0, 0.95);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  /* border: 1px solid #7f1d1d; */
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  display: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.guild-upgrade-btn-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 12px;
  border: 6px solid transparent;
  border-top-color: #090909;
  pointer-events: none;
}

.guild-upgrade-btn:hover .guild-upgrade-btn-tooltip {
  display: block;
  opacity: 1;
}

.guild-upgrade-btn-tooltip i {
  margin-right: 4px;
}

/* Progress bar tooltip */
.guild-upgrade-row>.flex-1[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.95);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: normal;
  z-index: 1000;
  /* border: 1px solid #7f1d1d; */
  pointer-events: none;
  max-width: 250px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.guild-upgrade-row>.flex-1[data-tooltip]:hover::before {
  content: "";
  position: absolute;
  bottom: calc(100% + -8px);
  left: 50%;
  transform: translateX(-50%);
  border: 10px solid transparent;
  border-top-color: #010101;
  z-index: 1001;
  pointer-events: none;
}

.guild-select-styled {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #9d846b;
}

.guild-text-primary {
  color: #7f1d1d;
}

.guild-margin-bottom {
  margin-bottom: 12px;
}

.guild-margin-top-sm {
  margin-top: 4px;
}

.guild-margin-top-md {
  margin-top: 8px;
}

.guild-margin-left-sm {
  margin-left: 8px;
}

.guild-margin-bottom-sm {
  margin-bottom: 6px;
}

.guild-font-size-md {
  font-size: 13px;
}

.submit-button {
  display: block;
  width: 100%;
  background: #4591f3;
  border-bottom: 4px solid #326ebd;
  color: white;
}

.submit-button:hover {
  background: #326ebd;
  border-bottom: 4px solid #204f8d;
}

.submit-button:active {
  transform: translateY(1px);
  border-bottom: 3px solid #204f8d;
}

.submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.vote-btn {
  background: #ffffff3b;
}

.comment-card {
  background: #0000003d;
  color: #0000009c;
  border: 2px solid #836a598a;
}

/* Monster scaling demo full-width (breaks out of body max-width) */
.demo-monsters-fullscreen {
  max-width: none !important;
  width: 100vw;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  box-sizing: border-box;
  padding-left: 16px;
  padding-right: 16px;
}

.demo-monsters-fullscreen .demo-monsters-header {
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Scrollable table area so sticky thead works (scroll container) */
.demo-monsters-fullscreen .demo-monsters-table-scroll {
  max-height: min(70vh, 600px);
  overflow: auto;
  overflow-x: auto;
  overflow-y: auto;
}

/* Sticky table header row (ID, Monster, Biome, etc.) */
.demo-monsters-fullscreen .demo-monsters-table thead th {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #374151 !important;
  box-shadow: 0 1px 0 0 #4b5563;
}

/* PC Editor full-screen (breaks out of body max-width) */
.pc-editor-fullscreen {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: #1a1a1a;
  color: #e5e5e5;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: none !important;
  width: 100vw;
  margin: 0 !important;
}

.pc-editor-fullscreen .pc-editor-header {
  flex-shrink: 0;
  padding: 12px 16px;
  background: #262626;
  border-bottom: 2px solid #7f1d1d;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.pc-editor-fullscreen .pc-editor-header h1 {
  margin: 0;
  font-size: 1.1rem;
  color: #fbbf24;
}

.pc-editor-fullscreen .pc-editor-header select {
  padding: 6px 10px;
  background: #404040;
  color: #fff;
  border: 1px solid #666;
  border-radius: 4px;
  min-width: 140px;
}

.pc-editor-fullscreen .pc-editor-body {
  flex: 1;
  overflow: auto;
  padding: 8px;
}

.pc-editor-fullscreen .pc-editor-table-wrap {
  overflow: auto;
  max-height: 100%;
}

.pc-editor-fullscreen .pc-editor-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: #262626;
}

.pc-editor-fullscreen .pc-editor-table th,
.pc-editor-fullscreen .pc-editor-table td {
  border: 1px solid #404040;
  padding: 6px 10px;
  text-align: left;
  white-space: nowrap;
}

.pc-editor-fullscreen .pc-editor-table th {
  background: #363636;
  color: #fbbf24;
  position: sticky;
  top: 0;
  z-index: 2;
}

.pc-editor-fullscreen .pc-editor-table th.col-id,
.pc-editor-fullscreen .pc-editor-table td.col-id {
  position: sticky;
  left: 0;
  background: #262626;
  z-index: 1;
  min-width: 50px;
}

.pc-editor-fullscreen .pc-editor-table th.col-name,
.pc-editor-fullscreen .pc-editor-table td.col-name {
  position: sticky;
  left: 50px;
  background: #262626;
  z-index: 1;
  min-width: 160px;
}

.pc-editor-fullscreen .pc-editor-table th.col-id {
  left: 0;
  background: #363636;
  z-index: 3;
}

.pc-editor-fullscreen .pc-editor-table th.col-name {
  left: 50px;
  background: #363636;
  z-index: 3;
}

.pc-editor-fullscreen .pc-editor-table tr:nth-child(even) td {
  background: #2d2d2d;
}

.pc-editor-fullscreen .pc-editor-table tr:nth-child(even) td.col-id,
.pc-editor-fullscreen .pc-editor-table tr:nth-child(even) td.col-name {
  background: #2d2d2d;
}

.pc-editor-fullscreen .pc-editor-table tbody tr:hover td {
  background: rgba(127, 29, 29, 0.2) !important;
}

.pc-editor-fullscreen .pc-editor-table tbody tr:hover td.col-id,
.pc-editor-fullscreen .pc-editor-table tbody tr:hover td.col-name {
  background: rgba(127, 29, 29, 0.2) !important;
}

.pc-editor-fullscreen .pc-editor-table .pc-editor-cell {
  cursor: text;
  min-width: 80px;
  outline: none;
}

.pc-editor-fullscreen .pc-editor-table .pc-editor-cell:focus {
  background: #404040;
  box-shadow: inset 0 0 0 2px #7f1d1d;
}

.pc-editor-fullscreen .pc-editor-table .pc-editor-cell-input {
  width: 100%;
  min-width: 80px;
  padding: 4px 6px;
  background: #404040;
  color: #fff;
  border: 1px solid #7f1d1d;
  border-radius: 2px;
  font-size: 12px;
}

.pc-editor-fullscreen .pc-editor-back {
  color: #fbbf24;
  text-decoration: none;
  margin-right: 12px;
}

.pc-editor-fullscreen .pc-editor-back:hover {
  text-decoration: underline;
}

.pc-editor-fullscreen .pc-editor-context-menu {
  display: none;
  position: fixed;
  z-index: 10001;
  min-width: 220px;
  background: #363636;
  border: 1px solid #7f1d1d;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  padding: 4px 0;
}

.pc-editor-fullscreen .pc-editor-context-menu.pc-editor-context-menu-visible {
  display: block;
}

.pc-editor-fullscreen .pc-editor-context-menu-item {
  display: block;
  width: 100%;
  padding: 8px 14px;
  background: transparent;
  border: none;
  color: #e5e5e5;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

.pc-editor-fullscreen .pc-editor-context-menu-item:hover {
  background: rgba(127, 29, 29, 0.3);
  color: #fbbf24;
}

/* Profile equipment layout: avatar center, slots around, stats below */
.profile-equipment {
  position: relative;
  z-index: 2;
  overflow: visible;
  padding: 16px;
}

.profile-equipment-inner {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.profile-equipment-left,
.profile-equipment-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.profile-equipment-left {
  align-items: flex-end;
}

.profile-equipment-right {
  align-items: flex-start;
}

/* Bottom row: tools (left), middle (empty), companion (right) */
.profile-equipment-bottom-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(134, 108, 91, 0.3);
}

.profile-equipment-bottom-row .profile-slot-wrap {
  flex-direction: column;
  align-items: center;
}

.profile-equipment-bottom-row .profile-slot-wrap.profile-slot-middle .profile-slot-empty {
  color: rgba(134, 108, 91, 0.35);
}

.profile-equipment-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(145deg, #7f1d1d 0%, #5c1515 100%);
  border: 3px solid #866c5b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 28px;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.profile-avatar-initial {
  font-weight: bold;
  font-size: 28px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Character avatar in equipment center: 200Ã—200px, responsive.
   Background is applied via CSS so the GD-rendered avatar PNG itself stays transparent. */
.profile-avatar-with-character {
  position: relative;
  overflow: hidden;
  width: clamp(100px, 20vw, 200px);
  height: clamp(100px, 20vw, 200px);
  min-width: 100px;
  min-height: 100px;
  border-radius: 8px;
  border: 3px solid #866c5b;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
  background-image: url("../images/characters/character-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.profile-avatar-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.avatar-loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 4px solid rgba(134, 108, 91, 0.2);
  border-top: 4px solid #866c5b;
  border-radius: 50%;
  animation: avatar-spin 1s linear infinite;
  z-index: 10;
  pointer-events: none;
}

.avatar-loading-spinner.hidden {
  display: none;
}

@keyframes avatar-spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.profile-avatar-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.profile-avatar-char-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

/* Equipped topwear; match GD: box = 20% * --item-size, center X, top Y, rotate around center top */
.profile-avatar-topwear-wrap {
  position: absolute;
  left: var(--item-x, 50%);
  top: var(--item-y, 0%);
  width: calc(20% * var(--item-size, 1));
  height: calc(20% * var(--item-size, 1));
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
  --item-size: 1;
  transform: translateX(-50%) rotate(var(--item-rotation, 0deg));
  transform-origin: center top;
}

.profile-avatar-topwear-img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center top;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Equipped tool; same as topwear so preview matches GD: box = 20% * --item-size */
.profile-avatar-weapon-wrap {
  position: absolute;
  left: var(--item-x, 22%);
  top: var(--item-y, 34%);
  width: calc(20% * var(--item-size, 1));
  height: calc(20% * var(--item-size, 1));
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
  --item-size: 1;
  transform: translateX(-50%) rotate(var(--item-rotation, 0deg));
  transform-origin: center top;
}

.profile-avatar-weapon-img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center top;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

/* Best companion; match GD: box = 55% * --item-size by 38% * --item-size */
.profile-avatar-companion-wrap {
  position: absolute;
  left: var(--item-x, 50%);
  top: var(--item-y, 62%);
  width: calc(55% * var(--item-size, 1));
  height: calc(38% * var(--item-size, 1));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
  --item-size: 1;
  transform: translateX(-50%) rotate(var(--item-rotation, 0deg));
  transform-origin: center bottom;
}

.profile-avatar-companion-img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center bottom;
}

@media (max-width: 640px) {
  .profile-avatar-with-character {
    width: clamp(88px, 22vw, 140px);
    height: clamp(108px, 44vw, 140px);
    min-width: 88px;
    min-height: 88px;
  }
}

.profile-slot-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-equipment-left .profile-slot-wrap {
  flex-direction: row-reverse;
}

.profile-slot {
  position: relative;
  width: 44px;
  height: 44px;
  border: 2px solid #866c5b;
  border-radius: 6px;
  background: rgba(60, 45, 35, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  flex-shrink: 0;
}

.profile-slot-has-tooltip:hover .profile-slot-tooltip {
  display: block;
}

/* Tooltip below slot so it doesnâ€™t hide behind header */
.profile-slot-tooltip {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 6px;
  z-index: 10000;
  min-width: 140px;
  padding: 8px 10px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border: 2px solid;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  pointer-events: none;
}

.profile-slot-tooltip-name {
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-slot-tooltip-stat {
  font-size: 11px;
  color: #d1d5db;
  margin-top: 2px;
}

.profile-slot-tooltip-stat i {
  width: 14px;
  margin-right: 4px;
  color: #9ca3af;
}

.profile-slot-lg {
  width: 52px;
  height: 52px;
}

.profile-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
  border: 2px solid;
}

.profile-slot-empty {
  color: rgba(134, 108, 91, 0.6);
  font-size: 18px;
}

.profile-slot-lg .profile-slot-empty {
  font-size: 22px;
}

.profile-slot-label {
  font-size: 10px;
  font-weight: 600;
  color: #5a594e;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.profile-equipment-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding-top: 8px;
  border-top: 1px solid rgba(134, 108, 91, 0.4);
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.profile-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #5a594e;
  text-transform: uppercase;
}

.profile-stat-value {
  font-size: 20px;
  font-weight: bold;
  color: #b45309;
  text-shadow: 0 0 1px rgba(180, 83, 9, 0.5);
}

/* Message notification toast - speech bubble design */
.msg-notif-root {
  position: fixed;
  top: 60px;
  right: 20px;
  z-index: 10000;
  cursor: pointer;
  display: none;
}

.msg-notif-wrap {
  position: relative;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 10px 12px;
  width: 48px;
  height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  overflow: visible;
  transition: width 0.35s ease, height 0.35s ease, padding 0.35s ease, box-shadow 0.3s ease;
  position: relative;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 10px 12px;
  width: 43px;
  height: 35px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  overflow: visible;
  transition: width 0.35s ease, height 0.35s ease, padding 0.35s ease, box-shadow 0.3s ease;
  box-shadow: -2px 2px 4px 1px rgba(0, 0, 0, 0.25);
}

.msg-notif-wrap::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 12px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid white;
  filter: drop-shadow(-2px 2px 1px rgba(0, 0, 0, 0.25));
}

.msg-notif-root:hover .msg-notif-wrap {
  width: auto;
  min-width: 200px;
  height: auto;
  padding: 12px 16px;
  /* box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.3); */
}

.msg-notif-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  overflow: hidden;
}

.msg-notif-line {
  height: 3px;
  background: #d1d5db;
  border-radius: 2px;
  transition: opacity 0.25s ease;
}

.msg-notif-line.line-1 {
  width: 100%;
}

.msg-notif-line.line-2 {
  width: 85%;
}

.msg-notif-line.line-3 {
  width: 70%;
}

.msg-notif-root:hover .msg-notif-lines {
  display: none;
}

.msg-notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  background: #F4511E;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 12px;
  box-shadow: -2px 2px 4px 1px rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.msg-notif-text {
  display: none;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease 0.1s, transform 0.25s ease 0.1s;
}

.msg-notif-root:hover .msg-notif-text {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.msg-notif-text .msg-notif-title {
  font-weight: bold;
  font-size: 13px;
  color: #1f2937;
}

.msg-notif-text .msg-notif-preview {
  font-size: 11px;
  color: #6b7280;
}

/* Boss images are bigger than regular monsters */
#monster-img.boss-image {
  max-height: 80% !important;
  transform: scale(1.3);
  width: auto;
  animation: monsterFloatBoss 3s ease-in-out infinite;
}

/* Shadow toggle - disable shadows when class is applied to body */
body.shadows-disabled .battle-shadow-container,
body.shadows-disabled [style*="filter: drop-shadow"] {
  filter: none !important;
}

body.shadows-disabled [style*="box-shadow"] {
  box-shadow: none !important;
}

/* Disable text-shadow on damage indicators */
body.shadows-disabled .damage-dealt {
  text-shadow: none !important;
}

body.shadows-disabled .damage-dealt.high-dmg,
body.shadows-disabled .damage-dealt.high-dmg-2,
body.shadows-disabled .damage-dealt.high-dmg-3,
body.shadows-disabled .damage-dealt.high-dmg-4 {
  text-shadow: none !important;
}

body.shadows-disabled .damage-dealt.lucky-strike {
  text-shadow: none !important;
}

/* Disable box-shadow on health bar */
body.shadows-disabled .monster-health-bar {
  box-shadow: none !important;
}

body.shadows-disabled .boss-timer-bar {
  box-shadow: none !important;
}

/* Disable box-shadow on attack button */
body.shadows-disabled .attack-btn {
  box-shadow: none !important;
}

body.shadows-disabled .attack-btn:active {
  box-shadow: none !important;
}

@keyframes monsterFloatBoss {

  0%,
  100% {
    transform: translateY(0) scale(1.15);
  }

  50% {
    transform: translateY(-3px) scale(1.15);
  }
}

/* Screen Shake Animations */
@keyframes shake-minor {
  0% {
    transform: translate(1px, 0px) rotate(0deg);
  }

  25% {
    transform: translate(-1px, -1px) rotate(-0.5deg);
  }

  50% {
    transform: translate(-1px, 1px) rotate(0.5deg);
  }

  75% {
    transform: translate(1px, -1px) rotate(0deg);
  }

  100% {
    transform: translate(0px, 0px) rotate(0deg);
  }
}

@keyframes shake-major {
  0% {
    transform: translate(2px, 1px) rotate(0deg);
  }

  20% {
    transform: translate(-2px, -2px) rotate(-1deg);
  }

  40% {
    transform: translate(-1px, 2px) rotate(1deg);
  }

  60% {
    transform: translate(2px, -1px) rotate(0deg);
  }

  80% {
    transform: translate(-1px, 1px) rotate(-0.5deg);
  }

  100% {
    transform: translate(0px, 0px) rotate(0deg);
  }
}

.shake-container-minor {
  animation: shake-minor 0.15s cubic-bezier(.36, .07, .19, .97) both;
}

.shake-container-major {
  animation: shake-major 0.25s cubic-bezier(.36, .07, .19, .97) both;
}

/* Slash Overlay Animation */
.slash-effect {
  position: absolute;
  top: 75%;
  /* Moved even lower onto monster body */
  left: 50%;
  width: 40%;
  /* Reduced width by a lot */
  height: 2px;
  /* Reduced height */
  background: white;
  box-shadow: 0 0 2px white, 0 0 4px #ff0044;
  transform-origin: center;
  pointer-events: none;
  z-index: 1000;
  animation: slash-anim 0.15s ease-out forwards;
  opacity: var(--slash-opacity, 0.4);
}

@keyframes slash-anim {
  0% {
    transform: translate(-50%, -50%) rotate(var(--slash-angle)) scaleX(0) scaleY(2);
    opacity: var(--slash-opacity, 0.4);
  }

  50% {
    transform: translate(-50%, -50%) rotate(var(--slash-angle)) scaleX(1) scaleY(1);
    opacity: var(--slash-opacity, 0.4);
  }

  100% {
    transform: translate(-50%, -50%) rotate(var(--slash-angle)) scaleX(1.1) scaleY(0);
    opacity: 0;
  }
}

.footer-dropup-container {
  position: fixed;
  bottom: -100%;
  left: 50%;
  --dropup-drag-y: 0px;
  transform: translateX(-50%) translateY(var(--dropup-drag-y));
  width: 100%;
  max-width: 600px;
  height: calc(100vh - 160px);
  background: rgba(209, 195, 172, 0.98);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-top: 2px solid rgba(134, 108, 91, 0.75);
  border-left: 4px solid rgba(134, 108, 91, 0.55);
  border-right: 4px solid rgba(134, 108, 91, 0.55);
  z-index: 9999;
  transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s ease-out;
  display: flex;
  flex-direction: column;
  box-shadow: 0px 12px 26px rgba(0, 0, 0, 0.35);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  will-change: transform, bottom;
}

.footer-dropup-container.is-open {
  bottom: 47px;
}

.footer-dropup-container.is-dragging,
.footer-dropup-container.is-dragging * {
  user-select: none !important;
  -webkit-user-select: none !important;
}

.footer-dropup-header {
  padding: 14px 16px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(134, 108, 91, 0.55);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.03));
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  position: relative;
  cursor: grab;
  touch-action: none;
}

.footer-dropup-title {
  color: #6c5241;
  font-weight: 900;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-dropup-title::before,
.footer-dropup-title::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #c89c58;
  transform: rotate(45deg);
  box-shadow: 0 0 0 1px rgba(108, 82, 65, 0.35);
}

.footer-dropup-title::after { opacity: 0.55; }

.footer-dropup-drag-handle {
  position: absolute;
  left: 50%;
  top: 7px;
  transform: translateX(-50%);
  width: 46px;
  height: 4px;
  background: rgba(108, 82, 65, 0.35);
  border-radius: 999px;
  touch-action: none;
  user-select: none;
}

.close-dropup-btn {
  background: rgba(0, 0, 0, 0.10);
  border: 1px solid rgba(134, 108, 91, 0.35);
  color: rgba(76, 74, 65, 0.92);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
}

.close-dropup-btn:hover {
  background: rgba(0, 0, 0, 0.16);
  color: #111;
  transform: translateY(-1px);
}

.footer-dropup-content {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(134, 108, 91, 0.28);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(0, 0, 0, 0.05));
}

/* When the profile is loaded via direct URL, we mirror the `footer-dropup-content`
   class onto the `.profile-view` wrapper so the deep rules still apply, but
   neutralise the base-layer layout rules so it stays a normal flow container
   (no extra scroll, no duplicated padding/border). */
.profile-view.footer-dropup-content {
  flex: unset;
  overflow-y: visible;
  padding: 0;
  border: 0;
  background-image: none;
}

/* Force AOS elements inside modal to show immediately bypasses scroll-trigger issues */
.footer-dropup-content [data-aos] {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
  transition: opacity 0.4s ease-out !important;
  /* Keep a subtle fade but don't hide */
}

.footer-dropup-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #d4af37;
}

/* Hide duplicate headers inside overlays if they exist */
.footer-dropup-content .header,
.footer-dropup-content .footer,
.footer-dropup-content .auto-fight-widget-toggle-standalone {
  display: none !important;
}

/* Hide some elements inside overlays to save space */
.footer-dropup-content .card:first-child {
  margin-top: 0;
}

/* Ensure the module content fits nicely */
.footer-dropup-content .grid {
  gap: 1rem;
}

/* =========================
   Drop-up interior polish
   Scoped to #footer-dropup-content only so global classes
   (.card / .title-card / .tab-group / .tab / .slot / .inventory / .info-div)
   are not affected outside of the drop-up modal.
   ========================= */

.footer-dropup-content {
  padding: 14px 14px 36px;
  background-image:
    radial-gradient(900px 260px at 50% -40px, rgba(255, 235, 180, 0.35), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.40), rgba(0, 0, 0, 0.04));
}

/* ---- Help / intro banner (was unreadable gold-on-cream) ---- */
.footer-dropup-content .card.title-card {
  background-color: #2a231d !important;
  background-image: none !important;
  color: #f1dfaa !important;
  text-align: left !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  padding: 12px 14px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(226, 192, 122, 0.35) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 2px 10px rgba(0, 0, 0, 0.2) !important;
  display: flex !important;
  align-items: center;
  gap: 12px;
}

.footer-dropup-content .card.title-card::before {
  content: "\f05a"; /* fa-circle-info */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #e2c07a;
  font-size: 18px;
  flex-shrink: 0;
  text-shadow: 0 0 8px rgba(226, 192, 122, 0.35);
}

/* ---- Category tab bar ---- */
.footer-dropup-content .tab-group {
  background: linear-gradient(180deg, #3a2e25 0%, #2a221c 100%) !important;
  border: 1px solid rgba(226, 192, 122, 0.35) !important;
  border-bottom: none !important;
  border-radius: 10px 10px 0 0 !important;
  padding: 6px !important;
  gap: 4px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18) !important;
}

.footer-dropup-content .tab {
  flex: 1;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(226, 192, 122, 0.18) !important;
  border-radius: 6px !important;
  padding: 6px !important;
  margin: 0 !important;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease !important;
}

.footer-dropup-content .tab:hover {
  background: rgba(226, 192, 122, 0.10) !important;
  border-color: rgba(226, 192, 122, 0.45) !important;
  transform: translateY(-1px);
}

.footer-dropup-content .tab.active {
  background: linear-gradient(180deg, rgba(226, 192, 122, 0.30), rgba(200, 156, 88, 0.10)) !important;
  border-color: rgba(226, 192, 122, 0.85) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 10px rgba(226, 192, 122, 0.35) !important;
}

.footer-dropup-content .tab img {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
  transition: transform 0.18s ease;
}

.footer-dropup-content .tab:hover img,
.footer-dropup-content .tab.active img {
  transform: scale(1.05);
}

/* Hide broken-image thumbs inside tabs (missing category icons) */
.footer-dropup-content .tab img[src=""],
.footer-dropup-content .tab img:not([src]) {
  visibility: hidden;
}

/* ---- Cards inside the drop-up ---- */
.footer-dropup-content .card {
  background: rgba(206, 192, 168, 0.95) !important;
  border: 1px solid rgba(134, 108, 91, 0.55) !important;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  border-radius: 10px !important;
  margin-bottom: 0.85rem !important;
}

/* Card directly following tabs joins seamlessly with them */
.footer-dropup-content .tab-group + .card {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-top: 1px solid rgba(226, 192, 122, 0.35) !important;
}

/* ---- Section headers (h3.blood-text: "Tools", "Equipped Tool", etc.) ---- */
.footer-dropup-content .card > h3.blood-text,
.footer-dropup-content .card > h3.blood-text.font-bold {
  font-family: "Poppins", sans-serif !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 1.8px !important;
  text-transform: uppercase !important;
  color: #5a4631 !important;
  margin: 0 0 10px 0 !important;
  padding-bottom: 8px !important;
  border-bottom: 1px solid rgba(108, 82, 65, 0.28);
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.footer-dropup-content .card > h3.blood-text::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #c89c58;
  transform: rotate(45deg);
  box-shadow: 0 0 0 1px rgba(108, 82, 65, 0.35);
  flex-shrink: 0;
}

.footer-dropup-content .card > h3.blood-text b {
  font-weight: 800;
}

.footer-dropup-content .card > h3.blood-text i.fas,
.footer-dropup-content .card > h3.blood-text .fa-solid {
  color: #c89c58;
}

/* ---- Inventory slot grid ---- */
.footer-dropup-content .inventory {
  background: rgba(108, 82, 65, 0.14) !important;
  border: 1px solid rgba(108, 82, 65, 0.28) !important;
  padding: 10px !important;
  gap: 6px !important;
  border-radius: 8px !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12) !important;
}

.footer-dropup-content .slot {
  /* background: rgba(30, 20, 10, 0.10) !important; */
  nt; */
  border: 1px solid rgba(108, 82, 65, 0.45);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.15),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease !important;
}

.footer-dropup-content .slot:hover {
  background: rgba(253, 240, 204, 0.7) !important;
  border-color: rgba(226, 192, 122, 0.85);
  box-shadow:
    0 0 10px rgba(226, 192, 122, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-3px);
  filter: drop-shadow(2px 4px 4px rgba(0, 0, 0, 0.25));
}

/* ---- Modern inventory override inside footer drop-up ----------------
   The drop-up has old broad .card/.slot rules above; these intentionally
   win for the redesigned inventory and gear preview.
   -------------------------------------------------------------------- */
.footer-dropup-content .inventory-modern-card {
  /* background:
    linear-gradient(180deg, rgba(35, 28, 21, 0.96), rgba(24, 19, 15, 0.96)) !important; */
  border: 1px solid rgba(226, 192, 122, 0.28) !important;
  border-radius: 16px !important;
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.055) !important;
  color: #f3e5c4 !important;
}

.footer-dropup-content .inventory-modern-card .inventory-section-head {
  border-bottom-color: rgba(226, 192, 122, 0.18);
}

.footer-dropup-content .inventory-modern-card .inventory-section-head h3 {
  color: #766e60 !important;
  /* text-shadow: 0 2px 6px rgba(0, 0, 0, 0.32); */
}

.footer-dropup-content .inventory-modern-card .inventory-section-count {
  color: #f1dfaa !important;
  background: rgba(0, 0, 0, 0.34) !important;
  border-color: rgba(226, 192, 122, 0.22) !important;
}

.footer-dropup-content .inventory-modern-card .inventory-help-note {
  color: rgb(88 86 81 / 82%) !important;
  background: rgb(255 255 255 / 8%) !important;
  border: 1px solid rgba(226, 192, 122, 0.18) !important;
  border-left: 3px solid rgb(255 235 193 / 45%) !important;
}

.footer-dropup-content .inventory-modern-card .inventory.inventory-grid {
  /* background:
    radial-gradient(180px 90px at 50% 0%, rgba(226, 192, 122, 0.08), transparent 70%),
    rgba(0, 0, 0, 0.26) !important; */
  border: 1px solid rgba(226, 192, 122, 0.16) !important;
  border-radius: 14px !important;
  /* box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    inset 0 10px 20px rgba(0, 0, 0, 0.16) !important; */
}

.footer-dropup-content .inventory-modern-card .slot.inventory-slot {
  /* background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)) !important; */
  border: 1px solid rgba(226, 192, 122, 0.18) !important;
  border-radius: 14px !important;
  /* box-shadow:
    0 9px 16px rgba(0, 0, 0, 0.25),
    0 2px 0 rgba(255, 255, 255, 0.045) inset,
    0 -10px 18px rgba(0, 0, 0, 0.16) inset !important; */
  filter: none !important;
  background: #ffefc19c !important;
}

.footer-dropup-content .inventory-modern-card .slot.inventory-slot::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 10px;
  /* background: rgba(0, 0, 0, 0.13); */
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.footer-dropup-content .inventory-modern-card .slot.inventory-slot:hover {
  transform: translateY(-4px) scale(1.02) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.045)) !important;
  border-color: var(--slot-rarity, rgba(226, 192, 122, 0.76)) !important;
  box-shadow:
    0 14px 26px rgba(0, 0, 0, 0.34),
    0 0 0 1px var(--slot-rarity, rgba(226, 192, 122, 0.4)),
    0 2px 0 rgba(255, 255, 255, 0.08) inset !important;
}

.footer-dropup-content .inventory-modern-card .slot.inventory-slot img {
  z-index: 2;
  max-width: 58px !important;
  max-height: 58px !important;
  filter: drop-shadow(0 0px 3px var(--slot-rarity))
    drop-shadow(0 2px 1px rgba(0, 0, 0, 0.65)) !important;
  transform: translateY(-1px);
}

.footer-dropup-content .inventory-modern-card .slot.inventory-slot:hover img {
  filter:
    drop-shadow(0 14px 10px rgba(0, 0, 0, 0.6))
    drop-shadow(0 0 8px var(--slot-rarity, rgba(226, 192, 122, 0.35))) !important;
  transform: translateY(-3px) scale(1.05);
}

.footer-dropup-content .inventory-modern-card .inventory-slot-frame {
  z-index: 3;
  border-color: var(--slot-rarity, rgba(226, 192, 122, 0.46));
  /* box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.28); */
}

.footer-dropup-content .inventory-modern-card .inventory-equipped-type {
  color: rgba(241, 223, 170, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  display: none;
}

.footer-dropup-content .inventory-modern-card .inventory-equipped-label {
  color: rgba(241, 223, 170, 0.86);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.footer-dropup-content .inventory-modern-card .slot.inventory-slot-empty {
  background: rgba(0, 0, 0, 0.18) !important;
  border: 1px dashed rgba(226, 192, 122, 0.24) !important;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.22) !important;
}

/* ---- Help/info banners inside drop-up (e.g., "Click on the equipped item...") ---- */
.footer-dropup-content .info-div {
  background: linear-gradient(180deg, rgba(226, 192, 122, 0.18), rgba(226, 192, 122, 0.06)) !important;
  border: 1px solid rgba(226, 192, 122, 0.45) !important;
  border-left: 3px solid #c89c58 !important;
  color: #3b2c1e !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  gap: 6px !important;
  flex-direction: row !important;
  margin: 0 0 10px 0 !important;
}

/* Tailwind arbitrary blue text (text-[#3c7090]) used on some info-divs â€”
   keep inside the drop-up readable on the cream banner */
.footer-dropup-content .info-div[class*="3c7090"],
.footer-dropup-content .info-div .text-\[\#3c7090\] {
  color: #3b2c1e !important;
}

/* Alert / empty-state card inside drop-up */
.footer-dropup-content .alert.info {
  background: linear-gradient(180deg, rgba(226, 192, 122, 0.18), rgba(226, 192, 122, 0.06)) !important;
  border: 1px dashed rgba(134, 108, 91, 0.5) !important;
  color: #5a4631 !important;
  padding: 12px !important;
  border-radius: 8px !important;
  text-align: center;
  font-style: italic;
  font-weight: 600;
}

/* =========================
   Upgrades tab polish (scoped to drop-up)
   ========================= */

.footer-dropup-content .upgrade-tabs {
  display: flex !important;
  gap: 4px !important;
  margin: 0 0 12px 0 !important;
  padding: 6px !important;
  background: linear-gradient(180deg, #3a2e25 0%, #2a221c 100%) !important;
  border: 1px solid rgba(226, 192, 122, 0.35) !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18) !important;
  flex-wrap: wrap;
}

.footer-dropup-content .upgrade-tab {
  flex: 1 1 120px;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(226, 192, 122, 0.18) !important;
  color: #cdb78a !important;
  padding: 7px 10px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  cursor: pointer;
  transform: none !important;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease !important;
}

.footer-dropup-content .upgrade-tab i {
  color: #e2c07a !important;
  margin: 0 !important;
}

.footer-dropup-content .upgrade-tab:hover {
  background: rgba(226, 192, 122, 0.10) !important;
  border-color: rgba(226, 192, 122, 0.45) !important;
  color: #fff4d1 !important;
  transform: translateY(-1px) !important;
}

.footer-dropup-content .upgrade-tab.active {
  background: linear-gradient(180deg, rgba(226, 192, 122, 0.30), rgba(200, 156, 88, 0.10)) !important;
  border-color: rgba(226, 192, 122, 0.85) !important;
  color: #fff4d1 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 10px rgba(226, 192, 122, 0.35) !important;
}

/* Upgrade cards â€” parchment panels */
.footer-dropup-content .upgrade-card.crumb {
  background: linear-gradient(180deg, rgba(219, 204, 181, 0.85) 0%, rgba(192, 178, 157, 0.9) 100%) !important;
  border: 1px solid rgba(134, 108, 91, 0.55) !important;
  border-left: 3px solid #c89c58 !important;
  border-radius: 8px !important;
  padding: 12px !important;
  margin-bottom: 10px !important;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  color: #2a2411;
}

.footer-dropup-content .upgrade-card.crumb h3 {
  font-family: "Poppins", sans-serif !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  color: #3b2c1e !important;
  margin: 0 !important;
}

.footer-dropup-content .upgrade-card.crumb h3 i {
  margin-right: 6px;
  font-size: 14px;
}

.footer-dropup-content .upgrade-card.crumb .tooltip {
  background: #2a231d !important;
  color: #e9d6a1 !important;
  border: 1px solid rgba(226, 192, 122, 0.35);
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 3px 8px !important;
  border-radius: 999px !important;
}

.footer-dropup-content .upgrade-card.crumb p {
  font-size: 12px !important;
  color: #3b2c1e !important;
  margin: 8px 0 10px !important;
  line-height: 1.35;
}

.footer-dropup-content .upgrade-card.crumb p .text-gray-400,
.footer-dropup-content .upgrade-card.crumb p .text-4 {
  color: #3b2c1e !important;
}

.footer-dropup-content .upgrade-card.crumb p b {
  color: #2a2411;
  background: rgba(226, 192, 122, 0.35);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(226, 192, 122, 0.5);
}

/* Progress bars inside the drop-up */
.footer-dropup-content .progress-bar {
  height: 6px !important;
  background: rgba(30, 20, 10, 0.25) !important;
  border-radius: 999px !important;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(134, 108, 91, 0.3);
}

.footer-dropup-content .progress-fill {
  background: linear-gradient(90deg, #c89c58, #e2c07a) !important;
  box-shadow: 0 0 8px rgba(226, 192, 122, 0.5);
  height: 100%;
}

/* Upgrade button â€” gold-tone primary inside the drop-up */
.footer-dropup-content .upgrade-btn {
  background: linear-gradient(180deg, #d6a74c 0%, #a97a2f 100%) !important;
  color: #2a2411 !important;
  border: 1px solid #8c6520 !important;
  border-bottom: 3px solid #6b4c15 !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 12px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
}

.footer-dropup-content .upgrade-btn:hover:not(.cursor-not-allowed) {
  filter: brightness(1.06);
  transform: translateY(-1px) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 8px rgba(107, 76, 21, 0.5) !important;
}

.footer-dropup-content .upgrade-btn:active:not(.cursor-not-allowed) {
  transform: translateY(0) !important;
  border-bottom-width: 1px !important;
}

.footer-dropup-content .upgrade-btn .flex.items-center {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}

.footer-dropup-content .upgrade-btn .fa-coins { color: #5a3c0a !important; }
.footer-dropup-content .upgrade-btn .fa-gem { color: #8b1a1a !important; }

/* Upgrade page heading (h2 "Upgrades") */
.footer-dropup-content .card > h2.blood-text {
  font-family: "Poppins", sans-serif !important;
  font-weight: 800 !important;
  font-size: 16px !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  color: #5a4631 !important;
  margin-bottom: 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(108, 82, 65, 0.28);
}

.footer-dropup-content .card > h2.blood-text i {
  color: #c89c58 !important;
  margin: 0 !important;
}

/* =========================
   Quests tab polish (scoped to drop-up)
   ========================= */

/* Quest title-card description + reset-timer row */
.footer-dropup-content .card.title-card p {
  opacity: 1 !important;
  color: #d6c28a !important;
  margin-top: 4px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.35;
}

.footer-dropup-content .card.title-card h2,
.footer-dropup-content .card.title-card h2.blood-text {
  color: #f1dfaa !important;
  font-family: "Poppins", sans-serif !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  margin: 0 !important;
}

/* Reset-timer inline pill */
.footer-dropup-content .daily-reset-timer,
.footer-dropup-content .weekly-reset-timer {
  margin-top: 10px !important;
  padding: 6px 10px !important;
  background: rgba(226, 192, 122, 0.15) !important;
  border: 1px solid rgba(226, 192, 122, 0.4) !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  color: #e9d6a1 !important;
}

.footer-dropup-content .daily-reset-timer small,
.footer-dropup-content .weekly-reset-timer small {
  color: #e9d6a1 !important;
  font-size: 11px !important;
  letter-spacing: 0.3px;
}

.footer-dropup-content .daily-reset-timer small strong,
.footer-dropup-content .weekly-reset-timer small strong {
  color: #fff4d1 !important;
  margin-right: 4px;
}

#daily-reset-countdown,
#weekly-reset-countdown {
  color: #f1dfaa !important;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}

/* Quest cards */
.footer-dropup-content .quest-card {
  background: linear-gradient(180deg, rgba(219, 204, 181, 0.95) 0%, rgba(200, 184, 158, 0.95) 100%) !important;
  border: 1px solid rgba(134, 108, 91, 0.55) !important;
  border-radius: 10px !important;
  padding: 14px !important;
  margin-bottom: 10px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.footer-dropup-content .quest-card::before {
  height: 3px !important;
  background: linear-gradient(90deg, transparent, #c89c58 50%, transparent) !important;
  opacity: 0.7 !important;
}

.footer-dropup-content .quest-card.quest-completed {
  border-color: rgba(64, 187, 117, 0.8) !important;
  box-shadow: 0 0 10px rgba(64, 187, 117, 0.25), 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.footer-dropup-content .quest-card.quest-claimed {
  opacity: 0.6;
  filter: grayscale(0.3);
}

.footer-dropup-content .quest-title {
  font-family: "Poppins", sans-serif !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #2a2411 !important;
  letter-spacing: 0.3px;
}

/* Quest badge on tabs â€” align with drop-up gold theme */
.footer-dropup-content .quest-badge {
  background: #c2281f !important;
  border: 1px solid #2a221c !important;
  box-shadow: 0 0 0 1px rgba(226, 192, 122, 0.55), 0 0 6px rgba(194, 40, 31, 0.55);
  width: 16px !important;
  height: 16px !important;
  font-size: 10px !important;
  top: -4px !important;
  right: -4px !important;
}

/* =========================
   Profile tab polish (scoped to drop-up)
   ========================= */

/* Profile equipment card */
.footer-dropup-content .profile-equipment.card {
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(255, 235, 180, 0.2), transparent 65%),
    linear-gradient(180deg, rgba(206, 192, 168, 0.98), rgba(192, 178, 157, 0.95)) !important;
  border: 1px solid rgba(134, 108, 91, 0.6) !important;
  border-radius: 12px !important;
  padding: 14px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 3px 10px rgba(0, 0, 0, 0.15) !important;
}

.footer-dropup-content .profile-avatar-with-character {
  border: 3px solid transparent !important;
  border-radius: 10px !important;
  background: linear-gradient(#1a1410, #1a1410) padding-box,
    linear-gradient(180deg, #e2c07a, #8a6a3a) border-box !important;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.4),
    0 4px 14px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(226, 192, 122, 0.3) !important;
}

.footer-dropup-content .profile-slot-label {
  color: #5a4631 !important;
  font-size: 9px !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase;
  font-weight: 800 !important;
}

.footer-dropup-content .profile-slot {
  background: rgba(30, 20, 10, 0.12) !important;
  border: 1px solid rgba(108, 82, 65, 0.5) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18) !important;
}

.footer-dropup-content .profile-slot-has-tooltip:hover,
.footer-dropup-content .profile-slot:hover {
  border-color: rgba(226, 192, 122, 0.75) !important;
  box-shadow: 0 0 10px rgba(226, 192, 122, 0.4), inset 0 1px 2px rgba(0, 0, 0, 0.18) !important;
}

.footer-dropup-content .profile-equipment-stats {
  border-top: 1px solid rgba(134, 108, 91, 0.3) !important;
  margin-top: 8px !important;
  padding-top: 10px !important;
  justify-content: center;
  display: flex;
  gap: 16px;
}

.footer-dropup-content .profile-stat {
  background: linear-gradient(180deg, rgba(30, 20, 10, 0.2), rgba(30, 20, 10, 0.08)) !important;
  border: 1px solid rgba(134, 108, 91, 0.5) !important;
  border-radius: 8px !important;
  padding: 6px 14px !important;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.footer-dropup-content .profile-stat-label {
  color: #6c5241 !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase;
}

.footer-dropup-content .profile-stat-value {
  color: #2a2411 !important;
  font-family: "Poppins", sans-serif !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  letter-spacing: 0.3px;
}

/* Profile sub-nav (injected) */
.profile-subnav {
  display: flex;
  gap: 4px;
  padding: 6px;
  margin: 0 0 12px 0;
  background: linear-gradient(180deg, #3a2e25 0%, #2a221c 100%);
  border: 1px solid rgba(226, 192, 122, 0.35);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  flex-wrap: wrap;
}

.profile-subnav button {
  flex: 1 1 90px;
  min-width: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(226, 192, 122, 0.18);
  color: #cdb78a;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  font-family: inherit;
}

.profile-subnav button i { color: #e2c07a; }

.profile-subnav button:hover {
  background: rgba(226, 192, 122, 0.10);
  border-color: rgba(226, 192, 122, 0.45);
  color: #fff4d1;
  transform: translateY(-1px);
}

.profile-subnav button.is-active {
  background: linear-gradient(180deg, rgba(226, 192, 122, 0.30), rgba(200, 156, 88, 0.10));
  border-color: rgba(226, 192, 122, 0.85);
  color: #fff4d1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 10px rgba(226, 192, 122, 0.35);
}

/* Profile section card style (inside drop-up OR direct profile view) */
.footer-dropup-content .card > .hunter-stats-header,
.footer-dropup-content .card > .recent-kills-header,
.footer-dropup-content .card > .achievements-header,
.footer-dropup-content .card > .guild-header,
.footer-dropup-content .card > .companions-header,
.footer-dropup-content .card > .relics-header,
.footer-dropup-content .card > .quest-stats-header,
.footer-dropup-content .card > .combat-stats-header,
.footer-dropup-content .card > .collection-stats-header,
.footer-dropup-content .card > .activity-timeline-header,
.footer-dropup-content .card > .currency-stats-header,
.footer-dropup-content .card > .playtime-stats-header,
.footer-dropup-content .card > .other-header,
.profile-view .card > .hunter-stats-header,
.profile-view .card > .recent-kills-header,
.profile-view .card > .achievements-header,
.profile-view .card > .guild-header,
.profile-view .card > .companions-header,
.profile-view .card > .relics-header,
.profile-view .card > .quest-stats-header,
.profile-view .card > .combat-stats-header,
.profile-view .card > .collection-stats-header,
.profile-view .card > .activity-timeline-header,
.profile-view .card > .currency-stats-header,
.profile-view .card > .playtime-stats-header,
.profile-view .card > .other-header {
  padding: 4px 6px !important;
  border-radius: 8px;
  transition: background 0.18s ease;
}

.footer-dropup-content .card > .hunter-stats-header:hover,
.footer-dropup-content .card > .recent-kills-header:hover,
.footer-dropup-content .card > .achievements-header:hover,
.footer-dropup-content .card > .guild-header:hover,
.footer-dropup-content .card > .companions-header:hover,
.footer-dropup-content .card > .relics-header:hover,
.footer-dropup-content .card > .quest-stats-header:hover,
.footer-dropup-content .card > .combat-stats-header:hover,
.footer-dropup-content .card > .collection-stats-header:hover,
.footer-dropup-content .card > .activity-timeline-header:hover,
.footer-dropup-content .card > .currency-stats-header:hover,
.footer-dropup-content .card > .playtime-stats-header:hover,
.footer-dropup-content .card > .other-header:hover,
.profile-view .card > .hunter-stats-header:hover,
.profile-view .card > .recent-kills-header:hover,
.profile-view .card > .achievements-header:hover,
.profile-view .card > .guild-header:hover,
.profile-view .card > .companions-header:hover,
.profile-view .card > .relics-header:hover,
.profile-view .card > .quest-stats-header:hover,
.profile-view .card > .combat-stats-header:hover,
.profile-view .card > .collection-stats-header:hover,
.profile-view .card > .activity-timeline-header:hover,
.profile-view .card > .currency-stats-header:hover,
.profile-view .card > .playtime-stats-header:hover,
.profile-view .card > .other-header:hover {
  background: rgba(226, 192, 122, 0.15);
}

.footer-dropup-content .card > [class$="-header"] h3.blood-text,
.profile-view .card > [class$="-header"] h3.blood-text {
  font-family: "Poppins", sans-serif !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 1.8px !important;
  text-transform: uppercase !important;
  color: #3b2c1e !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.footer-dropup-content .card > [class$="-header"] h3.blood-text::before,
.profile-view .card > [class$="-header"] h3.blood-text::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #c89c58;
  transform: rotate(45deg);
  box-shadow: 0 0 0 1px rgba(108, 82, 65, 0.35);
  flex-shrink: 0;
}

.footer-dropup-content .card > [class$="-header"] h3.blood-text i,
.profile-view .card > [class$="-header"] h3.blood-text i {
  color: #c89c58 !important;
  font-size: 14px;
  margin-right: 0 !important;
}

.footer-dropup-content .card > [class$="-header"] > .fa-chevron-down,
.profile-view .card > [class$="-header"] > .fa-chevron-down {
  color: #6c5241 !important;
  font-size: 12px;
}

/* When a card is filtered out by sub-nav (works in both dropup and direct view) */
.card[data-profile-hidden="1"] {
  display: none !important;
}

/* Profile bio edit pencil */
.footer-dropup-content #bio-edit-pencil,
.profile-view #bio-edit-pencil {
  border: 1px solid rgba(134, 108, 91, 0.35);
  border-radius: 6px;
  background: rgba(226, 192, 122, 0.15);
}

.footer-dropup-content #bio-edit-pencil:hover,
.profile-view #bio-edit-pencil:hover {
  background: rgba(226, 192, 122, 0.35);
  color: #2a231d !important;
}

@media (max-width: 480px) {
  .footer-dropup-content .upgrade-tabs,
  .profile-subnav {
    gap: 3px !important;
  }
  .footer-dropup-content .upgrade-tab,
  .profile-subnav button {
    flex: 1 1 80px;
    padding: 6px 8px !important;
    font-size: 10px !important;
    letter-spacing: 0.5px !important;
  }
}

/* =========================
   Profile stat cells (scoped to drop-up)
   Restyles the generic dark "rgba(0,0,0,0.2)" and red-tinted
   "rgba(127,29,29,0.1)" panels used by every profile section.
   ========================= */

/* Neutral stat cell (was dark-on-cream and hard to read) */
.footer-dropup-content [id$="-content"] div[style*="rgba(0,0,0,0.2)"],
.footer-dropup-content [id$="-content"] div[style*="rgba(0, 0, 0, 0.2)"],
.footer-dropup-content [id$="-content"] div[style*="rgba(0,0,0,0.3)"],
.footer-dropup-content [id$="-content"] div[style*="rgba(0, 0, 0, 0.3)"] {
  background: linear-gradient(180deg, rgba(30, 20, 10, 0.10), rgba(30, 20, 10, 0.04)) !important;
  border: 1px solid rgba(108, 82, 65, 0.35) !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  color: #2a2411 !important;
}

/* Warm-accented stat cell (the "red-left-border" highlight boxes) */
.footer-dropup-content [id$="-content"] div[style*="rgba(127, 29, 29, 0.1)"],
.footer-dropup-content [id$="-content"] div[style*="rgba(127,29,29,0.1)"] {
  background: linear-gradient(180deg, rgba(226, 192, 122, 0.20), rgba(226, 192, 122, 0.06)) !important;
  border: 1px solid rgba(226, 192, 122, 0.45) !important;
  border-left: 3px solid #c89c58 !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  color: #2a2411 !important;
}

/* Labels / secondary text inside stat cells are now on parchment, so darken them */
.footer-dropup-content [id$="-content"] .text-sm,
.footer-dropup-content [id$="-content"] .text-xs {
  color: #5a4631 !important;
}

.footer-dropup-content [id$="-content"] .text-sm.font-bold,
.footer-dropup-content [id$="-content"] .text-sm strong,
.footer-dropup-content [id$="-content"] .font-bold {
  color: #2a2411;
}

/* Main stat value */
.footer-dropup-content [id$="-content"] .text-lg {
  color: #2a2411 !important;
  font-family: "Poppins", sans-serif;
  font-weight: 800 !important;
  letter-spacing: 0.2px;
}

.footer-dropup-content [id$="-content"] .text-2xl {
  color: #2a2411 !important;
  font-family: "Poppins", sans-serif;
  font-weight: 900 !important;
  letter-spacing: 0.2px;
}

/* Retint Tailwind utility / arbitrary colors for readability on parchment */
.footer-dropup-content [id$="-content"] .text-yellow-400,
.footer-dropup-content [id$="-content"] .text-\[\#dbd291\],
.footer-dropup-content [id$="-content"] .text-\[\#f59e0b\] {
  color: #a97a2f !important; /* warm amber */
}

.footer-dropup-content [id$="-content"] .text-red-400,
.footer-dropup-content [id$="-content"] .text-\[\#ef4444\],
.footer-dropup-content [id$="-content"] .text-\[\#c32929\],
.footer-dropup-content [id$="-content"] .text-\[\#7f1d1d\] {
  color: #9a3a1a !important; /* warm rust */
}

.footer-dropup-content [id$="-content"] .text-green-400,
.footer-dropup-content [id$="-content"] .text-\[\#10b981\] {
  color: #2d8f5a !important;
}

.footer-dropup-content [id$="-content"] .text-blue-400 {
  color: #3b5a7a !important;
}

/* Small colored tags (like BOSS pill) inside stats should keep contrast */
.footer-dropup-content [id$="-content"] .bg-red-600 {
  background: #9a3a1a !important;
  color: #fff4d1 !important;
}

/* Icon tweaks â€” the red #7f1d1d icon-accent reads better slightly warmer */
.footer-dropup-content [id$="-content"] .fa-coins { color: #c89c58 !important; }
.footer-dropup-content [id$="-content"] .fa-gem { color: #9a3a1a !important; }
.footer-dropup-content [id$="-content"] .fa-sword,
.footer-dropup-content [id$="-content"] .fa-skull,
.footer-dropup-content [id$="-content"] .fa-hand-fist { color: #9a3a1a !important; }
.footer-dropup-content [id$="-content"] .fa-clock { color: #3b5a7a !important; }
.footer-dropup-content [id$="-content"] .fa-trophy { color: #c89c58 !important; }

/* =========================
   Companions section cards
   ========================= */

.footer-dropup-content #companions-content .grid > div[style*="border: 2px solid #7f1d1d"] {
  background: linear-gradient(180deg, rgba(219, 204, 181, 0.95), rgba(192, 178, 157, 0.95)) !important;
  border: 1px solid rgba(134, 108, 91, 0.55) !important;
  border-top: 2px solid #c89c58 !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  padding: 10px !important;
  color: #2a2411 !important;
}

.footer-dropup-content #companions-content .grid img[style*="border: 2px solid #7f1d1d"] {
  border: 2px solid rgba(226, 192, 122, 0.7) !important;
  border-radius: 10px !important;
  background: rgba(30, 20, 10, 0.15);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(108, 82, 65, 0.3);
  padding: 2px;
}

.footer-dropup-content #companions-content .grid p.font-bold {
  color: #2a2411 !important;
  font-family: "Poppins", sans-serif;
  font-size: 13px !important;
  letter-spacing: 0.3px;
  margin-bottom: 6px !important;
}

.footer-dropup-content #companions-content .grid .text-xs > div {
  color: #3b2c1e !important;
  padding: 2px 0;
  display: flex !important;
  align-items: center;
  gap: 6px;
}

/* The "Total Companion Damage: 17" row â€” make it a readable pill */
.footer-dropup-content #companions-content > div[style*="rgba(127, 29, 29, 0.1)"] {
  background: linear-gradient(180deg, rgba(226, 192, 122, 0.22), rgba(226, 192, 122, 0.08)) !important;
  border: 1px solid rgba(226, 192, 122, 0.5) !important;
  border-radius: 999px !important;
  padding: 6px 14px !important;
  display: inline-flex !important;
  align-items: center;
  margin-bottom: 10px !important;
}

/* =========================
   Relics section cards
   ========================= */

.footer-dropup-content #relics-content .grid > div {
  background: linear-gradient(180deg, rgba(219, 204, 181, 0.95), rgba(192, 178, 157, 0.95)) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  border-radius: 10px !important;
  padding: 10px !important;
  color: #2a2411 !important;
  position: relative;
  /* Inline border-color stays â€” preserves rarity color. We just reduce width. */
  border-width: 1px !important;
}

/* Tiny rarity-colored glow at the top of each relic card */
.footer-dropup-content #relics-content .grid > div::before {
  content: "";
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 2px;
  background: currentColor;
  opacity: 0.4;
  border-radius: 0 0 2px 2px;
}

/* Frame the relic image so broken-image placeholders still look intentional */
.footer-dropup-content #relics-content .grid > div img {
  background: rgba(30, 20, 10, 0.18);
  padding: 3px;
  border-radius: 8px !important;
  border-width: 2px !important;
  width: 54px !important;
  height: 54px !important;
  object-fit: contain;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
  display: block;
  margin: 0 auto 6px;
}

/* Relic name â€” keep rarity color but give it a faint dark outline for readability */
.footer-dropup-content #relics-content .grid > div p.font-bold {
  font-family: "Poppins", sans-serif !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
  margin-bottom: 4px !important;
  line-height: 1.2;
}

/* Level line */
.footer-dropup-content #relics-content .grid > div p:not(.font-bold) {
  color: #3b2c1e !important;
  font-weight: 600;
}

/* Bonus line â€” admin */
.footer-dropup-content #relics-content .grid > div p[style*="#dbd291"] {
  color: #a97a2f !important;
  background: rgba(226, 192, 122, 0.25);
  border: 1px solid rgba(226, 192, 122, 0.5);
  border-radius: 999px;
  padding: 2px 6px;
  display: inline-block;
  margin-top: 4px;
  font-weight: 700;
}

/* =========================
   Recent Kills list polish
   ========================= */

.footer-dropup-content #recent-kills-content div[class*="bg-\[\#262626\]"],
.footer-dropup-content #recent-kills-content div[class*="bg-[#262626]"] {
  background: linear-gradient(180deg, rgba(30, 20, 10, 0.10), rgba(30, 20, 10, 0.04)) !important;
  border: 1px solid rgba(108, 82, 65, 0.35) !important;
  border-radius: 8px !important;
  padding: 8px 10px !important;
  color: #2a2411 !important;
}

/* =========================
   Admin "Other" section polish
   ========================= */

.footer-dropup-content #other-content div[style*="rgba(127, 29, 29, 0.1)"] {
  background: linear-gradient(180deg, rgba(226, 192, 122, 0.18), rgba(226, 192, 122, 0.06)) !important;
  border: 1px solid rgba(226, 192, 122, 0.45) !important;
  border-left: 3px solid #c89c58 !important;
  border-radius: 8px !important;
}

.footer-dropup-content #other-content h4 {
  color: #3b2c1e !important;
  font-family: "Poppins", sans-serif;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
}

/* =========================
   Identity card polish (Overview "user card")
   The big card under the equipment with name/rep/bio/stat grids.
   ========================= */

.footer-dropup-content .card[data-profile-card="identity"] {
  background: linear-gradient(180deg, rgba(206, 192, 168, 0.95), rgba(192, 178, 157, 0.95)) !important;
}

/* Rep/like buttons â€” warm on parchment */
.footer-dropup-content .reputation-icon-btn {
  color: #3b2c1e !important;
}
.footer-dropup-content .reputation-icon-btn.active-like {
  color: #2d8f5a !important;
  border-color: #2d8f5a !important;
  background: rgba(45, 143, 90, 0.1) !important;
}
.footer-dropup-content .reputation-icon-btn.active-dislike {
  color: #9a3a1a !important;
  border-color: #9a3a1a !important;
  background: rgba(154, 58, 26, 0.1) !important;
}

/* The many stat grids inside the identity card (Rank/XP/Monsters/etc.) */
.footer-dropup-content .card[data-profile-card="identity"] .grid > div {
  background: linear-gradient(180deg, rgba(30, 20, 10, 0.08), rgba(30, 20, 10, 0.02));
  border: 1px solid rgba(108, 82, 65, 0.3);
  border-radius: 8px;
  padding: 8px 10px;
}

.footer-dropup-content .card[data-profile-card="identity"] .grid > div > p.text-grey-400 {
  color: #5a4631 !important;
  font-weight: 700;
  letter-spacing: 0.3px;
  font-size: 11px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-dropup-content .card[data-profile-card="identity"] .grid > div .text-md.font-bold,
.footer-dropup-content .card[data-profile-card="identity"] .grid > div p.text-md {
  color: #2a2411 !important;
  font-family: "Poppins", sans-serif;
  font-weight: 800 !important;
  font-size: 15px !important;
}

/* Bio display box */
.footer-dropup-content .card[data-profile-card="identity"] > div[style*="border-left: 3px solid #977d64"] {
  background: linear-gradient(180deg, rgba(226, 192, 122, 0.14), rgba(226, 192, 122, 0.04)) !important;
  border: 1px solid rgba(226, 192, 122, 0.4) !important;
  border-left: 3px solid #c89c58 !important;
  border-radius: 8px;
}

/* =========================
   Landing page (index.php)
   Simple, on-brand redesign
   ========================= */

.landing-page {
  padding-top: 14px;
  padding-bottom: 14px;
}

.landing-panel {
  border: 4px double #8b817b;
  background: rgba(209, 195, 172, 0.96);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.landing-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(134, 108, 91, 0.65);
}

.landing-brand {
  font-family: "Oswald", sans-serif;
  letter-spacing: 1.5px;
  font-weight: 700;
  font-size: 13px;
  color: #f5deb3;
  text-transform: uppercase;
}

.landing-version {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.8px;
  color: rgba(245, 222, 179, 0.92);
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(245, 222, 179, 0.25);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.landing-hero {
  padding: 14px 14px 8px;
  text-align: center;
}

.landing-logo-text {
  font-family: "Cinzel Decorative", cursive;
  font-weight: 700;
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
  color: #3a2f25;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.landing-tagline {
  margin: 8px auto 0;
  max-width: 520px;
  font-size: 11px;
  letter-spacing: 0.7px;
  color: rgba(38, 35, 28, 0.8);
  text-transform: uppercase;
}

.landing-main {
  padding: 12px 14px 14px;
}

.landing-info-box,
.landing-form-box {
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(134, 108, 91, 0.35);
  border-radius: 10px;
  padding: 14px;
}

.landing-info-text {
  margin: 0 0 10px;
  color: rgba(38, 35, 28, 0.9);
  line-height: 1.45;
}

.landing-info-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.landing-info-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  padding: 10px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(245, 222, 179, 0.24);
  color: #f3ead9;
  font-weight: 800;
  letter-spacing: 0.2px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.landing-info-btn:hover {
  background: rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.landing-info-btn--wide {
  grid-column: 1 / -1;
}

.landing-section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(245, 222, 179, 0.22);
  color: #f5deb3;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-size: 12px;
}

.landing-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.landing-tab {
  appearance: none;
  border: 1px solid rgba(134, 108, 91, 0.35);
  background: rgba(0, 0, 0, 0.12);
  color: rgba(38, 35, 28, 0.92);
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.landing-tab:hover {
  background: rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
}

.landing-tab.is-active {
  background: rgba(0, 0, 0, 0.78);
  color: #f5deb3;
  border-color: rgba(245, 222, 179, 0.34);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.landing-tab-panels {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(245, 222, 179, 0.18);
  border: 1px solid rgba(134, 108, 91, 0.35);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.landing-tab-panel {
  display: none;
}

.landing-tab-panel.is-active {
  display: block;
}

.landing-bullets {
  margin: 0;
  padding-left: 18px;
  color: rgba(38, 35, 28, 0.92);
  line-height: 1.5;
}

.landing-bullets li {
  margin: 6px 0;
}

.landing-tabs-actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.landing-tabs {
  background-image: linear-gradient(180deg, rgba(245, 222, 179, 0.10), rgba(0, 0, 0, 0.06));
}

.landing-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0;
  color: rgba(38, 35, 28, 0.8);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.landing-separator::before,
.landing-separator::after {
  content: "";
  height: 1px;
  background: rgba(134, 108, 91, 0.55);
  flex: 1;
}

.landing-separator span {
  padding: 0 10px;
  background: rgba(209, 195, 172, 0.96);
  border-radius: 999px;
  border: 1px solid rgba(134, 108, 91, 0.28);
}

.landing-cta-title {
  margin: 0;
  font-size: 18px;
  color: #2b231c;
  font-weight: 900;
}

.landing-cta-desc {
  margin: 6px 0 12px;
  color: rgba(38, 35, 28, 0.85);
}

.landing-cta-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.landing-cta-primary,
.landing-cta-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  border-radius: 10px;
  padding: 11px 12px;
  font-weight: 900;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.landing-cta-primary {
  background: rgba(0, 0, 0, 0.78);
  color: #f5deb3;
  border: 1px solid rgba(245, 222, 179, 0.32);
}

.landing-cta-primary:hover {
  background: rgba(0, 0, 0, 0.86);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.landing-cta-secondary {
  background: rgba(139, 0, 0, 0.14);
  color: #5c1a1a;
  border: 1px solid rgba(139, 0, 0, 0.28);
}

.landing-cta-secondary:hover {
  background: rgba(139, 0, 0, 0.18);
  transform: translateY(-1px);
}

.landing-cta-note {
  margin: 10px 0 0;
  font-size: 11px;
  color: rgba(38, 35, 28, 0.65);
  text-align: center;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.landing-carousel-wrap img {
  max-width: 100%;
  height: auto;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(245, 222, 179, 0.22);
  color: #f5deb3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.58);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 14px 9px;
  background: rgb(117 109 91);
  /* border-top: 1px solid rgb(24 23 23 / 35%); */
  width: stretch;
  box-shadow: none !important;
  /* margin: 5px 0 0;*/

}
.landing-carousel-wrap.card.p-0.prevent-select {
  overflow: hidden;
  background: #756d5b00;
  border-radius: 12px;
  padding: 0px !important;
  border: 0;
  box-shadow: none !important;
  filter: brightness(1);
  border: 3px double #c0b29e;
  box-shadow: 0px 0px 4px 4px #0000003b !important;
}
@media (min-width: 520px) {
  .landing-cta-buttons {
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================
   Idle rewards return screen
   ========================= */
.idle-return-card {
  border: 4px solid #866c5b;
  border-radius: 12px;
  background: rgba(209, 195, 172, 0.98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.idle-return-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 10px;
  background: rgba(0, 0, 0, 0.38);
  border-bottom: 1px solid rgba(134, 108, 91, 0.7);
}
.idle-return-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.idle-return-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(245, 222, 179, 0.3);
  color: #f5deb3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.idle-return-h1 {
  font-family: "Cinzel Decorative", cursive;
  font-weight: 700;
  color: #f5deb3;
  font-size: 16px;
  letter-spacing: 0.6px;
}
.idle-return-sub {
  font-size: 12px;
  color: rgba(245, 222, 179, 0.85);
}
.idle-return-close {
  appearance: none;
  border: 1px solid rgba(245, 222, 179, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(245, 222, 179, 0.95);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.15s;
}
.idle-return-close:hover {
  background: rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}
.idle-return-body { padding: 12px; }
.idle-return-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.idle-stat {
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(134, 108, 91, 0.35);
  border-radius: 12px;
  padding: 10px;
}
.idle-stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 12px;
  color: rgba(38, 35, 28, 0.9);
}
.idle-stat-value {
  margin-top: 6px;
  font-weight: 900;
  font-size: 18px;
  color: #2b231c;
}
.idle-meter {
  margin-top: 10px;
  background: rgba(245, 222, 179, 0.16);
  border: 1px solid rgba(134, 108, 91, 0.35);
  border-radius: 12px;
  padding: 10px;
}
.idle-meter-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.idle-meter-label {
  font-weight: 900;
  font-size: 12px;
  color: rgba(38, 35, 28, 0.9);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.idle-meter-hint {
  font-size: 12px;
  font-weight: 900;
  color: rgba(38, 35, 28, 0.75);
}
.idle-meter-bar {
  margin-top: 8px;
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.idle-meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.75), rgba(139, 0, 0, 0.55));
  border-radius: 999px;
  transition: width 0.35s ease;
}
.idle-meter-note {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(38, 35, 28, 0.65);
}

.idle-chest-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.28);
  color: #166534;
  font-weight: 900;
  margin-top: 8px;
}

.idle-chest-indicator i {
  color: #16a34a;
}

.idle-chest-next {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(38, 35, 28, 0.72);
  font-weight: 800;
}

.idle-chest-next span {
  font-weight: 900;
  color: rgba(127, 29, 29, 0.88);
}

.idle-chest-footnote {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(38, 35, 28, 0.60);
}

.idle-chest-action {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.idle-chest-action-opt {
  appearance: none;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid rgba(134, 108, 91, 0.28);
  background: rgba(0, 0, 0, 0.06);
  color: rgba(38, 35, 28, 0.85);
  transition: 0.15s;
}

.idle-chest-action-opt:hover {
  transform: translateY(-1px);
  background: rgba(0, 0, 0, 0.08);
}

.idle-chest-action-opt.is-active {
  background: rgba(0, 0, 0, 0.82);
  border-color: rgba(245, 222, 179, 0.32);
  color: #f5deb3;
}
.idle-focus { margin-top: 10px; }
.idle-focus-title {
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(38, 35, 28, 0.85);
  margin-bottom: 8px;
}
.idle-focus-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.idle-focus-opt {
  text-align: left;
  appearance: none;
  border: 1px solid rgba(134, 108, 91, 0.35);
  background: rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  transition: 0.15s;
}
.idle-focus-opt:hover { transform: translateY(-1px); background: rgba(0, 0, 0, 0.10); }
.idle-focus-opt .opt-name { font-weight: 900; color: #2b231c; }
.idle-focus-opt .opt-desc { font-size: 12px; color: rgba(38, 35, 28, 0.72); margin-top: 2px; }
.idle-focus-opt.is-active {
  background: rgba(0, 0, 0, 0.78);
  border-color: rgba(245, 222, 179, 0.34);
}
.idle-focus-opt.is-active .opt-name { color: #f5deb3; }
.idle-focus-opt.is-active .opt-desc { color: rgba(245, 222, 179, 0.82); }
.idle-return-footer {
  padding: 12px;
  background: rgba(0, 0, 0, 0.16);
  border-top: 1px solid rgba(134, 108, 91, 0.35);
}
.idle-return-claim {
  width: 100%;
  appearance: none;
  border-radius: 12px;
  border: 1px solid rgba(245, 222, 179, 0.32);
  background: rgba(0, 0, 0, 0.82);
  color: #f5deb3;
  font-weight: 900;
  padding: 12px 12px;
  cursor: pointer;
  transition: 0.15s;
}
.idle-return-claim:hover { background: rgba(0, 0, 0, 0.9); transform: translateY(-1px); }
.idle-return-claim:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* =========================================================
   Generic event modals (boss escape, relic drop, etc.)
   Same parchment frame as .idle-return-card, accent-driven.
   Each modal sets --df-accent inline for its accent strip,
   icon glow, separator and button.
   ========================================================= */

.df-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: dfFadeIn 0.25s ease-out;
}

.df-modal-card {
  --df-accent: #8a5a2b;
  position: relative;
  width: 100%;
  max-width: 460px;
  border: 4px solid #866c5b;
  border-radius: 12px;
  background: rgba(209, 195, 172, 0.98);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.25),
    0 0 28px color-mix(in srgb, var(--df-accent) 45%, transparent);
  overflow: hidden;
  animation: dfScaleIn 0.35s cubic-bezier(.18,.89,.32,1.28);
}

.df-modal-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg,
    transparent,
    var(--df-accent) 20%,
    var(--df-accent) 80%,
    transparent);
  box-shadow: 0 0 10px var(--df-accent);
  pointer-events: none;
}

.df-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 10px;
  background: rgba(0, 0, 0, 0.42);
  border-bottom: 1px solid rgba(134, 108, 91, 0.7);
}

.df-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.df-modal-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid color-mix(in srgb, var(--df-accent) 55%, rgba(245, 222, 179, 0.3));
  color: var(--df-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  text-shadow: 0 0 8px color-mix(in srgb, var(--df-accent) 70%, transparent);
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--df-accent) 40%, transparent));
}

.df-modal-h1 {
  font-family: "Cinzel Decorative", "Cinzel", serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.7px;
  color: #f5deb3;
  text-transform: uppercase;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.df-modal-sub {
  margin-top: 2px;
  font-size: 11.5px;
  color: rgba(245, 222, 179, 0.78);
  letter-spacing: 0.3px;
}

.df-modal-close {
  appearance: none;
  border: 1px solid rgba(245, 222, 179, 0.25);
  background: rgba(0, 0, 0, 0.4);
  color: rgba(245, 222, 179, 0.95);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}
.df-modal-close:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: translateY(-1px);
}

.df-modal-body {
  padding: 14px 14px 12px;
}

/* Hero block — image / large icon */
.df-modal-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px auto 10px;
  width: 96px;
  height: 96px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 30% 28%, rgba(0, 0, 0, 0.08), transparent 60%),
    rgba(30, 20, 10, 0.18);
  border: 2px solid color-mix(in srgb, var(--df-accent) 70%, var(--pg-border));
  box-shadow:
    inset 0 1px 4px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 18px color-mix(in srgb, var(--df-accent) 35%, transparent);
  position: relative;
}
.df-modal-hero img {
  max-width: 72px;
  max-height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}
.df-modal-hero .df-hero-emoji {
  font-size: 56px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.df-modal-eyebrow {
  text-align: center;
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--df-accent);
  margin: 4px 0 4px;
  text-shadow: 0 1px 0 rgba(255, 250, 230, 0.4);
}

.df-modal-name {
  text-align: center;
  font-family: "Cinzel", serif;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.4px;
  color: var(--pg-ink, #2a2411);
  margin: 0 0 6px;
  line-height: 1.2;
}

.df-modal-rarity-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 auto 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--df-accent) 14%, rgba(30, 20, 10, 0.06));
  border: 1px solid color-mix(in srgb, var(--df-accent) 45%, transparent);
  color: var(--df-accent);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.df-modal-rarity-chip i { font-size: 10px; }

.df-modal-rarity-wrap {
  display: flex;
  justify-content: center;
}

/* Divider with accent fade */
.df-modal-divider {
  height: 1px;
  margin: 10px 0;
  background: linear-gradient(90deg,
    transparent,
    color-mix(in srgb, var(--df-accent) 60%, transparent),
    transparent);
}

/* Message paragraph (boss escape body, etc.) */
.df-modal-message {
  text-align: center;
  margin: 6px 0 0;
  color: var(--pg-ink-soft, #5a4631);
  font-size: 13px;
  line-height: 1.5;
}
.df-modal-message strong {
  color: var(--df-accent);
  font-weight: 800;
}

/* Stat tiles row (mirrors .idle-return-stats) */
.df-modal-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.df-modal-stat {
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(134, 108, 91, 0.35);
  border-radius: 10px;
  padding: 9px 10px;
}
.df-modal-stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: rgba(38, 35, 28, 0.78);
}
.df-modal-stat-label i { color: var(--df-accent); }
.df-modal-stat-value {
  margin-top: 4px;
  font-weight: 900;
  font-size: 15px;
  color: var(--pg-ink, #2a2411);
}

/* Footer with action buttons */
.df-modal-footer {
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.14);
  border-top: 1px solid rgba(134, 108, 91, 0.35);
  display: flex;
  gap: 8px;
}
.df-modal-footer .df-modal-btn { flex: 1; }

.df-modal-btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 11px 14px;
  font-family: "Oswald", sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  text-transform: uppercase;
}

.df-modal-btn-primary {
  background: rgba(0, 0, 0, 0.82);
  color: #f5deb3;
  border: 1px solid color-mix(in srgb, var(--df-accent) 50%, rgba(245, 222, 179, 0.32));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 14px color-mix(in srgb, var(--df-accent) 30%, transparent);
}
.df-modal-btn-primary:hover {
  background: rgba(0, 0, 0, 0.92);
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 4px 18px color-mix(in srgb, var(--df-accent) 45%, transparent);
}

.df-modal-btn-secondary {
  background: rgba(30, 20, 10, 0.06);
  color: var(--pg-ink, #2a2411);
  border: 1px solid color-mix(in srgb, var(--df-accent) 35%, var(--pg-border-soft, rgba(134, 108, 91, 0.35)));
}
.df-modal-btn-secondary:hover {
  background: color-mix(in srgb, var(--df-accent) 14%, rgba(30, 20, 10, 0.06));
  border-color: var(--df-accent);
  transform: translateY(-1px);
}

/* Variants by accent tone */
.df-modal-card.is-boss-fail {
  --df-accent: #b04a1c;
}
.df-modal-card.is-relic-drop {
  /* --df-accent is set inline from the rarity colour */
}

/* Decorative inner ornament strip (subtle) */
.df-modal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% -10%,
      color-mix(in srgb, var(--df-accent) 18%, transparent),
      transparent 55%);
  pointer-events: none;
}

/* Animations */
@keyframes dfFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes dfFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes dfScaleIn {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
@keyframes dfBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@keyframes dfAccentPulse {
  0%, 100% { box-shadow: inset 0 1px 4px rgba(0,0,0,0.4),
                         inset 0 0 0 1px rgba(255,255,255,0.05),
                         0 0 14px color-mix(in srgb, var(--df-accent) 30%, transparent); }
  50%      { box-shadow: inset 0 1px 4px rgba(0,0,0,0.4),
                         inset 0 0 0 1px rgba(255,255,255,0.05),
                         0 0 28px color-mix(in srgb, var(--df-accent) 65%, transparent); }
}
.df-modal-hero.is-pulsing { animation: dfBounce 0.7s ease-out, dfAccentPulse 2.4s ease-in-out 0.7s infinite; }

@media (max-width: 420px) {
  .df-modal-card { max-width: 100%; }
  .df-modal-h1 { font-size: 15px; letter-spacing: 0.4px; }
  .df-modal-footer { flex-direction: column; }
  .df-modal-stats { grid-template-columns: 1fr; }
}

/* =========================================================
   Relic rarity glow — soft outer halo on collection cards
   and equipped slots so the rarity color reads even at a
   glance (border-top alone was easy to miss).
   --rarity-color is set inline by render/game/relics.php.
   ========================================================= */

.rv-relic {
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.06),
    0 0 0 1px color-mix(in srgb, var(--rarity-color, #6b7280) 22%, transparent),
    0 8px 18px color-mix(in srgb, var(--rarity-color, #6b7280) 14%, transparent);
}
.rv-relic:hover {
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.06),
    0 0 0 1px color-mix(in srgb, var(--rarity-color, #6b7280) 42%, transparent),
    0 12px 24px color-mix(in srgb, var(--rarity-color, #6b7280) 28%, transparent);
}
.rv-relic.equipped {
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.06),
    0 0 0 1px color-mix(in srgb, var(--rarity-color, #6b7280) 38%, transparent),
    0 8px 22px color-mix(in srgb, var(--rarity-color, #6b7280) 22%, transparent);
}

.rv-slot.filled {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--rarity-color, #6b7280) 26%, transparent),
    0 4px 10px color-mix(in srgb, var(--rarity-color, #6b7280) 18%, transparent);
}
.rv-slot.filled:hover {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--rarity-color, #6b7280) 50%, transparent),
    0 6px 14px color-mix(in srgb, var(--rarity-color, #6b7280) 32%, transparent);
}

/* Selection modal: rarity-tinted glow on hover (already existed
   but now backed by canonical colours from the call site). */
#relicSelectModal .rv-relic-selectable {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--rarity-color, #6b7280) 22%, transparent),
    0 6px 14px color-mix(in srgb, var(--rarity-color, #6b7280) 14%, transparent);
}
#relicSelectModal .rv-relic-selectable:hover {
  box-shadow:
    0 0 0 2px var(--rarity-color, var(--pg-accent)),
    0 10px 22px color-mix(in srgb, var(--rarity-color, #6b7280) 32%, transparent);
}

/* =========================
   Battle screen â€“ RPG redesign
   ========================= */

/* Player nameplate */
.battle-player-card {
  padding-top: 12px;
  padding-bottom: 10px;
}

.battle-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.battle-player-id {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.battle-player-name {
  font-size: 20px !important;
  line-height: 1.1;
}

.battle-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(127, 29, 29, 0.08);
  color: #7f1d1d !important;
  font-size: 11px;
  text-decoration: none;
  border: 1px solid rgba(127, 29, 29, 0.25);
  transition: 0.15s;
}
.battle-logout:hover { background: rgba(127, 29, 29, 0.18); }

.battle-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}

.battle-meta-pill.is-link {
  text-decoration: none;
  transition: 0.15s;
}
.battle-meta-pill.is-link:hover {
  background: rgba(0, 0, 0, 0.14);
  transform: translateY(-1px);
}
.battle-meta-pill-arrow {
  font-size: 9px !important;
  opacity: 0.55;
  color: rgba(58, 47, 37, 0.7) !important;
}

/* Stat strip (DPS / Damage / Crit) */
.battle-stats-strip {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 8px;
  margin-top: 12px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(134, 108, 91, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

/* When the strip is rendered as a link (?id=stats breakdown page), keep it
 * visually identical but add a subtle hover affordance + chevron hint. */
a.battle-stats-strip-link {
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
a.battle-stats-strip-link:hover {
  border-color: rgba(232, 192, 107, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32),
              0 0 0 1px rgba(232, 192, 107, 0.25);
}
a.battle-stats-strip-link:active {
  transform: translateY(1px);
}
.battle-stats-strip-hint {
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 10px;
  color: rgba(134, 108, 91, 0.55);
  pointer-events: none;
  transition: color 0.15s ease, transform 0.15s ease;
}
a.battle-stats-strip-link:hover .battle-stats-strip-hint {
  color: #7f1d1d;
  transform: translateX(2px);
}

.battle-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  min-width: 0;
}
.battle-stat + .battle-stat {
  border-left: 1px solid rgba(134, 108, 91, 0.24);
}
.battle-stat-primary {
  background: rgba(127, 29, 29, 0.06);
}

.battle-stat-icon {
  font-size: 16px;
  color: #7f1d1d;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.18));
  flex: 0 0 auto;
}
.battle-stat .battle-stat-body { min-width: 0; }
.battle-stat-label {
  text-transform: uppercase;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.8px;
  color: rgba(58, 47, 37, 0.7);
  line-height: 1.1;
}
.battle-stat-value {
  font-weight: 800;
  font-size: 16px;
  color: #7f1d1d;
  line-height: 1.15;
  letter-spacing: 0.2px;
}
.battle-stat-bonus {
  font-size: 10px;
  color: rgba(58, 47, 37, 0.6);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Enemy banner (name + level + reward pills on one row) */
.battle-enemy-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(127, 29, 29, 0.06) 0%,
    rgba(0, 0, 0, 0.04) 100%
  );
  border: 1px solid rgba(134, 108, 91, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  margin-bottom: 10px;
  position: relative;
}
.battle-enemy-banner::before,
.battle-enemy-banner::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  height: 1px;
  background: rgba(134, 108, 91, 0.55);
}
.battle-enemy-banner::before { left: 0; transform: translateY(-50%); }
.battle-enemy-banner::after  { right: 0; transform: translateY(-50%); }

.battle-enemy-banner-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.battle-enemy-banner-main .battle-entity-name {
  font-size: 18px;
}

.battle-enemy-banner-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.battle-enemy-banner-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(134, 108, 91, 0.32);
  color: #5a510f;
  text-decoration: none;
  transition: 0.15s;
}
.battle-enemy-banner-switch:hover {
  background: rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

/* Pill variants */
.battle-meta-pill-sm {
  padding: 3px 8px;
  font-size: 11px;
  gap: 5px;
}
.battle-meta-pill-coins i { color: #cfb90e; }
.battle-meta-pill-coins    { color: #7a5a0f; }
.battle-meta-pill-xp    i  { color: #2f7f1d; }
.battle-meta-pill-xp       { color: #2d5a19; }

/* Scene frame â€“ lighter RPG frame instead of harsh gray border */
.battle-scene {
  border: 3px solid rgba(134, 108, 91, 0.85) !important;
  border-radius: 14px !important;
  box-shadow:
    inset 0 0 6px 6px rgba(0, 0, 0, 0.35),
    0 0 0 3px rgba(255, 246, 226, 0.45),
    0 6px 14px rgba(0, 0, 0, 0.18) !important;
}

/* HP block */
.battle-hp-block {
  margin-top: 4px;
}
.battle-hp-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 12px;
}
.battle-hp-label {
  text-transform: uppercase;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.9px;
  color: rgba(58, 47, 37, 0.75);
}
.battle-hp-label i { color: #7f1d1d; margin-right: 4px; }
.battle-hp-values {
  font-weight: 800;
  color: #7f1d1d;
  font-size: 13px;
  letter-spacing: 0.2px;
}
.battle-hp-bar-wrap {
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(134, 108, 91, 0.45);
  background: rgba(0, 0, 0, 0.18) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.battle-hp-bar-wrap #hp-bar,
.battle-hp-bar-wrap #hp-bar-trail {
  height: 100% !important;
}

/* Boss timer */
.battle-boss-timer {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(234, 88, 12, 0.08);
  border: 1px solid rgba(234, 88, 12, 0.3);
}

/* Attack button â€“ bigger, RPG feel, still green */
.battle-attack-btn {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  padding-top: 14px !important;
  padding-bottom: 14px !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, rgba(24, 140, 78, 0.95), rgba(16, 110, 62, 0.95)) !important;
  border: 2px solid rgba(10, 58, 34, 0.55) !important;
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22) !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

/* Ability rows â€“ tighter spacing */
.battle-abilities {
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(134, 108, 91, 0.22);
}
.battle-abilities .attack-counter {
  padding: 4px 6px !important;
}

/* Battle log â€“ parchment feel */
.battle-log-card {
  padding-top: 10px;
  padding-bottom: 10px;
}
.battle-log-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(134, 108, 91, 0.28);
}
.battle-log-rune {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(127, 29, 29, 0.1);
  color: #7f1d1d;
  border: 1px solid rgba(127, 29, 29, 0.25);
  font-size: 12px;
}
.battle-log-title {
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #7f1d1d;
  font-size: 12px;
}
.battle-log-body {
  background: rgba(247, 236, 213, 0.55) !important;
  border: 1px solid rgba(134, 108, 91, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Mobile tweaks */
@media (max-width: 520px) {
  .battle-stats-strip {
    grid-template-columns: 1fr 1fr 1fr;
    padding: 6px;
    gap: 4px;
  }
  .battle-stat {
    padding: 4px 6px;
    gap: 6px;
  }
  .battle-stat-icon { font-size: 14px; }
  .battle-stat-value { font-size: 14px; }
  .battle-stat-bonus { display: none; }
  .battle-enemy-banner {
    flex-wrap: wrap;
  }
  .battle-enemy-banner-main .battle-entity-name { font-size: 16px; }
}

/* =========================
   Game menu â€“ Player card (simple)
   ========================= */
.menu-player-card {
  padding: 12px 14px;
}

.menu-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.menu-player-identity {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.menu-player-guild {
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(127, 29, 29, 0.12);
  color: #7f1d1d;
  border: 1px solid rgba(127, 29, 29, 0.22);
  letter-spacing: 0.3px;
}

.menu-player-name {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
  color: #3a2f25;
  letter-spacing: 0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  max-width: 100%;
}

.menu-player-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(127, 29, 29, 0.08);
  border: 1px solid rgba(127, 29, 29, 0.25);
  color: #7f1d1d !important;
  font-size: 10px;
  text-decoration: none;
  transition: 0.15s;
  flex: 0 0 auto;
}
.menu-player-logout:hover { background: rgba(127, 29, 29, 0.18); }

.menu-player-battle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.92), rgba(98, 22, 22, 0.92));
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.4px;
  border: 1px solid rgba(60, 14, 14, 0.55);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: 0.15s;
  white-space: nowrap;
  flex: 0 0 auto;
}
.menu-player-battle:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.menu-player-battle i {
  font-size: 12px;
  opacity: 0.95;
}

.menu-player-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.menu-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(134, 108, 91, 0.28);
  color: rgba(58, 47, 37, 0.9);
  font-weight: 700;
  font-size: 12px;
  text-decoration: none !important;
  transition: 0.15s;
}
.menu-chip i { color: #7f1d1d; font-size: 11px; }
.menu-chip img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}
.menu-chip-link:hover {
  background: rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

/* Responsive tweaks (game menu + chat + admin notice) */
@media (max-width: 420px) {
  .menu-player-battle {
    padding: 6px 10px;
    font-size: 12px;
  }
  .menu-player-name { font-size: 15px; }

  .admin-notice-card { padding: 10px 12px; }
  .admin-notice-message { font-size: 12.5px; }

  .chat-card .chat-messages { height: 280px; }
  .chat-header-heading { font-size: 14px; }
  .chat-header-rune { width: 30px; height: 30px; flex: 0 0 30px; }
}


/* ============================================================
   RPG PAGE POLISH — muted, flat, matches existing card palette
   Applies to: relics, playerMarketplace, guild, messages, info,
   online. No gradients, no bright gold; uses the same tones as
   .card / .crumb / .title-card already in the stylesheet.
   ============================================================ */

:root {
  --pg-card:        rgb(192, 178, 157);   /* .card base tan */
  --pg-card-light:  rgb(211, 192, 160);   /* .crumb-light */
  --pg-card-dark:   rgb(152, 140, 122);   /* .crumb */
  --pg-border:      rgb(171, 153, 133);
  --pg-border-soft: rgba(134, 108, 91, 0.35);
  --pg-ink:         #2a2411;
  --pg-ink-soft:    #5a4631;
  --pg-ink-mute:    #6c5241;
  --pg-gold-text:   #dac291;               /* title card gold */
  --pg-accent:      #8a5a2b;               /* muted warm accent */
  --pg-accent-deep: #5c3c12;               /* outlines */
  --pg-wine:        #7f1d1d;               /* .blood-text */
  --pg-red:         #9a3a1a;
  --pg-green:       #2d6d3c;
}

/* ==========================================================
   RELICS PAGE
   ========================================================== */

/* Collection grid cards — flat tan, keep rarity border colour */
.relic-card {
  background: var(--pg-card) !important;
  color: var(--pg-ink) !important;
  border-width: 1px !important;
  border-radius: 8px !important;
  box-shadow: none;
}

.relic-card[data-rarity] {
  border-top-width: 3px !important;
}

.relic-card .relic-icon {
  width: 52px !important;
  height: 52px !important;
  background: rgba(30, 20, 10, 0.1) !important;
  border: 1px solid var(--pg-border-soft) !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

.relic-card .relic-icon img {
  width: 42px !important;
  height: 42px !important;
  object-fit: contain !important;
}

.relic-card h4 { font-size: 14px !important; }

.relic-card p.text-xs.text-gray-200 {
  color: var(--pg-ink-soft) !important;
  line-height: 1.4;
}

.relic-card .text-xs.mb-2,
.relic-card .text-xs.mb-2 span { color: var(--pg-ink)  }

.relic-card .blood-text-light { color: var(--pg-accent)  font-weight: 700; }
.relic-card .text-green-400    { color: var(--pg-green)  font-weight: 700; }

.relic-card .equiped-relic {
  background: rgba(45, 109, 60, 0.18);
  color: var(--pg-green) !important;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  font-weight: 700;
  font-size: 11px;
  border: 1px solid rgba(45, 109, 60, 0.35);
}

/* Buttons inside relic cards — flat, muted */
.relic-card .relic-upgrade-btn,
.relic-card .equip-relic-btn,
.relic-card .unequip-relic-btn {
  background: var(--pg-card-dark) !important;
  color: var(--pg-ink) !important;
  border: 1px solid var(--pg-border) !important;
  box-shadow: none !important;
  font-weight: 700;
}

.relic-card .relic-upgrade-btn:hover:not(:disabled),
.relic-card .equip-relic-btn:hover,
.relic-card .unequip-relic-btn:hover {
  background: var(--pg-card-light) !important;
}

.relic-card .relic-upgrade-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.relic-card .unequip-relic-btn {
  background: rgba(127, 29, 29, 0.14) !important;
  border-color: rgba(127, 29, 29, 0.35) !important;
  color: #6a1f1f !important;
}

/* Equipped relic slots */
.inventory .slot.unequip-relic {
  background: rgba(30, 20, 10, 0.08);
  box-shadow: inset 0 0 0 1px var(--pg-border-soft);
}

.inventory .slot.equip-relic-slot {
  background: repeating-linear-gradient(
    45deg,
    rgba(108, 82, 65, 0.06),
    rgba(108, 82, 65, 0.06) 6px,
    rgba(108, 82, 65, 0.12) 6px,
    rgba(108, 82, 65, 0.12) 12px
  );
  border: 1px dashed var(--pg-border) !important;
  border-radius: 8px;
}

.inventory .slot.equip-relic-slot:hover {
  background: rgba(108, 82, 65, 0.16);
  border-color: var(--pg-accent) !important;
}

.inventory .slot.equip-relic-slot i {
  color: var(--pg-ink-soft) !important;
}

/* Relic selection modal (match .card tone) */
#relicSelectModal .modal-content {
  background: var(--pg-card) !important;
  color: var(--pg-ink) !important;
  border: 1px solid var(--pg-border) !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45) !important;
  padding: 18px !important;
}

#relicSelectModal .modal-content h2.blood-text {
  color: var(--pg-wine) !important;
}

#relicSelectModal .chest-modal-close {
  color: var(--pg-ink) !important;
}

/* ==========================================================
   PLAYER MARKETPLACE
   ========================================================== */

.market.card {
  background: var(--pg-card) !important;
  border: 1px solid var(--pg-border) !important;
}

.pm-market-item {
  background: var(--pg-card-light) !important;
  border: 1px solid var(--pg-border) !important;
  border-top: 3px solid var(--rarity-color, var(--pg-border)) !important;
  border-radius: 6px !important;
  box-shadow: none;
  padding: 12px !important;
  transition: transform 0.15s ease;
}

.pm-market-item:hover { transform: translateY(-2px); }

.pm-market-item-img {
  max-width: 64px !important;
  filter: none;
}

.pm-market-item-name {
  color: var(--pg-ink) !important;
  font-size: 13px;
  text-align: center;
  margin-top: 8px !important;
}
.pm-market-item-name b { color: var(--pg-ink) !important; }

.pm-market-item-rarity {
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  font-size: 10px !important;
  text-align: center;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(30, 20, 10, 0.08);
  color: var(--rarity-color, var(--pg-ink-mute)) !important;
  display: inline-block;
  align-self: center;
  border: 1px solid var(--pg-border-soft);
}

.pm-market-item-seller {
  color: var(--pg-ink-soft) !important;
  font-size: 11px !important;
  text-align: center;
}

.pm-market-item-price {
  background: rgba(30, 20, 10, 0.06);
  border: 1px dashed var(--pg-border-soft);
  border-radius: 4px;
  padding: 6px 8px;
  margin: 8px 0 !important;
}

.pm-market-item-price-title {
  color: var(--pg-ink-soft) !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 10px !important;
}

.pm-market-item-price-label {
  color: var(--pg-ink) !important;
  font-weight: 700;
}

.pm-market-item .lines { opacity: 0.3; }

.pm-market-item-view {
  margin-top: 6px !important;
  background: transparent !important;
  border: 1px solid var(--pg-border) !important;
  color: var(--pg-ink) !important;
}

.pm-market-item-view:hover {
  background: rgba(30, 20, 10, 0.06) !important;
}

.pm-market-item-insufficient {
  background: rgba(127, 29, 29, 0.1) !important;
  color: #6a1f1f !important;
  border: 1px solid rgba(127, 29, 29, 0.3) !important;
  border-radius: 4px;
  text-align: center;
  padding: 4px 6px !important;
}

.pm-detail-card {
  background: var(--pg-card) !important;
  border: 1px solid var(--pg-border) !important;
  border-top: 3px solid var(--rarity-color, var(--pg-border)) !important;
  border-radius: 8px !important;
  color: var(--pg-ink);
  box-shadow: none !important;
}

.pm-detail-card h3 {
  color: var(--pg-ink) !important;
  font-size: 18px;
  font-family: inherit;
  font-weight: 800;
}

.pm-detail-rarity {
  background: rgba(30, 20, 10, 0.08);
  color: var(--rarity-color, var(--pg-ink-mute)) !important;
  padding: 3px 10px;
  border-radius: 4px;
  display: inline-block;
  border: 1px solid var(--pg-border-soft);
}

.pm-seller { color: var(--pg-ink-soft) !important; }
.pm-seller-link { color: var(--pg-accent) !important; font-weight: 600; }

/* Pagination inside marketplace — flat */
.page-link {
  background: rgba(30, 20, 10, 0.08) !important;
  border: 1px solid var(--pg-border-soft) !important;
  color: var(--pg-ink) !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  font-weight: 700;
  transition: background 0.15s ease;
}

.page-link:hover:not(.disabled):not(:disabled) {
  background: rgba(30, 20, 10, 0.14) !important;
}

.page-link.active {
  background: var(--pg-card-dark) !important;
  color: var(--pg-ink) !important;
  border-color: var(--pg-border) !important;
  box-shadow: none;
}

.page-link.disabled { opacity: 0.45; cursor: not-allowed; }

/* ==========================================================
   GUILD PAGES
   ========================================================== */

/* List of guilds — flat rows */
.card .menu-link {
  background: var(--pg-card-light) !important;
  border: 1px solid var(--pg-border-soft) !important;
  border-left: 3px solid var(--pg-border) !important;
  border-radius: 6px !important;
  color: var(--pg-ink) !important;
  transition: background 0.15s ease, border-left-color 0.15s ease;
  padding: 10px !important;
}

.card .menu-link:hover {
  background: var(--pg-card-dark) !important;
  border-left-color: var(--pg-accent) !important;
}

.card .menu-link p.font-bold { color: var(--pg-ink) !important; font-size: 14px; }
.card .menu-link p.text-sm.text-gray-400 { color: var(--pg-ink-soft) !important; }

.card .menu-link .text-\[\#7f1d1d\],
.card .menu-link div[class*="text-[#7f1d1d]"] {
  color: var(--pg-wine) !important;
  font-size: 16px;
}

/* Empty rows on dark bg-[#262626] */
.card div.flex.bg-\[\#262626\],
.card div[class*="bg-[#262626]"] {
  background: rgba(30, 20, 10, 0.06) !important;
  border: 1px dashed var(--pg-border-soft) !important;
  border-radius: 6px;
  color: var(--pg-ink-soft) !important;
  padding: 10px !important;
}

/* My-guild vault tiles */
.guild-vault-card {
  background: var(--pg-card-light) !important;
  border: 1px solid var(--pg-border-soft) !important;
  border-left: 3px solid var(--pg-border) !important;
  border-radius: 6px !important;
  padding: 8px 10px !important;
  color: var(--pg-ink) !important;
  box-shadow: none;
}

.guild-vault-card .text-xs,
.guild-vault-card .text-sm { color: var(--pg-ink-soft) !important; }

.guild-vault-card .blood-text {
  color: var(--pg-ink) !important;
  font-weight: 800;
  font-size: 14px;
}

.guild-vault-card .fa-coins { color: #8a5c21 !important; }
.guild-vault-card .fa-gem   { color: var(--pg-red) !important; }

.guild-level-text,
.guild-level-text-sm {
  color: var(--pg-ink-soft);
  font-weight: 700;
}
.guild-level-number { color: var(--pg-accent); }

/* Guild upgrade rows */
.guild-upgrade-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--pg-card-light) !important;
  border: 1px solid var(--pg-border-soft);
  border-radius: 6px;
  padding: 6px 10px;
}

.guild-upgrade-icon-container {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: rgba(30, 20, 10, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--pg-border-soft);
}

.guild-upgrade-icon-container i { color: var(--pg-ink) !important; }

.guild-upgrade-value {
  color: var(--pg-ink);
  font-weight: 700;
  min-width: 52px;
  text-align: right;
  font-size: 12px;
}
.guild-upgrade-value .text-white { color: var(--pg-ink) !important; }

.guild-upgrade-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--pg-border);
  background: var(--pg-card-dark);
  color: var(--pg-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.guild-upgrade-btn:hover:not(:disabled) {
  background: var(--pg-card-light);
}

.guild-upgrade-btn-disabled,
.guild-upgrade-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.guild-upgrade-btn-tooltip {
  position: absolute;
  bottom: calc(100% + 4px);
  right: 0;
  background: #2a2411;
  color: #f0e5c4;
  font-size: 11px;
  padding: 4px 7px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 10;
}

.guild-upgrade-btn:hover .guild-upgrade-btn-tooltip { opacity: 1; }

/* Guild member cards */
.guild-member-card {
  background: var(--pg-card-light) !important;
  border: 1px solid var(--pg-border-soft);
  border-radius: 4px;
  color: var(--pg-ink);
  text-align: center;
  padding: 6px !important;
}

.guild-member-card .text-sm { color: var(--pg-ink-soft) !important; }
.guild-member-card .blood-text {
  color: var(--pg-ink) !important;
  font-weight: 700;
}

/* Leave / Manage buttons — subdued */
.guild-btn-leave {
  background: rgba(127, 29, 29, 0.14) !important;
  border: 1px solid rgba(127, 29, 29, 0.35) !important;
  color: #6a1f1f !important;
  box-shadow: none;
}

.guild-btn-manage {
  background: var(--pg-card-dark) !important;
  border: 1px solid var(--pg-border) !important;
  color: var(--pg-ink) !important;
  box-shadow: none;
}

/* ==========================================================
   INFORMATION PAGE (landing links)
   ========================================================== */

.info-card-link { display: block; }

.grid-card.info-card {
  background-image: none !important;
  background: var(--pg-card-light) !important;
  border: 1px solid var(--pg-border) !important;
  border-top: 3px solid var(--pg-border-soft) !important;
  border-radius: 6px !important;
  padding: 14px 10px !important;
  box-shadow: none !important;
  filter: none !important;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-top-color 0.15s ease, transform 0.15s ease;
}

.info-card-link:hover .grid-card.info-card {
  background: var(--pg-card-dark) !important;
  border-top-color: var(--pg-accent) !important;
  transform: translateY(-2px);
}

.grid-card.info-card i {
  color: var(--pg-wine) !important;
  font-size: 24px !important;
  margin-bottom: 8px !important;
  text-shadow: none;
}

.grid-card.info-card h4 {
  color: var(--pg-ink) !important;
  font-size: 13px !important;
  letter-spacing: 0.2px;
  margin-bottom: 4px !important;
  text-shadow: none;
}

.grid-card.info-card p.text-xs {
  color: var(--pg-ink-soft) !important;
  line-height: 1.35;
  font-size: 11px !important;
}

@media (max-width: 420px) {
  .card.mb-4 > .grid.grid-cols-2.gap-3 {
    grid-template-columns: 1fr !important;
  }
  .grid-card.info-card {
    min-height: 88px;
    padding: 10px !important;
  }
}

/* ==========================================================
   ONLINE PLAYERS PAGE
   ========================================================== */

.online-players-title {
  color: var(--pg-ink) !important;
  font-family: inherit;
  font-weight: 800;
  font-size: 16px !important;
  letter-spacing: 0.2px;
  border-bottom: 1px solid var(--pg-border-soft);
  padding-bottom: 8px;
  margin-bottom: 12px;
  text-shadow: none;
}

.online-players-icon { color: var(--pg-wine) !important; }

.online-player-item {
  background: var(--pg-card-light) !important;
  border: 1px solid var(--pg-border-soft) !important;
  border-left: 3px solid var(--pg-border) !important;
  border-bottom: 1px solid var(--pg-border-soft) !important;
  border-radius: 6px !important;
  box-shadow: none;
  padding: 9px 10px !important;
  transition: background 0.15s ease, border-left-color 0.15s ease;
}

.online-player-item:hover {
  background: var(--pg-card-dark) !important;
  border-left-color: var(--pg-accent) !important;
}

.online-player-default-avatar {
  background: rgba(30, 20, 10, 0.1) !important;
  border: 1px solid var(--pg-border) !important;
}

.online-player-default-avatar i { color: var(--pg-ink-soft) !important; }

.online-player-rank-badge {
  border: 1px solid var(--pg-border) !important;
  background: var(--pg-card-light) !important;
  box-shadow: none;
}

.online-player-username {
  color: var(--pg-ink) !important;
  font-size: 13.5px;
  font-weight: 700;
}

.online-player-guild-tag { color: var(--pg-wine) !important; }

.online-player-admin-badge {
  color: #a15e12 !important;
  text-shadow: none;
}

.online-player-time {
  background: rgba(30, 20, 10, 0.08) !important;
  color: var(--pg-ink-soft) !important;
  border: 1px solid var(--pg-border-soft);
  font-weight: 700;
}

.online-player-time.recent {
  background: rgba(45, 109, 60, 0.18) !important;
  color: var(--pg-green) !important;
  border-color: rgba(45, 109, 60, 0.35);
  text-shadow: none;
}

@media (max-width: 480px) {
  .online-player-item { padding: 8px 10px !important; }
  .online-player-username { font-size: 13px; }
  .online-player-companion,
  .online-player-default-avatar {
    width: 40px !important;
    height: 40px !important;
  }
  .online-player-rank-badge { width: 20px; height: 20px; }
  .online-player-time { font-size: 10px; padding: 3px 6px !important; }
}

/* ==========================================================
   MESSAGES — muted, matches site palette; responsive
   Scoped under .messages-container
   ========================================================== */

.messages-container {
  padding: 0 8px;
}

.messages-container .messages-layout {
  height: calc(100vh - 170px);
  min-height: 540px;
  max-height: 820px;
  background: var(--pg-card);
  border: 1px solid var(--pg-border);
  border-radius: 8px;
  box-shadow: 0px 0px 2px 2px #00000061;
  overflow: hidden;
  display: flex;
}

/* Sidebar */
.messages-container .messages-sidebar {
  width: 290px;
  min-width: 230px;
  background: var(--pg-card-light);
  border: 0;
  border-right: 1px solid var(--pg-border);
  display: flex;
  flex-direction: column;
}

.messages-container .messages-header {
  background: var(--pg-card-dark);
  border-bottom: 1px solid var(--pg-border);
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.messages-container .messages-header .blood-text {
  color: var(--pg-ink) !important;
  text-shadow: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.messages-container .new-message-btn {
  width: 30px;
  height: 30px;
  background: var(--pg-card) !important;
  color: var(--pg-ink) !important;
  border: 1px solid var(--pg-border) !important;
  box-shadow: none !important;
  border-radius: 6px;
  transform: none !important;
}

.messages-container .new-message-btn:hover {
  background: var(--pg-card-light) !important;
  transform: none !important;
}

.messages-container .conversations-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: transparent;
}

.messages-container .conversation-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--pg-card) !important;
  border: 1px solid var(--pg-border-soft) !important;
  border-left: 3px solid transparent !important;
  border-radius: 6px !important;
  cursor: pointer;
  transition: background 0.12s ease, border-left-color 0.12s ease;
  color: var(--pg-ink);
  position: relative;
  min-width: 0;
  transform: none !important;
}

.messages-container .conversation-item:hover {
  background: var(--pg-card-dark) !important;
  border-left-color: var(--pg-border) !important;
}

.messages-container .conversation-item.active {
  background: var(--pg-card-dark) !important;
  border-left-color: var(--pg-accent) !important;
}

.messages-container .conversation-avatar {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--pg-card-dark);
  color: var(--pg-ink);
  border: 1px solid var(--pg-border);
  box-shadow: none;
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.messages-container .conversation-avatar img,
.messages-container .chat-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.messages-container .conversation-content {
  flex: 1;
  min-width: 0;
  display: block;
}

.messages-container .conversation-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 2px;
}

.messages-container .conversation-name {
  color: var(--pg-ink) !important;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.messages-container .conversation-time {
  color: var(--pg-ink-soft) !important;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.messages-container .conversation-preview {
  display: flex;
  align-items: center;
  gap: 6px;
}

.messages-container .conversation-message {
  color: var(--pg-ink-soft) !important;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.messages-container .unread-badge {
  background: var(--pg-wine);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 4px;
  border: 0;
  box-shadow: none;
  margin-left: 0;
}

.messages-container .conversation-name-mobile { display: none; }

/* Empty state */
.messages-container .no-conversations {
  padding: 30px 16px;
  text-align: center;
  color: var(--pg-ink-soft);
}

.messages-container .no-conversations i {
  color: var(--pg-ink-soft);
  opacity: 0.7;
}

.messages-container .new-conversation-btn {
  background: var(--pg-card-dark);
  border: 1px solid var(--pg-border);
  color: var(--pg-ink);
  box-shadow: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 700;
}

.messages-container .new-conversation-btn:hover {
  background: var(--pg-card);
  transform: none;
  box-shadow: none;
}

/* Chat pane */
.messages-container .messages-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--pg-card);
  border: 0;
  min-width: 0;
}

.messages-container .chat-header {
  background: var(--pg-card-dark);
  border-bottom: 1px solid var(--pg-border);
  border-radius: 0;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.messages-container .chat-header h4 {
  color: var(--pg-ink) !important;
  text-shadow: none;
  font-weight: 800;
  font-size: 14px;
  margin: 0;
}

.messages-container .chat-header .text-xs { color: var(--pg-ink-soft) !important; }

.messages-container .chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--pg-card);
  color: var(--pg-ink);
  border: 1px solid var(--pg-border);
  font-weight: 800;
  font-size: 15px;
  box-shadow: none;
  overflow: hidden;
  flex-shrink: 0;
}

.messages-container .view-profile-btn {
  background: var(--pg-card);
  color: var(--pg-ink);
  border: 1px solid var(--pg-border);
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s ease;
}

.messages-container .view-profile-btn:hover {
  background: var(--pg-card-light);
  transform: none;
  box-shadow: none;
}

/* Mobile back button */
.messages-container .chat-back-btn {
  display: none;
  background: var(--pg-card);
  color: var(--pg-ink);
  border: 1px solid var(--pg-border);
  border-radius: 6px;
  padding: 5px 9px;
  font-weight: 700;
  font-size: 12px;
  box-shadow: none;
  cursor: pointer;
  align-items: center;
  gap: 6px;
}

.messages-container .chat-back-btn i { font-size: 12px; }

/* Messages body */
.messages-container .chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--pg-card-light);
}

.messages-container .no-messages {
  text-align: center;
  color: var(--pg-ink-soft);
  padding: 32px 16px;
  font-style: italic;
}

/* Message bubbles — muted, flat */
.messages-container .message {
  max-width: 78%;
  animation: fadeIn 0.25s ease;
}

.messages-container .message-content {
  padding: 8px 12px;
  border-radius: 8px;
  position: relative;
  box-shadow: none;
}

.messages-container .message-sent .message-content {
  background: var(--pg-card-dark) !important;
  color: var(--pg-ink) !important;
  border: 1px solid var(--pg-border);
  border-bottom-right-radius: 3px;
}

.messages-container .message-received .message-content {
  background: var(--pg-card) !important;
  color: var(--pg-ink) !important;
  border: 1px solid var(--pg-border-soft);
  border-bottom-left-radius: 3px;
}

.messages-container .message-text {
  margin: 0;
  line-height: 1.4;
  word-wrap: break-word;
  font-size: 13px;
}

.messages-container .message-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.messages-container .message-time {
  color: var(--pg-ink-soft) !important;
  font-size: 10px;
  font-weight: 600;
}

.messages-container .delete-message-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.55;
  padding: 2px 4px;
  color: var(--pg-ink-soft);
  transition: opacity 0.15s ease;
}

.messages-container .delete-message-btn:hover { opacity: 1; }

/* Chat input */
.messages-container .chat-input-container {
  background: var(--pg-card-dark);
  border-top: 1px solid var(--pg-border);
  padding: 10px 12px;
  display: block !important;
}

.messages-container .chat-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 0;
}

.messages-container #messageInput {
  flex: 1;
  padding: 8px 12px;
  background: var(--pg-card-light);
  border: 1px solid var(--pg-border);
  border-radius: 6px;
  color: var(--pg-ink);
  font-size: 13px;
  resize: none;
  max-height: 140px;
  min-height: 36px;
  line-height: 1.4;
  box-shadow: none;
}

.messages-container #messageInput:focus {
  outline: none;
  border-color: var(--pg-accent);
  box-shadow: none;
}

.messages-container #messageInput::placeholder {
  color: var(--pg-ink-soft);
  opacity: 0.6;
}

.messages-container .send-message-btn {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: var(--pg-card);
  color: var(--pg-ink);
  border: 1px solid var(--pg-border);
  box-shadow: none;
  flex-shrink: 0;
  transition: background 0.12s ease;
}

.messages-container .send-message-btn:hover:not(:disabled) {
  background: var(--pg-card-light);
  transform: none;
  box-shadow: none;
}

.messages-container .send-message-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.messages-container .char-counter {
  color: var(--pg-ink-soft);
  font-size: 10.5px;
  font-weight: 600;
  text-align: right;
  margin-top: 4px;
  padding-right: 4px;
}

.messages-container .no-chat-selected {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
  color: var(--pg-ink-soft);
  text-align: center;
  background: transparent;
}

.messages-container .no-chat-selected i {
  color: var(--pg-ink-soft);
  opacity: 0.55;
  margin-bottom: 10px;
}

.messages-container .no-chat-selected h3 {
  color: var(--pg-ink);
  font-family: inherit;
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 4px;
}

/* Scrollbars */
.messages-container .conversations-list::-webkit-scrollbar,
.messages-container .chat-messages::-webkit-scrollbar {
  width: 6px;
}
.messages-container .conversations-list::-webkit-scrollbar-track,
.messages-container .chat-messages::-webkit-scrollbar-track {
  background: rgba(30, 20, 10, 0.06);
}
.messages-container .conversations-list::-webkit-scrollbar-thumb,
.messages-container .chat-messages::-webkit-scrollbar-thumb {
  background: var(--pg-card-dark);
  border-radius: 3px;
  border: 0;
}

/* New Message Modal */
#newMessageModal.modal-overlay {
  background: rgba(0, 0, 0, 0.6);
}

#newMessageModal .modal-content {
  background: var(--pg-card) !important;
  color: var(--pg-ink) !important;
  border: 1px solid var(--pg-border) !important;
  border-radius: 8px !important;
  box-shadow: 0px 0px 2px 2px #00000061 !important;
  padding: 0 !important;
  max-width: 420px !important;
  width: 92% !important;
  overflow: hidden !important;
  max-height: none !important;
  text-align: left !important;
}

#newMessageModal .modal-header {
  background: var(--pg-card-dark);
  border-bottom: 1px solid var(--pg-border);
  padding: 10px 14px;
  color: var(--pg-ink);
}

#newMessageModal .modal-header .blood-text {
  color: var(--pg-ink) !important;
  font-family: inherit;
  font-weight: 800;
  text-shadow: none;
}

#newMessageModal .modal-close {
  background: transparent;
  color: var(--pg-ink);
  border: 1px solid var(--pg-border-soft);
}

#newMessageModal .modal-close:hover {
  background: rgba(30, 20, 10, 0.08);
}

#newMessageModal .modal-body { padding: 16px 14px 14px; }

#newMessageModal .modal-body label {
  color: var(--pg-ink-soft);
  font-weight: 700;
}

#newMessageModal #newMessageUsername {
  background: var(--pg-card-light) !important;
  color: var(--pg-ink) !important;
  border: 1px solid var(--pg-border) !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
}

#newMessageModal #newMessageUsername:focus {
  outline: none;
  border-color: var(--pg-accent) !important;
  box-shadow: none;
}

#newMessageModal button[type="submit"] {
  background: var(--pg-card-dark) !important;
  border: 1px solid var(--pg-border) !important;
  color: var(--pg-ink) !important;
  box-shadow: none;
  border-radius: 6px !important;
}

#newMessageModal button[type="button"] {
  background: var(--pg-card) !important;
  color: var(--pg-ink) !important;
  border: 1px solid var(--pg-border) !important;
  box-shadow: none;
  border-radius: 6px !important;
}

#newMessageModal #usernameError {
  color: #6a1f1f !important;
  background: rgba(127, 29, 29, 0.12);
  border: 1px solid rgba(127, 29, 29, 0.3);
  padding: 5px 9px;
  border-radius: 4px;
  font-weight: 700;
}

/* Responsive: tablet */
@media (max-width: 900px) {
  .messages-container .messages-sidebar {
    width: 230px;
    min-width: 210px;
  }
}

/* Responsive: mobile (single pane) */
@media (max-width: 720px) {
  .messages-container { padding: 0; }
  .messages-container .messages-layout {
    flex-direction: column;
    height: calc(100dvh - 130px);
    max-height: none;
    min-height: 420px;
    border-radius: 8px;
  }
  .messages-container.mobile-in-chat .messages-sidebar { display: none; }
  .messages-container:not(.mobile-in-chat) .messages-chat { display: none; }
  .messages-container .messages-sidebar {
    width: 100%;
    min-width: 0;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--pg-border);
  }
  .messages-container .conversations-list {
    padding: 8px;
    gap: 6px;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .messages-container .conversation-item {
    max-width: none;
    min-width: 0;
    background: var(--pg-card) !important;
  }
  .messages-container .conversation-avatar {
    width: 44px;
    height: 44px;
    font-size: 17px;
  }
  .messages-container .conversation-content { display: block !important; }
  .messages-container .conversation-name-mobile { display: none !important; }
  .messages-container .chat-back-btn { display: inline-flex; }
  .messages-container .chat-header h4 { font-size: 13px; }
  .messages-container .chat-messages { padding: 12px; gap: 7px; }
  .messages-container .message { max-width: 88%; }
  .messages-container .message-text { font-size: 12.5px; }
  .messages-container #messageInput { font-size: 13px; }
  .messages-container .send-message-btn { width: 36px; height: 36px; }
  .messages-container .conversation-badge-mobile { display: none !important; }
}

@media (max-width: 420px) {
  .messages-container .messages-layout {
    height: calc(100dvh - 110px);
    border-radius: 6px;
  }
  .messages-container .messages-header { padding: 9px 11px; }
  .messages-container .messages-header .blood-text { font-size: 13px; }
  .messages-container .chat-header { padding: 7px 10px; }
  .messages-container .chat-avatar { width: 32px; height: 32px; font-size: 13px; }
  .messages-container .chat-input-container { padding: 8px 10px; }
}


/* ============================================================
   RELICS + PLAYER MARKETPLACE — extra polish (still muted)
   Adds: subtle rarity tint, framed item "sockets", better
   hierarchy, quiet corner accents. No gradients/glows.
   ============================================================ */

/* ---- Rarity palette (CSS vars consumed by rules below) ---- */
.relic-card[data-rarity="common"]    { --r-tint: 156, 163, 175; --r-color: #7a7f89; }
.relic-card[data-rarity="uncommon"]  { --r-tint:  34, 197,  94; --r-color: #2d7a45; }
.relic-card[data-rarity="rare"]      { --r-tint:  59, 130, 246; --r-color: #2f5ea8; }
.relic-card[data-rarity="epic"]      { --r-tint: 168,  85, 247; --r-color: #6b3d9e; }
.relic-card[data-rarity="legendary"] { --r-tint: 217, 150,  55; --r-color: #8a5a2b; }
.relic-card[data-rarity="mythic"]    { --r-tint: 200,  70,  70; --r-color: #8a2d2d; }

/* ==========================================================
   RELICS — collection cards
   ========================================================== */

.relic-card {
  /* Tan base with ~7% rarity tint layered on — stays muted */
  background:
    linear-gradient(180deg, rgba(var(--r-tint, 171, 153, 133), 0.08), rgba(var(--r-tint, 171, 153, 133), 0.02)),
    var(--pg-card) !important;
  border: 1px solid var(--pg-border) !important;
  border-top: 3px solid var(--r-color, var(--pg-border)) !important;
  padding: 14px 12px 12px !important;
  position: relative;
  overflow: hidden;
}

/* Quiet corner ornament — a single dark diagonal sliver, no glow */
.relic-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(225deg, rgba(42, 36, 17, 0.25) 0 50%, transparent 50%);
  pointer-events: none;
}

/* Header row: icon socket + title block */
.relic-card .flex.items-start.mb-2 {
  align-items: center !important;
  gap: 10px;
  margin-bottom: 10px !important;
}

/* Item "socket" — dark inset well so relic art reads like a collectible */
.relic-card .relic-icon {
  width: 56px !important;
  height: 56px !important;
  margin-right: 0 !important;
  background:
    radial-gradient(circle at 30% 25%, rgba(0, 0, 0, 0.06), transparent 55%),
    rgba(30, 20, 10, 0.16) !important;
  border: 1px solid var(--pg-border) !important;
  border-radius: 5px !important;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03) !important;
  flex-shrink: 0;
}

.relic-card .relic-icon img {
  width: 44px !important;
  height: 44px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4));
}

/* Name block */
.relic-card .flex-1 { min-width: 0; }

.relic-card h4 {
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0.2px;
  margin-bottom: 4px !important;
  color: var(--r-color, var(--pg-ink)) !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Rarity chip — flat, no background gradient */
.relic-card .flex-1 span.text-xs {
  background: rgba(var(--r-tint), 0.15) !important;
  color: var(--r-color) !important;
  border: 1px solid rgba(var(--r-tint), 0.35);
  font-weight: 700;
  font-size: 10px !important;
  padding: 1px 7px !important;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* Description reads as italic body copy */
.relic-card p.text-xs.text-gray-200 {
  color: var(--pg-ink-soft) !important;
  font-style: italic;
  line-height: 1.4;
  font-size: 11.5px !important;
  margin: 0 0 10px !important;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--pg-border-soft);
}

/* Stat rows — tidy two-column feel without a grid rewrite */
.relic-card .text-xs.mb-2 {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px !important;
  font-size: 12px !important;
}

.relic-card .text-xs.mb-2 > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.relic-card .text-xs.mb-2 > div > span:first-child {
  color: var(--pg-ink-soft) !important;
  min-width: 70px;
}

.relic-card .blood-text-light {
  color: var(--pg-ink) !important;
  font-weight: 800;
}

.relic-card .text-green-400 {
  color: var(--pg-green) !important;
  font-weight: 700;
}

/* Equipped badge — inline banner above the header row, no overlap */
.relic-card .equiped-relic {
  position: static !important;
    display: block;
    width: fit-content;
    margin: 0 18px 8px auto !important;
    background: #60dca296 !important;
    color: #fffff6 !important;
    border: 1px solid #89ce9a !important;
    padding: 2px 9px !important;
    border-radius: 3px !important;
    font-size: 9.5px !important;
    font-weight: 500;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

/* Bottom actions row */
.relic-card .flex.gap-2.mt-auto {
  gap: 6px !important;
  padding-top: 8px;
  border-top: 1px solid var(--pg-border-soft);
}

/* Upgrade / Equip — dark brown panel, cream text (primary CTA) */
.relic-card .relic-upgrade-btn,
.relic-card .equip-relic-btn {
  background: #3a2a18 !important;
  color: #f3e9d2 !important;
  border: 1px solid #1f140a !important;
  box-shadow: inset 0 1px 0 rgba(255, 220, 170, 0.08),
              0 1px 0 rgba(0, 0, 0, 0.15) !important;
  padding: 7px 10px !important;
  font-size: 11.5px !important;
  border-radius: 5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px;
}

.relic-card .relic-upgrade-btn:hover:not(:disabled),
.relic-card .equip-relic-btn:hover {
  background: #4a3621 !important;
  color: #fff4d8 !important;
}

.relic-card .relic-upgrade-btn:disabled,
.relic-card .relic-upgrade-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.relic-card .relic-upgrade-btn > div {
  justify-content: space-between;
  padding: 0 !important;
}

.relic-card .relic-upgrade-btn .fa-coins,
.relic-card .relic-upgrade-btn .text-yellow-400 {
  color: #e8c568 !important;
  text-shadow: none;
}

/* Unequip — wine red panel, cream text (danger CTA) */
.relic-card .unequip-relic-btn {
  background: #5a1f1f !important;
  color: #f3e4d2 !important;
  border: 1px solid #2f1010 !important;
  box-shadow: inset 0 1px 0 rgba(255, 200, 170, 0.08),
              0 1px 0 rgba(0, 0, 0, 0.15) !important;
  padding: 7px 12px !important;
  font-size: 11.5px !important;
  border-radius: 5px !important;
  min-width: 74px;
  text-align: center;
  font-weight: 800 !important;
  letter-spacing: 0.3px;
}

.relic-card .unequip-relic-btn:hover {
  background: #6e2828 !important;
  color: #fff1df !important;
}

/* Max-level plate — readable green */
.relic-card .flex-1.text-center.text-green-400 {
  background: #2d5f3a !important;
  border: 1px solid #1f4327 !important;
  color: #f3e9d2 !important;
  border-radius: 5px !important;
  padding: 7px 8px !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 200, 0.08);
}

/* ==========================================================
   RELICS — Equipped slots strip (the 8 slots up top)
   ========================================================== */

.card .inventory {
  gap: 8px;
  padding: 10px;
  background: rgba(30, 20, 10, 0.08);
  border-radius: 6px;
  border: 1px solid var(--pg-border-soft);
}

.card .inventory .slot {
  /* background:
    radial-gradient(circle at 30% 25%, rgba(0, 0, 0, 0.06), transparent 55%),
    rgba(30, 20, 10, 0.14) !important; */
  border-radius: 5px;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: transform 0.15s ease;
}

.card .inventory .slot.unequip-relic {
  border-width: 2px !important;
  padding: 4px !important;
}

.card .inventory .slot.unequip-relic:hover {
  transform: translateY(-2px);
}

.card .inventory .slot.unequip-relic img {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45)) !important;
}

.card .inventory .slot.equip-relic-slot {
  background: repeating-linear-gradient(
    45deg,
    rgba(108, 82, 65, 0.06),
    rgba(108, 82, 65, 0.06) 6px,
    rgba(108, 82, 65, 0.14) 6px,
    rgba(108, 82, 65, 0.14) 12px
  ) !important;
  box-shadow: none;
  border: 1px dashed var(--pg-border) !important;
}

/* ==========================================================
   PLAYER MARKETPLACE — listing cards
   ========================================================== */

.pm-market-item {
  /* 7% rarity tint on the tan base */
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--rarity-color, #866c5b) 7%, var(--pg-card-light)),
      color-mix(in srgb, var(--rarity-color, #866c5b) 2%, var(--pg-card-light))) !important;
  border: 1px solid var(--pg-border) !important;
  border-top: 3px solid var(--rarity-color, var(--pg-border)) !important;
  padding: 14px 12px 12px !important;
  position: relative;
  overflow: hidden;
  display: flex !important;
  flex-direction: column !important;
}

/* Quiet corner sliver (matches relic cards) */
.pm-market-item::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 14px;
  height: 14px;
  background: linear-gradient(225deg, rgba(42, 36, 17, 0.25) 0 50%, transparent 50%);
  pointer-events: none;
}

/* Framed image socket — dark inset well */
.pm-market-item-image {
  align-self: center;
  width: 84px;
  height: 84px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(0, 0, 0, 0.05), transparent 55%),
    rgba(30, 20, 10, 0.16);
  border: 1px solid var(--pg-border);
  border-radius: 6px;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  padding: 6px;
  margin-bottom: 8px;
}

.pm-market-item-img {
  max-width: 64px !important;
  max-height: 64px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

/* Name — centered, bold, thin divider under */
.pm-market-item-name {
  color: var(--pg-ink) !important;
  font-size: 13px !important;
  font-weight: 800;
  text-align: center;
  margin: 0 0 4px !important;
  padding-bottom: 4px;
  line-height: 1.25;
  position: relative;
}

.pm-market-item-name b { color: var(--pg-ink) !important; font-weight: 800; }

.pm-market-item-name::after {
  content: "";
  display: block;
  width: 44px;
  height: 1px;
  background: var(--pg-border);
  margin: 6px auto 0;
}

/* Rarity chip */
.pm-market-item-rarity {
  align-self: center;
  background: rgba(0, 0, 0, 0.06) !important;
  color: var(--rarity-color, var(--pg-ink-mute)) !important;
  border: 1px solid var(--pg-border-soft);
  padding: 2px 8px !important;
  border-radius: 3px !important;
  font-size: 9.5px !important;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin: 2px 0 !important;
}

.pm-market-item-seller {
  text-align: center;
  color: var(--pg-ink-soft) !important;
  font-size: 11px !important;
  margin: 6px 0 !important;
}

.pm-market-item-seller img {
  max-width: 14px !important;
  vertical-align: middle;
}

/* Price plate */
.pm-market-item-price {
  background: rgba(30, 20, 10, 0.08) !important;
  border: 1px solid var(--pg-border-soft) !important;
  border-radius: 5px !important;
  padding: 6px 8px !important;
  margin: 6px 0 10px !important;
  text-align: center;
}

.pm-market-item-price-title {
  display: none !important;
}

.pm-market-item-price-label {
  color: var(--pg-ink) !important;
  font-weight: 800;
  font-size: 13px;
  padding: 0 !important;
  background: transparent !important;
  display: inline-block;
  margin: 0 4px;
}

.pm-market-item-price-label .fa-coins { color: #8a5c21 !important; }
.pm-market-item-price-label .fa-gem   { color: #8a2d2d !important; }

.pm-market-item .lines { display: none !important; }

/* Actions: stack cleanly */
.pm-market-item-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto !important;
}

.pm-market-item-actions .button {
  width: 100%;
  padding: 7px 10px !important;
  font-size: 12px !important;
  border-radius: 5px !important;
  margin: 0 !important;
}

/* Buy Item — primary CTA, dark brown with cream text */
.pm-market-item-buy {
  background: #3a2a18 !important;
  color: #f3e9d2 !important;
  border: 1px solid #1f140a !important;
  box-shadow: inset 0 1px 0 rgba(255, 220, 170, 0.08),
              0 1px 0 rgba(0, 0, 0, 0.15) !important;
  font-weight: 800 !important;
  letter-spacing: 0.4px;
  text-transform: none;
}

.pm-market-item-buy:hover:not([disabled]) {
  background: #4a3621 !important;
  color: #fff4d8 !important;
}

.pm-market-item-buy[disabled],
.pm-market-item-buy:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* View Details — ghost outline, but strong readable ink text */
.pm-market-item-view {
  background: rgba(30, 20, 10, 0.04) !important;
  color: var(--pg-ink) !important;
  border: 1px solid var(--pg-border) !important;
  box-shadow: none !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px;
}

.pm-market-item-view:hover {
  background: rgba(30, 20, 10, 0.12) !important;
  border-color: var(--pg-ink-soft) !important;
  color: var(--pg-ink) !important;
}

.pm-market-item-rank-required {
  background: rgba(127, 29, 29, 0.08) !important;
  border: 1px solid rgba(127, 29, 29, 0.3) !important;
  border-radius: 4px;
  padding: 4px 6px !important;
  color: #6a1f1f !important;
  text-align: center;
  margin-bottom: 0 !important;
}

.pm-market-item-insufficient {
  margin-bottom: 0 !important;
}

/* ==========================================================
   PLAYER MARKETPLACE — detail card
   ========================================================== */

.pm-detail-card {
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--rarity-color, #866c5b) 7%, var(--pg-card)),
      color-mix(in srgb, var(--rarity-color, #866c5b) 2%, var(--pg-card))) !important;
  border: 1px solid var(--pg-border) !important;
  border-top: 3px solid var(--rarity-color, var(--pg-border)) !important;
  border-radius: 8px !important;
  padding: 18px !important;
  position: relative;
  overflow: hidden;
}

.pm-detail-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background: linear-gradient(225deg, rgba(42, 36, 17, 0.25) 0 50%, transparent 50%);
  pointer-events: none;
}

.pm-detail-card h3 {
  color: var(--rarity-color, var(--pg-ink)) !important;
  font-size: 20px !important;
  font-weight: 800;
  letter-spacing: 0.3px;
  margin-bottom: 6px !important;
  text-align: center;
}

.pm-detail-image {
  max-width: 128px !important;
  max-height: 128px !important;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
  padding: 10px;
  background:
    radial-gradient(circle at 30% 25%, rgba(0, 0, 0, 0.06), transparent 55%),
    rgba(30, 20, 10, 0.16);
  border: 1px solid var(--pg-border);
  border-radius: 8px;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.pm-detail-rarity {
  background: rgba(0, 0, 0, 0.06) !important;
  color: var(--rarity-color, var(--pg-ink-mute)) !important;
  border: 1px solid var(--pg-border-soft);
  padding: 2px 10px !important;
  border-radius: 3px !important;
  font-size: 10px !important;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 800;
}

.pm-detail-card .lines { display: none !important; }

.pm-detail-card .label {
  background: rgba(30, 20, 10, 0.08) !important;
  border: 1px solid var(--pg-border-soft);
  color: var(--pg-ink) !important;
  padding: 4px 10px !important;
  border-radius: 4px;
  font-weight: 700;
  margin: 0 4px !important;
}

.pm-detail-card .label .fa-coins { color: #8a5c21 !important; }
.pm-detail-card .label .fa-gem   { color: #8a2d2d !important; }

.pm-detail-buy-btn {
  background: var(--pg-card-dark) !important;
  color: var(--pg-ink) !important;
  border: 1px solid var(--pg-border) !important;
  box-shadow: none !important;
  border-radius: 5px !important;
  padding: 8px 18px !important;
  font-weight: 800;
}

.pm-detail-buy-btn:hover:not([disabled]) {
  background: var(--pg-card) !important;
}

/* ==========================================================
   Responsive tweaks
   ========================================================== */

@media (max-width: 520px) {
  .relic-card .relic-icon {
    width: 48px !important;
    height: 48px !important;
  }
  .relic-card .relic-icon img { width: 38px !important; height: 38px !important; }
  .relic-card h4 { font-size: 13px !important; }

  .pm-market-item {
    min-width: 150px !important;
    max-width: none !important;
    flex: 1 0 46% !important;
    padding: 12px 10px 10px !important;
  }
  .pm-market-item-image { width: 72px; height: 72px; }
  .pm-market-item-img   { max-width: 56px !important; max-height: 56px !important; }
  .pm-market-item-name  { font-size: 12px !important; }
  .pm-market-item-price-label { font-size: 12px; }
}

/* =========================
   Level-up modal (RPG parchment)
   ========================= */
.levelup-card {
  border: 4px solid #866c5b;
  border-radius: 14px;
  background: rgba(209, 195, 172, 0.98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  color: #2b231c;
  padding: 0 !important;
}

.levelup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 10px;
  background: rgba(0, 0, 0, 0.38);
  border-bottom: 1px solid rgba(134, 108, 91, 0.7);
  position: relative;
}

.levelup-header::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 222, 179, 0.55), transparent);
}

.levelup-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.levelup-icon-tile {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(245, 222, 179, 0.35);
  color: #f5deb3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  text-shadow: 0 0 8px rgba(245, 222, 179, 0.5);
}

.levelup-title-text {
  min-width: 0;
}

.levelup-h1 {
  font-family: "Cinzel Decorative", cursive;
  font-weight: 700;
  color: #f5deb3;
  font-size: 16px;
  letter-spacing: 0.6px;
  text-align: left;
  margin: 0;
  line-height: 1.1;
}

.levelup-sub {
  font-size: 12px;
  color: rgba(245, 222, 179, 0.85);
  margin-top: 2px;
  text-align: left;
}

.levelup-new-rank {
  color: #f5deb3;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
}
.levelup-new-rank img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(245, 222, 179, 0.5));
}

.levelup-close {
  appearance: none;
  border: 1px solid rgba(245, 222, 179, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(245, 222, 179, 0.95);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.levelup-close:hover {
  background: rgba(0, 0, 0, 0.55);
  transform: translateY(-1px);
}

.levelup-body { padding: 14px 12px 12px; }

.levelup-rewards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.levelup-reward {
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(134, 108, 91, 0.35);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  min-width: 0;
}

.levelup-reward-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 900;
  font-size: 11px;
  color: rgba(38, 35, 28, 0.85);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.levelup-reward-label i { color: #8b6a3e; }
.levelup-reward:nth-child(1) .levelup-reward-label i { color: #c88f2b; }
.levelup-reward:nth-child(2) .levelup-reward-label i { color: #b63333; }
.levelup-reward:nth-child(3) .levelup-reward-label i { color: #b8860b; }

.levelup-reward-value {
  margin-top: 4px;
  font-weight: 900;
  font-size: 18px;
  color: #2b231c;
  font-family: "Cinzel Decorative", cursive;
  letter-spacing: 0.3px;
}

.levelup-unlock {
  margin-top: 12px;
  background: rgba(245, 222, 179, 0.18);
  border: 1px solid rgba(134, 108, 91, 0.35);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #3a2d22;
  font-weight: 700;
  font-size: 12.5px;
}
.levelup-unlock i { color: #b8860b; }

.levelup-btn {
  margin-top: 14px;
  width: 100%;
  appearance: none;
  border: 1px solid rgba(245, 222, 179, 0.25);
  background: rgba(0, 0, 0, 0.78);
  color: #f5deb3;
  font-family: "Cinzel Decorative", cursive;
  font-weight: 700;
  letter-spacing: 0.8px;
  font-size: 14px;
  padding: 11px 16px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(245, 222, 179, 0.08);
}
.levelup-btn:hover {
  background: rgba(0, 0, 0, 0.92);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(245, 222, 179, 0.12);
}
.levelup-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(245, 222, 179, 0.08);
}
.levelup-btn i { font-size: 13px; }

@media (max-width: 380px) {
  .levelup-rewards { grid-template-columns: 1fr 1fr; }
  .levelup-reward:nth-child(3) { grid-column: span 2; }
  .levelup-reward-value { font-size: 16px; }
  .levelup-h1 { font-size: 15px; }
}

/* ====================================================================
   ITEM BONUS ROWS  (2026-04-15 tooltip & preview rebuild)
   A 3-column grid used in both the hover tooltip and the item-info
   stat board:  [ icon ] [ label .................. ] [ value ]
   ==================================================================== */

.item-bonus-row {
  display: grid !important;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px !important;
  margin: 4px 0 !important;
  border-radius: 7px !important;
  background: linear-gradient(180deg, rgba(249, 231, 197, 0.18), rgba(249, 231, 197, 0.05)) !important;
  border: 1px solid rgba(212, 175, 55, 0.28) !important;
  color: #f3e6c6 !important;
  font-weight: 500 !important;
  /* Override .info-div flex behaviour */
  flex-direction: initial !important;
  justify-content: initial !important;
  align-items: center !important;
}

.item-bonus-row .ib-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: #f0c75e;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.4);
}
.item-bonus-row .ib-icon img {
  max-width: 24px;
  max-height: 24px;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.75));
}

.item-bonus-row .ib-label {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: #e8d5a8;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
  text-align: left;
  line-height: 1.15;
}

.item-bonus-row .ib-value {
  font-family: 'Cinzel Decorative', 'Cinzel', 'Georgia', serif;
  font-weight: 700;
  font-size: 15px;
  color: #ffd96b;
  text-shadow: 0 0 6px rgba(255, 217, 107, 0.38), 0 1px 0 rgba(0, 0, 0, 0.7);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* Positive / primary (gold) — default */
.item-bonus-positive .ib-icon  { color: #f0c75e; }
.item-bonus-positive .ib-value { color: #ffd96b; }

/* Secondary "traits" — amethyst */
.item-bonus-secondary {
  background: linear-gradient(180deg, rgba(183, 115, 250, 0.16), rgba(183, 115, 250, 0.04)) !important;
  border-color: rgba(183, 115, 250, 0.32) !important;
}
.item-bonus-secondary .ib-icon {
  background: rgba(40, 12, 60, 0.6);
  border-color: rgba(183, 115, 250, 0.5);
  color: #d6b4ff;
}
.item-bonus-secondary .ib-label { color: #e8d9ff; }
.item-bonus-secondary .ib-value {
  color: #d6b4ff;
  text-shadow: 0 0 6px rgba(183, 115, 250, 0.4), 0 1px 0 rgba(0, 0, 0, 0.7);
}

/* Debuff / curse — blood red with subtle crack */
.item-bonus-negative {
  background: linear-gradient(180deg, rgba(229, 92, 92, 0.18), rgba(229, 92, 92, 0.05)) !important;
  border-color: rgba(229, 92, 92, 0.45) !important;
  position: relative;
}
.item-bonus-negative::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    repeating-linear-gradient(115deg, transparent 0 22px, rgba(229, 92, 92, 0.08) 22px 23px);
  opacity: 0.6;
}
.item-bonus-negative .ib-icon {
  background: rgba(60, 12, 12, 0.65);
  border-color: rgba(229, 92, 92, 0.6);
  color: #ff9090;
}
.item-bonus-negative .ib-label { color: #ffb3b3; }
.item-bonus-negative .ib-value {
  color: #ff6b6b;
  text-shadow: 0 0 6px rgba(255, 82, 82, 0.45), 0 1px 0 rgba(0, 0, 0, 0.7);
}

/* -------- Section wrappers & their titles ---------------------------- */
.item-bonus-section        { margin-bottom: 8px; }
.item-bonus-section:last-child { margin-bottom: 0; }

.item-bonus-section-title {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #d4af37;
  margin: 6px 2px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.item-bonus-section-title i { font-size: 11px; }
.item-bonus-section-title::before,
.item-bonus-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.55), transparent);
}
.item-bonus-section-title-curse {
  color: #ff6b6b;
}
.item-bonus-section-title-curse::before,
.item-bonus-section-title-curse::after {
  background: linear-gradient(90deg, transparent, rgba(229, 92, 92, 0.55), transparent);
}

/* ====================================================================
   TOOLTIP scoping  — enlarge the outer bubble & let the rows breathe
   ==================================================================== */

.item-tooltip-bonuses {
  /* Overrides inline min/max width set in allItems.php / equipedItems.php */
  min-width: 300px !important;
  max-width: 360px !important;
}

/* --------------------------------------------------------------------
   COMPACT inventory hover tooltip — icon + value pills on a single
   wrapping row. Used by allItems.php and equipedItems.php hover cards.
   The outer .item-tooltip-bonuses element is positioned via JS (fixed),
   the compact variant just shrinks the chrome down drastically.
   -------------------------------------------------------------------- */
.item-tooltip-bonuses.item-tooltip-compact {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10000;
  pointer-events: none;
  min-width: 0 !important;
  max-width: 240px !important;
  padding: 6px 8px 7px;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.97) 0%, rgba(45, 45, 45, 0.97) 100%);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
  /* Border color comes from rarity via an inline style set in PHP */
}
.item-tooltip-bonuses.item-tooltip-compact .ittc-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  padding-bottom: 4px;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.item-tooltip-bonuses.item-tooltip-compact .ittc-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 170px;
}
.item-tooltip-bonuses.item-tooltip-compact .ittc-lock {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #fca5a5;
  font-size: 10px;
}
.item-tooltip-bonuses.item-tooltip-compact .ittc-lock img {
  width: 12px;
  height: 12px;
  object-fit: contain;
}
.item-tooltip-bonuses.item-tooltip-compact .ittc-empty {
  font-size: 10px;
  font-style: italic;
  color: #9ca3af;
  text-align: center;
  padding: 2px 0;
}
.item-tooltip-bonuses.item-tooltip-compact .ittc-arrow {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid currentColor;
}

/* --- compact bonus pills (icon + value, no labels) ------------------- */
.ib-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 4px;
  align-items: center;
}
.ib-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 5px 1px 3px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 600;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f3e6c6;
  white-space: nowrap;
}
.ib-pill img {
  width: 12px;
  height: 12px;
  object-fit: contain;
  flex-shrink: 0;
}
.ib-pill i {
  font-size: 9px;
  width: 12px;
  text-align: center;
  flex-shrink: 0;
}
.ib-pill .ib-pill-val {
  font-variant-numeric: tabular-nums;
}
.ib-pill-positive {
  border-color: rgba(212, 175, 55, 0.38);
  color: #fde68a;
}
.ib-pill-secondary {
  border-color: rgba(183, 115, 250, 0.38);
  color: #ddd6fe;
}
.ib-pill-negative {
  border-color: rgba(229, 92, 92, 0.5);
  color: #fecaca;
  background: rgba(80, 20, 20, 0.55);
}
.tooltip-bonuses-content {
  font-size: 13px !important;
  color: #f3e6c6 !important;
}
.tooltip-bonuses-content .item-bonus-row {
  padding: 6px 9px !important;
  margin: 3px 0 !important;
}
.tooltip-bonuses-content .item-bonus-row .ib-label { font-size: 12.5px; }
.tooltip-bonuses-content .item-bonus-row .ib-value { font-size: 14px; }
.tooltip-bonuses-content .item-bonus-row .ib-icon  { width: 26px; height: 26px; }
.tooltip-bonuses-content .item-bonus-row .ib-icon img { max-width: 20px; max-height: 20px; }

.tooltip-bonuses-content .item-bonus-section-title {
  font-size: 10px;
  letter-spacing: 0.2em;
  margin: 4px 2px 3px;
}

/* Defeat the legacy .info-div override that zeroed the backgrounds.
   The new .item-bonus-row rules are more specific; these remove the
   old silent resets so nothing forces transparent / neutral again. */
.tooltip-bonuses-content .info-div.item-bonus-row {
  border: 1px solid rgba(212, 175, 55, 0.28) !important;
  color: inherit !important;
}
.tooltip-bonuses-content .info-div.item-bonus-row.item-bonus-secondary {
  border-color: rgba(183, 115, 250, 0.32) !important;
}
.tooltip-bonuses-content .info-div.item-bonus-row.item-bonus-negative {
  border-color: rgba(229, 92, 92, 0.45) !important;
}
.tooltip-bonuses-content .info-div.item-bonus-row p { margin: 0 !important; }

/* ====================================================================
   ITEM INFO STAT BOARD  — the preview screen card
   ==================================================================== */

.item-info-panel {
  width: 100%;
  max-width: 440px;
  margin: 14px auto 0;
  padding: 16px 14px;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 60%),
    linear-gradient(160deg, #1a1410 0%, #2a1f18 50%, #1a1410 100%);
  border: 2px solid rgba(212, 175, 55, 0.45);
  border-radius: 12px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.55),
    inset 0 0 30px rgba(0, 0, 0, 0.45);
  position: relative;
}
.item-info-panel::before {
  content: '';
  position: absolute;
  inset: 5px;
  pointer-events: none;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
}

.item-info-panel .item-bonus-section-title {
  font-size: 12px;
  letter-spacing: 0.25em;
  margin: 8px 2px 6px;
}

.item-info-panel .item-bonus-row {
  padding: 9px 12px !important;
  margin: 5px 0 !important;
}
.item-info-panel .item-bonus-row .ib-icon {
  width: 34px; height: 34px;
}
.item-info-panel .item-bonus-row .ib-icon img {
  max-width: 26px; max-height: 26px;
}
.item-info-panel .item-bonus-row .ib-label { font-size: 14px; }
.item-info-panel .item-bonus-row .ib-value { font-size: 16px; }

.item-info-empty {
  text-align: center;
  color: rgba(243, 230, 198, 0.6);
  font-style: italic;
  padding: 14px 0;
  letter-spacing: 0.05em;
}

/* ---- Description (parchment scroll) panel ------------------------- */
.item-info-description {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 12px auto 0;
  padding: 18px 22px 16px;
  color: #ead9b2;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.0) 0px,
      rgba(0, 0, 0, 0.0) 2px,
      rgba(212, 175, 55, 0.025) 2px,
      rgba(212, 175, 55, 0.025) 3px
    ),
    radial-gradient(120% 70% at 50% 0%, rgba(212, 175, 55, 0.06) 0%, transparent 60%),
    linear-gradient(165deg, #1c1510 0%, #241a12 50%, #1a120c 100%);
  border-top: 1px solid rgba(212, 175, 55, 0.5);
  border-bottom: 1px solid rgba(212, 175, 55, 0.5);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.45),
    inset 0 0 26px rgba(0, 0, 0, 0.55);
}
.item-info-description::before,
.item-info-description::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1px;
  background: rgba(212, 175, 55, 0.22);
  pointer-events: none;
}
.item-info-description::before { top: 4px; }
.item-info-description::after  { bottom: 4px; }

.item-info-description .iid-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: rgba(212, 175, 55, 0.65);
  border-style: solid;
  border-width: 0;
  pointer-events: none;
}
.item-info-description .iid-corner.iid-tl { top: 2px;    left: 2px;    border-top-width: 2px;    border-left-width: 2px;  }
.item-info-description .iid-corner.iid-tr { top: 2px;    right: 2px;   border-top-width: 2px;    border-right-width: 2px; }
.item-info-description .iid-corner.iid-bl { bottom: 2px; left: 2px;    border-bottom-width: 2px; border-left-width: 2px;  }
.item-info-description .iid-corner.iid-br { bottom: 2px; right: 2px;   border-bottom-width: 2px; border-right-width: 2px; }

.item-info-description .iid-label {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.85);
  text-align: center;
  margin: 0 0 8px;
  position: relative;
}
.item-info-description .iid-label::before,
.item-info-description .iid-label::after {
  content: '';
  display: inline-block;
  width: 38px;
  height: 1px;
  vertical-align: middle;
  margin: 0 10px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.55), transparent);
}

.item-info-description .iid-text {
  font-family: 'Lora', Georgia, 'Cinzel', serif;
  font-style: italic;
  font-size: 14px;
  line-height: 1.6;
  color: #ead9b2;
  text-align: center;
  margin: 0;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
  quotes: "\201C" "\201D";
}
.item-info-description .iid-text::before {
  content: open-quote;
  font-family: 'Cinzel Decorative', Georgia, serif;
  font-style: normal;
  font-size: 22px;
  line-height: 0;
  color: rgba(212, 175, 55, 0.75);
  margin-right: 4px;
  vertical-align: -6px;
}
.item-info-description .iid-text::after {
  content: close-quote;
  font-family: 'Cinzel Decorative', Georgia, serif;
  font-style: normal;
  font-size: 22px;
  line-height: 0;
  color: rgba(212, 175, 55, 0.75);
  margin-left: 4px;
  vertical-align: -10px;
}

/* ---- Portrait / header for the item info page -------------------- */
.item-info-header {
  text-align: center;
  padding-bottom: 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}
.item-info-header .iih-portrait-wrap {
  display: inline-block;
  position: relative;
  padding: 6px;
  margin-bottom: 10px;
  border-radius: 10px;
  background:
    radial-gradient(50% 50% at 50% 50%, rgba(212, 175, 55, 0.22), rgba(0, 0, 0, 0) 70%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.15));
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.15), inset 0 0 14px rgba(0, 0, 0, 0.45);
  width: 200px;
  height: 200px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(#fffdfa, #decfc373, #b3a48dfc);
}
.item-info-header .iih-portrait-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--iih-rarity, #d4af37);
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 10px var(--iih-rarity, #d4af37) inset;
  opacity: 0.85;
}
.item-info-header .iih-portrait-wrap img {
  position: relative;
  display: block;
  max-width: 200px;
  max-height: 200px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.7));
}
.iih-portrait-wrap img {
  filter: drop-shadow(0 2px 6px var(--iih-rarity)) !important;
}
.item-info-header .iih-name {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: 20px;
  font-weight: 700;
  margin: 2px 0 6px 0;
  /* text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6); */
  line-height: 1.2;
  background: #201710;
  padding: 6px;
  max-width: max-content;
  margin: auto;
  margin-bottom: 8px;
  border-radius: 4px;
  border: 1px solid #937928;
}
.item-info-header .iih-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
}
.item-info-header .iih-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #f3e6c6;
  font-weight: 600;
}
.item-info-header .iih-chip.iih-rarity {
  background: rgba(0, 0, 0, 0.5);
  border-color: currentColor;
  color: var(--iih-rarity, #d4af37);
}
.item-info-header .iih-chip.iih-level i { font-size: 10px; }

/* Rank chip — rank icon + name + status badge */
.item-info-header .iih-chip.iih-rank {
  padding: 3px 10px 3px 4px;
  gap: 6px;
  letter-spacing: 0.15em;
  border-width: 1px;
  position: relative;
}
.item-info-header .iih-chip.iih-rank .iih-rank-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.6));
  image-rendering: auto;
}
.item-info-header .iih-chip.iih-rank .iih-rank-name {
  font-family: 'Cinzel Decorative', 'Poppins', serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: none;
  line-height: 1;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-info-header .iih-chip.iih-rank .iih-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 9px;
  line-height: 1;
  margin-left: 2px;
  background: rgba(0, 0, 0, 0.35);
}
.item-info-header .iih-chip.iih-rank.iih-rank-ok {
  border-color: rgba(74, 222, 128, 0.55);
  background: linear-gradient(135deg, rgba(22, 101, 52, 0.35), rgba(0, 0, 0, 0.55));
  color: #bbf7d0;
}
.item-info-header .iih-chip.iih-rank.iih-rank-ok .iih-rank-badge {
  background: rgba(34, 197, 94, 0.25);
  color: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.4);
}
.item-info-header .iih-chip.iih-rank.iih-rank-close {
  border-color: rgba(251, 191, 36, 0.55);
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.4), rgba(0, 0, 0, 0.55));
  color: #fde68a;
}
.item-info-header .iih-chip.iih-rank.iih-rank-close .iih-rank-badge {
  background: rgba(251, 191, 36, 0.22);
  color: #fbbf24;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.4);
}
.item-info-header .iih-chip.iih-rank.iih-rank-low {
  border-color: rgba(239, 68, 68, 0.6);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.45), rgba(0, 0, 0, 0.6));
  color: #fecaca;
}
.item-info-header .iih-chip.iih-rank.iih-rank-low .iih-rank-badge {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.45);
}
.item-info-header .iih-chip.iih-rank.iih-rank-low .iih-rank-icon {
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.6)) grayscale(0.35);
}

/* ====================================================================
   RESPONSIVE — tighten on small screens without losing legibility
   ==================================================================== */
@media (max-width: 480px) {
  .item-tooltip-bonuses { min-width: 260px !important; max-width: 300px !important; }
  .tooltip-bonuses-content .item-bonus-row .ib-label { font-size: 12px; }
  .tooltip-bonuses-content .item-bonus-row .ib-value { font-size: 13px; }

  .item-info-panel { padding: 12px 10px; }
  .item-info-panel .item-bonus-row .ib-label { font-size: 13px; }
  .item-info-panel .item-bonus-row .ib-value { font-size: 15px; }
  .item-info-panel .item-bonus-row .ib-icon { width: 30px; height: 30px; }

  .item-info-header .iih-name { font-size: 18px; }
  .item-info-header .iih-portrait-wrap img { max-width: 108px; max-height: 108px; }
}

/* ====================================================================
   ITEM INFO — action buttons (Equip / Sell / Back)
   ==================================================================== */
.item-info-actions .item-info-btn {
  min-width: 120px;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: "Cinzel Decorative", "Cinzel", Georgia, serif;
  letter-spacing: 0.5px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}
.item-info-actions .item-info-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}
.item-info-actions .item-info-btn-equip {
  background: linear-gradient(180deg, #1e3a2b 0%, #14251d 100%);
  border-color: rgba(80, 200, 120, 0.45);
  color: #b9f5c9;
}
.item-info-actions .item-info-btn-equip:hover {
  background: linear-gradient(180deg, #265038 0%, #182e23 100%);
}
.item-info-actions .item-info-btn-sell {
  background: linear-gradient(180deg, #3b2e17 0%, #241b0e 100%);
  border-color: rgba(212, 175, 55, 0.55);
  color: #f6d679;
}
.item-info-actions .item-info-btn-sell:hover {
  background: linear-gradient(180deg, #4a3a1d 0%, #2c2010 100%);
}
.item-info-actions .item-info-btn-back {
  background: linear-gradient(180deg, #2a2540 0%, #1a172a 100%);
  border-color: rgba(147, 112, 219, 0.45);
  color: #d7cbf0;
}
.item-info-actions .item-info-btn-back:hover {
  background: linear-gradient(180deg, #352e52 0%, #211d36 100%);
}
.item-info-actions .item-info-btn-disabled {
  background: linear-gradient(180deg, #2a2a2a 0%, #181818 100%) !important;
  border-color: rgba(120, 120, 120, 0.3) !important;
  color: #8a8a8a !important;
  cursor: not-allowed !important;
  opacity: 0.7;
}

/* ====================================================================
   SELL ITEM PAGE — medieval merchant theme
   ==================================================================== */
.sell-page {
  --sell-rarity: #d4af37;
  max-width: 860px;
  margin: 0 auto;
}

.sell-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: "Cinzel Decorative", "Cinzel", Georgia, serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #f6d679;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 12px rgba(212, 175, 55, 0.35);
}
.sell-banner i { color: #d4af37; opacity: 0.85; }

.sell-card {
  position: relative;
  background:
    radial-gradient(ellipse at top, rgba(212, 175, 55, 0.06) 0%, transparent 60%),
    linear-gradient(180deg, #1e1812 0%, #14100b 100%);
  border: 2px solid rgba(212, 175, 55, 0.35);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6) inset,
    0 0 24px rgba(0, 0, 0, 0.5);
  padding: 20px;
}
.sell-card::before,
.sell-card::after {
  content: "";
  position: absolute;
  width: 28px; height: 28px;
  border: 2px solid rgba(212, 175, 55, 0.55);
  pointer-events: none;
}
.sell-card::before { top: 6px; left: 6px;  border-right: none;  border-bottom: none; }
.sell-card::after  { bottom: 6px; right: 6px; border-left: none; border-top: none; }

/* --- Header grid: portrait + details --- */
.sell-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 16px;
}
.sell-portrait-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.sell-portrait-frame {
  position: relative;
  width: 156px;
  height: 156px;
  padding: 8px;
  background:
    radial-gradient(ellipse at center, rgba(212, 175, 55, 0.15) 0%, transparent 70%),
    linear-gradient(180deg, #2a2118 0%, #13100a 100%);
  border: 3px double var(--sell-rarity);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.8) inset,
    0 0 20px rgba(0, 0, 0, 0.6),
    0 0 18px color-mix(in srgb, var(--sell-rarity) 25%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sell-portrait-img {
  max-width: 128px;
  max-height: 128px;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
}
.sell-rarity-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid color-mix(in srgb, var(--sell-rarity) 55%, transparent);
  border-radius: 2px;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.sell-details { min-width: 0; }
.sell-item-name {
  font-family: "Cinzel Decorative", "Cinzel", Georgia, serif;
  font-size: 24px;
  margin: 0 0 10px 0;
  line-height: 1.2;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.8),
    0 0 10px color-mix(in srgb, var(--sell-rarity) 35%, transparent);
}
.sell-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.sell-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 2px;
  font-family: "Cinzel", Georgia, serif;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: #e8d9a8;
}
.sell-chip img { width: 16px; height: 16px; object-fit: contain; }
.sell-chip i { color: #d4af37; font-size: 11px; }

.sell-stats-panel {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(212, 175, 55, 0.2);
  padding: 10px 12px;
  border-radius: 2px;
}

/* --- Divider --- */
.sell-divider {
  position: relative;
  text-align: center;
  margin: 18px 0 16px;
  color: #b89a4a;
  font-family: "Cinzel", Georgia, serif;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
}
.sell-divider::before,
.sell-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 80px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.45), transparent);
}
.sell-divider::before { left: 0; }
.sell-divider::after  { right: 0; }
.sell-divider span { padding: 0 10px; }

/* --- Two options --- */
.sell-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.sell-option {
  position: relative;
  padding: 16px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(ellipse at top, rgba(0, 0, 0, 0.25) 0%, transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 100%);
  border: 2px solid rgba(120, 120, 120, 0.25);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6) inset;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.sell-option:hover { transform: translateY(-2px); }

.sell-option-quick {
  border-color: rgba(183, 28, 28, 0.55);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6) inset,
    0 0 18px rgba(183, 28, 28, 0.15);
}
.sell-option-quick:hover {
  border-color: rgba(220, 38, 38, 0.8);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6) inset,
    0 0 24px rgba(220, 38, 38, 0.3);
}
.sell-option-market {
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6) inset,
    0 0 18px rgba(34, 197, 94, 0.12);
}
.sell-option-market:hover {
  border-color: rgba(34, 197, 94, 0.75);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6) inset,
    0 0 24px rgba(34, 197, 94, 0.25);
}

.sell-option-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Cinzel Decorative", "Cinzel", Georgia, serif;
  font-size: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}
.sell-option-quick  .sell-option-header { color: #ffb4a2; }
.sell-option-quick  .sell-option-header i { color: #ef4444; }
.sell-option-market .sell-option-header { color: #b9f5c9; }
.sell-option-market .sell-option-header i { color: #22c55e; }

.sell-option-desc {
  font-size: 13px;
  color: #c8c0a8;
  line-height: 1.45;
  font-style: italic;
  margin: 0;
}

.sell-option-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 2px;
}
.sell-option-price-label {
  font-family: "Cinzel", Georgia, serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #b89a4a;
}
.sell-option-price-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Cinzel Decorative", Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: #f6d679;
  text-shadow: 0 0 8px rgba(246, 214, 121, 0.4);
}
.sell-option-price-value i { color: #d4af37; }

.sell-option-suggested {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.35);
  border-left: 3px solid rgba(34, 197, 94, 0.55);
  font-size: 12px;
  color: #cfe8d6;
  border-radius: 0 2px 2px 0;
}
.sell-option-suggested i { color: #22c55e; }
.sell-option-suggested b { color: #f6d679; }

.sell-list-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sell-field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 2px;
  padding: 4px 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.sell-field:focus-within {
  border-color: rgba(212, 175, 55, 0.6);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}
.sell-field-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 78px;
  font-family: "Cinzel", Georgia, serif;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #d4af37;
}
.sell-field input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f3e6c6;
  font-family: "Cinzel", Georgia, serif;
  font-size: 14px;
  padding: 6px 4px;
  min-width: 0;
}
.sell-field input::placeholder { color: rgba(243, 230, 198, 0.35); }
.sell-field input::-webkit-outer-spin-button,
.sell-field input::-webkit-inner-spin-button { opacity: 0.35; }

.sell-list-hint {
  font-size: 11px;
  color: #9a8b64;
  display: flex;
  align-items: center;
  gap: 6px;
  font-style: italic;
}
.sell-list-hint i { color: #d4af37; }

.sell-option-btn {
  margin-top: auto;
  padding: 10px 14px;
  font-family: "Cinzel Decorative", "Cinzel", Georgia, serif;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.sell-option-btn:hover:not(:disabled) { transform: translateY(-1px); }
.sell-option-quick .sell-option-btn {
  background: linear-gradient(180deg, #991b1b 0%, #5a0f0f 100%);
  border: 1px solid rgba(255, 120, 120, 0.35);
  color: #ffe4e1;
}
.sell-option-quick .sell-option-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #b91c1c 0%, #7a1414 100%);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.35);
}
.sell-option-market .sell-option-btn {
  background: linear-gradient(180deg, #166534 0%, #0a3f1f 100%);
  border: 1px solid rgba(120, 240, 160, 0.35);
  color: #e0fbe4;
}
.sell-option-market .sell-option-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #15803d 0%, #105026 100%);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

/* --- Already listed --- */
.sell-listed-notice {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0;
  padding: 14px 16px;
  background:
    linear-gradient(180deg, rgba(34, 197, 94, 0.08) 0%, rgba(34, 197, 94, 0.03) 100%);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-left: 4px solid #22c55e;
  border-radius: 2px;
  color: #cfe8d6;
  font-size: 13px;
  line-height: 1.5;
}
.sell-listed-notice i { font-size: 22px; color: #22c55e; flex-shrink: 0; }
.sell-listed-notice strong { color: #b9f5c9; font-family: "Cinzel", Georgia, serif; }

/* --- Back buttons --- */
.sell-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}
.sell-back-btn {
  min-width: 160px;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: "Cinzel", Georgia, serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 12px;
  border-radius: 2px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: linear-gradient(180deg, #2a2118 0%, #181208 100%);
  color: #e8d9a8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.sell-back-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #3a2e20 0%, #231a0c 100%);
  border-color: rgba(212, 175, 55, 0.55);
}
.sell-back-inv { border-color: rgba(147, 112, 219, 0.35); color: #d7cbf0; }
.sell-back-inv:hover { border-color: rgba(147, 112, 219, 0.6); }

/* --- Responsive --- */
@media (max-width: 720px) {
  .sell-grid { grid-template-columns: 1fr; justify-items: center; }
  .sell-details { width: 100%; text-align: center; }
  .sell-meta { justify-content: center; }
  .sell-options { grid-template-columns: 1fr; }
  .sell-item-name { font-size: 20px; }
}
@media (max-width: 480px) {
  .sell-banner { font-size: 13px; letter-spacing: 1px; }
  .sell-banner i { display: none; }
  .sell-portrait-frame { width: 132px; height: 132px; }
  .sell-portrait-img { max-width: 108px; max-height: 108px; }
  .sell-option { padding: 12px; }
  .sell-option-header { font-size: 15px; }
  .sell-option-price-value { font-size: 17px; }
  .sell-back-btn { min-width: 140px; font-size: 11px; padding: 7px 12px; }
  .item-info-actions .item-info-btn { min-width: 100px; font-size: 13px; }
}

/* =====================================================================
   Item detail sheet
   A single docked bottom-sheet that shows full item info + actions when
   an inventory item is tapped. Sits above the footer drop-up overlay
   (z-index 9999) so it can be used while the inventory is open, and
   updates in place as you tap different items.
   ===================================================================== */
.item-detail-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(110%);
  width: 100%;
  max-width: 600px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  z-index: 12000;
  background: linear-gradient(180deg, #241d16 0%, #16110c 100%);
  border-top: 2px solid rgba(226, 192, 122, 0.6);
  border-left: 1px solid rgba(226, 192, 122, 0.22);
  border-right: 1px solid rgba(226, 192, 122, 0.22);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  box-shadow: 0 -16px 44px rgba(0, 0, 0, 0.6);
  transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.item-detail-sheet.is-open {
  transform: translateX(-50%) translateY(0);
}

.item-detail-sheet.is-dragging {
  transition: none;
}

.item-detail-sheet .ids-grip {
  flex: 0 0 auto;
  width: 48px;
  height: 5px;
  margin: 9px auto 2px;
  border-radius: 999px;
  background: rgba(226, 192, 122, 0.5);
  cursor: grab;
  touch-action: none;
}

.item-detail-sheet .ids-close,
.item-detail-sheet .ids-back {
  position: absolute;
  top: 8px;
  color: #e2c07a;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(226, 192, 122, 0.32);
  border-radius: 9px;
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s ease, transform 0.1s ease;
}

.item-detail-sheet .ids-close {
  right: 12px;
  width: 32px;
  height: 32px;
  line-height: 28px;
  font-size: 22px;
  text-align: center;
}

.item-detail-sheet .ids-back {
  left: 12px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.item-detail-sheet .ids-back i { font-size: 12px; }

.item-detail-sheet .ids-close:hover,
.item-detail-sheet .ids-back:hover { background: rgba(226, 192, 122, 0.18); }
.item-detail-sheet .ids-close:active,
.item-detail-sheet .ids-back:active { transform: scale(0.92); }

.item-detail-sheet .ids-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 14px 18px;
  transition: opacity 0.18s ease;
}

.item-detail-sheet .ids-body.is-swapping { opacity: 0.35; }

/* The injected item card carries data-aos; outside the overlay scope AOS
   would leave it at opacity:0. Force it visible (same fix the overlay uses). */
.item-detail-sheet [data-aos] {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
  transition: none !important;
}

.item-detail-sheet .inventory-modern-card {
  margin: 4px 0 0 !important;
  border: 1px solid rgba(226, 192, 122, 0.22) !important;
  box-shadow: none !important;
}

.item-detail-sheet .ids-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 180px;
  color: #d4af37;
}

.item-detail-sheet .ids-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(212, 175, 55, 0.2);
  border-top-color: #d4af37;
  animation: idsSpin 0.8s linear infinite;
}

.item-detail-sheet .ids-loading-text {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.7;
}

@keyframes idsSpin { to { transform: rotate(360deg); } }

.item-detail-sheet .ids-error {
  padding: 28px 18px;
  text-align: center;
  color: #fca5a5;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .item-detail-sheet { transition: none; }
}

@media (max-width: 480px) {
  .item-detail-sheet { max-height: 86vh; }
  .item-detail-sheet .ids-body { padding: 2px 11px 16px; }
}



