/* ==========================================================================
   Dragon Nest Paradox — V8
   01. Logo fit corrections (overrides squashed V2/V4/V6 image rules)
   02. Navbar redesign
   03. Mobile drawer
   04. Player pulse (online / total player counters)
   05. Trailer modal
   06. Responsive
   ========================================================================== */

/* -- 01. Logo fit --------------------------------------------------------- */
/*
   V2, V4 and V6 all force the brand image to a fixed square (34×34, 44×44).
   The real crest artwork is not square, so those rules cropped and squashed it.
   These selectors are deliberately more specific and reset width to auto.
*/
.nav .brand .brand-lockup--nav img,
.nav--v4 .brand .brand-lockup--nav img,
.nav--v8 .brand .brand-lockup--nav img {
  width: auto;
  height: 38px;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(255, 61, 79, 0.42));
}

/* Nav brand is now logo-only (no "DRAGON NEST / PARADOX" wordmark next to
   it — the crest already reads as the mark). The old rule reserved 215px
   for that text; drop it so the crest doesn't sit in a wide empty box, and
   size the mark up a little since it's the sole brand element here. */
.nav--v8 .brand {
  min-width: 0;
  padding-left: 2px;
}

.nav--v8 .brand .brand-lockup--nav img {
  height: 46px;
}

.nav--v8.nav--solid .brand .brand-lockup--nav img {
  height: 40px;
}

.footer .footer__brand .brand-lockup--footer img,
.footer--v4 .footer__brand .brand-lockup--footer img {
  width: auto;
  height: 32px;
  max-width: none;
  object-fit: contain;
}

.dnp-intro .dnp-intro__brand img.dnp-intro__logo,
.dnp-intro__brand img.dnp-intro__logo {
  width: min(260px, 48vw);
  height: auto;
  max-width: none;
  margin-bottom: 18px;
  object-fit: contain;
  filter: drop-shadow(0 0 38px rgba(255, 61, 79, 0.4));
}

/* The V4 nav clip-path cuts the bottom-left corner; without extra padding the
   crest sat inside that cut and looked sliced. */
.nav--v8 .brand {
  padding-left: 6px;
}

/* -- 02. Navbar ----------------------------------------------------------- */
.nav.nav--v8 {
  --nav-accent: var(--ember, #ff3d4f);
  --nav-accent-2: #64efff;

  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  display: block;
  height: auto;
  padding: 14px 22px 0;
  background: none;
  border: 0;
  backdrop-filter: none;
  clip-path: none;
  transition: padding 0.32s ease;
}

.nav.nav--v8:before,
.nav.nav--v8:after {
  content: none;
}

.nav--v8 .nav__bar {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  height: 66px;
  padding: 0 16px 0 14px;
  border: 1px solid rgba(196, 218, 255, 0.11);
  background: linear-gradient(100deg, rgba(5, 7, 16, 0.92), rgba(9, 11, 24, 0.66) 48%, rgba(5, 7, 16, 0.9));
  backdrop-filter: blur(18px) saturate(1.2);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  transition: height 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

/* Hairline that runs the width of the bar and glows from both ends. */
.nav--v8 .nav__bar:after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--nav-accent), transparent 22%, transparent 78%, var(--nav-accent-2));
  opacity: 0.7;
  box-shadow: 0 0 12px rgba(255, 61, 79, 0.4);
}

.nav--v8.nav--solid {
  padding-top: 8px;
}

.nav--v8.nav--solid .nav__bar {
  height: 60px;
  background: rgba(4, 6, 14, 0.95);
  border-color: rgba(196, 218, 255, 0.16);
}

/* Scroll progress rail under the bar. */
.nav--v8 .nav__progress {
  display: block;
  height: 2px;
  margin: 0 22px;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--nav-accent), #8d3cff 55%, var(--nav-accent-2));
  box-shadow: 0 0 14px rgba(255, 61, 79, 0.45);
  transition: transform 0.12s linear;
}

/* Links ------------------------------------------------------------------ */
.nav--v8 .nav__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 0.9vw, 14px);
  min-width: 0;
}

.nav--v8 .nav__links a {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 10px 11px;
  color: #8e9bb2;
  overflow: hidden;
  transition: color 0.24s ease;
}

.nav--v8 .nav__links a b {
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.17em;
}

.nav--v8 .nav__links a em {
  font-style: normal;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #3f4859;
  transition: color 0.24s ease;
}

