/* index.css */
* {
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: "Oxanium", sans-serif;
  /*justify-content: center;
  align-items: center;
  height: 100vh;*/
}

h1 {
  font-family: "Oxanium", sans-serif;
  font-size: 50px;
  text-align: center;
}

/*
.pfpCanvas {
  max-width: 100%;
  height: auto;
  display: flex;
  flex-wrap: wrap;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}
*/

/*-----------------------------Minting Canvas Effects-----------------------------*/
.mint-card-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  gap: 16px;
  margin-top: 32px;
}

.mint-preview-wrapper {
  width: 290px;
  max-width: 95vw;
  margin: 0 auto;
  position: relative;
}

.preview-canvas {
  width: 100%;
  max-width: 280px;
  height: 501px;
  margin: 0 auto;
  display: block;
  border: 2.5px solid #9d71f9;
  border-radius: 18px;
  box-shadow: 0 0 48px 6px #b89aff80, 0 0 0 2px #3b1b57;
  /*background: linear-gradient(135deg, #191e2b 75%, #b89aff 100%);*/
  background: transparent;
  position: relative;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.8s;
}

.preview-canvas.fading-in {
  mask-image: linear-gradient(to top,
      transparent 0%,
      #fff 12%,
      #fff 98%,
      transparent 100%);
  -webkit-mask-image: linear-gradient(to top,
      transparent 0%,
      #fff 12%,
      #fff 98%,
      transparent 100%);
  transition: opacity 0.9s;
  opacity: 1;
}

.preview-canvas.hidden {
  opacity: 0;
}

