/* /styles.css — trimmed for /index.php only
   Keep: app frame, home search, hero panels, newest items, explore links,
   entity modal shell, battlepass modal, toast, display-name + header buttons.
*/

/* =========================
   THEME TOKENS & BASE
   ========================= */
:root{
  --bg-x: 0px;
  --bg-y: 0px;
  --zoom: 1;

  --panel: rgba(10, 12, 16, 0.78);
  --panel2: rgba(10, 12, 16, 0.88);
  --line: rgba(255,255,255,0.12);
  --line2: rgba(255,255,255,0.18);
  --txt: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.66);
  --hover: rgba(255,255,255,0.06);

  /* ✅ Dark overlay on the background image */
  --bg-overlay: rgba(0,0,0,0.58);

  /* sticky col must be basically opaque so text behind never bleeds through */
  --stickybg: rgba(8, 10, 13, 0.985);
  --stickybg-hover: rgba(12, 14, 18, 0.985);

  /* ✅ Scrollbar theme (table horizontal scrollbar) */
  --scrollbar-size: 12px;
  --scroll-track: rgba(0,0,0,0.40);
  --scroll-track-border: rgba(255,255,255,0.10);

  --scroll-thumb: rgba(255,255,255,0.16);
  --scroll-thumb-border: rgba(255,255,255,0.14);

  --scroll-thumb-hover: rgba(255,255,255,0.24);
  --scroll-thumb-hover-border: rgba(255,255,255,0.20);

  --scroll-thumb-active: rgba(34,197,94,0.28);
  --scroll-thumb-active-border: rgba(34,197,94,0.38);
}


html,body{
  height:100%;
  margin:0;
  background: #05070a;
}

body{
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 14px;
  color: var(--txt);
  background: transparent;
  image-rendering: pixelated;
  position: relative;
}

/* Fixed background layer (doesn't scroll) */
.bg{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("https://myfo2.com/zones/noob-island.png");
  background-repeat: no-repeat;

  /* keep image at "true size" relative to initial zoom by compensating with --zoom */
  background-size: calc(4096px / var(--zoom)) calc(3072px / var(--zoom));
  background-position: var(--bg-x) var(--bg-y);
  background-color: #05070a;
  image-rendering: pixelated;
}

/* ✅ Overlay sits on top of the bg image */
.bg::after{
  content:"";
  position:absolute;
  inset:0;
  background: var(--bg-overlay);
  pointer-events:none;
}

..wrap {
    margin: 0 auto;
    padding: 14px;
    position: relative;
    z-index: 1;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

button, input { font-family: inherit; }

/* Scrollbar styling */
* { scrollbar-width: thin; scrollbar-color: rgba(100,116,139,0.7) transparent; }
*::-webkit-scrollbar { width: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(100,116,139,0.7); border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.95); }

/* =========================
   APP FRAME
   ========================= */
#fo2-home-app { width: 100%; }

.app-frame {
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  transform-origin: center;
  animation: frameIn 420ms cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

@keyframes frameIn {
  from { transform: scale(0.985); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.app-frame::before {
  content: "";
  position: absolute;
  inset: -2px;
  border: 1px solid rgba(34,197,94,0.14);
  pointer-events: none;
  opacity: 0.7;
}

.app-inner {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Main content padding for home page */
.home-content {
  padding: 20px;
  padding-top: 16px;
  padding-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

@media (max-width: 900px) { .home-content { padding: 16px; } }
@media (max-width: 640px) { .home-content { padding: 12px; } }

/* =========================
   GLOBAL SEARCH (HOME)
   ========================= */
.home-search-shell {
  margin-top: 12px;
  margin-bottom: 10px;
  position: relative;
  z-index: 20;
}

.home-search-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.home-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: radial-gradient(circle at top left, rgba(34,197,94,0.18), rgba(15,23,42,0.92));
  padding: 4px 10px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.65);
}

.home-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  font-size: 12px;
  color: var(--accent);
}

.home-search-input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-main);
  font-size: 14px;
  padding: 6px 0;
}

.home-search-input::placeholder { color: var(--text-faint); }