/* Diagonal wipe that fills in on hover. */
.nav--v8 .nav__links a:before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, color-mix(in srgb, var(--nav-accent) 22%, transparent), transparent 72%);
  transform: translateX(-102%) skewX(-16deg);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav--v8 .nav__links a:after {
  content: '';
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 6px;
  height: 1px;
  background: var(--nav-accent);
  box-shadow: 0 0 10px var(--nav-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav--v8 .nav__links a:hover {
  color: #fff;
}

.nav--v8 .nav__links a:hover:before {
  transform: translateX(0) skewX(-16deg);
}

.nav--v8 .nav__links a:hover:after,
.nav--v8 .nav__links a.is-active:after {
  transform: scaleX(1);
}

.nav--v8 .nav__links a.is-active {
  color: #fff;
  text-shadow: 2px 0 rgba(255, 61, 79, 0.28), -2px 0 rgba(100, 239, 255, 0.18);
}

.nav--v8 .nav__links a.is-active em {
  color: var(--nav-accent);
}

/* Actions ---------------------------------------------------------------- */
.nav--v8 .nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav--v8 .nav__divider {
  width: 1px;
  height: 22px;
  background: rgba(196, 218, 255, 0.14);
}

.nav--v8 .nav__login {
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.18em;
  color: #9dabc2;
  transition: color 0.22s ease;
}

.nav--v8 .nav__login:hover {
  color: #fff;
}

.nav--v8 .nav__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  height: 38px;
  padding: 0 15px;
  overflow: hidden;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.17em;
  color: #fff;
  background: linear-gradient(110deg, #b7121f, #ff3d4f 52%, #8d3cff);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  box-shadow: 0 10px 26px rgba(183, 18, 31, 0.32);
  transition: transform 0.24s ease, filter 0.24s ease;
}

.nav--v8 .nav__cta:before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 22%, rgba(255, 255, 255, 0.34), transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.nav--v8 .nav__cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.nav--v8 .nav__cta:hover:before {
  transform: translateX(120%);
}

.nav--v8 .nav__cta i {
  font-style: normal;
  font-size: 12px;
}

.nav--v8 .quality {
  padding: 4px 7px;
  border-color: rgba(196, 218, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

/* Toggle ----------------------------------------------------------------- */
.nav--v8 .nav__toggle {
  display: none;
  position: relative;
  width: 42px;
  height: 38px;
  border: 1px solid rgba(196, 218, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.nav--v8 .nav__toggle i {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1.5px;
  background: #d7e1f0;
  transition: transform 0.28s ease, opacity 0.2s ease;
}

.nav--v8 .nav__toggle i:first-child {
  top: 14px;
}

.nav--v8 .nav__toggle i:last-child {
  bottom: 14px;
}

.nav--v8.nav--open .nav__toggle i:first-child {
  transform: translateY(7px) rotate(45deg);
  background: var(--nav-accent);
}

.nav--v8.nav--open .nav__toggle i:last-child {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--nav-accent);
}

/* -- 03. Drawer ----------------------------------------------------------- */
.nav--v8 .nav__drawer {
  display: none;
}

.nav--v8 .nav__drawer[hidden] {
  display: none;
}

.nav--v8 .nav__drawer-inner {
  display: flex;
  flex-direction: column;
}

.nav--v8 .nav__drawer a {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: baseline;
  gap: 4px 12px;
  padding: 15px 6px;
  border-bottom: 1px solid rgba(196, 218, 255, 0.1);
  color: #9dabc2;
}

.nav--v8 .nav__drawer a span {
  grid-row: 1 / 3;
  font-size: 8px;
  font-weight: 900;
  color: #454f63;
}

.nav--v8 .nav__drawer a b {
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.nav--v8 .nav__drawer a em {
  font-style: normal;
  font-size: 8px;
  letter-spacing: 0.14em;
  color: #59647c;
}

.nav--v8 .nav__drawer a.is-active {
  color: #fff;
  box-shadow: inset 2px 0 0 var(--nav-accent);
}

.nav--v8 .nav__drawer-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 20px;
}

/* -- 04. Player pulse ----------------------------------------------------- */
.pulse i[data-live] {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6dffb0;
  box-shadow: 0 0 10px #6dffb0;
}

.pulse i[data-live='true'] {
  animation: pulseBlink 2.4s ease-in-out infinite;
}

@keyframes pulseBlink {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.82);
  }
}

/* Nav pill --------------------------------------------------------------- */
.pulse--nav {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(109, 255, 176, 0.22);
  background: rgba(109, 255, 176, 0.05);
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
  white-space: nowrap;
}

.pulse--nav span {
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.18em;
  color: #6d7b91;
}

.pulse--nav b {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: -0.01em;
  color: #cffbe4;
  font-variant-numeric: tabular-nums;
}

/* Hero strip ------------------------------------------------------------- */
.pulse--hero {
  display: flex;
  gap: 1px;
  background: rgba(196, 218, 255, 0.12);
  border: 1px solid rgba(196, 218, 255, 0.12);
}

.pulse--hero > div {
  min-width: 132px;
  padding: 11px 15px;
  background: rgba(4, 6, 14, 0.78);
  backdrop-filter: blur(10px);
}

.pulse--hero span {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 6.5px;
  font-weight: 950;
  letter-spacing: 0.18em;
  color: #6a778d;
}

.pulse--hero b {
  display: block;
  margin-top: 6px;
  font-size: 19px;
  font-weight: 950;
  letter-spacing: -0.035em;
  color: #eef4ff;
  font-variant-numeric: tabular-nums;
}

/* Panel ------------------------------------------------------------------ */
.pulse--panel {
  padding: 26px 28px;
  border: 1px solid var(--v7-line, rgba(196, 218, 255, 0.13));
  background: radial-gradient(circle at 88% 12%, rgba(109, 255, 176, 0.09), transparent 44%),
    linear-gradient(140deg, rgba(12, 17, 33, 0.86), rgba(5, 8, 17, 0.9));
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.pulse--panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--v7-line, rgba(196, 218, 255, 0.13));
}

.pulse--panel header span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.2em;
  color: #6dffb0;
}

.pulse--panel header small {
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: #5c687f;
}

.pulse__figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 22px 0;
}