.printing-grid {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
  background: repeating-linear-gradient(to right,
      #bb9aff33 0 1px,
      transparent 1px 24px),
    repeating-linear-gradient(to bottom, #bb9aff33 0 1px, transparent 1px 24px);
  mask-image: radial-gradient(ellipse at center, #fff 70%, transparent 100%);
  transition: opacity 1.2s;
  animation: grid-move 3s linear infinite;
}

@keyframes grid-move {
  from {
    background-position: 0px 0px, 0px 0px;
  }

  to {
    background-position: 24px 24px, 24px 24px;
  }
}

.glow-wipe {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0;
  border-top: 4px solid #d3a2ff;
  border-radius: 8px;
  box-shadow: 0 0 24px 6px #d3a2ff80;
  z-index: 3;
  pointer-events: none;
  opacity: 0.95;
  transition: height 1.4s cubic-bezier(0.66, 0, 0.33, 1);
  background: none;
}

#mint-btn {
  margin-top: 18px;
  width: 220px;
  font-size: 1.15em;
}

.lore-caption {
  text-align: center;
  font-family: "Oxanium", "Orbitron", monospace;
  font-size: 1.05em;
  color: #bb9aff;
  margin: 16px 0 0 0;
  text-shadow: 0 2px 6px #36063a80;
  letter-spacing: 0.5px;
  min-height: 1.3em;
}

/*--Text Effect--*/

@font-face {
  font-family: "tekobold";
  src: url("teko-bold-webfont.eot");
  src: url("teko-bold-webfont.eot?#iefix") format("embedded-opentype"),
    url("teko-bold-webfont.woff2") format("woff2"),
    url("teko-bold-webfont.woff") format("woff"),
    url("teko-bold-webfont.ttf") format("truetype"),
    url("teko-bold-webfont.svg#tekobold") format("svg");
  font-weight: normal;
  font-style: normal;
}

:root {
  --gold: #ffd534;
  --light-shadow: #77571d;
  --dark-shadow: #febc15;
}

.wrapper {
  /*background: radial-gradient(#272727, #1b1b1b);*/
  display: grid;
  grid-template-areas: "overlap";
  place-content: center;
  text-transform: uppercase;
}

.wrapper>div {
  background-clip: text;
  -webkit-background-clip: text;
  color: #363833;
  font-family: "tekobold", sans-serif;
  font-weight: 900;
  line-height: 80%;
  font-size: clamp(4em, 12vw, 12em);
  grid-area: overlap;
  letter-spacing: 1px;
  -webkit-text-stroke: 4px transparent;
}

div.bg {
  background-image: repeating-linear-gradient(105deg,
      var(--gold) 0%,
      var(--dark-shadow) 5%,
      var(--gold) 12%);
  color: transparent;
  /*filter: drop-shadow(5px 15px 15px black);*/
  transform: scaleY(1.05);
  transform-origin: top;
}

div.fg {
  background-image: repeating-linear-gradient(5deg,
      var(--gold) 0%,
      var(--light-shadow) 23%,
      var(--gold) 31%);
  color: #1e2127;
  transform: scale(1);
}

/*---------------------------*/

.nav-logo {
  height: 50px;
  width: auto;
  /*margin: 10px;*/
}

/* LOGIN SECTION */

.login-section {
  display: flex;
  flex-direction: row;
}

/*
.login-btn {
  background: #111111;
  color: #fff;
  padding: 13px 35px;
  font-size: 24px;
  border: none;
  font-weight: 600;
  cursor: pointer;
}
*/

.instruction {
  text-align: center;
  color: #21bf96;
  color: #feba35;
  margin: 1rem 0;
}

/* DASHBOARD SECTION */

.dashboard-section {
  display: none;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.wallet-status {
  font-size: 54px;
  color: #21bf96;
  letter-spacing: 1.5px;
}

.wallet-address-heading,
.wallet-balance-heading {
  color: white;
  letter-spacing: 1.5px;
  margin-top: 1rem;
  text-align: center;
}

.wallet-balance,
.wallet-address {
  color: #feba35;
  letter-spacing: normal;
  display: block;
  margin-top: 1rem;
  background: #000;
  padding: 8px;
  border-radius: 19px;
}

#previewCanvas {
  width: 100%;
  max-height: 800px;
  padding: 10px;
  margin: auto;
}

/*
.logout-btn {
  color: white;
  background: #cc0000;
  padding: 13px 35px;
  font-size: 24px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  margin-top: 40px;
}
*/

footer a {
  float: left;
  display: inline;
  color: #707171;
  margin: 0 0 0 5px;
  padding: 5px 5px;
  font-size: 12px;
}

footer a:hover {
  color: #feba35;
}

footer a:active {
  color: #feba35;
}

footer p {
  color: #707171;
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

body {
  background: #10192b;
  color: #fff;
  font-family: "Orbitron", "Montserrat", "Arial", sans-serif;
}

.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 18px;
  justify-content: center;
  align-items: flex-start;
  margin: 0 auto;
  padding: 16px 0 0 0;
  width: 100%;
  max-width: 1100px;
}

.mp-card {
  background: #191e2b;
  border-radius: 13px;
  width: 100%;
  max-width: 240px;
  margin: 0;
  padding: 13px 13px 10px 13px;
  box-shadow: 0 0 12px #00fff088, 0 2px 8px #000a;
  border: 1.7px solid #00fff0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mp-card-header {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

/*----------------------Polygons-------------------*/
.polygon-title {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #00fff0 60%, #8c52ff 100%);
  margin-right: 8px;
  display: inline-block;
  /* make sure this is here */
  box-shadow: 0 0 8px #00fff044, 0 0 1px #8c52ff;
  border: 2px solid #00fff0;
}

.polygon-9 {
  /* Nonagon */
  clip-path: polygon(50% 0%,
      83% 12%,
      100% 43%,
      94% 78%,
      68% 100%,
      32% 100%,
      6% 78%,
      0% 43%,
      17% 12%);
}

.polygon-8 {
  /* Octagon */
  clip-path: polygon(30% 0%,
      70% 0%,
      100% 30%,
      100% 70%,
      70% 100%,
      30% 100%,
      0% 70%,
      0% 30%);
}

.polygon-7 {
  /* Heptagon */
  clip-path: polygon(50% 0%,
      90% 20%,
      100% 60%,
      75% 100%,
      25% 100%,
      0% 60%,
      10% 20%);
}

.polygon-6 {
  /* Hexagon */
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
}

.polygon-5 {
  /* Pentagon */
  clip-path: polygon(50% 0%, 95% 35%, 77% 91%, 23% 91%, 5% 35%);
}

.polygon-4 {
  /* Square */
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
}

.polygon-3 {
  /* Triangle */
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.mp-title {
  font-weight: bold;
  font-size: 1.2em;
  color: #00fff0;
  letter-spacing: 1px;
}

.mp-id {
  margin-left: auto;
  font-size: 1em;
  color: #7afde2;
  font-family: "Share Tech Mono", monospace;
}

.mp-card-art {
  width: 100%;
  max-width: 260px;
  margin: 0 auto 6px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  /* add background for contrast */
  background: #232a40;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 12px #00fff022;
}

.mp-card-art img {
  width: 100%;
  max-width: 260px;
  height: auto;
  object-fit: contain;
  /* Keeps aspect ratio and ensures fit */
  border-radius: 10px;
  display: block;
  background: #191e2b;
  /* Remove border if undesired, or set a subtle one */
  border: 1.5px solid #00fff055;
}

.mp-xp-bar {
  background: #222942;
  height: 8px;
  border-radius: 6px;
  margin: 10px 0 7px 0;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.mp-xp-progress {
  background: linear-gradient(90deg, #00ffae, #00fff0 65%, #8c52ff 100%);
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s;
}

.mp-energy-progress {
  background: linear-gradient(90deg, #b8002f, #ff6f00 65%, #ffd534 100%);
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s;
}

.mp-stats-row {
  display: flex;
  justify-content: space-between;
  margin: 8px 0 5px 0;
  font-size: 0.85em;
  text-shadow: 0 1px 6px #00fff022;
}

.mp-attack-row {
  display: flex;
  justify-content: center;
  margin: 8px 0 12px 0;
}

.attack-square {
  width: 18px;
  height: 18px;
  border: 2px solid #6afffd;
  margin: 0 2px;
  border-radius: 5px;
  display: inline-block;
  background: #232a40;
  transition: background 0.2s;
}

.attack-square.used {
  background: #ffe066;
  border-color: #ffe066;
  box-shadow: 0 0 7px #ffe06699;
}

.mp-use-btn {
  margin-top: 18px;
  width: 100%;
  font-size: 1.0em;
  justify-content: center;
  /* Center text since btn is flex */
  /* Remove background/border/clip-path as btn-primary handles them */
  box-shadow: 0 1px 8px #00fff055;
  /* Keep specific shadow if desired, or let btn-primary handle it */
  white-space: nowrap;
  padding: 0 20px;
  /* Add horizontal padding */
}

.cro-text {
  color: #ffd534;
  font-weight: 900;
  font-size: 1.2em;
  /* Make CRO larger */
  text-shadow: 0 0 4px rgba(255, 213, 52, 0.6);
  transition: color 0.15s, text-shadow 0.15s;
  vertical-align: middle;
  /* Align with other text if size differs */
  margin: 0 1px;
  /* Slight spacing if needed, but span structure should handle it */
}

/* On hover, change the main text color (MINT/SSOVER) to white (or keep black if preferred, but user asked for change) */
.mp-use-btn:hover {
  color: #fff;
  /* Rest of letters become white */
}

/* Ensure CRO stays yellow or brightens on hover */
.mp-use-btn:hover .cro-text {
  color: #ffe066;
  /* Lighter yellow */
  text-shadow: 0 0 8px #ffe066;
}

.mp-selected {
  /* The animated glow (lavender/light purple) */
  box-shadow: 0 0 12px 2px #bb9aff, 0 0 32px 10px #ae88f580,
    0 0 120px 40px #d2a5ff30;
  border: 2.5px solid #bb9aff;
  animation: lavender-glow 2.2s infinite alternate;
  z-index: 1;
}

.mp-selected .polygon-title {
  box-shadow: 0 0 16px 6px #bb9aff99, 0 0 2px #c7a4ff;
  border-color: #bb9aff;
  transition: box-shadow 0.5s;
}

@keyframes lavender-glow {
  from {
    box-shadow: 0 0 10px 2px #bb9aff, 0 0 28px 6px #ae88f540,
      0 0 40px 16px #d2a5ff20;
    border-color: #bb9aff;
  }

  to {
    box-shadow: 0 0 18px 4px #d2a5ff, 0 0 48px 16px #c7a4ff90,
      0 0 120px 54px #b9b0ff45;
    border-color: #c7a4ff;
  }
}

/* Combat modal & accordion */
#combat-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

#combat-modal .combat-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

#combat-modal .combat-modal {
  position: absolute;
  inset: 10% 8%;
  background: #0d0f13;
  color: #e8eef7;
  border: 1px solid #222a36;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}

.combat-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #1b2330;
}

.combat-modal__participants {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #1b2330;
}

.combat-modal__participants .label {
  font-weight: 700;
  margin-bottom: 6px;
}

.combat-modal__participants .stats {
  font-size: 12px;
  opacity: 0.9;
}

#combat-close {
  background: #1a2230;
  border: 1px solid #2a3342;
  color: #dbe7ff;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.combat-accordion {
  padding: 8px 16px 16px;
  overflow: auto;
}

.round {
  border: 1px solid #1b2330;
  border-radius: 10px;
  margin-top: 8px;
  background: #0f1218;
}

.round summary {
  cursor: pointer;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  list-style: none;
}

.round summary::-webkit-details-marker {
  display: none;
}

.round .r {
  font-weight: 700;
  width: 94px;
}

.round .hp {
  margin-left: auto;
  opacity: 0.9;
}

.round .result {
  font-weight: 700;
}

.round-body {
  padding: 10px 12px 12px;
}

.ab {
  font-size: 13px;
  padding: 4px 0;
}

.ab--muted {
  opacity: 0.7;
  font-style: italic;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.card {
  background: #0f1218;
  border: 1px solid #1b2330;
  border-radius: 10px;
}

.card .card-body {
  padding: 12px;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  background: #1a2230;
  border: 1px solid #2a3342;
  color: #dbe7ff;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-small {
  padding: 4px 8px;
  font-size: 12px;
}

.muted {
  opacity: .8;
  font-size: 12px;
  margin: 2px 0 6px;
}

/* Center the level number inside the polygon chip */
.polygon-title {
  position: relative;
  display: inline-block;
  /* if your polygon asset already sets size via class (polygon-3..9), keep those;
     otherwise ensure a base size here, e.g. width/height 28–32px */
}

.polygon-title .polygon-level {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  /* tweak to fit your polygon */
  font-weight: 700;
  color: #e710dd;
  /* readable on your polygon bg */
  text-shadow: 0 0 6px rgba(0, 255, 255, .5);
  pointer-events: none;
  /* clicks pass through to the card */
}

/* ===== Poster UI — dark industrial look ===== */
:root {
  --bg: #0B0B12;
  --panel: #0f1218;
  --ink: #e9ecff;
  --muted: #8b93b7;
  --accent: #a30b17;
  /* red stamp */
  --violet: #8c61ff;
  /* brand glow */
  --grid: #171b28;
}

body {
  background: var(--bg);
  color: var(--ink);
}

/* framed glass panels */
.frame {
  border: 2px solid #202437;
  box-shadow: inset 0 0 0 1px #0e1020;
  border-radius: 12px;
}

.glass {
  background: rgba(255, 255, 255, .035);
  backdrop-filter: blur(8px);
}

.gridbg {
  background:
    linear-gradient(to right, var(--grid) 1px, transparent 1px) 0 0/48px 48px,
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px) 0 0/48px 48px;
}

/* poster headings (works with Oxanium already loaded) */
.poster {
  font-size: clamp(40px, 7vw, 92px);
  line-height: .9;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* hero asset on glow */
.hero-asset {
  width: min(540px, 70vw);
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, .6)) drop-shadow(0 0 24px rgba(140, 97, 255, .15));
}

/* barcode / glitch separator */
.sep-barcode {
  height: 38px;
  background:
    repeating-linear-gradient(90deg, #fff 0 6px, transparent 6px 10px),
    repeating-linear-gradient(90deg, transparent 0 22px, #fff1 22px 24px);
  opacity: .12;
  border-radius: 6px;
}

/* red brush stamp overlay */
.stamp {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  mix-blend-mode: screen;
}

.stamp img {
  max-width: min(65vw, 820px);
  opacity: .22;
  transform: translateY(2%);
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .45));
}

/* compact badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #2a2f46;
  background: #10121b;
  font: 600 11px/1.1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: #cbd3ff;
}

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--violet);
}

/* buttons */
.btn {
  padding: .85rem 1.15rem;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--violet);
  color: #000;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-ghost {
  background: transparent;
  border-color: #2a2f46;
}

.btn-ghost:hover {
  border-color: #3d4466;
}

/* header bar facelift (works with your existing header markup) */
header .w3-bar {
  background: linear-gradient(180deg, #0c0f16 0%, #0a0d14 100%);
  border-bottom: 1px solid #1b2330;
  border-top: 1px solid #0b0f18;
}

.nav-logo {
  height: 42px;
}

.w3-bar .w3-bar-item {
  color: #cbd3ff;
}

.w3-bar .w3-bar-item:hover {
  color: #ffe066;
}

/* === HERO layout: Leila beside title =================================== */
.hero-section {
  min-height: 56vh;
  display: flex;
  align-items: center;
}

.poster-panel {
  position: relative;
  overflow: hidden;
  padding: 32px;
}

.poster-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  /* text | art */
  align-items: end;
  /* align bottoms neatly */
  column-gap: 18px;
}

.poster-left {
  position: relative;
  z-index: 2;
}

.poster-left .badge,
.poster-left .poster,
.poster-left p,
.poster-left .cta-row {
  position: relative;
  z-index: 3;
}

/* Leila sizing: about the size of the title block */
.poster-art-wrap {
  display: flex;
  align-items: end;
  justify-content: center;
  min-width: 220px;
}

.poster-art {
  height: clamp(140px, 24vw, 240px);
  /* small on desktop */
  max-width: 28vw;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 38px rgba(0, 0, 0, .55)) drop-shadow(0 0 14px rgba(140, 97, 255, .14));
  pointer-events: none;
  user-select: none;
}

/* Keep FR33 behind text only */
.stamp {
  z-index: 1;
}

/* Mobile: text first (FR33 behind), Leila below, slightly larger */
@media (max-width: 860px) {
  .poster-grid {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }

  .poster-art {
    height: clamp(180px, 34vw, 260px);
    max-width: 70vw;
  }
}

/* === World section — compact map ======================================= */
.world-wrap {
  margin: 32px auto 0;
  max-width: 1200px;
}

.world-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 980px) {
  .world-grid {
    grid-template-columns: 1fr;
  }
}

