/* ---------------------------------------------------------------------------
   Demo-page-only styles: the screen switcher chrome and per-demo layout.
   Nothing in this file is part of the framework itself.
--------------------------------------------------------------------------- */

body {
  margin: 0;
  min-height: 100vh;
  background-color: #0b0e13;
  background-image: radial-gradient(
      ellipse at 20% -10%,
      rgba(66, 92, 128, 0.35),
      transparent 55%
    ),
    radial-gradient(ellipse at 90% 0%, rgba(82, 47, 101, 0.25), transparent 50%),
    linear-gradient(180deg, #10151c 0%, #0b0e13 40%);
  background-attachment: fixed;
}

/* -- top bar / demo switcher ---------------------------------------------- */

.demo-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 0.9rem 2rem;
  background-color: rgba(8, 11, 15, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.demo-topbar .brand {
  font-size: 0.95rem;
  letter-spacing: 0.35rem;
  text-transform: uppercase;
  color: #fcedd3;
  white-space: nowrap;
}

.demo-topbar .brand a {
  color: inherit;
  text-decoration: none;
}

.demo-topbar .nav-tabs {
  gap: 1.5rem;
  flex: 1;
}

.demo-topbar .nav-tabs .nav-tab {
  font-size: 1rem;
  letter-spacing: 0.25rem;
}

.demo-topbar .back-link {
  font-size: 0.8rem;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  white-space: nowrap;
}

.demo-topbar .back-link:hover {
  color: #fff;
}

/* -- screens ---------------------------------------------------------------- */

.demo-screen {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6.5rem 2rem 4rem;
}

.demo-screen.active {
  display: block;
  animation: screen-in 0.25s ease-out;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.screen-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

/* -- character screen -------------------------------------------------------- */

.char-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 23rem);
  gap: 2.5rem;
  align-items: start;
}

.char-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.char-row .slot-label {
  width: 6.5rem;
  padding-top: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  color: #8d949b;
  text-align: right;
}

.char-detail {
  position: sticky;
  top: 5.5rem;
}

.char-detail .detail-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.char-power {
  text-align: right;
}

.char-power .power-number {
  font-size: 2.4rem;
  line-height: 1;
  color: #eade8b;
}

.char-power .power-caption {
  font-size: 0.75rem;
  letter-spacing: 0.25rem;
  text-transform: uppercase;
  color: #8d949b;
}

/* -- vendor screen ---------------------------------------------------------- */

.vendor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 23rem);
  gap: 2.5rem;
  align-items: start;
}

.vendor-wares {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 1.25rem;
}

.ware {
  position: relative;
  padding: 1rem;
  text-align: center;
  background-color: rgba(14, 18, 23, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: border-color 0.1s ease-in-out, background-color 0.1s ease-in-out;
}

.ware:hover,
.ware.selected {
  border-color: rgba(255, 255, 255, 0.85);
  background-color: rgba(255, 255, 255, 0.07);
}

.ware .ware-name {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  color: #fff;
}

.ware .ware-price {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: #b6bbb7;
}

.ware.owned {
  opacity: 0.45;
}

.ware.owned::after {
  content: "Owned";
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.currency {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  color: #fff;
}

.currency .shard {
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #b184c5, #522f65);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* -- settings screen --------------------------------------------------------- */

.settings-layout {
  max-width: 46rem;
}

.settings-panel {
  display: none;
}

.settings-panel.active {
  display: block;
}

/* -- scoreboard --------------------------------------------------------------- */

.score-teams {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 2rem;
}

.score-teams > div {
  flex: 1;
  min-width: 16rem;
}

/* -- toast --------------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 2.5rem;
  transform: translateX(-50%) translateY(1rem);
  padding: 0.7rem 1.6rem;
  font-size: 0.9rem;
  letter-spacing: 0.25rem;
  text-transform: uppercase;
  color: #fff;
  background-color: rgba(8, 11, 15, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
  z-index: 60;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%);
}

/* -- responsive ----------------------------------------------------------------- */

@media (max-width: 950px) {
  .char-layout,
  .vendor-layout {
    grid-template-columns: 1fr;
  }

  .char-detail {
    position: static;
  }

  .demo-topbar {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
  }

  .demo-screen {
    padding: 9rem 1.25rem 3rem;
  }

  .char-row .slot-label {
    display: none;
  }
}