.pulse__figures span {
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.2em;
  color: #66728a;
}

.pulse__figures b {
  display: block;
  margin-top: 8px;
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 950;
  letter-spacing: -0.05em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.pulse__servers {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--v7-line, rgba(196, 218, 255, 0.13));
}

.pulse__servers li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--v7-line, rgba(196, 218, 255, 0.13));
  font-size: 10px;
}

.pulse__servers li:last-child {
  border-bottom: 0;
}

.pulse__servers span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #dbe4f3;
}

.pulse__servers em {
  font-style: normal;
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.15em;
}

.pulse__servers li[data-status='LIVE'] em {
  color: #6dffb0;
}

.pulse__servers li[data-status='BUSY'] em {
  color: #ffb347;
}

.pulse__servers li[data-status='MAINTENANCE'] em {
  color: #ff6d7d;
}

.pulse__servers b {
  font-size: 13px;
  font-weight: 950;
  color: #eef4ff;
  font-variant-numeric: tabular-nums;
}

/* Hero bottom bar now carries three blocks. */
.dnv4-hero__bottom {
  gap: 24px;
  flex-wrap: wrap;
}

/* -- 05. Trailer modal ---------------------------------------------------- */
.trailer {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: grid;
  place-items: center;
  padding: 24px;
  animation: trailerIn 0.24s ease both;
}

@keyframes trailerIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.trailer__scrim {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(2, 3, 9, 0.88);
  backdrop-filter: blur(9px);
  cursor: pointer;
}

.trailer__frame {
  position: relative;
  width: min(1040px, 100%);
  border: 1px solid rgba(196, 218, 255, 0.16);
  background: #05070f;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.trailer__frame header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(196, 218, 255, 0.12);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.2em;
  color: var(--ember, #ff3d4f);
}

.trailer__frame header button {
  border: 0;
  background: none;
  color: #94a2b9;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.16em;
  cursor: pointer;
}

.trailer__frame header button:hover {
  color: #fff;
}

.trailer__stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: radial-gradient(circle at 50% 45%, rgba(255, 61, 79, 0.12), transparent 46%), #04060d;
}

.trailer__stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.trailer__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.trailer__placeholder img {
  width: min(180px, 34vw);
  opacity: 0.85;
  margin-bottom: 18px;
  filter: drop-shadow(0 0 34px rgba(255, 61, 79, 0.32));
}

.trailer__placeholder b {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.2em;
  color: #dbe4f3;
}

.trailer__placeholder p {
  margin: 10px 0 18px;
  max-width: 420px;
  font-size: 11px;
  line-height: 1.7;
  color: #7b8799;
}

.trailer__placeholder code {
  color: #9ee7ff;
}