.map-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #202437;
  box-shadow: inset 0 0 0 1px #0e1020, 0 12px 32px rgba(0, 0, 0, .28);
  background: #0f1218;
  max-width: 420px;
  /* hard cap width */
}

.map-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  /* hard cap height */
  object-fit: contain;
}

.map-caption {
  font: 600 11px/1.2 ui-monospace, Menlo, Consolas, monospace;
  color: #9aa3d9;
  opacity: .85;
  padding: 10px 12px;
  border-top: 1px solid #1a2034;
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, 0));
}

/* Desktop: Leila left, text right. Mobile: text first, Leila below */
.poster-grid {
  grid-template-columns: auto 1fr;
}

/* art | text */
.poster-art-wrap.art-first {
  order: 1;
  justify-content: flex-start;
}

.poster-left.text-second {
  order: 2;
}

@media (max-width: 860px) {
  .poster-grid {
    grid-template-columns: 1fr;
  }

  .poster-art-wrap.art-first {
    order: 2;
    justify-content: center;
  }

  /* Leila below */
  .poster-left.text-second {
    order: 1;
  }

  /* text first */
}

/* Keep hero text aligned consistently */
.poster-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* align text + buttons flush left */
  max-width: 480px;
  /* cap width for good reading line length */
}

.poster-left .poster {
  text-align: left;
  /* prevent center alignment */
  margin: 0.35em 0 0 0;
  line-height: .95;
}