.home-search-clear {
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
}
.home-search-clear:hover { color: var(--text-main); }

.home-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition:
    max-height 0.18s ease-out,
    border-color 0.18s ease-out,
    background 0.18s ease-out,
    opacity 0.18s ease-out,
    transform 0.18s ease-out;
}

.home-search-results--open {
  max-height: 420px;
  overflow-y: auto;
  padding: 4px;
  background: rgba(15,23,42,0.96);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-soft);
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.home-search-result-row {
  width: 100%;
  border: 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: transparent;
  display: flex;
  text-align: left;
  cursor: pointer;
  margin-bottom: 2px;
  color:#fff;
}
.home-search-result-row:last-child { margin-bottom: 0; }
.home-search-result-row:hover { background: rgba(15,23,42,0.9); }

.home-search-result-main {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.home-search-result-icon-wrap { flex-shrink: 0; }

.home-search-result-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background-color: rgba(15,23,42,0.9);
  background-repeat: no-repeat;
  image-rendering: pixelated;
  border: 1px solid var(--border-subtle);
}

.home-search-result-icon--item {
  background-size: 87% !important;
  background-position: center !important;
}

.home-search-result-icon--mob {
  background-size: 96px 192px !important;
  background-position: -32px -96px !important;
  background-repeat: no-repeat !important;
}




.home-search-result-icon--npc {
  background-size: 320%;
  background-position: center -122px;
}

.home-search-result-icon--empty { opacity: 0.35; }

.home-search-result-text {
  flex: 1;
  min-width: 0;
}

.home-search-result-name {
  font-size: 13px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-search-result-name mark {
  background: rgba(34,197,94,0.16);
  color: var(--accent);
  border-radius: 3px;
  padding: 0 2px;
}

.home-search-result-meta {
  margin-top: 2px;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  color: var(--text-faint);
}

.home-search-result-pill {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.home-search-result-pill--item { border-color: rgba(34,197,94,0.5); color: var(--accent); }
.home-search-result-pill--mob  { border-color: rgba(96,165,250,0.6); }
.home-search-result-pill--npc  { border-color: rgba(249,115,22,0.7); }

.home-search-result-meta-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-search-empty {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-faint);
}

.home-search-loading-note {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-dim);
}

/* =========================
   HOME / HERO LAYOUT
   ========================= */
.home-hero {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 18px;
  margin-bottom: 28px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); }
}


.home-hero-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}

/* =========================
   MOB SPRITESHEET CROP FIX
   3 cols x 4 rows
   Target frame: row 3, col 2 (1-based)
   ========================= */
.home-rare-icon--mobsheet {
    background-size: 284% !important;
    background-position: center 65%;
    background-repeat: no-repeat !important;
}




/* =========================
   NEWEST ITEMS PANEL
   ========================= */
.home-rare-panel {
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(15,23,42,0.97), rgba(34,197,94,0.12));
  border: 1px solid rgba(148,163,184,0.45);
  box-shadow: var(--shadow-soft);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: 520px;
}

.home-rare-panel-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-rare-panel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.home-rare-panel-sub {
  font-size: 11px;
  color: var(--text-faint);
}

.home-rare-list {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
  flex: 1 1 auto;
  overflow-y: auto;
}

.home-empty {
  padding: 12px;
  border-radius: 10px;
  border: 1px dashed var(--border-subtle);
  font-size: 12px;
  color: var(--text-faint);
}

.home-rare-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  margin-bottom: 3px;
  text-decoration: none;
  color: inherit;
}
.home-rare-row:last-child { margin-bottom: 0; }

.home-rare-row:hover {
  background: rgba(15,23,42,0.95);
  border-color: rgba(34,197,94,0.6);
  box-shadow: 0 10px 24px rgba(0,0,0,0.7);
  text-decoration: none;
}

.home-rare-icon-wrap { flex-shrink: 0; }

.home-rare-icon {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    background-color: rgba(15,23,42,0.9);
    background-size: contain;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    border: 1px solid var(--border-subtle);
}

.home-rare-icon--empty { opacity: 0.35; }

.home-rare-row-main { flex: 1 1 auto; min-width: 0; }