.trailer__placeholder a {
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.16em;
  color: var(--ember, #ff3d4f);
}

/* -- 06. Responsive ------------------------------------------------------- */
@media (max-width: 1280px) {
  .nav--v8 .nav__links a em {
    display: none;
  }
}

@media (max-width: 1140px) {
  .nav--v8 .nav__bar {
    grid-template-columns: auto 1fr auto;
  }

  .nav--v8 .nav__links,
  .nav--v8 .nav__actions {
    display: none;
  }

  .nav--v8 .nav__toggle {
    display: block;
    justify-self: end;
    grid-column: 3;
  }

  .nav--v8 .nav__drawer:not([hidden]) {
    display: block;
    margin-top: 10px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding: 18px 20px 26px;
    border: 1px solid rgba(196, 218, 255, 0.12);
    background: rgba(4, 6, 14, 0.97);
    backdrop-filter: blur(20px);
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
    animation: drawerIn 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  @keyframes drawerIn {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

@media (max-width: 760px) {
  .nav.nav--v8 {
    padding: 10px 12px 0;
  }

  .nav--v8 .nav__progress {
    margin: 0 12px;
  }

  .nav--v8 .nav__bar {
    height: 58px;
  }

  .nav .brand .brand-lockup--nav img,
  .nav--v8 .brand .brand-lockup--nav img {
    height: 34px;
  }

  .pulse--hero {
    width: 100%;
  }

  .pulse--hero > div {
    flex: 1;
    min-width: 0;
  }

  .pulse__figures {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse i[data-live='true'],
  .trailer,
  .nav--v8 .nav__drawer:not([hidden]) {
    animation: none !important;
  }

  .nav--v8 .nav__links a:before,
  .nav--v8 .nav__links a:after,
  .nav--v8 .nav__cta {
    transition: none !important;
  }
}

/* Population panel placement inside redesigned pages. */
.dnp-population {
  margin-bottom: 40px;
}

/* -- 07. Nav emblem breakout --------------------------------------------- */
/* Keep the clipped silhouette on the navbar background, not on its content,
   so the emblem can sit beyond the frame without being cropped. */
.nav--v8 .nav__bar,
.nav--v8.nav--solid .nav__bar {
  isolation: isolate;
  overflow: visible;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  clip-path: none;
  box-shadow: none;
}

.nav--v8 .nav__bar::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  border: 1px solid rgba(196, 218, 255, 0.11);
  background: linear-gradient(100deg, rgba(5, 7, 16, 0.92), rgba(9, 11, 24, 0.66) 48%, rgba(5, 7, 16, 0.9));
  backdrop-filter: blur(18px) saturate(1.2);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav--v8.nav--solid .nav__bar::before {
  border-color: rgba(196, 218, 255, 0.16);
  background: rgba(4, 6, 14, 0.95);
}

.nav--v8 .brand {
  position: relative;
  z-index: 2;
  align-self: stretch;
  width: 112px;
  min-width: 112px;
  padding: 0;
  overflow: visible;
}

.nav--v8 .brand-lockup--nav {
  position: absolute;
  display: inline-flex;
  top: 50%;
  left: 0;
  width: 112px;
  overflow: visible;
  transform: translateY(-50%);
}

.nav--v8 .brand .brand-lockup--nav img,
.nav--v8.nav--solid .brand .brand-lockup--nav img {
  width: 112px;
  height: auto;
  max-width: none;
}

.nav--v8 .brand-lockup__text {
  display: none !important;
}

/* Arta adds a tenth fighter slot to the archive. */
.fighter-roster__grid {
  grid-template-columns: repeat(10, minmax(70px, 1fr));
}

@media (max-width: 1280px) {
  .fighter-roster__grid {
    grid-template-columns: repeat(10, minmax(62px, 1fr));
  }
}

@media (max-width: 980px) {
  .fighter-roster__grid {
    grid-template-columns: repeat(10, 100px);
  }
}

@media (max-width: 760px) {
  .nav--v8 .brand {
    width: 94px;
    min-width: 94px;
  }

  .nav--v8 .brand-lockup--nav,
  .nav--v8 .brand .brand-lockup--nav img,
  .nav--v8.nav--solid .brand .brand-lockup--nav img {
    width: 94px;
    height: auto;
  }
}

@media (max-width: 650px) {
  .fighter-roster__grid {
    grid-template-columns: repeat(10, 88px);
  }
}

@media (max-width: 480px) {
  .fighter-roster__grid {
    grid-template-columns: repeat(10, 80px);
  }
}