.poster-left p {
  text-align: left;
}

.poster-left .cta-row {
  justify-content: flex-start;
}

/* ==== HERO: art left, text right; Leila vertically centered & small ==== */
.hero-section {
  min-height: 56vh;
  display: flex;
  align-items: center;
}

.poster-panel {
  position: relative;
  overflow: hidden;
  padding: 32px;
}

/* Use a single, definitive grid for the hero panel */
.poster-panel .poster-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  /* art | text */
  column-gap: 18px;
  align-items: center;
  /* <-- vertical centering fix */
}

/* Desktop order: art first (left), text second (right) */
.poster-panel .poster-art-wrap {
  order: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.poster-panel .poster-left {
  order: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 820px;
}

/* Leila size: roughly headline height; fully contained */
.poster-panel .poster-art {
  height: clamp(220px, 30vw, 420px);
  max-width: 28vw;
  width: auto;
  object-fit: contain;
  object-position: center;
  /* keeps her centered in the column */
  filter: drop-shadow(0 18px 38px rgba(0, 0, 0, .55)) drop-shadow(0 0 14px rgba(140, 97, 255, .14));
  pointer-events: none;
  user-select: none;
}

/* Ensure FR33 sits behind text but under UI */
.poster-panel .stamp {
  z-index: 1;
}

.poster-panel .poster-left .badge,
.poster-panel .poster-left .poster,
.poster-panel .poster-left p,
.poster-panel .poster-left .cta-row {
  position: relative;
  z-index: 3;
  text-align: left;
}

/* Mobile: stack; TEXT FIRST (FR33 behind), Leila below & a touch larger */
@media (max-width: 860px) {
  .poster-panel .poster-grid {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }

  .poster-panel .poster-left {
    order: 1;
  }

  .poster-panel .poster-art-wrap {
    order: 2;
    justify-content: center;
  }

  .poster-panel .poster-art {
    height: clamp(180px, 34vw, 260px);
    max-width: 80vw;
  }
}

/* ==== WORLD / MAP: smaller cap so it never dominates =================== */
.world-wrap {
  margin: 32px auto 0;
  max-width: 1200px;
}

.world-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 980px) {
  .world-grid {
    grid-template-columns: 1fr;
  }
}