.home-rare-row-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-rare-row-meta {
  margin-top: 1px;
  font-size: 11px;
  color: var(--text-faint);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.home-rare-row-price {
  font-size: 11px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* =========================
   HOME – QUICK LINKS PANEL
   ========================= */
.home-nav-panel {
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(15,23,42,0.97), rgba(56,189,248,0.10));
  border: 1px solid rgba(148,163,184,0.45);
  box-shadow: var(--shadow-soft);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.home-nav-panel-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 8px;
}

.home-nav-panel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.home-nav-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.home-nav-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.35);
  background:
    radial-gradient(circle at top left, rgba(34,197,94,0.12), transparent 60%),
    rgba(15,23,42,0.92);
  box-shadow: 0 12px 28px rgba(0,0,0,0.55);
  transition:
    transform 90ms ease-out,
    box-shadow 90ms ease-out,
    border-color 90ms ease-out,
    background 90ms ease-out;
  text-decoration: none;
  color: inherit;
}

.home-nav-card:hover {
  transform: translateY(-1px);
  border-color: rgba(56,189,248,0.75);
  box-shadow: 0 18px 44px rgba(0,0,0,0.75);
  background:
    radial-gradient(circle at top left, rgba(56,189,248,0.16), transparent 60%),
    rgba(15,23,42,0.96);
  text-decoration: none;
}

.home-nav-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.55);
  background: rgba(15,23,42,0.95);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(248,250,252,0.92);
  box-shadow: 0 10px 22px rgba(0,0,0,0.55);
}

.home-nav-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-nav-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.home-nav-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}

.home-nav-go {
  flex: 0 0 auto;
  color: var(--text-faint);
  opacity: 0.9;
}
.home-nav-card:hover .home-nav-go { color: var(--text-main); }

/* =========================
   TOAST
   ========================= */
.toast {
  position: fixed;
  bottom: 16px;
  right: 16px;
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15,23,42,0.95);
  color: var(--text-main);
  font-size: 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.85);
  border: 1px solid var(--border-subtle);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
  z-index: 80;
}

.toast.toast--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Prevent background scroll when modal open (battlepass reuses this class) */
body.equip-modal-open { overflow: hidden; }

/* =========================
   DISPLAY NAME MODAL (display-name-modal.php)
   ========================= */
.dn-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
}

.dn-backdrop.dn-backdrop--open {
  display: flex;
  pointer-events: auto;
}

.dn-modal {
  width: min(420px, calc(100% - 2.5rem));
  max-width: 90vw;
  border-radius: 16px;
  padding: 18px 18px 16px;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(244, 114, 182, 0.16), transparent 55%),
    var(--surface, #020617);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(148, 163, 184, 0.3);
  color: var(--text-main, #e5e7eb);
}

.dn-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-main, #f9fafb);
}

.dn-sub {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim, #9ca3af);
}

.dn-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main, #e5e7eb);
  margin-bottom: 4px;
}

.dn-required { color: #f97373; font-size: 11px; }

#displayNameInput {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.4));
  background-color: var(--surface-soft, #020617);
  color: var(--text-main, #f9fafb);
  font-size: 13px;
  outline: none;
  transition:
    border-color 120ms ease-out,
    box-shadow 120ms ease-out,
    background-color 120ms ease-out;
}

#displayNameInput::placeholder { color: var(--text-faint, #6b7280); }

#displayNameInput:focus {
  border-color: var(--accent, #22c55e);
  box-shadow:
    0 0 0 1px rgba(34, 197, 94, 0.35),
    0 8px 24px rgba(15, 118, 110, 0.45);
}

.dn-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-faint, #6b7280);
}

.dn-error {
  margin: 6px 0 0;
  font-size: 12px;
  color: #fecaca;
  background: rgba(185, 28, 28, 0.18);
  border-radius: 8px;
  padding: 6px 8px;
  border: 1px solid rgba(248, 113, 113, 0.6);
}

.dn-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.dn-submit-btn {
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #020617;
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.35);
  transition: transform 80ms ease-out, box-shadow 80ms ease-out, filter 80ms ease-out;
}