.map-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #202437;
  box-shadow: inset 0 0 0 1px #0e1020, 0 12px 32px rgba(0, 0, 0, .28);
  background: #0f1218;
  max-width: 360px;
  /* smaller cap */
}

.map-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  /* smaller cap */
  object-fit: contain;
}

.map-caption {
  font: 600 11px/1.2 ui-monospace, Menlo, Consolas, monospace;
  color: #9aa3d9;
  opacity: .85;
  padding: 10px 12px;
  border-top: 1px solid #1a2034;
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, 0));
}

.world-copy {
  max-width: 560px;
}

.world-title {
  font-size: clamp(28px, 4.2vw, 48px);
  margin: .45em 0 0 0;
}

.world-lede {
  color: #cbd3ff;
  opacity: .9;
  margin-top: 10px;
}

.world-list {
  margin-top: 10px;
  color: #b7c0ff;
}

.world-ctas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}


/* === FUNNEL LAYOUT === */

/* === FUNNEL LAYOUT === */

.funnel-section {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  background:
    linear-gradient(rgba(11, 11, 18, 0.9), rgba(11, 11, 18, 0.95)),
    repeating-linear-gradient(0deg, transparent 0, transparent 1px, rgba(0, 255, 240, 0.03) 1px, rgba(0, 255, 240, 0.03) 2px),
    radial-gradient(circle at 50% 30%, #2a1f3d 0%, #0B0B12 60%);
  background-size: 100% 100%, 100% 4px, 100% 100%;
  position: relative;
  overflow: hidden;
}

.funnel-container {
  max-width: 1100px;
  width: 100%;
  z-index: 2;
  position: relative;
}

/* Character Overlay */
/* Character Overlay */
.funnel-character-overlay {
  position: absolute;
  top: 20px;
  /* Starts roughly mid-headline */
  right: 40px;
  width: 320px;
  height: 380px;
  /* Ends roughly at top of content/bottom of tabs */
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.character-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(140, 97, 255, 0.3));
  /* Reduced mask to keep feet more visible if "standing" on tabs */
  mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
  pointer-events: none;
}

.character-tag {
  position: absolute;
  bottom: 40px;
  right: 20px;
  text-align: right;
}

.tag-name {
  display: block;
  font-family: 'Oxanium', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-bottom: -10px;
  margin-right: 10px;
}

.tag-brush {
  width: 180px;
  transform: rotate(-5deg);
  opacity: 0.9;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

/* Hero Text */
.funnel-hero-text {
  text-align: left;
  margin-bottom: 60px;
  position: relative;
  z-index: 5;
  padding-left: 20px;
}

.funnel-headline {
  font-family: 'Teko', sans-serif;
  font-size: clamp(4rem, 8vw, 7rem);
  line-height: 0.85;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: 2px;
  position: relative;
  text-shadow: 2px 2px 0px rgba(0, 255, 240, 0.3);
}

/* Glitch Effect */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0B0B12;
}

.glitch::before {
  left: 2px;
  text-shadow: -1px 0 #ff00c1;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim-1 5s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: -1px 0 #00fff9;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim-2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% {
    clip: rect(30px, 9999px, 10px, 0);
  }

  5% {
    clip: rect(70px, 9999px, 90px, 0);
  }

  10% {
    clip: rect(20px, 9999px, 50px, 0);
  }

  15% {
    clip: rect(80px, 9999px, 10px, 0);
  }

  20% {
    clip: rect(10px, 9999px, 40px, 0);
  }

  100% {
    clip: rect(50px, 9999px, 60px, 0);
  }
}