.dn-submit-btn:hover {
  filter: brightness(1.05);
  box-shadow: 0 16px 36px rgba(34, 197, 94, 0.42);
}

.dn-submit-btn:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
}

.dn-cancel-btn {
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  background: transparent;
  color: var(--text-dim, #9ca3af);
  border: 1px solid rgba(148, 163, 184, 0.45);
  transition: background-color 80ms ease-out, color 80ms ease-out, border-color 80ms ease-out;
}

.dn-cancel-btn:hover {
  background-color: rgba(15, 23, 42, 0.8);
  color: var(--text-main, #e5e7eb);
  border-color: rgba(148, 163, 184, 0.7);
}

@media (max-width: 480px) {
  .dn-modal { padding: 16px 14px 14px; border-radius: 14px; }
}

/* Header user row / buttons (login-header.php) */
.header-user-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-display-name-btn {
  border-radius: 999px;
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.5));
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main, #e5e7eb);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header-display-name-btn::before {
  content: "★";
  font-size: 11px;
  opacity: 0.75;
}

.header-display-name-btn:hover { border-color: var(--accent, #22c55e); }

.btn-logout {
  border-radius: 999px;
  border: 0;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  background: rgba(15, 23, 42, 0.7);
  color: var(--text-dim, #9ca3af);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.btn-logout:hover {
  color: var(--text-main, #e5e7eb);
  border-color: rgba(248, 250, 252, 0.6);
  text-decoration: none;
}

/* =========================
   ENTITY DETAILS MODAL (shell)
   ========================= */
.entity-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.entity-modal-overlay[hidden] { display: none; }

.entity-modal {
  background: #020617;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  width: min(860px, 100%);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 22px 45px rgba(0,0,0,0.8);
}

.entity-modal-close {
  border: 0;
  background: rgba(15,23,42,0.9);
  color: var(--text-dim);
  border: 1px solid rgba(148,163,184,0.55);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.entity-modal-close:hover { color: var(--text-main); border-color: rgba(248,250,252,0.75); }

.entity-modal-header {
  padding: 14px 18px 10px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.entity-modal-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.node-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.node-title-pills { display: flex; gap: 6px; flex-wrap: wrap; }

.node-subtitle {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-dim);
}

.entity-modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  padding: 12px 18px 10px;
  overflow: auto;
}

.entity-modal-main { min-width: 0; }

.entity-modal-body-text {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
}

.npc-zones-row,
.npc-quests-list,
.entity-modal-drops-strip {
  margin-top: 10px;
}

.entity-modal-sidebar {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.view-details-btn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #020617;
  box-shadow: 0 12px 26px rgba(34,197,94,0.35);
}
.view-details-btn:hover { filter: brightness(1.05); }

@media (max-width: 820px) {
  .entity-modal-layout { grid-template-columns: minmax(0, 1fr); }
  .entity-modal-sidebar { justify-content: flex-start; }
}

/* =========================
   BATTLEPASS PREVIEW MODAL
   ========================= */
.bp-backdrop {
  position: fixed;
  inset: 0;
  z-index: 72;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15,23,42,0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 14px;
}

.bp-backdrop.bp-backdrop--open { display: flex; }

.bp-modal {
  width: min(720px, 100%);
  max-height: min(520px, 90vh);
  border-radius: 18px;
  padding: 14px 16px 12px;
  background:
    radial-gradient(circle at top left, rgba(56,189,248,0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(34,197,94,0.16), transparent 55%),
    #020617;
  box-shadow:
    0 24px 60px rgba(0,0,0,0.9),
    0 0 0 1px rgba(148,163,184,0.45);
  border: 1px solid rgba(148,163,184,0.5);
  display: flex;
  flex-direction: column;
}

.bp-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.bp-modal-title-wrap { display: flex; flex-direction: column; gap: 2px; }

.bp-modal-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-faint);
}

.bp-modal-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bp-modal-sub { font-size: 12px; color: var(--text-dim); }

.bp-modal-close {
  border: 0;
  border-radius: 999px;
  width: 26px;
  height: 26px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  background: rgba(15,23,42,0.95);
  color: var(--text-dim);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bp-modal-close:hover {
  color: var(--text-main);
  border-color: rgba(248,250,252,0.75);
  box-shadow: 0 10px 26px rgba(0,0,0,0.7);
}

.bp-modal-body {
  margin-top: 2px;
  padding: 8px 4px 4px;
  border-radius: 12px;
  background: radial-gradient(circle at top left, rgba(15,23,42,0.96), rgba(15,23,42,0.98));
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.bp-track {
  display: flex;
  gap: 10px;
  padding: 4px 4px 8px;
  min-height: 150px;
}

.bp-card {
  position: relative;
  flex: 0 0 140px;
  max-width: 140px;
  border-radius: 14px;
  padding: 10px 9px 8px;
  background: radial-gradient(circle at top, rgba(34,197,94,0.2), transparent 65%), rgba(15,23,42,0.98);
  border: 1px solid rgba(148,163,184,0.6);
  box-shadow: 0 18px 40px rgba(0,0,0,0.8);
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bp-card--clickable { cursor: pointer; }
.bp-card--clickable:hover {
  border-color: rgba(248,250,252,0.8);
  box-shadow: 0 22px 54px rgba(0,0,0,0.95);
  transform: translateY(-1px);
}

.bp-card--placeholder {
  background: radial-gradient(circle at top, rgba(148,163,184,0.18), transparent 65%), rgba(15,23,42,0.98);
  border-style: dashed;
  border-color: rgba(148,163,184,0.7);
}

.bp-level-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.8);
  background: rgba(15,23,42,0.95);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.bp-level-value { font-weight: 600; color: var(--accent); }

.bp-item-shell { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }

.bp-item-icon-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.85);
  background: radial-gradient(circle at top, rgba(15,23,42,0.95), rgba(15,23,42,1));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px rgba(0,0,0,0.95);
}

.bp-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: rgba(15,23,42,0.95);
  background-repeat: no-repeat;
  background-size: 100%;
  background-position: center;
  image-rendering: pixelated;
  border: 1px solid rgba(148,163,184,0.85);
}

.bp-item-icon--empty { opacity: 0.35; }

.bp-qty-pill {
  position: absolute;
  right: -4px;
  bottom: -4px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.95);
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #020617;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(34,197,94,0.55);
}

.bp-item-name {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bp-item-meta { font-size: 11px; color: var(--text-faint); }

.bp-empty {
  font-size: 12px;
  color: var(--text-faint);
  padding: 8px;
}

.bp-modal-footer {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.bp-progress-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
}

.bp-progress-bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(148,163,184,0.18);
  border: 1px solid rgba(148,163,184,0.35);
  overflow: hidden;
}

.bp-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(15,23,42,0.8) inset;
}