@keyframes glitch-anim-2 {
  0% {
    clip: rect(10px, 9999px, 80px, 0);
  }

  5% {
    clip: rect(50px, 9999px, 20px, 0);
  }

  10% {
    clip: rect(90px, 9999px, 10px, 0);
  }

  15% {
    clip: rect(30px, 9999px, 60px, 0);
  }

  20% {
    clip: rect(60px, 9999px, 30px, 0);
  }

  100% {
    clip: rect(20px, 9999px, 70px, 0);
  }
}

.funnel-subhead {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-family: 'Oxanium', monospace;
  letter-spacing: 1px;
  opacity: 0.8;
  margin-left: 4px;
}

/* Tabs */
.funnel-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  position: relative;
  z-index: 5;
  padding-left: 20px;
}

.funnel-tab-btn {
  background: rgba(15, 18, 24, 0.6);
  border: 1px solid var(--border-bright);
  color: var(--text-muted);
  padding: 16px 40px;
  font-family: 'Oxanium', sans-serif;
  font-weight: 500;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 4px;
  min-width: 200px;
  text-align: left;
  position: relative;
  backdrop-filter: blur(4px);
}

.funnel-tab-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
  box-shadow: 0 0 15px rgba(0, 255, 240, 0.1);
}

.funnel-tab-btn.active {
  background: linear-gradient(90deg, rgba(140, 97, 255, 0.2) 0%, rgba(140, 97, 255, 0) 100%);
  border-color: var(--accent-secondary);
  color: #fff;
  box-shadow: 0 0 20px rgba(140, 97, 255, 0.2), inset 0 0 10px rgba(140, 97, 255, 0.1);
  text-shadow: 0 0 8px rgba(140, 97, 255, 0.6);
}

.funnel-tab-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-secondary);
  box-shadow: 0 0 10px var(--accent-secondary);
}

/* Display Port */
.funnel-display-port {
  background: rgba(15, 18, 24, 0.8);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  padding: 50px;
  min-height: 400px;
  position: relative;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  margin: 0 20px;
}

.funnel-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.funnel-content.hidden {
  display: none;
}

.funnel-content-headline {
  font-family: 'Oxanium', sans-serif;
  font-size: 2.5rem;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 24px;
  text-transform: uppercase;
  font-weight: 600;
}

.funnel-content-body {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 45ch;
  font-family: 'Inter', sans-serif;
}

.funnel-action-btn {
  display: inline-block;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-bright);
  color: var(--text-primary);
  padding: 14px 28px;
  font-family: 'Oxanium', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 0.9rem;
}

.funnel-action-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-primary);
  color: #fff;
}

/* Visual / Code Block */
.funnel-visual {
  position: relative;
  height: 100%;
  min-height: 300px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
  font-family: 'Courier New', monospace;
  overflow: hidden;
}

.code-block {
  color: var(--accent-primary);
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0.8;
}

.code-line {
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 700;
}

.code-content {
  word-break: break-all;
  opacity: 0.6;
}

.signal-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 20px;
  background: rgba(0, 255, 240, 0.1);
  border-top: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  font-family: 'Oxanium', monospace;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.signal-bar.active {
  background: var(--accent-primary);
  color: #000;
  box-shadow: 0 0 20px rgba(0, 255, 240, 0.4);
}

@media (max-width: 1024px) {
  .funnel-character-overlay {
    display: none;
    /* Hide on smaller screens for simplicity */
  }

  .funnel-headline {
    font-size: 4rem;
  }
}

@media (max-width: 768px) {
  .funnel-content {
    grid-template-columns: 1fr;
  }

  .funnel-display-port {
    padding: 24px;
    /* Reduced from 50px */
    margin: 0 10px;
    /* Reduced margin */
  }

  .funnel-tabs {
    flex-direction: column;
    gap: 10px;
    padding-left: 10px;
    /* Align with reduced margin */
  }

  .funnel-tab-btn {
    width: 100%;
  }

  .funnel-content-body {
    max-width: 100%;
    /* Ensure text wraps */
  }
}

.printing-grid.is-loading {
  opacity: 0.75;
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0% {
    opacity: 0.75;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.98);
  }

  100% {
    opacity: 0.75;
    transform: scale(1);
  }
}

/* --- TRAIT INFLUENCE GUIDE (TIG) STYLES --- */
.tig-wrapper {
  background: linear-gradient(135deg, rgba(11, 11, 20, 0.95) 0%, rgba(20, 10, 30, 0.95) 100%);
  border: 1px solid var(--border-bright);
  border-radius: 16px;
  padding: 32px;
  margin: 40px 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  color: var(--text-primary);
  font-family: 'Oxanium', sans-serif;
  overflow: hidden;
  position: relative;
}

.tig-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(0, 255, 240, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 240, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.tig-content {
  position: relative;
  z-index: 1;
}

.tig-header {
  text-align: center;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-bright);
  padding-bottom: 20px;
}

.tig-title {
  font-family: 'Teko', sans-serif;
  font-size: 3rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 16px;
  text-shadow: 0 0 10px rgba(140, 97, 255, 0.5);
  line-height: 1;
}

.tig-subtitle {
  font-family: 'Oxanium', monospace;
  color: var(--accent-primary);
  font-size: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.tig-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.tig-legend-item {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
}

.tig-legend-item span {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
}

.tig-legend-block span {
  background: var(--accent-secondary);
  box-shadow: 0 0 8px var(--accent-secondary);
}

.tig-legend-power span {
  background: var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold);
}

.tig-legend-coll span {
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
}

.tig-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .tig-main-grid {
    grid-template-columns: 1fr;
  }
}

.tig-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 1.1rem;
}

.tig-guidance {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 16px;
  display: block;
}

/* BLOCK TIER TIMELINE */
.tig-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 20px;
  border-left: 2px solid var(--border-subtle);
  margin-left: 10px;
}

.tig-timeline-node {
  position: relative;
  padding: 0 0 24px 20px;
}

.tig-timeline-node::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent-secondary);
  box-shadow: 0 0 6px var(--accent-secondary);
  z-index: 2;
}

.tig-tier-name {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.tig-tier-cue {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* POWER TIER TABLE */
.tig-power-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.tig-power-table th {
  text-align: left;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  padding: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.tig-power-table td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tig-bonus {
  color: var(--accent-gold);
  font-weight: 700;
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
}

.tig-formula {
  margin-top: 16px;
  padding: 12px;
  background: rgba(255, 213, 52, 0.1);
  border-left: 3px solid var(--accent-gold);
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* COLLECTIONS GRID */
.tig-collections {
  margin-top: 40px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
}

.tig-section-header {
  text-align: center;
  margin-bottom: 20px;
}

.tig-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.tig-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}

.tig-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tig-card-title {
  color: #fff;
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 1rem;
}

.tig-card-style {
  color: var(--accent-primary);
  font-size: 0.85rem;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.tig-card-influences {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
}

.tig-card-influences strong {
  color: var(--text-secondary);
}

/* NEUTRAL FOOTER */
.tig-footer {
  margin-top: 40px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px dashed var(--border-bright);
  text-align: center;
}

/* --- FACTIONS & TRILEMMA STYLES --- */
#factions-trilemma {
  margin-top: 60px;
}

.faction-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 32px;
}

@media (max-width: 1200px) {
  .faction-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .faction-grid {
    grid-template-columns: 1fr;
  }
}

.faction-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.faction-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.faction-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.faction-name {
  color: #fff;
  font-family: 'Oxanium', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.faction-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent-primary);
  background: rgba(0, 255, 240, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.faction-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
}

.stat-label {
  width: 15px;
  font-weight: 700;
  color: var(--text-muted);
}

.stat-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.stat-bar {
  height: 100%;
  border-radius: 3px;
}

.stat-value {
  width: 20px;
  text-align: right;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
}

/* Stat Colors */
.stat-s .stat-bar {
  background: var(--accent-gold);
  box-shadow: 0 0 6px var(--accent-gold);
}

.stat-s .stat-value {
  color: var(--accent-gold);
}

.stat-d .stat-bar {
  background: var(--accent-secondary);
  box-shadow: 0 0 6px var(--accent-secondary);
}

.stat-d .stat-value {
  color: var(--accent-secondary);
}

.stat-c .stat-bar {
  background: var(--accent-primary);
  box-shadow: 0 0 6px var(--accent-primary);
}

.stat-c .stat-value {
  color: var(--accent-primary);
}

.faction-lore {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: auto;
  font-style: italic;
}