.bp-progress-percent { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }

.bp-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}


/* ✅ GUILD WARFARE COUNTDOWN BANNER (add anywhere after .home-content styles) */
.gw-banner{
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.45);
  background:
    radial-gradient(circle at top left, rgba(56,189,248,0.12), transparent 55%),
    radial-gradient(circle at bottom right, rgba(34,197,94,0.14), transparent 55%),
    rgba(15,23,42,0.92);
  box-shadow: 0 18px 40px rgba(0,0,0,0.65);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.gw-left{ min-width: 240px; }

.gw-kicker{
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint, var(--muted));
}

.gw-title{
  margin-top: 2px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main, var(--txt));
}

.gw-sub{
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-dim, var(--muted));
}

.gw-sub2{
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-faint, var(--muted));
  opacity: 0.95;
}

.gw-right{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.gw-count-label{
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint, var(--muted));
}

.gw-countdown{
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.gw-unit{
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.40);
  background: rgba(2,6,23,0.55);
  padding: 8px 10px 7px;
  min-width: 64px;
  text-align: center;
}

.gw-num{
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  color: var(--text-main, var(--txt));
  font-variant-numeric: tabular-nums;
}

.gw-lab{
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint, var(--muted));
}

.gw-banner.gw-ended{
  opacity: 0.7;
  filter: saturate(0.9);
}

@media (max-width: 700px){
  .gw-right{ align-items: flex-start; }
  .gw-countdown{ flex-wrap: wrap; }
}
